diff options
author | chaos-lord <dd4791.mariokarter@hotmail.co.uk> | 2017-07-22 18:26:40 +0100 |
---|---|---|
committer | chaos-lord <dd4791.mariokarter@hotmail.co.uk> | 2017-07-22 18:26:40 +0100 |
commit | 904194e9a9e7853c2de4e408010fe17038fec7f9 (patch) | |
tree | f02e0d21f45ce4cf7ac1b263ae254cc7a3a60ef6 /engine | |
parent | 66d35475b68ad4f15675041e63d2d1c368dca5fc (diff) |
commented what looks like pokemon billboard graphics loading
Diffstat (limited to 'engine')
-rw-r--r-- | engine/pinball_game/catchem_mode.asm | 68 | ||||
-rw-r--r-- | engine/pinball_game/catchem_mode/catchem_mode_red_field.asm | 16 | ||||
-rw-r--r-- | engine/pinball_game/evolution_mode/evolution_mode_red_field.asm | 8 |
3 files changed, 46 insertions, 46 deletions
diff --git a/engine/pinball_game/catchem_mode.asm b/engine/pinball_game/catchem_mode.asm index a541348..ac45f6c 100644 --- a/engine/pinball_game/catchem_mode.asm +++ b/engine/pinball_game/catchem_mode.asm @@ -55,7 +55,7 @@ StartCatchEmMode: ; 0x1003f ld l, c
add hl, bc
add hl, bc ; multiply the evolution line id by 3, add it to pointer to ???
- ld bc, Data_13685 ;mystery data
+ ld bc, Data_13685 ;mystery data, seems pokedex related too
add hl, bc
ld a, [hli]
ld [wd5c1], a
@@ -179,10 +179,10 @@ CallTable_10178: ; 0x10178 dw Func_109fc ; STAGE_BLUE_FIELD_TOP
dw Func_109fc ; STAGE_BLUE_FIELD_BOTTOM
-Func_10184: ; 0x10184
+Func_10184: ; 0x10184 called by what looks like the "hit voltorb and shellder" handllers, as well as some evo mode stuff
ld a, [wCurrentStage]
bit 0, a
- ret z
+ ret z ;skip if stage has no flippers
ld a, [wCurrentCatchEmMon]
ld c, a
ld b, $0
@@ -192,16 +192,16 @@ Func_10184: ; 0x10184 ld c, a
jr nc, .asm_10199
inc b
-.asm_10199
+.asm_10199 ;double current catch em mon
ld hl, MonBillboardPicPointers
add hl, bc
ld a, [hli]
- ld [$ff8c], a
+ ld [$ff8c], a ;load 3 byte billboard pointer into Hram
ld a, [hli]
ld [$ff8d], a
ld a, [hl]
ld [$ff8e], a
- ld hl, MonBillboardPaletteMapPointers
+ ld hl, MonBillboardPaletteMapPointers ;and the PAL pointers
add hl, bc
ld a, [hli]
ld [$ff8f], a
@@ -215,21 +215,21 @@ Func_10184: ; 0x10184 .asm_101bb
ld a, [hli]
cp [hl]
- ld [hli], a
+ ld [hli], a ;load first byte into next and test it gainst the second byte, if it's the same skip
jr z, .asm_101d2
- ld b, a
+ ld b, a ;else store in b
call nz, Func_101d9
ld a, [hGameBoyColorFlag]
and a
- jr z, .asm_101d2
+ jr z, .asm_101d2 ;skip if DMG
ld a, [wCurrentStage]
bit 0, a
ld a, b
- call nz, Func_10230
+ call nz, Func_10230 ;if lower stage, run ???
.asm_101d2
inc c
ld a, c
- cp $18
+ cp $18 ;run 24 times
jr nz, .asm_101bb
ret
@@ -239,13 +239,13 @@ Func_101d9: ; 0x101d9 push de
push af
ld a, $10
- ld [de], a
+ ld [de], a ;load 16 into de
inc de
ld a, $1
- ld [de], a
+ ld [de], a ;1 into de+1
inc de
ld b, $0
- ld hl, Data_102a4
+ ld hl, Data_102a4 ;add c to ???
add hl, bc
ld c, [hl]
sla c
@@ -255,23 +255,23 @@ Func_101d9: ; 0x101d9 sla c
rl b
sla c
- rl b
- ld hl, vTilesSH tile $10
- add hl, bc
+ rl b ;multiply ??? by 16
+ ld hl, vTilesSH tile $10 ;wut
+ add hl, bc ;add ???*16 to wut
ld a, l
ld [de], a
inc de
ld a, h
ld [de], a
- inc de
- ld a, [$ff8c]
+ inc de ;load result in to de
+ ld a, [$ff8c] ;loaded billboard pointer
ld l, a
ld a, [$ff8d]
ld h, a
- add hl, bc
+ add hl, bc ;add ???*16
pop af
and a
- jr nz, .asm_10215
+ jr nz, .asm_10215 ;if a is 0, add $180 (384)
ld bc, $0180
add hl, bc
.asm_10215
@@ -283,14 +283,14 @@ Func_101d9: ; 0x101d9 inc de
ld a, [$ff8e]
ld [de], a
- inc de
+ inc de ;load adjusted pointer into de, then 0
ld a, $0
ld [de], a
inc de
pop bc
push de
xor a
- ld de, Func_11d2
+ ld de, Func_11d2 ;queue graphics load from the adjusted pointer bank 0 using this funch
call QueueGraphicsToLoadWithFunc
pop de
pop hl
@@ -306,13 +306,13 @@ Func_10230: ; 0x10230 ld [de], a
inc de
ld [de], a
- inc de
+ inc de ;load 1 into first 2 bytes from DE
ld b, $0
ld hl, Data_102a4
- add hl, bc
+ add hl, bc ;retrieve entry c from ???
ld c, [hl]
sla c
- ld hl, PointerTable_10274
+ ld hl, PointerTable_10274 ;grab billboard BG position(?) pointer entry c, place in de
add hl, bc
ld a, [hli]
ld [de], a
@@ -321,34 +321,34 @@ Func_10230: ; 0x10230 ld [de], a
inc de
srl c
- ld a, [$ff8f]
+ ld a, [$ff8f];load PAL pointer
ld l, a
ld a, [$ff90]
ld h, a
- add hl, bc
+ add hl, bc ;add the value from Data_102a4
pop af
and a
ld a, [$ff91]
- call ReadByteFromBank
- jr nz, .asm_10261
+ call ReadByteFromBank ;fetch pallete data
+ jr nz, .asm_10261 ;
ld a, $5
.asm_10261
- ld [de], a
+ ld [de], a ;if a's initial place is 0, make it 5 into de, else load the PAL bank
inc de
ld a, $0
- ld [de], a
+ ld [de], a ;then load 0
inc de
pop bc
push de
xor a
- ld de, LoadTileListsBank1
+ ld de, LoadTileListsBank1 ;load pal pointer as graphics?
call QueueGraphicsToLoadWithFunc
pop de
pop hl
pop bc
ret
-PointerTable_10274: ; 0x10274
+PointerTable_10274: ; 0x10274 4x6 area? the billboard's position?
dw $9887
dw $9888
dw $9889
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 e02f160..0e04dfc 100644 --- a/engine/pinball_game/catchem_mode/catchem_mode_red_field.asm +++ b/engine/pinball_game/catchem_mode/catchem_mode_red_field.asm @@ -27,7 +27,7 @@ PointerTable_20021: ; 0x20021 Func_20041: ; 0x20041
ld a, [wd5b6]
- cp $18
+ cp $18 ;if not 24, ret
jr nz, .asm_2005d
ld a, [wCurrentStage]
bit 0, a
@@ -228,28 +228,28 @@ Func_201f2: ; 0x201f2 callba Func_106a6
ret
-Func_20230: ; 0x20230
+Func_20230: ; 0x20230 resolve hitting a voltorb in catch mode?
ld a, [wd5b6]
cp $18
- jr z, .asm_2029d
+ jr z, .asm_2029d ;if ?? is 24, add to jackpot and ret c
sla a
ld c, a
ld b, $0
ld hl, wd586
- add hl, bc
+ add hl, bc ;else go ???*2 down ???
ld d, $4
.asm_20242
ld a, $1
ld [hli], a
- inc hl
+ inc hl ;load in 1
ld a, l
cp wd5b6 % $100
- jr z, .asm_2024e
+ jr z, .asm_2024e ;continue until you reach ??? or until 4 spaces are done
dec d
jr nz, .asm_20242
.asm_2024e
ld a, [wd5b6]
- add $4
+ add $4 ;then add 4 to ??, clamp to 24
cp $18
jr c, .master_loop9
ld a, $18
@@ -258,7 +258,7 @@ Func_20230: ; 0x20230 cp $18
jr nz, .asm_20264
xor a
- ld [wIndicatorStates + 9], a
+ ld [wIndicatorStates + 9], a ;if 24, unmark voltorb arrow indicator
.asm_20264
callba Func_10184
ld bc, OneHundredThousandPoints
diff --git a/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm b/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm index 219cb38..a38ece6 100644 --- a/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm +++ b/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm @@ -40,7 +40,7 @@ PointerTable_205d4: ; 0x205d4 padded_dab Func_2070b
padded_dab Func_20757
-Func_205e0: ; 0x205e0
+Func_205e0: ; 0x205e0 runs on collecting exp in evo mode?
ld a, [wCurrentStage]
ld b, a
ld a, [wd578]
@@ -271,10 +271,10 @@ Func_2080f: ; 0x2080f call AddBCDEToJackpot
ld a, [wd551] ;if ??? is not zero, ret c
and a
- jr nz, .asm_20837
+ jr nz, .RetC
ld a, [wIndicatorStates + 9] ;if indicator is z, ret
and a
- jr z, .asm_20837
+ jr z, .RetC
xor a
ld [wIndicatorStates + 9], a
ld a, [wd55c]
@@ -284,7 +284,7 @@ Func_2080f: ; 0x2080f jp nz, Func_20977
jp Func_209eb
-.asm_20837
+.RetC
scf
ret
|