diff options
-rw-r--r-- | engine/battle/core.asm | 14 | ||||
-rw-r--r-- | engine/events/overworld.asm | 2 | ||||
-rw-r--r-- | engine/gfx/mon_icons.asm | 8 | ||||
-rw-r--r-- | engine/overworld/cmd_queue.asm | 4 | ||||
-rw-r--r-- | engine/overworld/events.asm | 2 | ||||
-rw-r--r-- | engine/overworld/map_objects.asm | 26 | ||||
-rw-r--r-- | engine/overworld/movement.asm | 10 | ||||
-rw-r--r-- | engine/overworld/npc_movement.asm | 22 | ||||
-rw-r--r-- | engine/overworld/player_movement.asm | 2 | ||||
-rw-r--r-- | engine/overworld/player_object.asm | 28 | ||||
-rw-r--r-- | engine/overworld/scripting.asm | 4 | ||||
-rw-r--r-- | engine/pokemon/party_menu.asm | 6 | ||||
-rw-r--r-- | home/joypad.asm | 36 | ||||
-rw-r--r-- | home/map.asm | 10 | ||||
-rw-r--r-- | home/map_objects.asm | 14 | ||||
-rw-r--r-- | home/text.asm | 2 | ||||
-rw-r--r-- | hram.asm | 4 |
17 files changed, 97 insertions, 97 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm index aca0185e..728fa9f4 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -2874,7 +2874,7 @@ MonFaintedAnimation: db " @" SlideBattlePicOut: - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ld c, a .loop push bc @@ -2897,7 +2897,7 @@ SlideBattlePicOut: ret .DoFrame: - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] ld c, a cp $8 jr nz, .back @@ -8618,7 +8618,7 @@ CopyBackpic: .LoadTrainerBackpicAsOAM: ld hl, wVirtualOAMSprite00 xor a - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ld b, 6 ld e, (SCREEN_WIDTH + 1) * TILE_WIDTH .outer_loop @@ -8629,10 +8629,10 @@ CopyBackpic: inc hl ld [hl], e ; x inc hl - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] ld [hli], a ; tile id inc a - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ld a, PAL_BATTLE_OB_PLAYER ld [hli], a ; attributes ld a, d @@ -8640,9 +8640,9 @@ CopyBackpic: ld d, a dec c jr nz, .inner_loop - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] add $3 - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ld a, e add 1 * TILE_WIDTH ld e, a diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index 1a12bfe3..b01bf5ca 100644 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -1315,7 +1315,7 @@ GetFacingObject: farcall CheckFacingObject jr nc, .fail - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] call GetObjectStruct ld hl, OBJECT_MAP_OBJECT_INDEX add hl, bc diff --git a/engine/gfx/mon_icons.asm b/engine/gfx/mon_icons.asm index 609e48f9..49e8db89 100644 --- a/engine/gfx/mon_icons.asm +++ b/engine/gfx/mon_icons.asm @@ -43,7 +43,7 @@ LoadMenuMonIcon: PartyMenu_InitAnimatedMonIcon: ld a, [wCurIconTile] push af - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] ld hl, wPartySpecies ld e, a ld d, 0 @@ -52,7 +52,7 @@ PartyMenu_InitAnimatedMonIcon: call ReadMonMenuIcon ld [wCurIcon], a call GetMemIconGFX - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] ; y coord add a add a @@ -76,7 +76,7 @@ PartyMenu_InitAnimatedMonIcon: .SpawnItemIcon: push bc - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] ld hl, wPartyMon1Item ld bc, PARTYMON_STRUCT_LENGTH call AddNTimes @@ -104,7 +104,7 @@ PartyMenu_InitAnimatedMonIcon: SetPartyMonIconAnimSpeed: push bc - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] ld b, a call .getspeed ld a, b diff --git a/engine/overworld/cmd_queue.asm b/engine/overworld/cmd_queue.asm index 1994220e..1c56fd53 100644 --- a/engine/overworld/cmd_queue.asm +++ b/engine/overworld/cmd_queue.asm @@ -14,7 +14,7 @@ HandleCmdQueue:: ld hl, wCmdQueue xor a .loop - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ld a, [hl] and a jr z, .skip @@ -27,7 +27,7 @@ HandleCmdQueue:: .skip ld de, CMDQUEUE_ENTRY_SIZE add hl, de - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] inc a cp CMDQUEUE_CAPACITY jr nz, .loop diff --git a/engine/overworld/events.asm b/engine/overworld/events.asm index 1a6f2206..cd4daa77 100644 --- a/engine/overworld/events.asm +++ b/engine/overworld/events.asm @@ -528,7 +528,7 @@ TryObjectEvent: .IsObject: call PlayTalkObject - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] call GetObjectStruct ld hl, OBJECT_MAP_OBJECT_INDEX add hl, bc diff --git a/engine/overworld/map_objects.asm b/engine/overworld/map_objects.asm index 3c58f60f..c30bc695 100644 --- a/engine/overworld/map_objects.asm +++ b/engine/overworld/map_objects.asm @@ -1040,7 +1040,7 @@ _RandomWalkContinue: add hl, bc ld [hl], OBJECT_ACTION_STEP ld hl, wCenteredObject - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] cp [hl] jr z, .centered ld hl, OBJECT_STEP_TYPE @@ -1913,7 +1913,7 @@ ApplyMovementToFollower: ret z ld a, [wObjectFollow_Leader] ld d, a - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] cp d ret nz ld a, e @@ -2053,7 +2053,7 @@ ShakeScreen: DespawnEmote: push bc - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] ld c, a call .DeleteEmote pop bc @@ -2098,7 +2098,7 @@ InitTempObject: CopyTempObjectData: ; load into wTempObjectCopy: -; -1, -1, [de], [de + 1], [de + 2], [hMapObjectIndexBuffer], [NextMapX], [NextMapY], -1 +; -1, -1, [de], [de + 1], [de + 2], [hMapObjectIndex], [NextMapX], [NextMapY], -1 ; This spawns the object at the same place as whichever object is loaded into bc. ld hl, wTempObjectCopyMapObjectIndex ld [hl], -1 @@ -2113,7 +2113,7 @@ CopyTempObjectData: ld [hli], a ld a, [de] ld [hli], a - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] ld [hli], a push hl ld hl, OBJECT_NEXT_MAP_X @@ -2137,7 +2137,7 @@ UpdateAllObjectsFrozen:: ld bc, wObjectStructs xor a .loop - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a call DoesObjectHaveASprite jr z, .ok call UpdateObjectFrozen @@ -2146,7 +2146,7 @@ UpdateAllObjectsFrozen:: add hl, bc ld b, h ld c, l - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] inc a cp NUM_OBJECT_STRUCTS jr nz, .loop @@ -2189,13 +2189,13 @@ HideAllObjects: xor a ld bc, wObjectStructs .loop - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a call SetFacing_Standing ld hl, OBJECT_LENGTH add hl, bc ld b, h ld c, l - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] inc a cp NUM_OBJECT_STRUCTS jr nz, .loop @@ -2413,7 +2413,7 @@ DoStepsForAllObjects: ld bc, wObjectStructs xor a .loop - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a call DoesObjectHaveASprite jr z, .next call HandleObjectStep @@ -2422,7 +2422,7 @@ DoStepsForAllObjects: add hl, bc ld b, h ld c, l - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] inc a cp NUM_OBJECT_STRUCTS jr nz, .loop @@ -2485,7 +2485,7 @@ StartFollow:: SetLeaderIfVisible: call CheckObjectVisibility ret c - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] ld [wObjectFollow_Leader], a ret @@ -2511,7 +2511,7 @@ SetFollowerIfVisible: ld hl, OBJECT_STEP_TYPE add hl, bc ld [hl], STEP_TYPE_RESET - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] ld [wObjectFollow_Follower], a ret diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index 1c9899ce..4c90c92d 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -230,7 +230,7 @@ Movement_48: Movement_remove_object: call DeleteMapObject ld hl, wObjectFollow_Leader - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] cp [hl] jr nz, .not_leading ld [hl], -1 @@ -673,7 +673,7 @@ NormalStep: .skip_grass ld hl, wCenteredObject - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] cp [hl] jr z, .player @@ -697,7 +697,7 @@ TurningStep: ld [hl], OBJECT_ACTION_SPIN ld hl, wCenteredObject - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] cp [hl] jr z, .player @@ -721,7 +721,7 @@ SlideStep: ld [hl], OBJECT_ACTION_STAND ld hl, wCenteredObject - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] cp [hl] jr z, .player @@ -753,7 +753,7 @@ JumpStep: call SpawnShadow ld hl, wCenteredObject - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] cp [hl] jr z, .player diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm index 1fb8e63a..2c374ff8 100644 --- a/engine/overworld/npc_movement.asm +++ b/engine/overworld/npc_movement.asm @@ -250,7 +250,7 @@ CheckFacingObject:: .not_counter ld bc, wObjectStructs ; redundant ld a, 0 - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a call IsNPCAtCoord ret nc ld hl, OBJECT_DIRECTION_WALKING @@ -275,7 +275,7 @@ WillObjectBumpIntoSomeoneElse: jr IsNPCAtCoord IsObjectFacingSomeoneElse: ; unreferenced - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] call GetObjectStruct call .GetFacingCoords call IsNPCAtCoord @@ -315,7 +315,7 @@ IsNPCAtCoord: ld bc, wObjectStructs xor a .loop - ldh [hObjectStructIndexBuffer], a + ldh [hObjectStructIndex], a call DoesObjectHaveASprite jr z, .next @@ -345,9 +345,9 @@ IsNPCAtCoord: jr nz, .check_current_coords .continue - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] ld l, a - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] cp l jr nz, .yes @@ -362,9 +362,9 @@ IsNPCAtCoord: ld a, [hl] cp e jr nz, .next - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] ld l, a - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] cp l jr nz, .yes @@ -373,7 +373,7 @@ IsNPCAtCoord: add hl, bc ld b, h ld c, l - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] inc a cp NUM_OBJECT_STRUCTS jr nz, .loop @@ -481,7 +481,7 @@ IsNPCAtPlayerCoord: ; unreferenced ld bc, wObjectStructs xor a .loop - ldh [hObjectStructIndexBuffer], a + ldh [hObjectStructIndex], a call DoesObjectHaveASprite jr z, .next @@ -505,7 +505,7 @@ IsNPCAtPlayerCoord: ; unreferenced ld a, [hl] cp d jr nz, .check_current_coords - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] cp PLAYER_OBJECT jr z, .next jr .yes @@ -528,7 +528,7 @@ IsNPCAtPlayerCoord: ; unreferenced add hl, bc ld b, h ld c, l - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] inc a cp NUM_OBJECT_STRUCTS jr nz, .loop diff --git a/engine/overworld/player_movement.asm b/engine/overworld/player_movement.asm index c18d3b46..2f16c492 100644 --- a/engine/overworld/player_movement.asm +++ b/engine/overworld/player_movement.asm @@ -621,7 +621,7 @@ ENDM ; Returns 1 if there is no NPC in front ; Returns 2 if there is a movable NPC in front ld a, 0 - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ; Load the next X coordinate into d ld a, [wPlayerStandingMapX] ld d, a diff --git a/engine/overworld/player_object.asm b/engine/overworld/player_object.asm index d23257a1..f5a0e0be 100644 --- a/engine/overworld/player_object.asm +++ b/engine/overworld/player_object.asm @@ -26,10 +26,10 @@ SpawnPlayer: ld b, PLAYER call PlayerSpawn_ConvertCoords ld a, PLAYER_OBJECT - ldh [hObjectStructIndexBuffer], a + ldh [hObjectStructIndex], a ld de, wObjectStructs ld a, PLAYER_OBJECT - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ld bc, wMapObjects call CopyMapObjectToObjectStruct ld a, PLAYER @@ -79,7 +79,7 @@ WriteObjectXY:: ld hl, OBJECT_NEXT_MAP_Y add hl, bc ld e, [hl] - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] ld b, a call CopyDECoordsToMapObject and a @@ -134,12 +134,12 @@ CopyObjectStruct:: ld a, 1 ld de, OBJECT_LENGTH .loop - ldh [hObjectStructIndexBuffer], a + ldh [hObjectStructIndex], a ld a, [hl] and a jr z, .done add hl, de - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] inc a cp NUM_OBJECT_STRUCTS jr nz, .loop @@ -165,12 +165,12 @@ CopyMapObjectToObjectStruct: ret .CopyMapObjectToTempObject: - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] ld hl, MAPOBJECT_OBJECT_STRUCT_ID add hl, bc ld [hl], a - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] ld [wTempObjectCopyMapObjectIndex], a ld hl, MAPOBJECT_SPRITE @@ -225,7 +225,7 @@ InitializeVisibleSprites: ld bc, wMap2Object ld a, 2 .loop - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ld hl, MAPOBJECT_SPRITE add hl, bc ld a, [hl] @@ -273,7 +273,7 @@ InitializeVisibleSprites: add hl, bc ld b, h ld c, l - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] inc a cp NUM_OBJECTS jr nz, .loop @@ -312,7 +312,7 @@ CheckObjectEnteringVisibleRange:: ld bc, wMap2Object ld a, 2 .loop_v - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ld hl, MAPOBJECT_SPRITE add hl, bc ld a, [hl] @@ -347,7 +347,7 @@ CheckObjectEnteringVisibleRange:: add hl, bc ld b, h ld c, l - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] inc a cp NUM_OBJECTS jr nz, .loop_v @@ -368,7 +368,7 @@ CheckObjectEnteringVisibleRange:: ld bc, wMap2Object ld a, 2 .loop_h - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ld hl, MAPOBJECT_SPRITE add hl, bc ld a, [hl] @@ -403,7 +403,7 @@ CheckObjectEnteringVisibleRange:: add hl, bc ld b, h ld c, l - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] inc a cp NUM_OBJECTS jr nz, .loop_h @@ -676,7 +676,7 @@ FollowNotExact:: ld hl, OBJECT_SPRITE_Y add hl, de ld [hl], a - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] ld hl, OBJECT_RANGE add hl, de ld [hl], a diff --git a/engine/overworld/scripting.asm b/engine/overworld/scripting.asm index b72b6099..ef94fca7 100644 --- a/engine/overworld/scripting.asm +++ b/engine/overworld/scripting.asm @@ -876,7 +876,7 @@ Script_variablesprite: Script_appear: call GetScriptByte call UnmaskCopyMapObjectStruct - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] ld b, 0 ; clear call ApplyEventActionAppearDisappear ret @@ -888,7 +888,7 @@ Script_disappear: ldh a, [hLastTalked] .ok call DeleteObjectStruct - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] ld b, 1 ; set call ApplyEventActionAppearDisappear farcall _UpdateSprites diff --git a/engine/pokemon/party_menu.asm b/engine/pokemon/party_menu.asm index b4ecec62..60fb0dc7 100644 --- a/engine/pokemon/party_menu.asm +++ b/engine/pokemon/party_menu.asm @@ -512,7 +512,7 @@ InitPartyMenuGFX: ret z ld c, a xor a - ldh [hObjectStructIndexBuffer], a + ldh [hObjectStructIndex], a .loop push bc push hl @@ -520,9 +520,9 @@ InitPartyMenuGFX: ld a, BANK(LoadMenuMonIcon) ld e, MONICON_PARTYMENU rst FarCall - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] inc a - ldh [hObjectStructIndexBuffer], a + ldh [hObjectStructIndex], a pop hl pop bc dec c diff --git a/home/joypad.asm b/home/joypad.asm index effe8e89..18d13a5a 100644 --- a/home/joypad.asm +++ b/home/joypad.asm @@ -346,14 +346,14 @@ WaitPressAorB_BlinkCursor:: ; ; NOTE: The cursor has to be shown before calling ; this function or no cursor will be shown at all. - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] push af - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] push af xor a - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ld a, 6 - ldh [hObjectStructIndexBuffer], a + ldh [hObjectStructIndex], a .loop push hl @@ -367,9 +367,9 @@ WaitPressAorB_BlinkCursor:: jr z, .loop pop af - ldh [hObjectStructIndexBuffer], a + ldh [hObjectStructIndex], a pop af - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ret SimpleWaitPressAorB:: @@ -447,37 +447,37 @@ BlinkCursor:: cp b pop bc jr nz, .place_arrow - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] dec a - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ret nz - ldh a, [hObjectStructIndexBuffer] + ldh a, [hObjectStructIndex] dec a - ldh [hObjectStructIndexBuffer], a + ldh [hObjectStructIndex], a ret nz ld a, "─" ld [hl], a ld a, -1 - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ld a, 6 - ldh [hObjectStructIndexBuffer], a + ldh [hObjectStructIndex], a ret .place_arrow - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] and a ret z dec a - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ret nz dec a - ldh [hMapObjectIndexBuffer], a - ldh a, [hObjectStructIndexBuffer] + ldh [hMapObjectIndex], a + ldh a, [hObjectStructIndex] dec a - ldh [hObjectStructIndexBuffer], a + ldh [hObjectStructIndex], a ret nz ld a, 6 - ldh [hObjectStructIndexBuffer], a + ldh [hObjectStructIndex], a ld a, "▼" ld [hl], a ret diff --git a/home/map.asm b/home/map.asm index 788312db..172571cf 100644 --- a/home/map.asm +++ b/home/map.asm @@ -1027,7 +1027,7 @@ CoordinatesEventText:: text_end CheckObjectMask:: - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] ld e, a ld d, 0 ld hl, wObjectMasks @@ -1036,7 +1036,7 @@ CheckObjectMask:: ret MaskObject:: - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] ld e, a ld d, 0 ld hl, wObjectMasks @@ -1045,7 +1045,7 @@ MaskObject:: ret UnmaskObject:: - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] ld e, a ld d, 0 ld hl, wObjectMasks @@ -1283,7 +1283,7 @@ SaveScreen:: ld de, wScreenSave ld a, [wMapWidth] add 6 - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a ld a, [wPlayerStepDirection] and a jr z, .down @@ -1297,7 +1297,7 @@ SaveScreen:: .up ld de, wScreenSave + SCREEN_META_WIDTH - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] ld c, a ld b, 0 add hl, bc diff --git a/home/map_objects.asm b/home/map_objects.asm index 64374c97..9e80e8cb 100644 --- a/home/map_objects.asm +++ b/home/map_objects.asm @@ -20,7 +20,7 @@ GetSpriteVTile:: ld hl, wUsedSprites + 2 ld c, SPRITE_GFX_LIST_CAPACITY - 1 ld b, a - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] cp 0 jr z, .nope ld a, b @@ -210,14 +210,14 @@ GetMapObject:: CheckObjectVisibility:: ; Sets carry if the object is not visible on the screen. - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a call GetMapObject ld hl, MAPOBJECT_OBJECT_STRUCT_ID add hl, bc ld a, [hl] cp -1 jr z, .not_visible - ldh [hObjectStructIndexBuffer], a + ldh [hObjectStructIndex], a call GetObjectStruct and a ret @@ -301,21 +301,21 @@ CheckObjectTime:: ret CopyMapObjectStruct:: ; unreferenced - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a call GetMapObject call CopyObjectStruct ret UnmaskCopyMapObjectStruct:: - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a call UnmaskObject - ldh a, [hMapObjectIndexBuffer] + ldh a, [hMapObjectIndex] call GetMapObject farcall CopyObjectStruct ret ApplyDeletionToMapObject:: - ldh [hMapObjectIndexBuffer], a + ldh [hMapObjectIndex], a call GetMapObject ld hl, MAPOBJECT_OBJECT_STRUCT_ID add hl, bc diff --git a/home/text.asm b/home/text.asm index 85270b0f..19deadb5 100644 --- a/home/text.asm +++ b/home/text.asm @@ -502,7 +502,7 @@ NullChar:: ret .ErrorText - text_decimal hObjectStructIndexBuffer, 1, 2 + text_decimal hObjectStructIndex, 1, 2 text "エラー" done @@ -48,8 +48,8 @@ hGraphicStartTile:: db hMoveMon:: db UNION -hMapObjectIndexBuffer:: db -hObjectStructIndexBuffer:: db +hMapObjectIndex:: db +hObjectStructIndex:: db NEXTU hConnectionStripLength:: db hConnectedMapWidth:: db |