shithub: pokecrystal

Download patch

ref: 682548493be7f20b8b7fb26ab0c367c3c24430ed
parent: fdda670f406c9eb2b323d3b251c67f69f970a071
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Tue Jan 23 06:40:32 EST 2018

Struct macros should have their main label outside the macro

--- a/macros/wram.asm
+++ b/macros/wram.asm
@@ -103,7 +103,6 @@
 ENDM
 
 box: MACRO
-\1::
 \1Count::           db
 \1Species::         ds MONS_PER_BOX + 1
 \1Mons::
@@ -285,7 +284,6 @@
 ENDM
 
 object_struct: MACRO
-\1Struct::
 \1Sprite::            db
 \1MapObjectIndex::    db
 \1SpriteTile::        db
@@ -323,7 +321,6 @@
 ENDM
 
 map_object: MACRO
-\1Object::
 \1ObjectStructID::  db
 \1ObjectSprite::    db
 \1ObjectYCoord::    db
--- a/sram.asm
+++ b/sram.asm
@@ -122,7 +122,7 @@
 SECTION "Active Box", SRAM
 
 ; ad10
-	box sBox
+sBox:: box sBox
 ; b160
 
 	ds $f4
@@ -220,24 +220,25 @@
 
 SECTION "Boxes 1-7",  SRAM, BANK [2]
 
-	box sBox1
-	box sBox2
-	box sBox3
-	box sBox4
-	box sBox5
-	box sBox6
-	box sBox7
+sBox1::  box sBox1
+sBox2::  box sBox2
+sBox3::  box sBox3
+sBox4::  box sBox4
+sBox5::  box sBox5
+sBox6::  box sBox6
+sBox7::  box sBox7
 
 
 SECTION "Boxes 8-14", SRAM
 
-	box sBox8
-	box sBox9
-	box sBox10
-	box sBox11
-	box sBox12
-	box sBox13
-	box sBox14
+sBox8::  box sBox8
+sBox9::  box sBox9
+sBox10:: box sBox10
+sBox11:: box sBox11
+sBox12:: box sBox12
+sBox13:: box sBox13
+sBox14:: box sBox14
+
 
 SECTION "SRAM Mobile", SRAM, BANK [5]
 
--- a/wram.asm
+++ b/wram.asm
@@ -2364,19 +2364,19 @@
 wFollowMovementQueue:: ds 5
 
 ObjectStructs:: ; d4d6
-	object_struct Player
-	object_struct Object1
-	object_struct Object2
-	object_struct Object3
-	object_struct Object4
-	object_struct Object5
-	object_struct Object6
-	object_struct Object7
-	object_struct Object8
-	object_struct Object9
-	object_struct Object10
-	object_struct Object11
-	object_struct Object12
+PlayerStruct::   object_struct Player
+Object1Struct::  object_struct Object1
+Object2Struct::  object_struct Object2
+Object3Struct::  object_struct Object3
+Object4Struct::  object_struct Object4
+Object5Struct::  object_struct Object5
+Object6Struct::  object_struct Object6
+Object7Struct::  object_struct Object7
+Object8Struct::  object_struct Object8
+Object9Struct::  object_struct Object9
+Object10Struct:: object_struct Object10
+Object11Struct:: object_struct Object11
+Object12Struct:: object_struct Object12
 ObjectStructsEnd:: ; d6de
 
 wCmdQueue:: ds CMDQUEUE_CAPACITY * CMDQUEUE_ENTRY_SIZE
@@ -2384,22 +2384,22 @@
 	ds 40
 
 MapObjects:: ; d71e
-	map_object Player
-	map_object Map1
-	map_object Map2
-	map_object Map3
-	map_object Map4
-	map_object Map5
-	map_object Map6
-	map_object Map7
-	map_object Map8
-	map_object Map9
-	map_object Map10
-	map_object Map11
-	map_object Map12
-	map_object Map13
-	map_object Map14
-	map_object Map15
+PlayerObject:: map_object Player
+Map1Object::   map_object Map1
+Map2Object::   map_object Map2
+Map3Object::   map_object Map3
+Map4Object::   map_object Map4
+Map5Object::   map_object Map5
+Map6Object::   map_object Map6
+Map7Object::   map_object Map7
+Map8Object::   map_object Map8
+Map9Object::   map_object Map9
+Map10Object::  map_object Map10
+Map11Object::  map_object Map11
+Map12Object::  map_object Map12
+Map13Object::  map_object Map13
+Map14Object::  map_object Map14
+Map15Object::  map_object Map15
 MapObjectsEnd::
 
 wObjectMasks:: ds NUM_OBJECTS ; d81e