diff options
Diffstat (limited to 'home')
| -rw-r--r-- | home/audio.asm | 4 | ||||
| -rw-r--r-- | home/map.asm | 152 | ||||
| -rw-r--r-- | home/map_objects.asm | 64 | ||||
| -rw-r--r-- | home/menu.asm | 8 | ||||
| -rw-r--r-- | home/menu_window.asm | 4 | ||||
| -rw-r--r-- | home/misc_32c8.asm | 4 | ||||
| -rw-r--r-- | home/pic.asm | 26 | ||||
| -rw-r--r-- | home/text.asm | 108 | ||||
| -rw-r--r-- | home/unknown_388f.asm | 2 | ||||
| -rw-r--r-- | home/vcopy.asm | 44 |
10 files changed, 208 insertions, 208 deletions
diff --git a/home/audio.asm b/home/audio.asm index b2d07c5..508a729 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -240,12 +240,12 @@ SpecialMapMusic:: scf ret -.state2 ; 3e14 +.state2 ld de, MUSIC_NONE scf ret -.normal ; 3e19 +.normal and a ret diff --git a/home/map.asm b/home/map.asm index daaa49b..5bbface 100644 --- a/home/map.asm +++ b/home/map.asm @@ -3,7 +3,7 @@ INCLUDE "constants.asm" SECTION "home/map.asm", ROM0 ; Runs a map script indexed by wMapScriptNumber -RunMapScript:: ; 20ff +RunMapScript:: push hl push de push bc @@ -27,7 +27,7 @@ RunMapScript:: ; 20ff ret ; TODO: is this used? -WriteIntod637:: ; 2117 +WriteIntod637:: push af ; TODO: figure out what variables are concerned here ld a, [wd637] @@ -36,14 +36,14 @@ WriteIntod637:: ; 2117 ld [wd637], a ret -ClearMapBuffer:: ; 00:2123 +ClearMapBuffer:: ld hl, wMapBuffer ld bc, wMapBufferEnd - wMapBuffer ld a, 0 call ByteFill ret -SetUpMapBuffer:: ; 212f +SetUpMapBuffer:: call ClearMapBuffer ldh a, [hROMBank] push af @@ -86,7 +86,7 @@ SetUpMapBuffer:: ; 212f add hl, de jr .search -GetMapScriptNumber:: ; 2171 +GetMapScriptNumber:: push hl ld a, [hli] ld h, [hl] @@ -96,7 +96,7 @@ GetMapScriptNumber:: ; 2171 pop hl ret -CopyWord:: ; 217b +CopyWord:: ld a, [hli] ld [de], a ld a, [hli] @@ -105,21 +105,21 @@ CopyWord:: ; 217b ret -SetMapScriptNumber:: ; 2181 +SetMapScriptNumber:: ld [wMapScriptNumber], a ret -IncMapScriptNumber:: ; 2185 +IncMapScriptNumber:: ld hl, wMapScriptNumber inc [hl] ret -DecMapScriptNumber:: ; 218a +DecMapScriptNumber:: ld hl, wMapScriptNumber dec [hl] ret -WriteBackMapScriptNumber:: ; 218f +WriteBackMapScriptNumber:: ld a, [wMapScriptNumberLocation] ld l, a ld a, [wMapScriptNumberLocation + 1] @@ -129,12 +129,12 @@ WriteBackMapScriptNumber:: ; 218f ret -GetMapPointer:: ; 219c +GetMapPointer:: ld a, [wMapGroup] ld b, a ld a, [wMapId] ld c, a -GetAnyMapPointer:: ; 21a4 +GetAnyMapPointer:: push bc dec b ld c, b @@ -153,12 +153,12 @@ GetAnyMapPointer:: ; 21a4 ret -SwitchToMapBank:: ; 21bb +SwitchToMapBank:: ld a, [wMapGroup] ld b, a ld a, [wMapId] ld c, a -SwitchToAnyMapBank:: ; 21c3 +SwitchToAnyMapBank:: push hl ld a, BANK(MapGroupPointers) call Bankswitch @@ -169,7 +169,7 @@ SwitchToAnyMapBank:: ; 21c3 ret -CopyMapPartial:: ; 213d +CopyMapPartial:: ldh a, [hROMBank] push af ld a, BANK(MapGroupPointers) @@ -182,7 +182,7 @@ CopyMapPartial:: ; 213d call Bankswitch ret -GetMapAttributesPointer:: ; 21eb +GetMapAttributesPointer:: push bc ldh a, [hROMBank] push af @@ -203,7 +203,7 @@ GetMapAttributesPointer:: ; 21eb pop bc ret -GetMapEnvironment:: ; 220c +GetMapEnvironment:: push hl push bc ldh a, [hROMBank] @@ -221,7 +221,7 @@ GetMapEnvironment:: ; 220c pop hl ret -GetAnyMapEnvironment:: ; 2226 +GetAnyMapEnvironment:: ldh a, [hROMBank] push af ld a, BANK(MapGroupPointers) @@ -235,7 +235,7 @@ GetAnyMapEnvironment:: ; 2226 ld a, b ret -GetWorldMapLocation:: ; 223c +GetWorldMapLocation:: ldh a, [hROMBank] push af ld a, BANK(MapGroupPointers) @@ -250,11 +250,11 @@ GetWorldMapLocation:: ; 223c ret -EmptyFunction2252:: ; 2252 +EmptyFunction2252:: ret -LoadMap:: ; 2253 +LoadMap:: ldh a, [hMapEntryMethod] and a ; Possible bug: if the entry method is $X0, this will overflow ret z @@ -278,7 +278,7 @@ LoadMap:: ; 2253 dw MapSetup_2275 ; TODO -MapSetup_2275:: ; 2275 +MapSetup_2275:: ldh a, [hROMBank] push af call MapSetup_22af ; TODO @@ -286,7 +286,7 @@ MapSetup_2275:: ; 2275 call Bankswitch ret -MapSetup_Reload:: ; 2280 +MapSetup_Reload:: call DisableLCD call DisableAudio call VolumeOff @@ -305,7 +305,7 @@ MapSetup_Reload:: ; 2280 call FadeIn ret -MapSetup_22af:: ; 22af +MapSetup_22af:: call DisableLCD call DisableAudio call VolumeOff @@ -324,10 +324,10 @@ MapSetup_22af:: ; 22af call FadeIn ret -MapSetup_22de:: ; 22de +MapSetup_22de:: callab OverworldFadeOut -MapSetup_Continue:: ; 22e6 +MapSetup_Continue:: call DisableLCD call DisableAudio call VolumeOff @@ -352,7 +352,7 @@ MapSetup_Continue:: ; 22e6 call FadeIn ret -MapSetup_Warp:: ; 232c +MapSetup_Warp:: callab OverworldFadeOut call DisableLCD call Function27C7 ; TODO @@ -380,14 +380,14 @@ MapSetup_Warp:: ; 232c call Function2407 ; TODO ret -LoadMapTimeOfDay:: ; 237c +LoadMapTimeOfDay:: callab ReplaceTimeOfDayPals call LoadMapPart call .ClearBGMap call .PushAttrMap ret -.ClearBGMap ; 238e +.ClearBGMap ld a, HIGH(vBGMap0) ld [wBGMapAnchor + 1], a xor a ; LOW(vBGMap0) @@ -401,7 +401,7 @@ LoadMapTimeOfDay:: ; 237c call ByteFill ret -.PushAttrMap ; 23a7 +.PushAttrMap decoord 0, 0 hlbgcoord 0, 0 ld c, SCREEN_WIDTH @@ -421,22 +421,22 @@ LoadMapTimeOfDay:: ; 237c jr nz, .row ret -LoadWildMons:: ; 23c1 +LoadWildMons:: callab _LoadWildMons ret -LoadGraphics:: ; 23ca +LoadGraphics:: call LoadTileset call LoadTilesetGFX callba RefreshSprites call LoadFontExtra ret -InitializeVisibleSprites:: ; 23dc +InitializeVisibleSprites:: callab _InitializeVisibleSprites ret -FadeIn:: ; 23e5 ; This is not OverworldFadeIn, but I don't know what it is +FadeIn:: ; This is not OverworldFadeIn, but I don't know what it is call InitToolgearBuffer call RefreshTiles ld hl, wVramState @@ -447,7 +447,7 @@ FadeIn:: ; 23e5 ; This is not OverworldFadeIn, but I don't know what it is callab OverworldFadeIn ret -Function2407:: ; 00:2407 +Function2407:: ld a, NO_MOVEMENT ld [wPlayerMovement], a xor a @@ -473,7 +473,7 @@ Function2407:: ; 00:2407 call SetObjectFacing ret -MapSetup_Connection:: ; 2439 +MapSetup_Connection:: call EnterMapConnection call CopyMapPartialAndAttributes call SetUpMapBuffer @@ -489,7 +489,7 @@ MapSetup_Connection:: ; 2439 scf ret -CheckMovingOffEdgeOfMap:: ; 245e +CheckMovingOffEdgeOfMap:: ld a, [wPlayerStepDirection] cp STANDING ret z @@ -548,7 +548,7 @@ CheckMovingOffEdgeOfMap:: ; 245e scf ret -EnterMapConnection: ; 24af +EnterMapConnection: ; Return carry if a connection has been entered. ld a, [wPlayerStepDirection] and a @@ -684,7 +684,7 @@ EnterMapConnection: ; 24af ret -WarpCheck:: ; 259f +WarpCheck:: call GetDestinationWarpPointer ret nc ld a, [hli] @@ -700,7 +700,7 @@ WarpCheck:: ; 259f scf ret -GetDestinationWarpPointer: ; 25b9 +GetDestinationWarpPointer: ld a, [wPlayerNextMapY] sub 4 ld d, a @@ -740,13 +740,13 @@ GetDestinationWarpPointer: ; 25b9 ret -CopyMapPartialAndAttributes:: ; 25ea +CopyMapPartialAndAttributes:: call SwitchToMapBank call CopyAndReadHeaders call ReadObjectEvents ret -CopyAndReadHeaders:: ; 25f4 +CopyAndReadHeaders:: call CopyMapPartial call GetMapAttributesPointer ld hl, wMapAttributesPtr @@ -772,7 +772,7 @@ CopyAndReadHeaders:: ; 25f4 call ReadSigns ret -GetMapConnections:: ; 261d +GetMapConnections:: ld a, $ff ld [wNorthConnectedMapGroup], a ld [wSouthConnectedMapGroup], a @@ -807,7 +807,7 @@ GetMapConnections:: ; 261d ret -GetMapConnection:: ; 2658 +GetMapConnection:: ld c, wSouthMapConnection - wNorthMapConnection .copy ld a, [hli] @@ -818,7 +818,7 @@ GetMapConnection:: ; 2658 ret -ReadWarps:: ; 2661 +ReadWarps:: ld a, [hli] ld [wCurrMapWarpCount], a and a @@ -840,7 +840,7 @@ ReadWarps:: ; 2661 ret -ReadSigns:: ; 2679 +ReadSigns:: ld a, [hli] ld [wCurrMapSignCount], a and a @@ -860,7 +860,7 @@ ReadSigns:: ; 2679 ret -ReadObjectEvents:: ; 268f +ReadObjectEvents:: push hl call ClearObjectStructs pop de @@ -911,7 +911,7 @@ ReadObjectEvents:: ; 268f ld l, e ret -ClearObjectStructs:: ; 26cf +ClearObjectStructs:: xor a ld [wUnkObjectStruct], a ; TODO ld hl, wObject2Struct @@ -935,7 +935,7 @@ ClearObjectStructs:: ; 26cf ret -ReadWord:: ; 26ef ; TODO: is this used? +ReadWord:: ; TODO: is this used? ld e, [hl] inc hl ld d, [hl] @@ -943,7 +943,7 @@ ReadWord:: ; 26ef ; TODO: is this used? ret -InitUnknownBuffercc9e:: ; 26f4 +InitUnknownBuffercc9e:: xor a ld hl, wUnknownWordcc9c ld [hli], a @@ -995,7 +995,7 @@ InitUnknownBuffercc9e:: ; 26f4 ret -RestoreFacingAfterWarp:: ; 273d +RestoreFacingAfterWarp:: ld hl, wMapObjectsPtr ld a, [hli] ld h, [hl] @@ -1018,7 +1018,7 @@ RestoreFacingAfterWarp:: ; 273d ret -Function275e:: ; 275e ; TODO: is this used? +Function275e:: ; TODO: is this used? inc hl inc hl inc hl @@ -1035,7 +1035,7 @@ Function275e:: ; 275e ; TODO: is this used? ret -GetCoordOfUpperLeftCorner:: ; 277a +GetCoordOfUpperLeftCorner:: ld hl, wOverworldMapBlocks ld a, [wXCoord] bit 0, a @@ -1081,7 +1081,7 @@ GetCoordOfUpperLeftCorner:: ; 277a ld [wMetatileNextX], a ret -Function27C7:: ; 27c7 ; TODO +Function27C7:: ; TODO call GetMapEnvironment cp 2 jr z, .interior @@ -1112,7 +1112,7 @@ Function27C7:: ; 27c7 ; TODO ld [hli], a ret -LoadMapPart:: ; 27fb +LoadMapPart:: callab UpdateTimeOfDayPal ldh a, [hROMBank] @@ -1132,7 +1132,7 @@ LoadMapPart:: ; 27fb call Bankswitch ret -LoadMetatiles:: ; 2822 +LoadMetatiles:: ld a, [wOverworldMapAnchor] ld e, a ld a, [wOverworldMapAnchor + 1] @@ -1173,7 +1173,7 @@ LoadMetatiles:: ; 2822 jr nz, .row ret -ApplyFlashlight:: ; 285a +ApplyFlashlight:: ld hl, wTileMapBackup ld a, [wMetatileNextY] and a @@ -1253,19 +1253,19 @@ redraw_with_flashlight: MACRO jr nz, .row\1 ENDM -.force_1 ; 289b +.force_1 redraw_with_flashlight 1 ret -.force_2 ; 28be +.force_2 redraw_with_flashlight 2 ret -.force_3 ; 28e1 +.force_3 redraw_with_flashlight 3 ret -.force_9001 ; 2904 +.force_9001 ; Actually force 4, but this also applies to larger values decoord 4 * 2, 4 * 2 ld bc, 4 * $32 ; TODO: constantify the $32 @@ -1290,7 +1290,7 @@ ENDM ld [de], a ret -DrawMetatile:: ; 2921 +DrawMetatile:: push hl ld hl, wTilesetBlocksAddress ld a, [hli] @@ -1323,7 +1323,7 @@ ENDR ret -ChangeMap:: ; 294d +ChangeMap:: ld hl, wOverworldMapBlocks ld bc, wOverworldMapBlocksEnd - wOverworldMapBlocks ld a, 0 @@ -1368,7 +1368,7 @@ ChangeMap:: ; 294d dec b jr nz, .row -; FillMapConnections:: ; 298e +; FillMapConnections:: ld a, [wNorthConnectedMapGroup] cp $ff @@ -1465,7 +1465,7 @@ ChangeMap:: ; 294d ret FillNorthConnectionStrip:: -FillSouthConnectionStrip:: ; 2a3d +FillSouthConnectionStrip:: ld c, 3 .y @@ -1501,7 +1501,7 @@ FillSouthConnectionStrip:: ; 2a3d ; 25f6 FillWestConnectionStrip:: -FillEastConnectionStrip:: ; 2a60 +FillEastConnectionStrip:: .loop ld a, [wMapWidth] @@ -1539,12 +1539,12 @@ FillEastConnectionStrip:: ; 2a60 ret Function2a85:: -.asm_2a85: ; 00:2a85 +.asm_2a85: call LoadMap call Function2a8d jr .asm_2a85 -Function2a8d:: ; 00:2a8d +Function2a8d:: push hl push de push bc @@ -1570,14 +1570,14 @@ Function2a8d:: ; 00:2a8d push de jp hl -.Return: ; 00:2aac +.Return: pop af pop bc pop de pop hl ret -.Pointers: ; 00:2ab1 +.Pointers: dbbw $00, $55, Function2ae5 dbbw $00, $55, Function2b52 dbbw $00, $55, Function2b77 @@ -1593,7 +1593,7 @@ Function2a8d:: ; 00:2a8d dbbw $05, $33, Function14777 Function2ae5:: -.loop: ; 00:2ae5 +.loop: ld hl, wJoypadFlags set 4, [hl] set 6, [hl] @@ -1642,7 +1642,7 @@ Function2b39:: ret Function2b52:: -.asm_2b52: ; 00:2b52 +.asm_2b52: call UpdateTime ld a, [wVramState] bit 7, a @@ -1672,7 +1672,7 @@ Function2b79:: ret Function2b87:: -.asm_2b87: ; 00:2b87 +.asm_2b87: call UpdateTime call GetJoypad call OverworldStartButtonCheck @@ -1683,7 +1683,7 @@ Function2b87:: callba Function824c jr .asm_2b87 -Function2ba8:: ; 00:2ba8 +Function2ba8:: ldh a, [hROMBank] push af ld a, BANK(Function50b9) @@ -1712,7 +1712,7 @@ Function2ba8:: ; 00:2ba8 scf ret -Function2be5:: ; 00:2be5 ; TODO +Function2be5:: ; TODO ld a, [wDebugFlags] bit 7, a ret nz @@ -1730,5 +1730,5 @@ Function2be5:: ; 00:2be5 ; TODO push de jp hl -.Return: ; 00:2c04 +.Return: ret diff --git a/home/map_objects.asm b/home/map_objects.asm index 1dd875e..d567318 100644 --- a/home/map_objects.asm +++ b/home/map_objects.asm @@ -2,11 +2,11 @@ include "constants.asm" SECTION "home/map_objects.asm", ROM0 -Function15b5:: ; 15b5 +Function15b5:: callab Function8000 ret -GetMapObject:: ; 00:15be +GetMapObject:: ld hl, wMapObjects ld bc, MAP_OBJECT_LENGTH call AddNTimes @@ -14,13 +14,13 @@ GetMapObject:: ; 00:15be ld c, l ret -GetMapObjectAttrPtr:: ; 15ca +GetMapObjectAttrPtr:: call GetMapObject ld d, $0 add hl, de ret -Function15d1:: ; 15d1 +Function15d1:: ldh [hMapObjectIndexBuffer], a call GetMapObject call Function40eb @@ -52,7 +52,7 @@ Function1602:: callab Function813d ret -Function1617:: ; 00:1617 +Function1617:: ldh [hMapObjectIndexBuffer], a call GetMapObject ld hl, MAPOBJECT_OBJECT_STRUCT_ID @@ -68,13 +68,13 @@ Function1617:: ; 00:1617 jr nz, .asm_1633 ld a, $ff ld [wObjectFollow_Leader], a -.asm_1633: ; 00:1633 +.asm_1633: ld a, [wObjectFollow_Follower] cp d jr nz, .asm_163e ld a, $0 ld [wObjectFollow_Follower], a -.asm_163e: ; 00:163e +.asm_163e: pop af call GetObjectStruct ld bc, OBJECT_LENGTH @@ -156,7 +156,7 @@ Function169f:: jr nz, .asm_16c5 ld a, $ff ld [wObjectFollow_Leader], a -.asm_16c5: ; 00:16c5 +.asm_16c5: ld a, b call GetObjectStruct ld bc, OBJECT_LENGTH @@ -203,10 +203,10 @@ Function16fb:: ld hl, OBJECT_FACING add hl, bc ld [hl], $0 -.asm_171f: ; 00:171f +.asm_171f: ret -CheckObjectVisibility:: ; 00:1720 +CheckObjectVisibility:: ldh [hMapObjectIndexBuffer], a call GetMapObject ld hl, MAPOBJECT_OBJECT_STRUCT_ID @@ -219,11 +219,11 @@ CheckObjectVisibility:: ; 00:1720 and a ret -.asm_1735: ; 00:1735 +.asm_1735: scf ret -PushToCmdQueue:: ; 1737 +PushToCmdQueue:: push de call GetCmdQueueEmptySlot pop de @@ -285,11 +285,11 @@ PushToCmdQueue:: ; 1737 ld [hl], a ret -GetCmdQueueEmptySlot:: ; 00:178e +GetCmdQueueEmptySlot:: ld hl, wCmdQueue ld de, CMDQUEUE_ENTRY_SIZE ld a, 1 -.asm_1796: ; 00:1796 +.asm_1796: ldh [hObjectStructIndexBuffer], a ld a, [hl] and a @@ -302,11 +302,11 @@ GetCmdQueueEmptySlot:: ; 00:178e scf ret -.asm_17a6: ; 00:17a6 +.asm_17a6: xor a ret -UpdateSprites:: ; 00:17a8 +UpdateSprites:: ld a, [wVramState] bit 0, a ret z @@ -314,7 +314,7 @@ UpdateSprites:: ; 00:17a8 callab _UpdateSprites ret -GetObjectStruct:: ; 00:17bf +GetObjectStruct:: ; Puts the start of the a'th object struct into bc ld bc, $28 ld hl, wObjectStructs @@ -338,7 +338,7 @@ Function17cd:: ret ; sets carry flag if the sprite data includes "in-motion" sprites -IsAnimatedSprite:: ; 00:17de +IsAnimatedSprite:: push hl push bc ld c, a @@ -356,7 +356,7 @@ IsAnimatedSprite:: ; 00:17de pop hl ret -.NonAnimatedSprites: ; 00:17f1 +.NonAnimatedSprites: db SPRITE_KABIGON db SPRITE_POKE_BALL db SPRITE_POKEDEX @@ -395,10 +395,10 @@ Function1813:: set 5, [hl] ret -Function1828:: ; 00:1828 +Function1828:: ld bc, wObjectStructs xor a -.asm_182c: ; 00:182c +.asm_182c: push af ld hl, OBJECT_SPRITE add hl, bc @@ -408,7 +408,7 @@ Function1828:: ; 00:1828 ld hl, OBJECT_FLAGS + 1 add hl, bc set 5, [hl] -.asm_183b: ; 00:183b +.asm_183b: ld hl, OBJECT_LENGTH add hl, bc ld b, h @@ -423,7 +423,7 @@ Function1848:: push bc ld bc, wObjectStructs xor a -.asm_184d: ; 00:184d +.asm_184d: push af ld hl, OBJECT_SPRITE add hl, bc @@ -433,7 +433,7 @@ Function1848:: ld hl, OBJECT_FLAGS + 1 add hl, bc res 5, [hl] -.asm_185c: ; 00:185c +.asm_185c: ld hl, OBJECT_LENGTH add hl, bc ld b, h @@ -460,7 +460,7 @@ Function186a:: Function187f:: xor a -.asm_1880: ; 00:1880 +.asm_1880: push af push hl ld b, a @@ -484,7 +484,7 @@ Function187f:: jr nz, .asm_1880 ret -._hl_: ; 00:189f +._hl_: jp hl Function18a0:: @@ -526,7 +526,7 @@ Function18cc:: ld [hl], $0 ret -Function18e5:: ; 00:18e5 +Function18e5:: ld hl, OBJECT_DIRECTION_WALKING add hl, bc ld a, [hl] @@ -562,7 +562,7 @@ Function1908:: ld [wCenteredObject], a ret -Function191d:: ; 00:191d +Function191d:: ld a, [wCenteredObject] cp $ff ret z @@ -586,7 +586,7 @@ StartFollow:: callab QueueFollowerFirstStep ret -SetLeaderIfVisible:: ; 00:1945 +SetLeaderIfVisible:: call CheckObjectVisibility ret c ldh a, [hObjectStructIndexBuffer] @@ -598,7 +598,7 @@ ResetLeader:: ld [wObjectFollow_Leader], a ret -SetFollowerIfVisible:: ; 00:1954 +SetFollowerIfVisible:: push af call ResetFollower pop af @@ -614,7 +614,7 @@ SetFollowerIfVisible:: ; 00:1954 ld [wObjectFollow_Follower], a ret -ResetFollower:: ; 00:196f +ResetFollower:: ld a, [wObjectFollow_Follower] and a ret z @@ -672,7 +672,7 @@ Function19b5:: res 7, [hl] ret -SetObjectFacing:: ; 19C0 +SetObjectFacing:: ; a is NPC number, d is direction push de call CheckObjectVisibility diff --git a/home/menu.asm b/home/menu.asm index e9d41bb..d4b6039 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -22,7 +22,7 @@ MenuTextBox:: ; unused ret -.Data: ; 00:1d65 +.Data: db MENU_BACKUP_TILES ; flags menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw VRAM_Begin @@ -63,11 +63,11 @@ VerticalMenu:: call Get2DMenuJoypad bit 1, a jr z, .asm_1dac -.asm_1daa: ; 00:1daa +.asm_1daa: scf ret -.asm_1dac: ; 00:1dac +.asm_1dac: and a ret @@ -292,7 +292,7 @@ RunMenuItemPrintingFunction:: call MenuBoxCoord2Tile ld bc, 2 * SCREEN_WIDTH + 2 add hl, bc -.asm_1f09: ; 00:1f09 +.asm_1f09: inc de ld a, [de] cp -1 diff --git a/home/menu_window.asm b/home/menu_window.asm index 5f8465e..4bb44d7 100644 --- a/home/menu_window.asm +++ b/home/menu_window.asm @@ -309,12 +309,12 @@ Function1c0a:: ld hl, sSpriteBuffer0 decoord 0, 0 ld bc, $168 -.asm_1c33: ; 00:1c33 +.asm_1c33: ld a, [hl] cp $61 jr c, .asm_1c39 ld [de], a -.asm_1c39: ; 00:1c39 +.asm_1c39: inc hl inc de dec bc diff --git a/home/misc_32c8.asm b/home/misc_32c8.asm index 3fafade..a12b81d 100644 --- a/home/misc_32c8.asm +++ b/home/misc_32c8.asm @@ -43,7 +43,7 @@ WaitPressedAny:: ; Reset hJoypadSum to clear button history xor a ldh [hJoypadSum], a -.loop: ; 00:369d +.loop: ; Wait for joypad polling. call DelayFrame @@ -53,7 +53,7 @@ WaitPressedAny:: jr z, .not_pressed and d ret nz -.not_pressed: ; 00:36a7 +.not_pressed: ; If bc < 0, don't check timeout. bit 7, b diff --git a/home/pic.asm b/home/pic.asm index 96c013b..b883093 100644 --- a/home/pic.asm +++ b/home/pic.asm @@ -2,7 +2,7 @@ INCLUDE "constants.asm" SECTION "home/pic.asm", ROM0 -UncompressSpriteData:: ; 95e (0:95e) +UncompressSpriteData:: ; bankswitches and runs _UncompressSpriteData ; bank is given in a, sprite input stream is pointed to in wSpriteInputPtr ld b, a @@ -18,7 +18,7 @@ UncompressSpriteData:: ; 95e (0:95e) call Bankswitch ret -_UncompressSpriteData:: ; 976 (0:976) +_UncompressSpriteData:: ; initializes necessary data to load a sprite and runs UncompressSpriteDataLoop ld hl, sSpriteBuffer1 ld c, (2 * SPRITEBUFFERSIZE) % $100 @@ -144,7 +144,7 @@ UncompressSpriteDataLoop:: jr nz, .writeZerosLoop jr .readNextInput -MoveToNextBufferPosition:: ; a34 (0:a34) +MoveToNextBufferPosition:: ; moves output pointer to next position ; also cancels the calling function if the all output is done (by removing the return pointer from stack) ; and calls postprocessing functions according to the unpack mode @@ -207,7 +207,7 @@ MoveToNextBufferPosition:: ; a34 (0:a34) .done jp UnpackSprite -WriteSpriteBitsToBuffer:: ; aa5 (0:aa5) +WriteSpriteBitsToBuffer:: ; writes 2 bits (from a) to the output buffer (pointed to from wSpriteOutputPtr) ld e, a ld a, [wSpriteOutputBitOffset] @@ -235,7 +235,7 @@ WriteSpriteBitsToBuffer:: ; aa5 (0:aa5) ld [hl], a ret -ReadNextInputBit:: ; acc (0:acc) +ReadNextInputBit:: ; reads next bit from input stream and returns it in a ld a, [wSpriteInputBitCounter] dec a @@ -251,7 +251,7 @@ ReadNextInputBit:: ; acc (0:acc) and $01 ret -ReadNextInputByte: ; ae7 (0:ae7) +ReadNextInputByte: ; reads next byte from input stream and returns it in a ld a, [wSpriteInputPtr] ld l, a @@ -285,7 +285,7 @@ LengthEncodingOffsetList:: dw %0111111111111111 dw %1111111111111111 -UnpackSprite:: ; b1b (0:b1b) +UnpackSprite:: ; unpacks the sprite data depending on the unpack mode ld a, [wSpriteUnpackMode] cp $02 @@ -383,7 +383,7 @@ SpriteDifferentialDecode:: ld [wSpriteCurPosY], a ret -DifferentialDecodeNybble:: ; bc9 (0:bc9) +DifferentialDecodeNybble:: ; decodes the nybble stored in a. Last decoded data is assumed to be in e (needed to determine if initial value is 0 or 1) srl a ; c=a%2, a/=2 ld c, $00 @@ -463,7 +463,7 @@ DecodeNybble1TableFlipped:: dn $e, $6 dn $2, $a -XorSpriteChunks:: ; c23 (0:c23) +XorSpriteChunks:: ; combines the two loaded chunks with xor (the chunk loaded second is the destination). The source chunk is differentially decoded beforehand. xor a ld [wSpriteCurPosX], a @@ -528,7 +528,7 @@ XorSpriteChunks:: ; c23 (0:c23) ld [wSpriteCurPosX], a ret -ReverseNybble:: ; c93 (0:c93) +ReverseNybble:: ; reverses the bits in the nybble given in register a ld de, NybbleReverseTable add e @@ -539,7 +539,7 @@ ReverseNybble:: ; c93 (0:c93) ld a, [de] ret -ResetSpriteBufferPointers:: ; c9d (0:c9d) +ResetSpriteBufferPointers:: ; resets sprite buffer pointers to buffer 1 and 2, depending on wSpriteLoadFlags ld a, [wSpriteLoadFlags] bit 0, a @@ -565,7 +565,7 @@ ResetSpriteBufferPointers:: ; c9d (0:c9d) NybbleReverseTable:: db $0, $8, $4, $c, $2, $a, $6 ,$e, $1, $9, $5, $d, $3, $b, $7 ,$f -UnpackSpriteMode2:: ; cd3 (0:cd3) +UnpackSpriteMode2:: ; combines the two loaded chunks with xor (the chunk loaded second is the destination). Both chunks are differentially decoded beforehand. call ResetSpriteBufferPointers ld a, [wSpriteFlipped] @@ -582,7 +582,7 @@ UnpackSpriteMode2:: ; cd3 (0:cd3) ld [wSpriteFlipped], a jp XorSpriteChunks -StoreSpriteOutputPointer:: ; cf3 (0:cf3) +StoreSpriteOutputPointer:: ; stores hl into the output pointers ld a, l ld [wSpriteOutputPtr], a diff --git a/home/text.asm b/home/text.asm index 4996c99..18722b0 100644 --- a/home/text.asm +++ b/home/text.asm @@ -2,17 +2,17 @@ INCLUDE "constants.asm" SECTION "home/text.asm", ROM0 -ClearBox:: ; 00:0e18 +ClearBox:: ; Fill a c*b box at hl with blank tiles. ld a, " " ; fallthrough FillBoxWithByte:: ld de, SCREEN_WIDTH -.asm_0e1d: ; 00:0e1d +.asm_0e1d: push hl push bc -.asm_0e1f: ; 00:0e1f +.asm_0e1f: ld [hli], a dec c jr nz, .asm_0e1f @@ -23,7 +23,7 @@ FillBoxWithByte:: jr nz, .asm_0e1d ret -ClearTileMap:: ; 00:0e2a +ClearTileMap:: ; Fill wTileMap with blank tiles. hlcoord 0, 0 @@ -35,7 +35,7 @@ ClearTileMap:: ; 00:0e2a ret z jp WaitBGMap -DrawTextBox:: ; 00:0e3d +DrawTextBox:: ; Top push hl @@ -74,7 +74,7 @@ DrawTextBox:: ; 00:0e3d ret ; e6a -.PlaceChars: ; e6a +.PlaceChars: ; Place char a c times. ld d, c .loop @@ -105,9 +105,9 @@ SpeechTextBox:: ld c, TEXTBOX_INNERW jp DrawTextBox -PlaceString:: ; 00:0e93 +PlaceString:: push hl -PlaceNextChar:: ; 00:0e94 +PlaceNextChar:: ld a, [de] cp "@" jr nz, CheckDict @@ -116,7 +116,7 @@ PlaceNextChar:: ; 00:0e94 pop hl ret -CheckDict:: ; 00:0e9d +CheckDict:: dict: MACRO if \1 == 0 and a @@ -134,7 +134,7 @@ ENDM push hl jp NextChar -.asm_0eaa: ; 00:0eaa +.asm_0eaa: cp "<LINE>" jr nz, .asm_0eb6 pop hl @@ -142,7 +142,7 @@ ENDM push hl jp NextChar -.asm_0eb6: ; 00:0eb6 +.asm_0eb6: dict 0, NullChar dict "<SCROLL>", _ContTextNoPause dict "<_CONT>", _ContText @@ -168,7 +168,7 @@ ENDM jr z, .diacritic cp "゙" jr nz, .not_diacritic -.diacritic: ; 00:0f21 +.diacritic: push hl ld bc, -SCREEN_WIDTH add hl, bc @@ -176,7 +176,7 @@ ENDM pop hl jr NextChar -.not_diacritic: ; 00:0f2a +.not_diacritic: cp FIRST_REGULAR_TEXT_CHAR jr nc, .place cp "パ" @@ -186,9 +186,9 @@ ENDM add "カ" - "ガ" jr .katakana_dakuten -.hiragana_dakuten: ; 00:0f3a +.hiragana_dakuten: add "か" - "が" -.katakana_dakuten: ; 00:0f3c +.katakana_dakuten: push af ld a, "゙" push hl @@ -199,15 +199,15 @@ ENDM pop af jr .place -.handakuten: ; 00:0f49 +.handakuten: cp "ぱ" jr nc, .hiragana_handakuten add "ハ" - "パ" jr .katakana_handakuten -.hiragana_handakuten: ; 00:0f51 +.hiragana_handakuten: add "は" - "ぱ" -.katakana_handakuten: ; 00:0f53 +.katakana_handakuten: push af ld a, "゚" push hl @@ -216,14 +216,14 @@ ENDM ld [hl], a pop hl pop af -.place: ; 00:0f5e +.place: ld [hli], a call PrintLetterDelay -NextChar:: ; 00:0f62 +NextChar:: inc de jp PlaceNextChar -NullChar:: ; 00:0f66 +NullChar:: ld b, h ld c, l pop hl @@ -254,27 +254,27 @@ PlacePOKe:: print_name POKeCharText SixDotsChar:: print_name SixDotsCharText GaCharacter:: print_name GaCharacterTExt -PlaceMoveTargetsName:: ; 00:0fb3 +PlaceMoveTargetsName:: ldh a, [hBattleTurn] xor $1 jr asm_0fbb -PlaceMoveUsersName:: ; 00:0fb9 +PlaceMoveUsersName:: ldh a, [hBattleTurn] -asm_0fbb: ; 00:0fbb +asm_0fbb: push de and a jr nz, .asm_0fc4 ld de, wEnemyMonNickname jr PlaceCommandCharacter -.asm_0fc4: ; 00:0fc4 +.asm_0fc4: ld de, EnemyText call PlaceString ld h, b ld l, c ld de, wBattleMonNickname -PlaceCommandCharacter: ; 00:0fcf +PlaceCommandCharacter: call PlaceString ld h, b ld l, c @@ -291,7 +291,7 @@ SixDotsCharText:: db "⋯⋯@" EnemyText:: db "てきの @" GaCharacterTExt:: db "が @" -ContText:: ; 00:1001 +ContText:: push de ld b, h ld c, l @@ -307,32 +307,32 @@ ContText:: ; 00:1001 text "<_CONT>@" db "@" -PlaceDexEnd:: ; 00:1015 +PlaceDexEnd:: ld [hl], "。" pop hl ret -PromptText:: ; 00:1019 +PromptText:: ld a, [wLinkMode] cp $3 jp z, Function1026 ld a, "▼" ldcoord_a 18, 17 -Function1026:: ; 00:1026 +Function1026:: call ProtectedWaitBGMap call ButtonSound ld a, "─" ldcoord_a 18, 17 -DoneText:: ; 00:1031 +DoneText:: pop hl ld de, .Text dec de ret -.Text:: ; 00:1037 +.Text:: db "@" -Paragraph:: ; 00:1038 +Paragraph:: push de ld a, "▼" ldcoord_a 18, 17 @@ -349,7 +349,7 @@ Paragraph:: ; 00:1038 hlcoord 1, 14 jp NextChar -_ContText:: ; 00:105e +_ContText:: ld a, "▼" ldcoord_a 18, 17 call ProtectedWaitBGMap @@ -358,7 +358,7 @@ _ContText:: ; 00:105e pop de ld a, "─" ldcoord_a 18, 17 -_ContTextNoPause:: ; 00:1070 +_ContTextNoPause:: push de call ScrollTextUpOneLine call ScrollTextUpOneLine @@ -366,7 +366,7 @@ _ContTextNoPause:: ; 00:1070 pop de jp NextChar -ScrollTextUpOneLine:: ; 107e (0:107e) +ScrollTextUpOneLine:: ; move both rows of text in the normal text box up one row ; always called twice in a row ; first time, copy the two rows of text to the "in between" rows that are usually emtpy @@ -394,13 +394,13 @@ ScrollTextUpOneLine:: ; 107e (0:107e) jr nz, .waitFrame ret -ProtectedWaitBGMap:: ; 10a0 (0:10a0) +ProtectedWaitBGMap:: push bc call WaitBGMap pop bc ret -TextCommandProcessor:: ; 10a6 (0:10a6) +TextCommandProcessor:: ; Process a string of text commands ; at hl and write text to bc ld a, [wTextBoxFlags] @@ -413,7 +413,7 @@ TextCommandProcessor:: ; 10a6 (0:10a6) ld [wTextDest + 1], a ; fall through -NextTextCommand:: ; 10b7 (0:10b7) +NextTextCommand:: ld a, [hli] cp "@" ; terminator jr nz, .doTextCommand @@ -434,7 +434,7 @@ NextTextCommand:: ; 10b7 (0:10b7) ld l, a jp hl -Text_TX_BOX:: ; 10d0 (0:10d0) +Text_TX_BOX:: ; TX_BOX ; draw a box ; little endian @@ -455,7 +455,7 @@ Text_TX_BOX:: ; 10d0 (0:10d0) pop hl jr NextTextCommand -Text_TX:: ; 10e2 (0:10e2) +Text_TX:: ; TX ; write text until "@" ; [$00]["...@"] @@ -470,7 +470,7 @@ Text_TX:: ; 10e2 (0:10e2) inc hl jr NextTextCommand -Text_TX_RAM:: ; 10ef (0:10ef) +Text_TX_RAM:: ; text_from_ram ; write text from a ram address ; little endian @@ -487,7 +487,7 @@ Text_TX_RAM:: ; 10ef (0:10ef) pop hl jr NextTextCommand -Text_TX_BCD:: ; 10fd (0:10fd) +Text_TX_BCD:: ; TX_BCD ; write bcd from address, typically ram ; [$02][addr][flags] @@ -508,7 +508,7 @@ Text_TX_BCD:: ; 10fd (0:10fd) pop hl jr NextTextCommand -Text_TX_MOVE:: ; 110f (0:110f) +Text_TX_MOVE:: ; TX_MOVE ; move to a new tile ; [$03][addr] @@ -521,7 +521,7 @@ Text_TX_MOVE:: ; 110f (0:110f) ld b, a jp NextTextCommand -Text_TX_LOW:: ; 111d (0:111d) +Text_TX_LOW:: ; TX_LOW ; write text at (1,16) ; [$05] @@ -530,7 +530,7 @@ Text_TX_LOW:: ; 111d (0:111d) jp NextTextCommand ; 0x1124 -Text_WAIT_BUTTON:: ; 1124 (0:1124) +Text_WAIT_BUTTON:: ; TX_WAITBUTTON ; wait for button press ; show arrow @@ -548,7 +548,7 @@ Text_WAIT_BUTTON:: ; 1124 (0:1124) pop hl jp NextTextCommand -Text_TX_SCROLL:: ; 113f (0:113f) +Text_TX_SCROLL:: ; TX_SCROLL ; pushes text up two lines and sets the BC cursor to the border tile ; below the first character column of the text box. @@ -561,7 +561,7 @@ Text_TX_SCROLL:: ; 113f (0:113f) coord bc, TEXTBOX_INNERX, TEXTBOX_INNERY + 2 jp NextTextCommand -Text_START_ASM:: ; 1151 (0:1151) +Text_START_ASM:: ; TX_ASM ; Executes code following this command. ; Text processing is resumed upon returning. @@ -571,7 +571,7 @@ Text_START_ASM:: ; 1151 (0:1151) push de jp hl -Text_TX_NUM:: ; 1157 (0:1157) +Text_TX_NUM:: ; TX_NUM ; [$09][addr][hi:bytes lo:digits] pop hl @@ -598,7 +598,7 @@ Text_TX_NUM:: ; 1157 (0:1157) jp NextTextCommand ; 0x1175 -Text_TX_EXIT: ; 1175 (0:1175) +Text_TX_EXIT: ; TX_EXIT ; [$0A] push bc @@ -614,7 +614,7 @@ Text_TX_EXIT: ; 1175 (0:1175) jp NextTextCommand ; 0x1189 -Text_PlaySound:: ; 1189 (0:1189) +Text_PlaySound:: ; Text_PlaySound ; [0B|0E..13] Play Sound Effects ; [14..16] Play Pokémon Cries @@ -672,7 +672,7 @@ Text_PlaySound:: ; 1189 (0:1189) dbw TX_CRY_15, MON_PIGEOT dbw TX_CRY_16, MON_JUGON -Text_TX_DOTS: ; 11e1 (0:11e1) +Text_TX_DOTS: pop hl ld a, [hli] ld d, a @@ -698,7 +698,7 @@ Text_TX_DOTS: ; 11e1 (0:11e1) pop hl jp NextTextCommand -Text_TX_LINK_WAIT_BUTTON:: ; 1203 (0:1203) +Text_TX_LINK_WAIT_BUTTON:: push bc call ButtonSound pop bc @@ -706,7 +706,7 @@ Text_TX_LINK_WAIT_BUTTON:: ; 1203 (0:1203) jp NextTextCommand ; 0x120c -TextCommands:: ; 120c +TextCommands:: dw Text_TX dw Text_TX_RAM dw Text_TX_BCD diff --git a/home/unknown_388f.asm b/home/unknown_388f.asm index 798dedb..16fa16c 100644 --- a/home/unknown_388f.asm +++ b/home/unknown_388f.asm @@ -83,7 +83,7 @@ Function3920:: call WriteIntod637 ret -.asm_392d: ; 00:392d +.asm_392d: ld hl, wJoypadFlags res 4, [hl] ld hl, .text diff --git a/home/vcopy.asm b/home/vcopy.asm index aae4a2f..e3d4be8 100644 --- a/home/vcopy.asm +++ b/home/vcopy.asm @@ -2,7 +2,7 @@ INCLUDE "constants.asm" SECTION "home/vcopy.asm", ROM0 -RedrawRowOrColumn:: ; 123a (0:123a) +RedrawRowOrColumn:: ; This function redraws a BG row of height 2 or a BG column of width 2. ; One of its main uses is redrawing the row or column that will be exposed upon ; scrolling the BG when the player takes a step. Redrawing only the exposed @@ -116,7 +116,7 @@ RedrawRowOrColumn:: ; 123a (0:123a) dw RedrawFlashlightColumn3 ; $1301 dw RedrawFlashlightColumn3 ; $1301 -RedrawFlashlightColumn0:: ; 12c3 (0:12c3) +RedrawFlashlightColumn0:: ldh a, [hSCX] and $07 ret nz ; wait till we moved one complete tile in X @@ -131,7 +131,7 @@ RedrawFlashlightColumn0:: ; 12c3 (0:12c3) call _RedrawFlashlightColumn ret -RedrawFlashlightColumn1:: ; 12dc (0:12dc) +RedrawFlashlightColumn1:: ld a, [wRedrawFlashlightBlackDst0] ld e, a ld a, [wRedrawFlashlightBlackDst0 + 1] @@ -140,7 +140,7 @@ RedrawFlashlightColumn1:: ; 12dc (0:12dc) ret ; 0x12e8 -RedrawFlashlightColumn2:: ; 12e8 (0:12e8) +RedrawFlashlightColumn2:: ldh a, [hSCX] and $0f ret nz ; wait till we moved two complete tiles in X @@ -155,7 +155,7 @@ RedrawFlashlightColumn2:: ; 12e8 (0:12e8) call _RedrawFlashlightColumn ret -RedrawFlashlightColumn3:: ; 1301 (0:1301) +RedrawFlashlightColumn3:: ld a, [wRedrawFlashlightBlackDst1] ld e, a ld a, [wRedrawFlashlightBlackDst1 + 1] @@ -165,7 +165,7 @@ RedrawFlashlightColumn3:: ; 1301 (0:1301) ldh [hRedrawRowOrColumnMode], a ; end flashlight redraw ret -RedrawFlashlightRow0:: ; 1310 (0:1310) +RedrawFlashlightRow0:: ldh a, [hSCY] and $07 ret nz ; wait till we moved one complete tile in Y @@ -180,7 +180,7 @@ RedrawFlashlightRow0:: ; 1310 (0:1310) call _RedrawFlashlightRow ret -RedrawFlashlightRow1:: ; 1329 (0:1329) +RedrawFlashlightRow1:: ld a, [wRedrawFlashlightBlackDst0] ld e, a ld a, [wRedrawFlashlightBlackDst0 + 1] @@ -189,7 +189,7 @@ RedrawFlashlightRow1:: ; 1329 (0:1329) ret ; 0x12e8 -RedrawFlashlightRow2:: ; 1335 (0:1335) +RedrawFlashlightRow2:: ldh a, [hSCY] and $0f ret nz ; wait till we moved two complete tiles in Y @@ -204,7 +204,7 @@ RedrawFlashlightRow2:: ; 1335 (0:1335) call _RedrawFlashlightRow ret -RedrawFlashlightRow3:: ; 134e (0:134e) +RedrawFlashlightRow3:: ld a, [wRedrawFlashlightBlackDst1] ld e, a ld a, [wRedrawFlashlightBlackDst1 + 1] @@ -214,7 +214,7 @@ RedrawFlashlightRow3:: ; 134e (0:134e) ldh [hRedrawRowOrColumnMode], a ; end flashlight redraw ret -_RedrawFlashlightColumn:: ; 135d (0:135d) +_RedrawFlashlightColumn:: ld a, [wRedrawFlashlightWidthHeight] add a ld c, a @@ -245,7 +245,7 @@ _RedrawFlashlightColumn:: ; 135d (0:135d) ldh [hRedrawRowOrColumnMode], a ; has four directions ret -_RedrawFlashlightRow:: ; 1382 (0:1382) +_RedrawFlashlightRow:: ld a, [wRedrawFlashlightWidthHeight] ld c, a .loop @@ -270,7 +270,7 @@ _RedrawFlashlightRow:: ; 1382 (0:1382) ldh [hRedrawRowOrColumnMode], a ; has four directions ret -_RedrawFlashlightColumnBlack:: ; 139f (0:139f) +_RedrawFlashlightColumnBlack:: ld l, e ld h, d ld b, "■" @@ -293,7 +293,7 @@ _RedrawFlashlightColumnBlack:: ; 139f (0:139f) ldh [hRedrawRowOrColumnMode], a ; has four directions ret -_RedrawFlashlightRowBlack:: ; 13bd (0:13bd) +_RedrawFlashlightRowBlack:: ld l, e ld h, d ld b, "■" @@ -319,7 +319,7 @@ _RedrawFlashlightRowBlack:: ; 13bd (0:13bd) ldh [hRedrawRowOrColumnMode], a ; has four directions ret -WaitForAutoBgMapTransfer:: ; 13dc (0:13dc) +WaitForAutoBgMapTransfer:: .loop ldh a, [hBGMapMode] and a @@ -341,7 +341,7 @@ WaitForAutoBgMapTransfer:: ; 13dc (0:13dc) ; on when talking to sprites, battling, using menus, etc. This is because ; the above function, RedrawRowOrColumn, is used when walking to ; improve efficiency. -AutoBgMapTransfer:: ; 13ee (0:13ee) +AutoBgMapTransfer:: ldh a, [hBGMapMode] and a ret z @@ -386,7 +386,7 @@ AutoBgMapTransfer:: ; 13ee (0:13ee) ld a, $06 ; 6 rows of SCREEN_WIDTH each ; fallthrough -TransferBgRows:: ; 1430 (0:1430) +TransferBgRows:: ld bc, BG_MAP_WIDTH - SCREEN_WIDTH + 1 .loop @@ -412,7 +412,7 @@ TransferBgRows:: ; 1430 (0:1430) ld sp, hl ret -VBlankCopyDouble:: ; 1470 (0:1470) +VBlankCopyDouble:: ; Copy [wVBCopyDoubleSize] 1bpp tiles ; from wVBCopyDoubleSrc to wVBCopyDoubleDst. ; wVBCopyDoubleDst must be aligned to 0x10 bytes. @@ -474,7 +474,7 @@ VBlankCopyDouble:: ; 1470 (0:1470) ld sp, hl ret -VBlankCopy:: ; 14c7 (0:14c7) +VBlankCopy:: ; Copy 16 * [wVBCopySize] bytes ; from wVBCopySrc to wVBCopyDst. ; wVBCopyDst must be aligned to 0x10 bytes. @@ -527,7 +527,7 @@ VBlankCopy:: ; 14c7 (0:14c7) ld sp, hl ret -AnimateTileset:: ; 1522 (0:1522) +AnimateTileset:: ldh a, [hROMBank] push af ld a, BANK(AnimateTilesetImpl) @@ -537,14 +537,14 @@ AnimateTileset:: ; 1522 (0:1522) jp Bankswitch ; 0x1531 -EnableSprites:: ; 1531 (0:1531) +EnableSprites:: nop ld hl, rLCDC set rLCDC_SPRITES_ENABLE, [hl] ret ; 0x1538 -TransferToolgearRow: ; 1538 (0:1538) +TransferToolgearRow: ; TransferToolgearRow ; Copy second line of toolgear to window ld a, [wToolgearFlags] @@ -563,7 +563,7 @@ TransferToolgearRow: ; 1538 (0:1538) ld a, $01 jp TransferBgRows -VBlankCopyFar:: ; 1558 (0:1558) +VBlankCopyFar:: ; Copy 0x10 * [wVBCopyFarSize] bytes ; from wVBCopyFarSrcBank::wVBCopyFarSrc to wVBCopyFarDst. ; wVBCopyFarDst must be aligned to 0x10 bytes. |
