summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-06-13 22:01:54 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2017-06-13 22:01:54 -0400
commitb585b9ac289ed906bb7cb6ea3ad033d69b2230cb (patch)
treec2dfa887756cbf41fb89b9f206c31f9247e82652
parent826664fbdab63fef78bd29d95cf06db5175d9e43 (diff)
parent212bb0566f12c44685e39e3285d4332a88a8feb1 (diff)
Merge branch 'decoration_inventory'
-rw-r--r--data/decoration_inventory.s16
-rwxr-xr-x[-rw-r--r--]include/decoration_inventory.h0
-rwxr-xr-x[-rw-r--r--]include/menu.h0
-rwxr-xr-x[-rw-r--r--]ld_script.txt2
-rwxr-xr-x[-rw-r--r--]src/decoration_inventory.c13
-rwxr-xr-x[-rw-r--r--]src/menu.c0
-rwxr-xr-x[-rw-r--r--]src/scrcmd.c0
7 files changed, 14 insertions, 17 deletions
diff --git a/data/decoration_inventory.s b/data/decoration_inventory.s
deleted file mode 100644
index a70dedbe5..000000000
--- a/data/decoration_inventory.s
+++ /dev/null
@@ -1,16 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
-
-@ pointer to decorations, capacity
- .align 2
-gDecorationInventories:: @ 8402E40
- .4byte gSaveBlock1 + 0x26A0, 10 @ DESK
- .4byte gSaveBlock1 + 0x26AA, 10 @ CHAIR
- .4byte gSaveBlock1 + 0x26B4, 10 @ PLANT
- .4byte gSaveBlock1 + 0x26BE, 30 @ ORNAMENT
- .4byte gSaveBlock1 + 0x26DC, 30 @ MAT
- .4byte gSaveBlock1 + 0x26FA, 10 @ POSTER
- .4byte gSaveBlock1 + 0x2704, 40 @ DOLL
- .4byte gSaveBlock1 + 0x272C, 10 @ CUSHION
diff --git a/include/decoration_inventory.h b/include/decoration_inventory.h
index dd87e7239..dd87e7239 100644..100755
--- a/include/decoration_inventory.h
+++ b/include/decoration_inventory.h
diff --git a/include/menu.h b/include/menu.h
index 98d7afcc3..98d7afcc3 100644..100755
--- a/include/menu.h
+++ b/include/menu.h
diff --git a/ld_script.txt b/ld_script.txt
index adecfd79d..3076fea67 100644..100755
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -459,7 +459,7 @@ SECTIONS {
data/battle_anim_81258BC.o(.rodata);
data/battle_anim_812C144.o(.rodata);
data/learn_move.o(.rodata);
- data/decoration_inventory.o(.rodata);
+ src/decoration_inventory.o(.rodata);
src/roamer.o(.rodata);
data/battle_tower.o(.rodata);
data/use_pokeblock.o(.rodata);
diff --git a/src/decoration_inventory.c b/src/decoration_inventory.c
index 879ceeb82..6463f50dc 100644..100755
--- a/src/decoration_inventory.c
+++ b/src/decoration_inventory.c
@@ -8,6 +8,19 @@
#include "decoration.h"
#include "decoration_inventory.h"
+#define DECOR_INV(ptr) {.items = (u8 *)&ptr, .size = sizeof ptr}
+
+struct DecorationInventory const gDecorationInventories[] = {
+ DECOR_INV(gSaveBlock1.decorDesk),
+ DECOR_INV(gSaveBlock1.decorChair),
+ DECOR_INV(gSaveBlock1.decorPlant),
+ DECOR_INV(gSaveBlock1.decorOrnament),
+ DECOR_INV(gSaveBlock1.decorMat),
+ DECOR_INV(gSaveBlock1.decorPoster),
+ DECOR_INV(gSaveBlock1.decorDoll),
+ DECOR_INV(gSaveBlock1.decorCushion)
+};
+
void ClearDecorationInventory(u8 invIdx)
{
u8 i;
diff --git a/src/menu.c b/src/menu.c
index 3acac88a0..3acac88a0 100644..100755
--- a/src/menu.c
+++ b/src/menu.c
diff --git a/src/scrcmd.c b/src/scrcmd.c
index f2b5090af..f2b5090af 100644..100755
--- a/src/scrcmd.c
+++ b/src/scrcmd.c