Name some map event reading functions.

This commit is contained in:
yenatch 2015-07-26 00:11:33 -07:00
parent ec10d9dd6f
commit abf3fc2137
3 changed files with 20 additions and 20 deletions

View File

@ -2660,7 +2660,7 @@ Function5579: ; 5579
Function5582: ; 5582 Function5582: ; 5582
ld de, ObjectStructs ld de, ObjectStructs
ld a, $d ld a, NUM_OBJECT_STRUCTS
.loop .loop
push af push af
ld hl, OBJECT_04 ld hl, OBJECT_04
@ -2780,7 +2780,7 @@ Function561d: ; 561d
; 5629 ; 5629
Function5629: ; 5629 Function5629: ; 5629
cp $10 cp NUM_OBJECTS
ret nc ret nc
call GetMapObject call GetMapObject
ld hl, MAPOBJECT_OBJECT_STRUCT_ID ld hl, MAPOBJECT_OBJECT_STRUCT_ID
@ -2788,7 +2788,7 @@ Function5629: ; 5629
ld a, [hl] ld a, [hl]
cp -1 cp -1
ret z ret z
cp $d cp NUM_OBJECT_STRUCTS
ret nc ret nc
call GetObjectStruct call GetObjectStruct
call GetObjectSprite call GetObjectSprite

View File

@ -393,7 +393,7 @@ LoadMapAttributes:: ; 2309
call SwitchToMapScriptHeaderBank call SwitchToMapScriptHeaderBank
call Function234f call Function234f
xor a xor a
call Function2336 call ReadMapEventHeader
ret ret
; 2317 ; 2317
@ -402,7 +402,7 @@ LoadMapAttributes_IgnoreHidden:: ; 2317
call SwitchToMapScriptHeaderBank call SwitchToMapScriptHeaderBank
call Function234f call Function234f
ld a, $1 ld a, $1
call Function2336 call ReadMapEventHeader
ret ret
; 2326 ; 2326
@ -415,7 +415,7 @@ Function2326:: ; 2326
ret ret
; 2336 ; 2336
Function2336:: ; 2336 ReadMapEventHeader:: ; 2336
push af push af
ld hl, MapEventHeaderPointer ld hl, MapEventHeaderPointer
ld a, [hli] ld a, [hli]
@ -424,13 +424,13 @@ Function2336:: ; 2336
rept 2 rept 2
inc hl inc hl
endr endr
call Function23da call ReadWarps
call Function23f1 call ReadCoordEvents
call Function2408 call ReadSignposts
pop af pop af
and a and a
ret nz ret nz
call Function241f call ReadObjectEvents
ret ret
; 234f ; 234f
@ -539,7 +539,7 @@ Function23c3:: ; 23c3
ret ret
; 23da ; 23da
Function23da:: ; 23da ReadWarps:: ; 23da
ld a, [hli] ld a, [hli]
ld c, a ld c, a
ld [wdbfb], a ld [wdbfb], a
@ -555,7 +555,7 @@ Function23da:: ; 23da
ret ret
; 23f1 ; 23f1
Function23f1:: ; 23f1 ReadCoordEvents:: ; 23f1
ld a, [hli] ld a, [hli]
ld c, a ld c, a
ld [wCurrentMapXYTriggerCount], a ld [wCurrentMapXYTriggerCount], a
@ -571,7 +571,7 @@ Function23f1:: ; 23f1
ret ret
; 2408 ; 2408
Function2408:: ; 2408 ReadSignposts:: ; 2408
ld a, [hli] ld a, [hli]
ld c, a ld c, a
ld [wCurrentMapSignpostCount], a ld [wCurrentMapSignpostCount], a
@ -587,7 +587,7 @@ Function2408:: ; 2408
ret ret
; 241f ; 241f
Function241f:: ; 241f ReadObjectEvents:: ; 241f
push hl push hl
call Function2471 call Function2471
pop de pop de
@ -651,12 +651,12 @@ Function2457:: ; 2457
Function2471:: ; 2471 Function2471:: ; 2471
ld hl, ObjectStruct1 ld hl, ObjectStruct1
ld bc, 40 * 12 ld bc, OBJECT_STRUCT_LENGTH * (NUM_OBJECT_STRUCTS - 1)
xor a xor a
call ByteFill call ByteFill
ld hl, ObjectStruct1 ld hl, ObjectStruct1
ld de, 40 ld de, OBJECT_STRUCT_LENGTH
ld c, $c ld c, NUM_OBJECT_STRUCTS - 1
xor a xor a
.asm_2484 .asm_2484
ld [hl], a ld [hl], a

View File

@ -25236,7 +25236,7 @@ MenuDataHeader_0x24547: ; 0x24547
Function2454f: ; 2454f Function2454f: ; 2454f
ld hl, wd81e ld hl, wd81e
xor a xor a
ld bc, $10 ld bc, NUM_OBJECTS
call ByteFill call ByteFill
nop nop
ld bc, MapObjects ld bc, MapObjects
@ -25254,13 +25254,13 @@ Function2454f: ; 2454f
ld [de], a ld [de], a
inc de inc de
pop bc pop bc
ld hl, $10 ld hl, OBJECT_LENGTH
add hl, bc add hl, bc
ld b, h ld b, h
ld c, l ld c, l
pop af pop af
inc a inc a
cp $10 cp NUM_OBJECTS
jr nz, .loop jr nz, .loop
ret ret