Jump to content
  • Advertisement
  • entries
    104
  • comments
    102
  • views
    260209

A C64 Game - Step 72

Sign in to follow this  
Endurion

1686 views

A rather simple step, remember the story page? Now the next chapter text has been put in place, as well as a cool off text after beating the first boss.

step72.pngstep72b.png


Analog to the ShowChapter routine we add a ShowChapterEnd routine.

!zone ShowChapterEnd
ShowChapterEnd
          ;clear screen
          lda #32
          ldy #1
          jsr ClearScreen
          jsr ResetObjects

          ldy CHAPTER
          lda CHAPTER_END_PAGES_LO,y
          sta ZEROPAGE_POINTER_1
          lda CHAPTER_END_PAGES_HI,y
          sta ZEROPAGE_POINTER_1 + 1

          lda #0
          sta VIC_SPRITE_ENABLE
          sta VIC_SPRITE_X_EXTEND
          sta SPRITE_POS_X_EXTEND

          lda #1
          sta PARAM1
          lda #1
          sta PARAM2
          jsr DisplayText
          jmp StoryLoop


The StoryLoop routine is a part of the original ShowChapter routine doing the car movement and wait for button part. We simply reuse the code.

At the .GotoNextLevel label we add this to actually call the new code.

          lda LEVEL_NR
          cmp #10
          beq .ShowStory
          cmp #21
          beq .ShowStory
          jmp .NoStory

.ShowStory
          jsr ShowChapterEnd
          inc CHAPTER
          jsr ShowChapter
          pla
          pla

          lda #$0b
          sta VIC_CONTROL_MODE
          jsr StartLevel

          inc LEVEL_NR
          jsr BuildScreen

          jsr CopyLevelToBackBuffer
          jsr DisplayGetReady

          lda #$1b
          sta VIC_CONTROL_MODE
          jmp DisplayScoreDisplay

.NoStory


Have fun!

step72.zip

Previous Step Next Step

 
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!