pokepinballrs/include/types.h
ColinT 09403d1e89
Decompile sub_12BF8 (#96)
* Decompile sub_12BF8

* Fix up types and DmaCopy calls

* formatting cleanup

---------

Co-authored-by: Marcus Huderle <huderlem@gmail.com>
2025-05-19 08:07:30 -05:00

73 lines
1.6 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*/ u16 available;
/*0x02*/ s16 baseX;
/*0x04*/ s16 baseY;
/*0x08*/ struct OamDataSimple oam[MAX_SPRITES_IN_GROUP];
};
// size: 0xB8
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 {
u16 mainSeriesIndexNumber; // Refers to the generation three internal index number; e.g. Treecko is 0x115 (decimal 227).
u8 unk2[0x5];
u8 name[10]; // Space-padded ASCII
u8 catchIndex; // Non-zero for all catch pokemon other than Treecko, zero for Treecko and all non-catch pokemon
u8 eggIndex; // Non-zero for all hatch pokemon other than Wurmple, zero for Wurmple and all non-hatch pokemon
u8 unk13; // Something egg related; only hatch pokemon have this set to 1, but not all do, and there is no other pattern
// unk13 list: Azurill, Skitty, Zubat, Plusle, Minun, Igglybuff, Shuppet, Chimecho, Pichu, Natu
u8 evolutionMethod; // Exp, Stone, etc.
u8 evolutionTarget; // Uses the standard index numbers; e.g. Treecko is 0x00 (SPECIES_TREECKO)
};
#endif // GUARD_TYPES_H