summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/pinball_game/catchem_mode.asm4
-rw-r--r--engine/pinball_game/catchem_mode/catchem_mode_blue_field.asm8
-rw-r--r--engine/pinball_game/catchem_mode/catchem_mode_red_field.asm8
-rw-r--r--home/text.asm62
-rw-r--r--wram.asm17
5 files changed, 54 insertions, 45 deletions
diff --git a/engine/pinball_game/catchem_mode.asm b/engine/pinball_game/catchem_mode.asm
index 095a877..0268589 100644
--- a/engine/pinball_game/catchem_mode.asm
+++ b/engine/pinball_game/catchem_mode.asm
@@ -1163,12 +1163,12 @@ Func_10825: ; 0x10825
call AddBCDEToCurBufferValue
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5e9
+ ld hl, wStationaryText2
ld de, Data_2a50
call Func_3372
pop de
pop bc
- ld hl, wd5e4
+ ld hl, wStationaryText1
ld de, JackpotText
call Func_3357
ret
diff --git a/engine/pinball_game/catchem_mode/catchem_mode_blue_field.asm b/engine/pinball_game/catchem_mode/catchem_mode_blue_field.asm
index c4b90fa..d03094d 100644
--- a/engine/pinball_game/catchem_mode/catchem_mode_blue_field.asm
+++ b/engine/pinball_game/catchem_mode/catchem_mode_blue_field.asm
@@ -127,12 +127,12 @@ Func_20394: ; 0x20394
push de
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5e9
+ ld hl, wStationaryText2
ld de, Data_2a2a
call Func_3372
pop de
pop bc
- ld hl, wd5e4
+ ld hl, wStationaryText1
ld de, HitText
call Func_3357
ld a, [wNumMonHits]
@@ -271,12 +271,12 @@ Func_204f1: ; 0x204f1
push de
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5e9
+ ld hl, wStationaryText2
ld de, Data_2a3d
call Func_3372
pop de
pop bc
- ld hl, wd5e4
+ ld hl, wStationaryText1
ld de, FlippedText
call Func_3357
.asm_2055e
diff --git a/engine/pinball_game/catchem_mode/catchem_mode_red_field.asm b/engine/pinball_game/catchem_mode/catchem_mode_red_field.asm
index b34f93d..d6738d8 100644
--- a/engine/pinball_game/catchem_mode/catchem_mode_red_field.asm
+++ b/engine/pinball_game/catchem_mode/catchem_mode_red_field.asm
@@ -125,12 +125,12 @@ Func_200d3: ; 0x200d3
push de
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5e9
+ ld hl, wStationaryText2
ld de, Data_2a2a
call Func_3372
pop de
pop bc
- ld hl, wd5e4
+ ld hl, wStationaryText1
ld de, HitText
call Func_3357
ld a, [wNumMonHits]
@@ -269,12 +269,12 @@ Func_20230: ; 0x20230
push de
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5e9
+ ld hl, wStationaryText2
ld de, Data_2a3d
call Func_3372
pop de
pop bc
- ld hl, wd5e4
+ ld hl, wStationaryText1
ld de, FlippedText
call Func_3357
.asm_2029d
diff --git a/home/text.asm b/home/text.asm
index a78e2a1..147051e 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -23,9 +23,9 @@ FillBottomMessageBufferWithBlackTile: ; 0x30e8
ld [wScrollingText1Enabled], a
ld [wScrollingText2Enabled], a
ld [wScrollingText3Enabled], a
- ld [wd5e4], a
- ld [wd5e9], a
- ld [wd5ee], a
+ ld [wStationaryText1], a
+ ld [wStationaryText2], a
+ ld [wStationaryText3], a
ret
Func_310a: ; 0x310a
@@ -584,27 +584,27 @@ Func_33a7: ; 0x33a7
inc de
ret
-Func_33c3: ; 0x33c3
- ld a, [hli]
+HandleStationaryText: ; 0x33c3 Handles stationary text HandleStationaryText
+ ld a, [hli] ;+1
and a
- ret z
- ld a, [hli]
+ ret z ;ret if var 1 is 0
+ ld a, [hli] ;+2 load var2 into e
ld e, a
ld d, wBottomMessageBuffer / $100
push hl
- ld l, [hl]
+ ld l, [hl] ;Place text from var 2 in buffer into var3 in text
ld h, wBottomMessageText / $100
call PlaceTextLow
pop hl
- inc hl
+ inc hl ;+3 dec Var4, ret if var not 0
ld a, [hl]
dec a
- ld [hli], a
+ ld [hli], a ;+4
ret nz
- ld a, [hl]
+ ld a, [hl] ;dec Var5
dec a
- ld [hld], a
- bit 7, a
+ ld [hld], a ;+3
+ bit 7, a ;if Var5 <= 128, ret, else toggle off
ret z
dec hl
dec hl
@@ -623,55 +623,55 @@ Func_33e3: ; 0x33e3
ld c, $0
ld a, [wScrollingText1Enabled]
and a
- jr z, .asm_33fe ;if ?? is 0
- push bc ;store b and 0
+ jr z, .Scrolling1Off ;if scrolling text is enabled, scroll text and inc c. repeat for each struct
+ push bc
ld hl, wScrollingText1
call HandleScrolling
pop bc
inc c
-.asm_33fe
+.Scrolling1Off
ld a, [wScrollingText2Enabled]
and a
- jr z, .asm_340d
+ jr z, .Scrolling2Off
push bc
ld hl, wScrollingText2
call HandleScrolling
pop bc
inc c
-.asm_340d
+.Scrolling2Off
ld a, [wScrollingText3Enabled]
and a
- jr z, .asm_341c
+ jr z, .Scrolling3Off
push bc
ld hl, wScrollingText3
call HandleScrolling
pop bc
inc c
-.asm_341c
- ld a, [wd5e4]
+.Scrolling3Off
+ ld a, [wStationaryText1]
and a
jr z, .asm_342b
push bc
- ld hl, wd5e4
- call Func_33c3
+ ld hl, wStationaryText1
+ call HandleStationaryText
pop bc
inc c
.asm_342b
- ld a, [wd5e9]
+ ld a, [wStationaryText2]
and a
jr z, .asm_343a
push bc
- ld hl, wd5e9
- call Func_33c3
+ ld hl, wStationaryText2
+ call HandleStationaryText
pop bc
inc c
.asm_343a
- ld a, [wd5ee]
+ ld a, [wStationaryText3]
and a
jr z, .asm_3449
push bc
- ld hl, wd5ee
- call Func_33c3
+ ld hl, wStationaryText3
+ call HandleStationaryText
pop bc
inc c
.asm_3449
@@ -705,7 +705,7 @@ Func_3475: ; 0x3475
ld [hPressedButtons], a
call HandleTilts
ld a, [wCurrentStage]
- bit 0, a
+ bit 0, a ;handle flippers if the stage has any
callba nz, HandleFlippers
callba DrawSpritesForStage
call Func_33e3
@@ -713,7 +713,7 @@ Func_3475: ; 0x3475
rst AdvanceFrame
ld a, [wd5ca]
and a
- jr nz, Func_3475
+ jr nz, Func_3475 ;loops until wd5ca is zero
ret
FivePoints: ; 34a6
diff --git a/wram.asm b/wram.asm
index 6dce20d..d64b08c 100644
--- a/wram.asm
+++ b/wram.asm
@@ -229,7 +229,7 @@ wDrawBottomMessageBox:: ; 0xd4aa
wd4ab:: ; 0xd4ab
ds $1
-wCurrentStage:: ; 0xd4ac
+wCurrentStage:: ; 0xd4ac see constants/stage_constants.asm for list. bit 1 is 1 if the stage has flippers
ds $1
wd4ad:: ; 0xd4ad
@@ -752,13 +752,22 @@ wScrollingText2:: ; 0xd5d4
wScrollingText3:: ; 0xd5dc
scrolling_text wScrollingText3
-wd5e4:: ; 0xd5e4
+stationary_text: MACRO
+\1Enabled:: ds 1 ; Toggles if enabled. 0 is off, non-0 is on
+\1MessageBoxOffset:: ds 1 ; Offset in wBottomMessageBuffer to place first character of text
+\1SourceTextOffset:: ds 1 ; Offset in wBottomMessageText for the text to be displayed
+\1DurationLowByte:: ;how many frames to stay on screen
+\1Duration:: ds 1
+\1DurationHighByte:: ds 1
+ENDM
+
+wStationaryText1:: ; 0xd5e4
ds $5
-wd5e9:: ; 0xd5e9
+wStationaryText2:: ; 0xd5e9
ds $5
-wd5ee:: ; 0xd5ee
+wStationaryText3:: ; 0xd5ee
ds $5
wCapturingMon:: ; 0xd5f3