diff options
Diffstat (limited to 'home')
-rw-r--r-- | home/joypad.asm | 36 | ||||
-rw-r--r-- | home/map.asm | 54 | ||||
-rw-r--r-- | home/map_objects.asm | 18 | ||||
-rw-r--r-- | home/menu.asm | 2 |
4 files changed, 55 insertions, 55 deletions
diff --git a/home/joypad.asm b/home/joypad.asm index d5bfc83f3..450fa28cb 100644 --- a/home/joypad.asm +++ b/home/joypad.asm @@ -356,14 +356,14 @@ JoyTextDelay:: ; a57 ; a80 Functiona80:: ; a80 - ld a, [hConnectionStripLength] + ld a, [hMapObjectIndexBuffer1] push af - ld a, [hConnectedMapWidth] + ld a, [hMapObjectIndexBuffer2] push af xor a - ld [hConnectionStripLength], a + ld [hMapObjectIndexBuffer1], a ld a, 6 - ld [hConnectedMapWidth], a + ld [hMapObjectIndexBuffer2], a .loop push hl @@ -377,9 +377,9 @@ Functiona80:: ; a80 jr z, .loop pop af - ld [hConnectedMapWidth], a + ld [hMapObjectIndexBuffer2], a pop af - ld [hConnectionStripLength], a + ld [hMapObjectIndexBuffer1], a ret ; aa5 @@ -459,37 +459,37 @@ Functionb06:: ; b06 cp b pop bc jr nz, .asm_b27 - ld a, [hConnectionStripLength] + ld a, [hMapObjectIndexBuffer1] dec a - ld [hConnectionStripLength], a + ld [hMapObjectIndexBuffer1], a ret nz - ld a, [hConnectedMapWidth] + ld a, [hMapObjectIndexBuffer2] dec a - ld [hConnectedMapWidth], a + ld [hMapObjectIndexBuffer2], a ret nz ld a, "─" ld [hl], a ld a, -1 - ld [hConnectionStripLength], a + ld [hMapObjectIndexBuffer1], a ld a, 6 - ld [hConnectedMapWidth], a + ld [hMapObjectIndexBuffer2], a ret .asm_b27 - ld a, [hConnectionStripLength] + ld a, [hMapObjectIndexBuffer1] and a ret z dec a - ld [hConnectionStripLength], a + ld [hMapObjectIndexBuffer1], a ret nz dec a - ld [hConnectionStripLength], a - ld a, [hConnectedMapWidth] + ld [hMapObjectIndexBuffer1], a + ld a, [hMapObjectIndexBuffer2] dec a - ld [hConnectedMapWidth], a + ld [hMapObjectIndexBuffer2], a ret nz ld a, $6 - ld [hConnectedMapWidth], a + ld [hMapObjectIndexBuffer2], a ld a, $ee ld [hl], a ret diff --git a/home/map.asm b/home/map.asm index 7f1c83b63..9ddb2f88e 100644 --- a/home/map.asm +++ b/home/map.asm @@ -729,9 +729,9 @@ ChangeMap:: ; 24e4 ld hl, OverworldMap ld a, [MapWidth] - ld [hConnectedMapWidth], a + ld [hMapObjectIndexBuffer2], a add $6 - ld [hConnectionStripLength], a + ld [hMapObjectIndexBuffer1], a ld c, a ld b, 0 rept 3 @@ -750,7 +750,7 @@ endr ld b, a .asm_250c push hl - ld a, [hConnectedMapWidth] + ld a, [hMapObjectIndexBuffer2] ld c, a .asm_2510 ld a, [de] @@ -759,7 +759,7 @@ endr dec c jr nz, .asm_2510 pop hl - ld a, [hConnectionStripLength] + ld a, [hMapObjectIndexBuffer1] add l ld l, a jr nc, .asm_251e @@ -794,10 +794,10 @@ FillMapConnections:: ; 2524 ld e, a ld a, [NorthConnectionStripLocation + 1] ld d, a - ld a, [NorthConnectionStripLength] - ld [hConnectionStripLength], a - ld a, [NorthConnectedMapWidth] - ld [hConnectedMapWidth], a + ld a, [NorthMapObjectIndexBuffer1] + ld [hMapObjectIndexBuffer1], a + ld a, [NorthMapObjectIndexBuffer2] + ld [hMapObjectIndexBuffer2], a call FillNorthConnectionStrip .South @@ -817,10 +817,10 @@ FillMapConnections:: ; 2524 ld e, a ld a, [SouthConnectionStripLocation + 1] ld d, a - ld a, [SouthConnectionStripLength] - ld [hConnectionStripLength], a - ld a, [SouthConnectedMapWidth] - ld [hConnectedMapWidth], a + ld a, [SouthMapObjectIndexBuffer1] + ld [hMapObjectIndexBuffer1], a + ld a, [SouthMapObjectIndexBuffer2] + ld [hMapObjectIndexBuffer2], a call FillSouthConnectionStrip .West @@ -843,7 +843,7 @@ FillMapConnections:: ; 2524 ld a, [WestConnectionStripLength] ld b, a ld a, [WestConnectedMapWidth] - ld [hConnectionStripLength], a + ld [hMapObjectIndexBuffer1], a call FillWestConnectionStrip .East @@ -866,7 +866,7 @@ FillMapConnections:: ; 2524 ld a, [EastConnectionStripLength] ld b, a ld a, [EastConnectedMapWidth] - ld [hConnectionStripLength], a + ld [hMapObjectIndexBuffer1], a call FillEastConnectionStrip .Done @@ -882,7 +882,7 @@ FillSouthConnectionStrip:: ; 25d3 push de push hl - ld a, [hConnectionStripLength] + ld a, [hMapObjectIndexBuffer1] ld b, a .x ld a, [hli] @@ -892,7 +892,7 @@ FillSouthConnectionStrip:: ; 25d3 jr nz, .x pop hl - ld a, [hConnectedMapWidth] + ld a, [hMapObjectIndexBuffer2] ld e, a ld d, 0 add hl, de @@ -917,7 +917,7 @@ FillEastConnectionStrip:: ; 25f6 .asm_25f6 ld a, [MapWidth] add 6 - ld [hConnectedMapWidth], a + ld [hMapObjectIndexBuffer2], a push de @@ -933,13 +933,13 @@ FillEastConnectionStrip:: ; 25f6 inc de pop hl - ld a, [hConnectionStripLength] + ld a, [hMapObjectIndexBuffer1] ld e, a ld d, 0 add hl, de pop de - ld a, [hConnectedMapWidth] + ld a, [hMapObjectIndexBuffer2] add e ld e, a jr nc, .asm_2617 @@ -1171,7 +1171,7 @@ CoordinatesEventText:: ; 2702 Function2707:: ; 2707 - ld a, [hConnectionStripLength] + ld a, [hMapObjectIndexBuffer1] ld e, a ld d, $0 ld hl, wd81e @@ -1181,7 +1181,7 @@ Function2707:: ; 2707 ; 2712 Function2712:: ; 2712 - ld a, [hConnectionStripLength] + ld a, [hMapObjectIndexBuffer1] ld e, a ld d, $0 ld hl, wd81e @@ -1191,7 +1191,7 @@ Function2712:: ; 2712 ; 271e Function271e:: ; 271e - ld a, [hConnectionStripLength] + ld a, [hMapObjectIndexBuffer1] ld e, a ld d, $0 ld hl, wd81e @@ -1463,7 +1463,7 @@ SaveScreen:: ; 289d ld de, XCoord + 1 ld a, [MapWidth] add $6 - ld [hConnectionStripLength], a + ld [hMapObjectIndexBuffer1], a ld a, [wd151] and a jr z, .asm_28cb @@ -1477,7 +1477,7 @@ SaveScreen:: ; 289d .asm_28c0 ld de, wdcbf - ld a, [hConnectionStripLength] + ld a, [hMapObjectIndexBuffer1] ld c, a ld b, $0 add hl, bc @@ -1512,7 +1512,7 @@ LoadNeighboringBlockData:: ; 28e3 ld l, a ld a, [MapWidth] add $6 - ld [hConnectionStripLength], a + ld [hMapObjectIndexBuffer1], a ld de, XCoord + 1 ld b, $6 ld c, $5 @@ -1537,7 +1537,7 @@ Function28f7:: ; 28f7 .asm_2908 pop hl - ld a, [hConnectionStripLength] + ld a, [hMapObjectIndexBuffer1] ld c, a ld b, $0 add hl, bc @@ -2145,7 +2145,7 @@ GetMapBank:: ; 2c29 GetAnyMapBank:: ; 2c31 push hl push de - ld de, $0000 + ld de, NONE call GetAnyMapHeaderMember ld a, c pop de diff --git a/home/map_objects.asm b/home/map_objects.asm index ac363b31d..74273f343 100644 --- a/home/map_objects.asm +++ b/home/map_objects.asm @@ -21,7 +21,7 @@ Function180e:: ; 180e ld hl, UsedSprites + 2 ld c, SPRITE_GFX_LIST_CAPACITY - 1 ld b, a - ld a, [hConnectionStripLength] + ld a, [hMapObjectIndexBuffer1] cp 0 jr z, .nope ld a, b @@ -234,14 +234,14 @@ GetMapObject:: ; 18d2 Function18de:: ; 18de ; Sets carry if the object is not visible on the screen. - ld [hConnectionStripLength], a + ld [hMapObjectIndexBuffer1], a call GetMapObject ld hl, MAPOBJECT_OBJECT_STRUCT_ID add hl, bc ld a, [hl] cp -1 jr z, .not_visible - ld [hConnectedMapWidth], a + ld [hMapObjectIndexBuffer2], a call GetObjectStruct and a ret @@ -326,7 +326,7 @@ Function18f5:: ; 18f5 ; 194d Function194d:: ; 194d - ld [hConnectionStripLength], a + ld [hMapObjectIndexBuffer1], a call GetMapObject call CopyObjectStruct ret @@ -335,16 +335,16 @@ Function194d:: ; 194d _CopyObjectStruct:: ; 1956 - ld [hConnectionStripLength], a + ld [hMapObjectIndexBuffer1], a call Function271e - ld a, [hConnectionStripLength] + ld a, [hMapObjectIndexBuffer1] call GetMapObject callba CopyObjectStruct ret ; 1967 Function1967:: ; 1967 - ld [hConnectionStripLength], a + ld [hMapObjectIndexBuffer1], a call GetMapObject ld hl, MAPOBJECT_OBJECT_STRUCT_ID add hl, bc @@ -569,12 +569,12 @@ endr ld [hl], a ld a, [bc] inc bc - ld hl, OBJECT_04 + ld hl, OBJECT_FLAGS1 add hl, de ld [hl], a ld a, [bc] inc bc - ld hl, OBJECT_FLAGS + ld hl, OBJECT_FLAGS2 add hl, de ld [hl], a ld a, [bc] diff --git a/home/menu.asm b/home/menu.asm index c4f0ed0d9..a63f74c08 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -62,7 +62,7 @@ MenuDataHeader_0x1d75:: ; 1d75 db $40 ; tile backup db 0, 0 ; start coords db 17, 19 ; end coords - dw $0000 + dw NONE db 1 ; default option ; 1d7d |