summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@gmail.com>2015-10-31 21:05:02 -0400
committerPikalaxALT <PikalaxALT@gmail.com>2015-10-31 21:05:02 -0400
commitfda1f7c01a9fb2944aeb42f2d2f19a766b2538e6 (patch)
tree1bcb2193b68ebb25a189958cab36304f103e7eda /home
parent8153737bae7169d42b8937c5dc7eec6f669acbb2 (diff)
SPRITEMOVEDATA
Diffstat (limited to 'home')
-rw-r--r--home/map_objects.asm13
-rw-r--r--home/text.asm2
2 files changed, 9 insertions, 6 deletions
diff --git a/home/map_objects.asm b/home/map_objects.asm
index 74273f343..07a361340 100644
--- a/home/map_objects.asm
+++ b/home/map_objects.asm
@@ -453,7 +453,10 @@ Function19e9:: ; 19e9
-Function1a13:: ; 1a13
+FindFirstEmptyObjectStruct:: ; 1a13
+; Returns the index of the first empty object struct in A and its address in HL, then sets carry.
+; If all object structs are occupied, A = 0 and Z is set.
+; Preserves BC and DE.
push bc
push de
ld hl, ObjectStructs
@@ -462,15 +465,15 @@ Function1a13:: ; 1a13
.loop
ld a, [hl]
and a
- jr z, .empty
+ jr z, .break
add hl, de
dec c
jr nz, .loop
xor a
jr .done
-.empty
- ld a, $d
+.break
+ ld a, NUM_OBJECT_STRUCTS
sub c
scf
@@ -547,7 +550,7 @@ Function1a71:: ; 1a71
push de
ld e, a
ld d, 0
- ld hl, ObjectStruct3_Data + 1
+ ld hl, ObjectStruct3_Data + 1 ; facing?
rept OBJECT_STRUCT_3_DATA_WIDTH
add hl, de
endr
diff --git a/home/text.asm b/home/text.asm
index 42f55d285..d400ddd66 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -175,7 +175,7 @@ RadioTerminator:: ; 1052
PrintText:: ; 1057
call SetUpTextBox
-Function105a:: ; 105a
+BuenaPrintText:: ; 105a
push hl
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY
lb bc, TEXTBOX_INNERH - 1, TEXTBOX_INNERW