diff options
| author | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-07-06 13:35:48 -0400 |
|---|---|---|
| committer | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-07-06 13:35:48 -0400 |
| commit | 9c9fb882c70650b82f4e684d12a5f5cf03d18ae6 (patch) | |
| tree | 38e83aa984862e0e6010e490f2092b9eaf5d5807 /engine/bank3d | |
| parent | More bank3d documentation. (diff) | |
| download | pokeyellow-9c9fb882c70650b82f4e684d12a5f5cf03d18ae6.tar.gz pokeyellow-9c9fb882c70650b82f4e684d12a5f5cf03d18ae6.tar.xz pokeyellow-9c9fb882c70650b82f4e684d12a5f5cf03d18ae6.zip | |
Complete documentation of bank3d
todo: label functions past engine/items/tm_prices.asm
check if hlCoords are correct.
Diffstat (limited to 'engine/bank3d')
| -rw-r--r-- | engine/bank3d/bank3d_battle.asm | 125 | ||||
| -rw-r--r-- | engine/bank3d/main.asm | 25 | ||||
| -rw-r--r-- | engine/bank3d/random.asm | 4 |
3 files changed, 133 insertions, 21 deletions
diff --git a/engine/bank3d/bank3d_battle.asm b/engine/bank3d/bank3d_battle.asm index aef04d9d..2c71a565 100644 --- a/engine/bank3d/bank3d_battle.asm +++ b/engine/bank3d/bank3d_battle.asm @@ -166,4 +166,127 @@ _LoadTrainerPic: ; f615a (3d:615a) ld de, vFrontPic ld a, $77 ld c, a - jp LoadUncompressedSpriteData
\ No newline at end of file + jp LoadUncompressedSpriteData + +LoadMonBackPic: ; f6178 (3d:6178) +; Assumes the monster's attributes have +; been loaded with GetMonHeader. + ld a, [wBattleMonSpecies2] + ld [wcf91], a + hlCoord 1, 5 + ld bc,$708 + call ClearScreenArea + ld hl, W_MONHBACKSPRITE - W_MONHEADER + call UncompressMonSprite + predef ScaleSpriteByTwo + ld de, vBackPic + call InterlaceMergeSpriteBuffers ; combine the two buffers to a single 2bpp sprite + ld hl, vSprites + ld de, vBackPic + ld c, (2*SPRITEBUFFERSIZE)/16 ; count of 16-byte chunks to be copied + ld a, [H_LOADEDROMBANK] + ld b, a + jp CopyVideoData + +Func_f61a6: ; f61a6 (3d:f61a6) + ld a, [wPredefRegisters] + ld h, a + ld a, [wPredefRegisters + 1] + ld l, a + ld a, [$ffe1] + ld [H_DOWNARROWBLINKCNT1], a + ld b, $4c + ld a, [W_ISINBATTLE] + and a + jr z, .asm_f61ef + add b + ld [hl], a + call Delay3 + ld bc, -41 + add hl, bc + ld a, $1 + ld [wcd6c], a + ld bc, $303 + predef Func_79aba + ld c, $4 + call DelayFrames + ld bc, -41 + add hl, bc + xor a + ld [wcd6c], a + ld bc, $505 + predef Func_79aba + ld c, $5 + call DelayFrames + ld bc, -41 + jr .asm_f61f2 +.asm_f61ef + ld bc, -123 +.asm_f61f2 + add hl, bc + ld a, [H_DOWNARROWBLINKCNT1] + add $31 + jr asm_f6203 + +Func_f61f9: ; 3f0c6 (f:70c6) + ld a, [wPredefRegisters] + ld h, a + ld a, [wPredefRegisters + 1] + ld l, a + ld a, [$ffe1] +asm_f6203: ; f6203 (3d:6203) + ld bc, $707 + ld de, $14 + push af + ld a, [W_SPRITEFLIPPED] + and a + jr nz, .asm_f6220 + pop af +.asm_f6211 + push bc + push hl +.asm_f6213 + ld [hl], a + add hl, de + inc a + dec c + jr nz, .asm_f6213 + pop hl + inc hl + pop bc + dec b + jr nz, .asm_f6211 + ret + +.asm_f6220 + push bc + ld b, $0 + dec c + add hl, bc + pop bc + pop af +.asm_f6227 + push bc + push hl +.asm_f6229 + ld [hl], a + add hl, de + inc a + dec c + jr nz, .asm_f6229 + pop hl + dec hl + pop bc + dec b + jr nz, .asm_f6227 + ret + +INCLUDE "engine/battle/init_battle_variables.asm" +INCLUDE "engine/battle/moveEffects/focus_energy_effect.asm" +INCLUDE "engine/battle/moveEffects/heal_effect.asm" +INCLUDE "engine/battle/moveEffects/transform_effect.asm" +INCLUDE "engine/battle/moveEffects/reflect_light_screen_effect.asm" +INCLUDE "engine/battle/moveEffects/mist_effect.asm" +INCLUDE "engine/battle/moveEffects/one_hit_ko_effect.asm" +INCLUDE "engine/battle/moveEffects/pay_day_effect.asm" +INCLUDE "engine/battle/moveEffects/paralyze_effect.asm"
\ No newline at end of file diff --git a/engine/bank3d/main.asm b/engine/bank3d/main.asm index d5ce0c5e..56aa260e 100644 --- a/engine/bank3d/main.asm +++ b/engine/bank3d/main.asm @@ -624,7 +624,7 @@ Func_f5ea4:: ; f5ea4 (3d:f5ea4) ld de,$0 ret -Func_f5ec1:: ; f5ec1 +Func_f5ec1:: ; f5ec1 (3d:5ec1) call Random cp $66 jr c,.asm_f5ed6 @@ -651,20 +651,11 @@ Pointer_f5eda:: ; f5eda (3d:f5eda) ; ... rest of data TBA SECTION "temp_f5ff2" ROMX[$5ff2],BANK[$3c] -INCLUDE "engine/bank3d/bank3d_battle.asm" -InitBattle:: ; f5ff2 (3d:5ff2) - ld a,[W_CUROPPONENT] - and a - jr z,.asm_f6003 - ld a,[W_CUROPPONENT] - ld [wcf91],a - ld [wEnemyMonSpecies2],a - jr .asm_f601d - ld a,[wd732] - bit 1,a ; debug mode? - jr z,.notdebugmode - ld a,[hJoyHeld] - bit 1,a ; holding b button? - ret nz -
\ No newline at end of file +INCLUDE "engine/bank3d/bank3d_battle.asm" +INCLUDE "engine/items/tm_prices.asm" +INCLUDE "engine/multiply_divide.asm" +INCLUDE "engine/give_pokemon.asm" +INCLUDE "engine/battle/get_trainer_name.asm" +INCLUDE "engine/bank3d/random.asm" +INCLUDE "engine/predefs.asm"
\ No newline at end of file diff --git a/engine/bank3d/random.asm b/engine/bank3d/random.asm index 8c8ead4e..ddf042df 100644 --- a/engine/bank3d/random.asm +++ b/engine/bank3d/random.asm @@ -1,6 +1,4 @@ -SECTION "bank3d Random",ROMX[$67DC],BANK[$3D] - -Random_:: +Random_:: ; f67dc (3d:67dc) ; Generate a random 16-bit value. ld a, [rDIV] ld b, a |
