summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arm9/asm/scrcmd.s4
-rw-r--r--arm9/asm/scrcmd_12.s16
-rw-r--r--arm9/asm/scrcmd_19.s4
-rw-r--r--arm9/asm/scrcmd_22.s8
-rw-r--r--arm9/asm/unk_02035068.s2
-rw-r--r--arm9/asm/unk_020476CC.s2
-rw-r--r--arm9/asm/unk_0204B34C.s2
-rw-r--r--arm9/asm/unk_0205CE48.s4
-rw-r--r--arm9/asm/unk_0205DD18.s2
-rw-r--r--arm9/asm/unk_02060CCC.s4
-rw-r--r--arm9/asm/unk_020653EC.s10
-rw-r--r--arm9/asm/unk_0206C700.s4
-rw-r--r--arm9/asm/unk_0206F3FC.s12
-rw-r--r--arm9/asm/unk_02073DA8.s4
-rw-r--r--arm9/asm/unk_0207550C.s6
-rw-r--r--arm9/asm/unk_02088AAC.s4
-rw-r--r--arm9/global.inc18
-rw-r--r--arm9/modules/05/asm/mod05_021E1374.s2
-rw-r--r--arm9/modules/05/asm/module_05.s2
-rw-r--r--arm9/modules/06/asm/module_06.s14
-rw-r--r--arm9/modules/09/asm/module_09.s8
-rw-r--r--arm9/modules/11/asm/module_11_thumb2.s2
-rw-r--r--arm9/modules/14/asm/module_14.s6
-rw-r--r--arm9/modules/18/asm/module_18.s2
-rw-r--r--arm9/modules/71/asm/module_71.s2
-rw-r--r--arm9/modules/73/asm/module_73.s2
-rw-r--r--arm9/modules/75/asm/module_75.s6
-rw-r--r--arm9/src/bag.c56
-rw-r--r--include/bag.h28
29 files changed, 118 insertions, 118 deletions
diff --git a/arm9/asm/scrcmd.s b/arm9/asm/scrcmd.s
index 5d9225bd..4fa6f75b 100644
--- a/arm9/asm/scrcmd.s
+++ b/arm9/asm/scrcmd.s
@@ -5093,7 +5093,7 @@ FUN_0203C1AC: ; 0x0203C1AC
ldr r0, [r0, #0xc]
bl Sav2_Bag_get
mov r1, #0x4
- bl BagPocketNotEmpty
+ bl Bag_PocketNotEmpty
cmp r0, #0x0
bne _0203C1E0
mov r0, #0x1
@@ -8035,7 +8035,7 @@ FUN_0203D958: ; 0x0203D958
ldr r0, [r0, #0xc]
bl Sav2_Bag_get
add r1, r6, #0x0
- bl BagPocketNotEmpty
+ bl Bag_PocketNotEmpty
strh r0, [r4, #0x0]
mov r0, #0x0
pop {r4-r6, pc}
diff --git a/arm9/asm/scrcmd_12.s b/arm9/asm/scrcmd_12.s
index a04f57b9..059262cf 100644
--- a/arm9/asm/scrcmd_12.s
+++ b/arm9/asm/scrcmd_12.s
@@ -766,7 +766,7 @@ FUN_02043308: ; 0x02043308
lsr r1, r1, #0x10
mov r2, #0x1
mov r3, #0x20
- bl BagHasSpaceForItem
+ bl Bag_HasSpaceForItem
pop {r3-r5, pc}
.balign 4
@@ -786,7 +786,7 @@ FUN_02043330: ; 0x02043330
lsr r1, r1, #0x10
mov r2, #0x1
mov r3, #0x20
- bl BagAddItem
+ bl Bag_AddItem
pop {r3-r5, pc}
.balign 4
@@ -1107,7 +1107,7 @@ FUN_020435A0: ; 0x020435A0
add r0, r4, #0x0
mov r2, #0x1
mov r3, #0x20
- bl BagHasSpaceForItem
+ bl Bag_HasSpaceForItem
pop {r3-r5, pc}
.balign 4
_020435C0: .word 0x000001C6
@@ -1128,7 +1128,7 @@ FUN_020435C4: ; 0x020435C4
add r0, r5, #0x0
mov r2, #0x1
mov r3, #0x20
- bl BagAddItem
+ bl Bag_AddItem
add r0, r4, #0x0
mov r1, #0x0
bl FUN_0205F478
@@ -1200,7 +1200,7 @@ FUN_02043660: ; 0x02043660
lsl r1, r1, #0x2
mov r2, #0x1
mov r3, #0x20
- bl BagHasSpaceForItem
+ bl Bag_HasSpaceForItem
pop {r3-r5, pc}
.balign 4
@@ -1221,7 +1221,7 @@ FUN_02043684: ; 0x02043684
lsl r1, r1, #0x2
mov r2, #0x1
mov r3, #0x20
- bl BagAddItem
+ bl Bag_AddItem
add r0, r4, #0x0
mov r1, #0x1
bl FUN_0205F478
@@ -1290,7 +1290,7 @@ FUN_0204371C: ; 0x0204371C
add r0, r4, #0x0
mov r2, #0x1
mov r3, #0x20
- bl BagHasSpaceForItem
+ bl Bag_HasSpaceForItem
pop {r3-r5, pc}
.balign 4
_0204373C: .word 0x000001C7
@@ -1311,7 +1311,7 @@ FUN_02043740: ; 0x02043740
add r0, r5, #0x0
mov r2, #0x1
mov r3, #0x20
- bl BagAddItem
+ bl Bag_AddItem
add r0, r4, #0x0
mov r1, #0x2
bl FUN_0205F478
diff --git a/arm9/asm/scrcmd_19.s b/arm9/asm/scrcmd_19.s
index c22bcd47..863006b1 100644
--- a/arm9/asm/scrcmd_19.s
+++ b/arm9/asm/scrcmd_19.s
@@ -36,7 +36,7 @@ _02045288:
lsl r1, r4, #0x2
ldrh r1, [r7, r1]
mov r2, #0x4
- bl BagGetQuantity
+ bl Bag_GetQuantity
add r0, r5, r0
lsl r0, r0, #0x10
lsr r5, r0, #0x10
@@ -137,7 +137,7 @@ _02045358:
ldr r1, _02045394 ; =UNK_020F450C
mov r2, #0x4
ldrh r1, [r1, r5]
- bl BagGetQuantity
+ bl Bag_GetQuantity
add r0, r6, r0
lsl r0, r0, #0x10
lsr r6, r0, #0x10
diff --git a/arm9/asm/scrcmd_22.s b/arm9/asm/scrcmd_22.s
index 718e511d..1f354520 100644
--- a/arm9/asm/scrcmd_22.s
+++ b/arm9/asm/scrcmd_22.s
@@ -37,7 +37,7 @@ FUN_02045784: ; 0x02045784
add r1, r6, #0x0
add r2, r7, #0x0
mov r3, #0x4
- bl BagAddItem
+ bl Bag_AddItem
strh r0, [r4, #0x0]
mov r0, #0x0
pop {r3-r7, pc}
@@ -76,7 +76,7 @@ FUN_020457DC: ; 0x020457DC
add r1, r6, #0x0
add r2, r7, #0x0
mov r3, #0x4
- bl BagTakeItem
+ bl Bag_TakeItem
strh r0, [r4, #0x0]
mov r0, #0x0
pop {r3-r7, pc}
@@ -115,7 +115,7 @@ FUN_02045834: ; 0x02045834
add r1, r6, #0x0
add r2, r7, #0x0
mov r3, #0x4
- bl BagHasSpaceForItem
+ bl Bag_HasSpaceForItem
strh r0, [r4, #0x0]
mov r0, #0x0
pop {r3-r7, pc}
@@ -154,7 +154,7 @@ FUN_0204588C: ; 0x0204588C
add r1, r6, #0x0
add r2, r7, #0x0
mov r3, #0xb
- bl BagHasItem
+ bl Bag_HasItem
strh r0, [r4, #0x0]
mov r0, #0x0
pop {r3-r7, pc}
diff --git a/arm9/asm/unk_02035068.s b/arm9/asm/unk_02035068.s
index 8fc11a20..55c9432f 100644
--- a/arm9/asm/unk_02035068.s
+++ b/arm9/asm/unk_02035068.s
@@ -3116,7 +3116,7 @@ _0203699A:
add r1, r7, #0x0
mov r2, #0x1
mov r3, #0xb
- bl BagHasItem
+ bl Bag_HasItem
cmp r0, #0x1
bne _020369C6
mov r0, #0x7e
diff --git a/arm9/asm/unk_020476CC.s b/arm9/asm/unk_020476CC.s
index 37b92559..39b89324 100644
--- a/arm9/asm/unk_020476CC.s
+++ b/arm9/asm/unk_020476CC.s
@@ -248,7 +248,7 @@ FUN_02047814: ; 0x02047814
mov r1, #0x4
mov r2, #0x14
add r3, r6, #0x0
- bl BagAddItem
+ bl Bag_AddItem
add r0, r6, #0x0
bl AllocMonZeroed
add r6, r0, #0x0
diff --git a/arm9/asm/unk_0204B34C.s b/arm9/asm/unk_0204B34C.s
index 8276cb17..fe9cc3fd 100644
--- a/arm9/asm/unk_0204B34C.s
+++ b/arm9/asm/unk_0204B34C.s
@@ -297,7 +297,7 @@ FUN_0204B4FC: ; 0x0204B4FC
add r0, r4, #0x0
lsr r2, r2, #0x10
mov r3, #0x4
- bl BagAddItem
+ bl Bag_AddItem
add sp, #0xc
pop {r4-r7, pc}
.balign 4
diff --git a/arm9/asm/unk_0205CE48.s b/arm9/asm/unk_0205CE48.s
index 76fa972e..c42ef09c 100644
--- a/arm9/asm/unk_0205CE48.s
+++ b/arm9/asm/unk_0205CE48.s
@@ -1150,7 +1150,7 @@ FUN_0205D6BC: ; 0x0205D6BC
ldrh r1, [r5, #0x4]
mov r2, #0x1
mov r3, #0xb
- bl BagTakeItem
+ bl Bag_TakeItem
pop {r3-r7, pc}
.balign 4
_0205D710: .word MOD05_021F57F0
@@ -1575,7 +1575,7 @@ FUN_0205DA3C: ; 0x0205DA3C
ldrh r1, [r5, #0x4]
mov r2, #0x1
mov r3, #0xb
- bl BagTakeItem
+ bl Bag_TakeItem
pop {r4-r6, pc}
nop
_0205DA7C: .word FUN_0205DAAC
diff --git a/arm9/asm/unk_0205DD18.s b/arm9/asm/unk_0205DD18.s
index deac026a..80b7ca1a 100644
--- a/arm9/asm/unk_0205DD18.s
+++ b/arm9/asm/unk_0205DD18.s
@@ -1041,7 +1041,7 @@ FUN_0205E4A4: ; 0x0205E4A4
ldr r1, _0205E4D4 ; =0x000001AF
mov r2, #0x1
mov r3, #0x4
- bl BagHasItem
+ bl Bag_HasItem
cmp r0, #0x1
bne _0205E4D0
ldr r0, [r4, #0xc]
diff --git a/arm9/asm/unk_02060CCC.s b/arm9/asm/unk_02060CCC.s
index 2aab6169..eaf86357 100644
--- a/arm9/asm/unk_02060CCC.s
+++ b/arm9/asm/unk_02060CCC.s
@@ -1731,7 +1731,7 @@ FUN_020618EC: ; 0x020618EC
lsl r1, r1, #0x2
mov r2, #0x1
mov r3, #0x20
- bl BagHasItem
+ bl Bag_HasItem
pop {r3, pc}
.balign 4
@@ -2088,7 +2088,7 @@ FUN_02061BB4: ; 0x02061BB4
lsl r1, r1, #0x2
mov r2, #0x1
mov r3, #0x20
- bl BagHasItem
+ bl Bag_HasItem
pop {r3, pc}
.balign 4
diff --git a/arm9/asm/unk_020653EC.s b/arm9/asm/unk_020653EC.s
index d1a47bb3..98bddf15 100644
--- a/arm9/asm/unk_020653EC.s
+++ b/arm9/asm/unk_020653EC.s
@@ -800,7 +800,7 @@ _020659DC:
add r1, r4, r1
ldrh r1, [r1, #0x22]
ldr r2, [r4, #0x0]
- bl BagGetQuantity
+ bl Bag_GetQuantity
cmp r0, #0x0
ldr r1, _02065AE8 ; =0x0000013B
beq _02065A1A
@@ -1762,7 +1762,7 @@ FUN_020661A0: ; 0x020661A0
ldr r0, [r5, r0]
ldr r3, [r5, #0x0]
mov r2, #0x1
- bl BagHasSpaceForItem
+ bl Bag_HasSpaceForItem
add r6, r0, #0x0
beq _020661D4
mov r0, #0x1b
@@ -1771,7 +1771,7 @@ FUN_020661A0: ; 0x020661A0
ldr r0, [r5, r0]
ldr r3, [r5, #0x0]
mov r2, #0x1
- bl BagAddItem
+ bl Bag_AddItem
_020661D4:
mov r0, #0x6b
lsl r0, r0, #0x2
@@ -1826,7 +1826,7 @@ FUN_020661F8: ; 0x020661F8
ldr r0, [r5, r0]
ldr r3, [r5, #0x0]
mov r2, #0x1
- bl BagHasSpaceForItem
+ bl Bag_HasSpaceForItem
cmp r0, #0x0
beq _0206625E
mov r0, #0x1b
@@ -1835,7 +1835,7 @@ FUN_020661F8: ; 0x020661F8
ldr r0, [r5, r0]
ldr r3, [r5, #0x0]
mov r2, #0x1
- bl BagAddItem
+ bl Bag_AddItem
_0206625E:
ldrb r1, [r5, #0x18]
add r0, r5, #0x0
diff --git a/arm9/asm/unk_0206C700.s b/arm9/asm/unk_0206C700.s
index 5bd309ce..7387f701 100644
--- a/arm9/asm/unk_0206C700.s
+++ b/arm9/asm/unk_0206C700.s
@@ -2081,7 +2081,7 @@ _0206D854:
ldr r0, [r4, #0x4c]
ldr r2, [r4, #0x5c]
mov r1, #0x4
- bl BagGetQuantity
+ bl Bag_GetQuantity
cmp r0, #0x0
beq _0206D86C
ldr r0, [r4, #0x24]
@@ -2216,7 +2216,7 @@ _0206D8EA:
ldr r3, [r4, #0x5c]
mov r1, #0x4
mov r2, #0x1
- bl BagTakeItem
+ bl Bag_TakeItem
add sp, #0x20
pop {r4-r6, pc}
_0206D9A0:
diff --git a/arm9/asm/unk_0206F3FC.s b/arm9/asm/unk_0206F3FC.s
index 6b3d7016..c0ecfeec 100644
--- a/arm9/asm/unk_0206F3FC.s
+++ b/arm9/asm/unk_0206F3FC.s
@@ -5415,7 +5415,7 @@ _02071E5A:
mov r3, #0xc
ldr r0, [r1, #0x4]
ldrh r1, [r1, #0x24]
- bl BagTakeItem
+ bl Bag_TakeItem
add r0, r4, #0x0
mov r1, #0x1a
bl GetItemAttr_PreloadedItemData
@@ -5666,7 +5666,7 @@ FUN_02072080: ; 0x02072080
ldr r1, [r4, r0]
ldr r0, [r1, #0x4]
ldrh r1, [r1, #0x24]
- bl BagTakeItem
+ bl Bag_TakeItem
add r0, r5, #0x0
mov r1, #0x6
add r2, sp, #0x0
@@ -5709,7 +5709,7 @@ FUN_020720E0: ; 0x020720E0
lsr r1, r1, #0x10
mov r2, #0x1
mov r3, #0xc
- bl BagAddItem
+ bl Bag_AddItem
add r0, r5, #0x0
mov r1, #0x6
add r2, sp, #0x1c
@@ -5825,7 +5825,7 @@ _020721B0:
mov r2, #0x1
ldr r0, [r0, #0x4]
mov r3, #0xc
- bl BagAddItem
+ bl Bag_AddItem
cmp r0, #0x0
bne _0207220C
add r0, r5, #0x0
@@ -5854,7 +5854,7 @@ _0207220C:
ldr r0, [r0, #0x4]
mov r2, #0x1
mov r3, #0xc
- bl BagTakeItem
+ bl Bag_TakeItem
add r0, r5, #0x0
add r1, r7, #0x0
add r2, r6, #0x0
@@ -6024,7 +6024,7 @@ _02072388:
ldr r0, [r0, #0x4]
mov r2, #0x1
mov r3, #0xc
- bl BagAddItem
+ bl Bag_AddItem
ldr r2, _0207241C ; =0x0000069C
mov r1, #0x54
ldr r0, [r5, r2]
diff --git a/arm9/asm/unk_02073DA8.s b/arm9/asm/unk_02073DA8.s
index 2f6de2fc..fe7c931f 100644
--- a/arm9/asm/unk_02073DA8.s
+++ b/arm9/asm/unk_02073DA8.s
@@ -230,7 +230,7 @@ _02073F66:
ldr r0, [r0, #0x4]
mov r2, #0x1
mov r3, #0xc
- bl BagAddItem
+ bl Bag_AddItem
cmp r0, #0x1
bne _0207400A
ldr r0, _02074054 ; =0x000005A4
@@ -617,7 +617,7 @@ FUN_020742A8: ; 0x020742A8
ldr r0, [r0, #0x4]
mov r2, #0x1
mov r3, #0xc
- bl BagAddItem
+ bl Bag_AddItem
cmp r0, #0x1
bne _0207431A
ldr r0, _02074334 ; =0x000005A4
diff --git a/arm9/asm/unk_0207550C.s b/arm9/asm/unk_0207550C.s
index fac7015d..1ae52fa7 100644
--- a/arm9/asm/unk_0207550C.s
+++ b/arm9/asm/unk_0207550C.s
@@ -1744,7 +1744,7 @@ _020763B2:
mov r3, #0xc
ldr r0, [r1, #0x4]
ldrh r1, [r1, #0x24]
- bl BagTakeItem
+ bl Bag_TakeItem
ldr r0, _020763F0 ; =0x000005A4
mov r1, #0x0
ldr r0, [r4, r0]
@@ -3114,7 +3114,7 @@ FUN_02076F2C: ; 0x02076F2C
mov r3, #0xc
ldr r0, [r1, #0x4]
ldrh r1, [r1, #0x24]
- bl BagTakeItem
+ bl Bag_TakeItem
_02076F98:
add r0, r5, #0x0
bl FUN_020772CC
@@ -3392,7 +3392,7 @@ _0207716A:
mov r3, #0xc
ldr r0, [r1, #0x4]
ldrh r1, [r1, #0x24]
- bl BagTakeItem
+ bl Bag_TakeItem
ldr r0, _0207723C ; =0x000005EC
bl FUN_020054C8
b _02077204
diff --git a/arm9/asm/unk_02088AAC.s b/arm9/asm/unk_02088AAC.s
index 612547e0..30ea796e 100644
--- a/arm9/asm/unk_02088AAC.s
+++ b/arm9/asm/unk_02088AAC.s
@@ -228,7 +228,7 @@ _02088C1E:
ldr r3, [r4, #0x0]
lsr r1, r1, #0x10
mov r2, #0x1
- bl BagTakeItem
+ bl Bag_TakeItem
cmp r0, #0x0
bne _02088C38
bl ErrorHandling
@@ -271,7 +271,7 @@ _02088C70:
ldr r3, [r5, #0x0]
add r1, r7, #0x0
mov r2, #0x1
- bl BagHasItem
+ bl Bag_HasItem
cmp r0, #0x1
bne _02088C9A
ldr r0, [r5, #0x18]
diff --git a/arm9/global.inc b/arm9/global.inc
index 771f1c76..4928b0f3 100644
--- a/arm9/global.inc
+++ b/arm9/global.inc
@@ -5017,16 +5017,16 @@
.extern Sav2_Bag_copy
.extern Bag_GetRegisteredItem
.extern Bag_SetRegisteredItem
-.extern BagHasSpaceForItem
-.extern BagAddItem
-.extern BagTakeItem
-.extern PocketTakeItem
-.extern BagHasItem
-.extern BagPocketNotEmpty
-.extern BagGetQuantity
-.extern PocketGetQuantity
+.extern Bag_HasSpaceForItem
+.extern Bag_AddItem
+.extern Bag_TakeItem
+.extern Pocket_TakeItem
+.extern Bag_HasItem
+.extern Bag_PocketNotEmpty
+.extern Bag_GetQuantity
+.extern Pocket_GetQuantity
.extern CreateBagView
-.extern BagGetPocketSlotN
+.extern Bag_GetPocketSlotN
.extern Sav2_Bag_get
.extern FUN_0206F164
.extern FUN_0206F17C
diff --git a/arm9/modules/05/asm/mod05_021E1374.s b/arm9/modules/05/asm/mod05_021E1374.s
index f4fc02fe..75c42499 100644
--- a/arm9/modules/05/asm/mod05_021E1374.s
+++ b/arm9/modules/05/asm/mod05_021E1374.s
@@ -400,7 +400,7 @@ MOD05_021E1654: ; 0x021E1654
ldr r1, _021E16C4 ; =0x000001BB
mov r2, #1
mov r3, #4
- bl BagHasItem
+ bl Bag_HasItem
cmp r0, #1
bne _021E1692
cmp r6, #0x64
diff --git a/arm9/modules/05/asm/module_05.s b/arm9/modules/05/asm/module_05.s
index a6ee875d..a0965880 100644
--- a/arm9/modules/05/asm/module_05.s
+++ b/arm9/modules/05/asm/module_05.s
@@ -26811,7 +26811,7 @@ _021EFCC4:
ldr r1, _021EFD3C ; =0x000001B5
mov r2, #1
mov r3, #4
- bl BagHasItem
+ bl Bag_HasItem
cmp r0, #1
bne _021EFCFE
add r0, r6, #0
diff --git a/arm9/modules/06/asm/module_06.s b/arm9/modules/06/asm/module_06.s
index 0e2dd1b6..a19163b0 100644
--- a/arm9/modules/06/asm/module_06.s
+++ b/arm9/modules/06/asm/module_06.s
@@ -9811,7 +9811,7 @@ MOD06_0223E1D8: ; 0x0223E1D8
ldrh r1, [r5, r1]
ldr r0, [r5, r0]
mov r2, #0xb
- bl BagGetQuantity
+ bl Bag_GetQuantity
add r4, r0, #0
b _0223E214
_0223E1FA:
@@ -10005,7 +10005,7 @@ MOD06_0223E384: ; 0x0223E384
ldrh r2, [r4, r2]
ldr r0, [r4, r0]
mov r3, #0xb
- bl BagHasSpaceForItem
+ bl Bag_HasSpaceForItem
b _0223E3D2
_0223E3A8:
cmp r0, #1
@@ -10507,7 +10507,7 @@ _0223E7B2:
ldrh r2, [r4, r2]
ldr r0, [r4, r0]
mov r3, #0xb
- bl BagAddItem
+ bl Bag_AddItem
b _0223E7F6
_0223E7D0:
cmp r0, #1
@@ -10622,7 +10622,7 @@ _0223E88A:
mov r1, #0xc
mov r2, #1
mov r3, #0xb
- bl BagAddItem
+ bl Bag_AddItem
cmp r0, #1
bne _0223E902
add r0, r5, #0
@@ -42756,7 +42756,7 @@ MOD06_0224E410: ; 0x0224E410
add r1, #0x95
lsl r1, r1, #0x10
lsr r1, r1, #0x10
- bl BagGetQuantity
+ bl Bag_GetQuantity
ldr r1, [r5, #0xc]
add r3, r0, #0
add r2, r1, r4
@@ -42870,7 +42870,7 @@ MOD06_0224E4E4: ; 0x0224E4E4
add r1, #0x95
lsl r1, r1, #0x10
lsr r1, r1, #0x10
- bl BagGetQuantity
+ bl Bag_GetQuantity
add r1, r5, r4
ldr r1, [r1, #8]
cmp r0, r1
@@ -42912,7 +42912,7 @@ MOD06_0224E520: ; 0x0224E520
add r0, r6, #0
lsr r1, r1, #0x10
lsr r2, r2, #0x10
- bl BagTakeItem
+ bl Bag_TakeItem
cmp r0, #1
beq _0224E550
bl ErrorHandling
diff --git a/arm9/modules/09/asm/module_09.s b/arm9/modules/09/asm/module_09.s
index 97479bc1..571d34b6 100644
--- a/arm9/modules/09/asm/module_09.s
+++ b/arm9/modules/09/asm/module_09.s
@@ -3802,7 +3802,7 @@ MOD09_02213C84: ; 0x02213C84
add r1, r4, #0
mov r2, #1
add r3, r7, #0
- bl BagTakeItem
+ bl Bag_TakeItem
_02213CA8:
add r0, r5, #0
bl MOD11_02230218
@@ -14295,7 +14295,7 @@ MOD09_0221944C: ; 0x0221944C
add r1, r4, #0
mov r2, #1
add r3, r7, #0
- bl BagTakeItem
+ bl Bag_TakeItem
add r0, r5, #0
bl MOD11_02230218
add r1, r4, #0
@@ -15275,7 +15275,7 @@ _02219C48:
ldr r0, [r3, #8]
ldr r3, [r3, #0xc]
mov r2, #1
- bl BagHasItem
+ bl Bag_HasItem
cmp r0, #0
bne _02219C62
ldr r1, [r4]
@@ -15351,7 +15351,7 @@ _02219CCA:
lsl r2, r2, #0x10
ldr r1, [sp, #8]
lsr r2, r2, #0x10
- bl BagGetPocketSlotN
+ bl Bag_GetPocketSlotN
add r5, r0, #0
beq _02219D3C
ldrh r0, [r5]
diff --git a/arm9/modules/11/asm/module_11_thumb2.s b/arm9/modules/11/asm/module_11_thumb2.s
index b33bacf9..ab70294a 100644
--- a/arm9/modules/11/asm/module_11_thumb2.s
+++ b/arm9/modules/11/asm/module_11_thumb2.s
@@ -33053,7 +33053,7 @@ _0223F598:
ldrh r1, [r6]
mov r2, #1
mov r3, #5
- bl BagTakeItem
+ bl Bag_TakeItem
add r0, r7, #0
bl MOD11_02230218
ldrh r1, [r6]
diff --git a/arm9/modules/14/asm/module_14.s b/arm9/modules/14/asm/module_14.s
index 9f0f7265..e1232e0b 100644
--- a/arm9/modules/14/asm/module_14.s
+++ b/arm9/modules/14/asm/module_14.s
@@ -5874,7 +5874,7 @@ _021DA498:
lsr r1, r1, #0x10
mov r2, #1
mov r3, #9
- bl BagTakeItem
+ bl Bag_TakeItem
ldr r1, _021DA5E4 ; =MOD14_021E6A00
add r0, r4, #0
ldr r1, [r1, #8]
@@ -6129,7 +6129,7 @@ _021DA6E4:
mov r3, #9
lsl r1, r1, #0x10
lsr r1, r1, #0x10
- bl BagAddItem
+ bl Bag_AddItem
cmp r0, #0
beq _021DA72A
add r0, r4, #0
@@ -6351,7 +6351,7 @@ _021DA8BA:
mov r3, #9
lsl r1, r1, #0x10
lsr r1, r1, #0x10
- bl BagAddItem
+ bl Bag_AddItem
cmp r0, #0
beq _021DA908
add r0, r4, #0
diff --git a/arm9/modules/18/asm/module_18.s b/arm9/modules/18/asm/module_18.s
index 92b27707..b1cef2e5 100644
--- a/arm9/modules/18/asm/module_18.s
+++ b/arm9/modules/18/asm/module_18.s
@@ -34915,7 +34915,7 @@ _0224A5A6:
lsr r1, r1, #0x10
mov r2, #1
mov r3, #4
- bl BagAddItem
+ bl Bag_AddItem
cmp r0, #0
beq _0224A62A
ldr r0, _0224A69C ; =0x022513F8
diff --git a/arm9/modules/71/asm/module_71.s b/arm9/modules/71/asm/module_71.s
index 91abbba9..3868e8f9 100644
--- a/arm9/modules/71/asm/module_71.s
+++ b/arm9/modules/71/asm/module_71.s
@@ -4685,7 +4685,7 @@ _0222FC70:
ldr r1, _0222FCFC ; =0x000001B5
mov r2, #1
mov r3, #0x1a
- bl BagHasItem
+ bl Bag_HasItem
cmp r0, #1
bne _0222FCAA
ldr r0, _0222FCE4 ; =0x0000366C
diff --git a/arm9/modules/73/asm/module_73.s b/arm9/modules/73/asm/module_73.s
index 800b7543..4a1e86bf 100644
--- a/arm9/modules/73/asm/module_73.s
+++ b/arm9/modules/73/asm/module_73.s
@@ -1159,7 +1159,7 @@ _021D7E68:
ldr r0, [r6, #0x10]
mov r1, #4
ldr r0, [r0, #0x14]
- bl BagPocketNotEmpty
+ bl Bag_PocketNotEmpty
cmp r0, #0
bne _021D7E8A
ldr r0, _021D7F44 ; =0x0000063C
diff --git a/arm9/modules/75/asm/module_75.s b/arm9/modules/75/asm/module_75.s
index 7cd217ef..e5623487 100644
--- a/arm9/modules/75/asm/module_75.s
+++ b/arm9/modules/75/asm/module_75.s
@@ -5004,7 +5004,7 @@ MOD75_021E92BC: ; 0x021E92BC
ldrh r2, [r2]
ldrh r3, [r4, r3]
sub r1, r1, #3
- bl PocketTakeItem
+ bl Pocket_TakeItem
add r0, r4, #0
add r0, #0xc4
ldr r3, [r0]
@@ -5226,7 +5226,7 @@ MOD75_021E947C: ; 0x021E947C
add r2, #0x66
ldrh r2, [r2]
sub r1, r1, #3
- bl PocketGetQuantity
+ bl Pocket_GetQuantity
cmp r0, #1
bne _021E94BA
add r0, r4, #0
@@ -5954,7 +5954,7 @@ _021E9A6E:
add r2, #0x66
ldrh r2, [r2]
sub r1, r1, #3
- bl PocketGetQuantity
+ bl Pocket_GetQuantity
cmp r0, #1
bne _021E9AF4
mov r0, #0x45
diff --git a/arm9/src/bag.c b/arm9/src/bag.c
index 819c7739..57609a8f 100644
--- a/arm9/src/bag.c
+++ b/arm9/src/bag.c
@@ -38,7 +38,7 @@ void Bag_SetRegisteredItem(struct Bag * bag, u32 item)
bag->registeredItem = item;
}
-u32 GetItemPocket(struct Bag * bag, u16 item_id, struct ItemSlot ** slot_p, u32 * count_p, u32 heap_id)
+u32 Bag_GetItemPocket(struct Bag * bag, u16 item_id, struct ItemSlot ** slot_p, u32 * count_p, u32 heap_id)
{
u32 pocket = GetItemAttr(item_id, 5, heap_id);
switch (pocket)
@@ -79,7 +79,7 @@ u32 GetItemPocket(struct Bag * bag, u16 item_id, struct ItemSlot ** slot_p, u32
return pocket;
}
-struct ItemSlot * BagGetItemSlotForAddInternal(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantity, u16 maxquantity)
+struct ItemSlot * Pocket_GetItemSlotForAdd(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantity, u16 maxquantity)
{
int i;
int found = -1;
@@ -101,35 +101,35 @@ struct ItemSlot * BagGetItemSlotForAddInternal(struct ItemSlot * slots, u32 coun
return &slots[found];
}
-struct ItemSlot * PocketGetItemSlotForAdd(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id)
+struct ItemSlot * Bag_GetItemSlotForAdd(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id)
{
struct ItemSlot * slots;
u32 count;
- u32 pocket = GetItemPocket(bag, item_id, &slots, &count, heap_id);
+ u32 pocket = Bag_GetItemPocket(bag, item_id, &slots, &count, heap_id);
if (pocket == POCKET_TMHMS)
{
- return BagGetItemSlotForAddInternal(slots, count, item_id, quantity, 99);
+ return Pocket_GetItemSlotForAdd(slots, count, item_id, quantity, 99);
}
else
{
- return BagGetItemSlotForAddInternal(slots, count, item_id, quantity, 999);
+ return Pocket_GetItemSlotForAdd(slots, count, item_id, quantity, 999);
}
}
-BOOL BagHasSpaceForItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id)
+BOOL Bag_HasSpaceForItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id)
{
- return PocketGetItemSlotForAdd(bag, item_id, quantity, heap_id) != NULL;
+ return Bag_GetItemSlotForAdd(bag, item_id, quantity, heap_id) != NULL;
}
-BOOL BagAddItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id)
+BOOL Bag_AddItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id)
{
- struct ItemSlot * slots = PocketGetItemSlotForAdd(bag, item_id, quantity, heap_id);
+ struct ItemSlot * slots = Bag_GetItemSlotForAdd(bag, item_id, quantity, heap_id);
if (slots == NULL)
return FALSE;
slots->id = item_id;
slots->quantity += quantity;
u32 count;
- u32 pocket = GetItemPocket(bag, item_id, &slots, &count, heap_id);
+ u32 pocket = Bag_GetItemPocket(bag, item_id, &slots, &count, heap_id);
if (pocket == POCKET_TMHMS || pocket == POCKET_BERRIES)
{
SortPocket(slots, count);
@@ -137,7 +137,7 @@ BOOL BagAddItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id)
return TRUE;
}
-struct ItemSlot * PocketGetItemSlotForRemove(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantity)
+struct ItemSlot * Pocket_GetItemSlotForRemove(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantity)
{
int i;
for (i = 0; i < count; i++)
@@ -152,31 +152,31 @@ struct ItemSlot * PocketGetItemSlotForRemove(struct ItemSlot * slots, u32 count,
return NULL;
}
-struct ItemSlot * BagGetItemSlotForRemove(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id)
+struct ItemSlot * Bag_GetItemSlotForRemove(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id)
{
struct ItemSlot * slots;
u32 count;
- (void)GetItemPocket(bag, item_id, &slots, &count, heap_id);
- return PocketGetItemSlotForRemove(slots, count, item_id, quantity);
+ (void)Bag_GetItemPocket(bag, item_id, &slots, &count, heap_id);
+ return Pocket_GetItemSlotForRemove(slots, count, item_id, quantity);
}
-BOOL BagTakeItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id)
+BOOL Bag_TakeItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id)
{
- struct ItemSlot * slots = BagGetItemSlotForRemove(bag, item_id, quantity, heap_id);
+ struct ItemSlot * slots = Bag_GetItemSlotForRemove(bag, item_id, quantity, heap_id);
if (slots == NULL)
return FALSE;
slots->quantity -= quantity;
if (slots->quantity == 0)
slots->id = ITEM_NONE;
u32 count;
- (void)GetItemPocket(bag, item_id, &slots, &count, heap_id);
+ (void)Bag_GetItemPocket(bag, item_id, &slots, &count, heap_id);
PocketCompaction(slots, count);
return TRUE;
}
-BOOL PocketTakeItem(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantity)
+BOOL Pocket_TakeItem(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantity)
{
- struct ItemSlot * slot = PocketGetItemSlotForRemove(slots, count, item_id, quantity);
+ struct ItemSlot * slot = Pocket_GetItemSlotForRemove(slots, count, item_id, quantity);
if (slot == NULL)
return FALSE;
slot->quantity -= quantity;
@@ -186,12 +186,12 @@ BOOL PocketTakeItem(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantit
return TRUE;
}
-BOOL BagHasItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id)
+BOOL Bag_HasItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id)
{
- return BagGetItemSlotForRemove(bag, item_id, quantity, heap_id) != NULL;
+ return Bag_GetItemSlotForRemove(bag, item_id, quantity, heap_id) != NULL;
}
-BOOL BagPocketNotEmpty(struct Bag * bag, u32 pocket)
+BOOL Bag_PocketNotEmpty(struct Bag * bag, u32 pocket)
{
struct ItemSlot * slots;
u32 count;
@@ -241,17 +241,17 @@ BOOL BagPocketNotEmpty(struct Bag * bag, u32 pocket)
return FALSE;
}
-u16 BagGetQuantity(struct Bag * bag, u16 item_id, u32 heap_id)
+u16 Bag_GetQuantity(struct Bag * bag, u16 item_id, u32 heap_id)
{
- struct ItemSlot * slot = BagGetItemSlotForRemove(bag, item_id, 1, heap_id);
+ struct ItemSlot * slot = Bag_GetItemSlotForRemove(bag, item_id, 1, heap_id);
if (slot == NULL)
return 0;
return slot->quantity;
}
-u16 PocketGetQuantity(struct ItemSlot * slots, u32 count, u16 item_id)
+u16 Pocket_GetQuantity(struct ItemSlot * slots, u32 count, u16 item_id)
{
- struct ItemSlot * slot = PocketGetItemSlotForRemove(slots, count, item_id, 1);
+ struct ItemSlot * slot = Pocket_GetItemSlotForRemove(slots, count, item_id, 1);
if (slot == NULL)
return 0;
return slot->quantity;
@@ -336,7 +336,7 @@ struct BagView * CreateBagView(struct Bag * bag, const u8 * pockets, u32 heap_id
return view;
}
-struct ItemSlot * BagGetPocketSlotN(struct Bag * bag, u32 pocket, u32 slot)
+struct ItemSlot * Bag_GetPocketSlotN(struct Bag * bag, u32 pocket, u32 slot)
{
struct ItemSlot * slots;
u32 count;
diff --git a/include/bag.h b/include/bag.h
index 00adbe58..14735443 100644
--- a/include/bag.h
+++ b/include/bag.h
@@ -43,24 +43,24 @@ void Sav2_Bag_init(struct Bag * bag);
void Sav2_Bag_copy(const struct Bag * src, struct Bag * dest);
u32 Bag_GetRegisteredItem(struct Bag * bag);
void Bag_SetRegisteredItem(struct Bag * bag, u32 item);
-u32 GetItemPocket(struct Bag * bag, u16 item_id, struct ItemSlot ** slot_p, u32 * count_p, u32 heap_id);
-struct ItemSlot * BagGetItemSlotForAddInternal(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantity, u16 maxquantity);
-struct ItemSlot * PocketGetItemSlotForAdd(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id);
-BOOL BagHasSpaceForItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id);
-BOOL BagAddItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id);
-struct ItemSlot * PocketGetItemSlotForRemove(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantity);
-struct ItemSlot * BagGetItemSlotForRemove(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id);
-BOOL BagTakeItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id);
-BOOL PocketTakeItem(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantity);
-BOOL BagHasItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id);
-BOOL BagPocketNotEmpty(struct Bag * bag, u32 pocket);
-u16 BagGetQuantity(struct Bag * bag, u16 item_id, u32 heap_id);
-u16 PocketGetQuantity(struct ItemSlot * slots, u32 count, u16 item_id);
+u32 Bag_GetItemPocket(struct Bag * bag, u16 item_id, struct ItemSlot ** slot_p, u32 * count_p, u32 heap_id);
+struct ItemSlot * Pocket_GetItemSlotForAdd(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantity, u16 maxquantity);
+struct ItemSlot * Bag_GetItemSlotForAdd(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id);
+BOOL Bag_HasSpaceForItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id);
+BOOL Bag_AddItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id);
+struct ItemSlot * Pocket_GetItemSlotForRemove(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantity);
+struct ItemSlot * Bag_GetItemSlotForRemove(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id);
+BOOL Bag_TakeItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id);
+BOOL Pocket_TakeItem(struct ItemSlot * slots, u32 count, u16 item_id, u16 quantity);
+BOOL Bag_HasItem(struct Bag * bag, u16 item_id, u16 quantity, u32 heap_id);
+BOOL Bag_PocketNotEmpty(struct Bag * bag, u32 pocket);
+u16 Bag_GetQuantity(struct Bag * bag, u16 item_id, u32 heap_id);
+u16 Pocket_GetQuantity(struct ItemSlot * slots, u32 count, u16 item_id);
void SwapItemSlots(struct ItemSlot * a, struct ItemSlot * b);
void PocketCompaction(struct ItemSlot * slots, u32 count);
void SortPocket(struct ItemSlot * slots, u32 count);
struct BagView * CreateBagView(struct Bag * bag, const u8 * pockets, u32 heap_id);
-struct ItemSlot * BagGetPocketSlotN(struct Bag * bag, u32 pocket, u32 slot);
+struct ItemSlot * Bag_GetPocketSlotN(struct Bag * bag, u32 pocket, u32 slot);
struct Bag * Sav2_Bag_get(struct SaveBlock2 * sav2);
struct UnkStruct_0206F164 * FUN_0206F164(u32 heap_id);
void FUN_0206F17C(struct UnkStruct_0206F164 * a0, u32 a1, u8 * a2, u8 * a3);