Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.






A C64 Game - Step 72

Posted by Endurion, in C64 12 October 2012 · 854 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.

Attached Image Attached Image


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!



Previous Step Next Step

Attached Files






December 2014 »

S M T W T F S
 123456
78910111213
14151617 18 1920
21222324252627
28293031   
PARTNERS