summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/battle.h1
-rw-r--r--include/battle_ai.h5
-rw-r--r--include/battle_anim.h4
-rw-r--r--include/gba/defines.h4
-rw-r--r--include/global.h18
-rw-r--r--include/rom3.h8
6 files changed, 27 insertions, 13 deletions
diff --git a/include/battle.h b/include/battle.h
index 95dba4897..9adcaaf95 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -748,7 +748,6 @@ void EmitEffectivenessSound(u8 a, u16 sound); //0x2B
void Emitcmd44(u8 a, u16 sound); //0x2C
void EmitFaintingCry(u8 a); //0x2D
void EmitIntroSlide(u8 a, u8 b); //0x2E
-void Emitcmd48(u8 a, u8 *b, u8 c); //0x30
void Emitcmd49(u8 a); //0x31
void EmitSpriteInvisibility(u8 a, u8 b); //0x33
void EmitBattleAnimation(u8 a, u8 b, u16 c); //0x34
diff --git a/include/battle_ai.h b/include/battle_ai.h
index 2922da0b3..60ca5d000 100644
--- a/include/battle_ai.h
+++ b/include/battle_ai.h
@@ -1,11 +1,6 @@
#ifndef GUARD_BATTLEAI_H
#define GUARD_BATTLEAI_H
-#define AIScriptRead32(ptr) ((ptr)[0] | (ptr)[1] << 8 | (ptr)[2] << 16 | (ptr)[3] << 24)
-#define AIScriptRead16(ptr) ((ptr)[0] | (ptr)[1] << 8)
-#define AIScriptRead8(ptr) ((ptr)[0])
-#define AIScriptReadPtr(ptr) (u8*) AIScriptRead32(ptr)
-
enum
{
TARGET,
diff --git a/include/battle_anim.h b/include/battle_anim.h
index a9405068d..3db5ae967 100644
--- a/include/battle_anim.h
+++ b/include/battle_anim.h
@@ -3,10 +3,6 @@
#include "sprite.h"
-#define SCRIPT_READ_8(ptr) ((ptr)[0])
-#define SCRIPT_READ_16(ptr) ((ptr)[0] | ((ptr)[1] << 8))
-#define SCRIPT_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24))
-
#define REG_BGnCNT_BITFIELD(n) (*(struct BGCntrlBitfield *)REG_ADDR_BG##n##CNT)
#define REG_BG1CNT_BITFIELD REG_BGnCNT_BITFIELD(1)
#define REG_BG2CNT_BITFIELD REG_BGnCNT_BITFIELD(2)
diff --git a/include/gba/defines.h b/include/gba/defines.h
index 0f7f06755..2a0e6f7d8 100644
--- a/include/gba/defines.h
+++ b/include/gba/defines.h
@@ -29,8 +29,8 @@
#define BG_VRAM VRAM
#define BG_VRAM_SIZE 0x10000
-#define BG_CHAR_ADDR(n) (BG_VRAM + (0x4000 * (n)))
-#define BG_SCREEN_ADDR(n) (BG_VRAM + (0x800 * (n)))
+#define BG_CHAR_ADDR(n) (void *)(BG_VRAM + (0x4000 * (n)))
+#define BG_SCREEN_ADDR(n) (void *)(BG_VRAM + (0x800 * (n)))
// text-mode BG
#define OBJ_VRAM0 (VRAM + 0x10000)
diff --git a/include/global.h b/include/global.h
index 29804a5a9..e0a1c6452 100644
--- a/include/global.h
+++ b/include/global.h
@@ -55,6 +55,24 @@ enum
B_32 = 4
};
+// There are many quirks in the source code which have overarching behavioral differences from
+// a number of other files. For example, diploma.c seems to declare rodata before each use while
+// other files declare out of order and must be at the beginning. There are also a number of
+// macros which differ from one file to the next due to the method of obtaining the result, such
+// as these below. Because of this, there is a theory (Two Team Theory) that states that these
+// programming projects had more than 1 "programming team" which utilized different macros for
+// each of the files that were worked on.
+#define T1_READ_8(ptr) ((ptr)[0])
+#define T1_READ_16(ptr) ((ptr)[0] | ((ptr)[1] << 8)) // why do you use OR here but not for READ_32?
+#define T1_READ_32(ptr) ((ptr)[0] | ((ptr)[1] << 8) | ((ptr)[2] << 16) | ((ptr)[3] << 24))
+#define T1_READ_PTR(ptr) (u8*) T1_READ_32(ptr)
+
+// T2_READ_8 is a duplicate to remain consistent with each group.
+#define T2_READ_8(ptr) ((ptr)[0])
+#define T2_READ_16(ptr) ((ptr)[0] + ((ptr)[1] << 8)) // why do you use OR here but not for READ_32?
+#define T2_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24))
+#define T2_READ_PTR(ptr) (void*) T2_READ_32(ptr)
+
enum
{
VERSION_SAPPHIRE = 1,
diff --git a/include/rom3.h b/include/rom3.h
index 81bb56df1..19c6def25 100644
--- a/include/rom3.h
+++ b/include/rom3.h
@@ -1,6 +1,12 @@
#ifndef GUARD_ROM3_H
#define GUARD_ROM3_H
+struct HpAndStatus
+{
+ u16 hp;
+ u32 status;
+};
+
struct DisableStruct;
void sub_800B858(void);
@@ -55,7 +61,7 @@ void Emitcmd44(u8 a, u16 b);
void EmitFaintingCry(u8 a);
void EmitIntroSlide(u8 a, u8 b);
void EmitTrainerBallThrow(u8 a);
-void Emitcmd48(u8 a, u8 *b, u8 c);
+void EmitDrawPartyStatusSummary(u8 a, struct HpAndStatus *hpAndStatus, u8 c); //0x30
void Emitcmd49(u8 a);
void Emitcmd50(u8 a);
void EmitSpriteInvisibility(u8 a, u8 b);