Files
pokepinballrs/include/types.h
T
Retnuhytnuob c75a93182f Renaming of board related src files, Prize state naming, board/bonus board state/substate naming (#214)
* name prize array, start on main board state

* next board state const refs

* main/groudon board states

* spriteGroup Const initialize

* undo SG_ consts for now - Later PR

* sprite group active bool checkpoint

* sprite group active conditions

* center screen display

* board substate initial enum tagging

* board intro mode; bonus board substates

* folderization; partial

* catch tile naming

* remaining board folderization (2 intended exceptions)

* center catch substates

* Finished Catchem substates

* finish jirachi substate mode

* baby mon substates

* clean up center screen in-file naming

* defolderization, evo/travel substates

* pendingModeChangeFlags

* Kecleon board state naming

* spheal board states

* fix unknown enum name

* kyogre initial state enum

* kyogre const checkpoint

* kyogre state enums finished

* data extraction for roulette wheel sets, state for special capturestate

* rayquaza states, roulette prize option dump
2026-05-09 08:06:24 -05:00

87 lines
2.1 KiB
C

#ifndef GUARD_TYPES_H
#define GUARD_TYPES_H
#include "gba/gba.h"
#define NUM_SPRITE_GROUPS 100
#define MAX_SPRITES_IN_GROUP 22
// Place all discovered types (structs, unions, etc.) in this file.
typedef void (*StateFunc)(void);
typedef void (*IntrFunc)(void);
struct SpriteSet
{
u16 count;
u8 oamData[0];
};
struct OamDataSimple
{
/*0x00*/ u16 oamId;
/*0x02*/ s16 xOffset;
/*0x04*/ s16 yOffset;
};
// size: 0x8
struct SpriteGroup
{
/*0x00*/ bool16 active;
/*0x02*/ s16 baseX;
/*0x04*/ s16 baseY;
/*0x08*/ struct OamDataSimple oam[MAX_SPRITES_IN_GROUP];
/*Note: oam is 22 groups of size 0x8. Extends to B7.
0 1 2 3 4 5 6 7 8 9
00 8, 10, 18, 20, 28, 30, 38, 40, 48, 50,
10 58, 60, 68, 70, 78, 80, 88, 90, 98, A0,
20 A8, B0
*/
};
// size: 0xB8
struct SpriteSetTableEntry
{
/*0x00*/ const struct SpriteSet *const *spriteSets;
/*0x04*/ u16 numSpriteSets;
/*0x06*/ u16 padding;
}; // size: 0x8
struct Vector16
{
s16 x;
s16 y;
};
struct VectorU16
{
u16 x;
u16 y;
};
struct Vector32
{
s32 x;
s32 y;
};
struct VectorU32
{
u32 x;
u32 y;
};
struct PokemonSpecies {
/*0x00*/ u16 speciesIdRS; // Refers to the generation three internal index number; e.g. Treecko is 0x115 (decimal 227).
/*0x02*/ u8 nameJapanese[5];
/*0x07*/ u8 name[10]; // Space-padded ASCII
/*0x11*/ u8 catchIndex; // Non-zero for all catch pokemon other than Treecko, zero for Treecko and all non-catch pokemon
/*0x12*/ u8 eggIndex; // Non-zero for all hatch pokemon other than Wurmple, zero for Wurmple and all non-hatch pokemon
/*0x13*/ u8 specialEggFlag; // Something egg related; only hatch pokemon have this set to 1, but not all do, and there is no other pattern
// specialEggFlag list: Azurill, Skitty, Zubat, Plusle, Minun, Igglybuff, Shuppet, Chimecho, Pichu, Natu
/*0x14*/ s8 evolutionMethod; // Exp, Stone, etc.
/*0x15*/ u8 evolutionTarget; // Uses the standard index numbers; e.g. Treecko is 0x00 (SPECIES_TREECKO)
};
#endif // GUARD_TYPES_H