diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/battle.h | 16 | ||||
-rw-r--r-- | include/battle_anim.h | 14 | ||||
-rw-r--r-- | include/contest.h | 2 | ||||
-rw-r--r-- | include/gba/macro.h | 35 | ||||
-rw-r--r-- | include/gba/types.h | 11 | ||||
-rw-r--r-- | include/global.h | 16 | ||||
-rw-r--r-- | include/graphics.h | 8 |
7 files changed, 74 insertions, 28 deletions
diff --git a/include/battle.h b/include/battle.h index 3b37c0853..dda71e562 100644 --- a/include/battle.h +++ b/include/battle.h @@ -3,6 +3,22 @@ #include "sprite.h" +#define F_TARGET_SELECTED_POKEMON 0 +#define F_TARGET_SPECIAL (1 << 0) +#define F_TARGET_UNK2 (1 << 1) +#define F_TARGET_RANDOM (1 << 2) +#define F_TARGET_BOTH_ENEMIES (1 << 3) +#define F_TARGET_USER (1 << 4) +#define F_TARGET_ALL_EXCEPT_USER (1 << 5) +#define F_TARGET_ENEMY_SIDE (1 << 6) + +#define F_MAKES_CONTACT (1 << 0) +#define F_AFFECTED_BY_PROTECT (1 << 1) +#define F_AFFECTED_BY_MAGIC_COAT (1 << 2) +#define F_AFFECTED_BY_SNATCH (1 << 3) +#define F_MIRROR_MOVE_COMPATIBLE (1 << 4) +#define F_AFFECTED_BY_KINGS_ROCK (1 << 5) + #define BATTLE_TYPE_DOUBLE 0x0001 #define BATTLE_TYPE_LINK 0x0002 #define BATTLE_TYPE_WILD 0x0004 diff --git a/include/battle_anim.h b/include/battle_anim.h index 77f7aed21..9decb8f95 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -3,22 +3,12 @@ #include "sprite.h" -#define REG_BGnCNT_BITFIELD(n) (*(struct BGCntrlBitfield *)REG_ADDR_BG##n##CNT) +#define REG_BGnCNT_BITFIELD(n) (*(vBgCnt *)REG_ADDR_BG##n##CNT) #define REG_BG0CNT_BITFIELD REG_BGnCNT_BITFIELD(0) #define REG_BG1CNT_BITFIELD REG_BGnCNT_BITFIELD(1) #define REG_BG2CNT_BITFIELD REG_BGnCNT_BITFIELD(2) #define REG_BG3CNT_BITFIELD REG_BGnCNT_BITFIELD(3) -struct BGCntrlBitfield -{ - volatile u16 priority:2; - volatile u16 charBaseBlock:2; - volatile u16 field_0_2:4; - volatile u16 field_1_0:5; - volatile u16 areaOverflowMode:1; - volatile u16 screenSize:2; -}; - struct BattleAnimBackground { void *image; @@ -46,6 +36,8 @@ struct UnknownStruct3 extern void (*gAnimScriptCallback)(void); extern u8 gAnimScriptActive; +extern u8 gHappinessMoveAnim; +extern u8 gUnknown_0202F7C4; void ExecuteMoveAnim(u16 move); void DoMoveAnim(const u8 *const moveAnims[], u16 b, u8 c); diff --git a/include/contest.h b/include/contest.h index 9f8c263a4..55f39d002 100644 --- a/include/contest.h +++ b/include/contest.h @@ -71,7 +71,7 @@ void sub_80AE82C(u8); u8 sub_80AEB1C(u16); void sub_80AF668(void); void sub_80B0F28(u8); -int sub_80B2A7C(u8); //Don't know return type size +bool8 sub_80B2A7C(u8); u8 sub_80B2C4C(u8, u8); void sub_80B2D1C(void); diff --git a/include/gba/macro.h b/include/gba/macro.h index a0edf2a49..d9d10c0a9 100644 --- a/include/gba/macro.h +++ b/include/gba/macro.h @@ -86,8 +86,8 @@ #define DmaCopyLarge(dmaNum, src, dest, size, block, bit) \ { \ - const void *_src = src; \ - void *_dest = dest; \ + const u8 *_src = src; \ + u8 *_dest = dest; \ u32 _size = size; \ while (1) \ { \ @@ -104,25 +104,28 @@ } #define DmaClearLarge(dmaNum, dest, size, block, bit) \ -{ \ - u32 _size = size; \ - while (1) \ - { \ - DmaFill##bit(dmaNum, 0, dest, (block)); \ - dest += (block); \ - _size -= (block); \ - if (_size <= (block)) \ - { \ - DmaFill##bit(dmaNum, 0, dest, _size); \ - break; \ - } \ - } \ +{ \ + const u8 *_dest = dest; \ + u32 _size = size; \ + while (1) \ + { \ + DmaFill##bit(dmaNum, 0, _dest, (block)); \ + _dest += (block); \ + _size -= (block); \ + if (_size <= (block)) \ + { \ + DmaFill##bit(dmaNum, 0, _dest, _size); \ + break; \ + } \ + } \ } #define DmaCopyLarge16(dmaNum, src, dest, size, block) DmaCopyLarge(dmaNum, src, dest, size, block, 16) - #define DmaCopyLarge32(dmaNum, src, dest, size, block) DmaCopyLarge(dmaNum, src, dest, size, block, 32) +#define DmaClearLarge16(dmaNum, dest, size, block) DmaClearLarge(dmaNum, dest, size, block, 16) +#define DmaClearLarge32(dmaNum, dest, size, block) DmaClearLarge(dmaNum, dest, size, block, 32) + #define DmaCopyDefvars(dmaNum, src, dest, size, bit) \ { \ const void *_src = src; \ diff --git a/include/gba/types.h b/include/gba/types.h index 480619d21..33ae7df9a 100644 --- a/include/gba/types.h +++ b/include/gba/types.h @@ -28,6 +28,17 @@ typedef u8 bool8; typedef u16 bool16; typedef u32 bool32; +struct BgCnt +{ + u16 priority:2; + u16 charBaseBlock:2; + u16 dummy:4; + u16 screenBaseBlock:5; + u16 areaOverflowMode:1; + u16 screenSize:2; +}; +typedef volatile struct BgCnt vBgCnt; + struct PlttData { u16 r:5; // red diff --git a/include/global.h b/include/global.h index 620806d1a..330e047fd 100644 --- a/include/global.h +++ b/include/global.h @@ -632,6 +632,16 @@ struct RecordMixingGift struct RecordMixingGiftData data; }; +struct ContestWinner +{ + /*0x00*/ u32 unk0; // personality + /*0x04*/ u32 unk4; // otId + /*0x08*/ u16 unk8; // species + /*0x0A*/ u8 unkA; + /*0x0B*/ u8 unkB[0x16-0xB]; + /*0x16*/ u8 unk16[0x20-0x16]; +}; + // there should be enough flags for all 412 slots // each slot takes up 8 flags // if the value is not divisible by 8, we need to account for the reminder as well @@ -710,8 +720,14 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2D90*/ u8 filler_2D90[0x4]; /*0x2D94*/ union MauvilleMan mauvilleMan; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff +#if 0 + // I don't think this is right. /*0x2DFC*/ u8 filler_2DFC[0x8]; /*0x2E04*/ SB_Struct sbStruct; +#else + /*0x2DFC*/ struct ContestWinner contestWinners[4]; + /*0x2E7C*/ u8 filler_2E7C[0x2F9C-0x2E7C]; +#endif /*0x2F9C*/ struct DayCare daycare; /*0x30B8*/ struct LinkBattleRecord linkBattleRecords[5]; /*0x3108*/ u8 filler_3108[8]; diff --git a/include/graphics.h b/include/graphics.h index b3417a30f..f94450f86 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -48,6 +48,14 @@ extern const u8 gContest2Pal[]; extern const u8 gMonFootprint_QuestionMark[]; +extern const u8 gContestNextTurnGfx[]; +extern const u8 gContestNextTurnNumbersGfx[]; +extern const u8 gContestNextTurnRandomGfx[]; +extern const u8 gBattleAnimSpriteSheet_264[]; +extern const u8 gBattleAnimSpritePalette_264[]; +extern const u8 gBattleAnimSpritePalette_265[]; +extern const u8 gBattleAnimSpritePalette_067[]; +extern const u8 gBattleAnimSpritePalette_068[]; extern const u8 gContestApplauseGfx[]; extern const u8 gContestApplauseMeterGfx[]; extern const u16 gContestPal[]; |