Merge pull request #292 from SethBarberee/overlay_30
Some checks failed
build / build (push) Has been cancelled

Overlay 30
This commit is contained in:
AnonymousRandomPerson
2026-09-04 23:46:31 -04:00
committed by GitHub
7 changed files with 2476 additions and 4503 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,152 @@
// Character mapping for Pokémon: Explorers of Sky
// Version 2026.09.14
// Format is HEXCODE=<character> or HEXCODE={<command>}
// Comments are preceded by double forward slashes as in C99 and C++.
// Leading spaces and tabs are ignored; trailing spaces and tabs are not.
82A0=あ
82A2=い
82A4=う
82A6=え
82A8=お
82A9=か
82AA=が
82AB=き
82AC=ぎ
82AD=く
82AE=ぐ
82AF=け
82B0=げ
82B1=こ
82B2=ご
82B3=さ
82B4=ざ
82B5=し
82B6=じ
82B7=す
82B8=ず
82B9=せ
82BA=ぜ
82BB=そ
82BC=ぞ
82BD=た
82BE=だ
82BF=ち
82C0=ぢ
82C2=つ
82C3=づ
82C4=て
82C5=で
82C6=と
82C7=ど
82C8=な
82C9=に
82CA=ぬ
82CB=ね
82CC=の
82CD=は
82CE=ば
82CF=ぱ
82D0=ひ
82D1=び
82D2=ぴ
82D3=ふ
82D4=ぶ
82D5=ぷ
82D6=へ
82D7=べ
82D8=ぺ
82D9=ほ
82DA=ぼ
82DB=ぽ
82DC=ま
82DD=み
82DE=む
82DF=め
82E0=も
82E2=や
82E4=ゆ
82E6=よ
82E7=ら
82E8=り
82E9=る
82EA=れ
82EB=ろ
82ED=わ
82F0=を
82F1=ん
8341=ア
8343=イ
8345=ウ
8347=エ
8349=オ
834A=カ
834B=ガ
834C=キ
834D=ギ
834E=ク
834F=グ
8350=ケ
8351=ゲ
8352=コ
8353=ゴ
8354=サ
8355=ザ
8356=シ
8357=ジ
8358=ス
8359=ズ
835A=セ
835B=ゼ
835C=ソ
835D=ゾ
835E=タ
835F=ダ
8360=チ
8361=ヂ
8362=ッ
8363=ツ
8364=ヅ
8365=テ
8366=デ
8367=ト
8368=ド
8369=ナ
836A=ニ
836B=ヌ
836C=ネ
836D=
836E=ハ
836F=バ
8370=パ
8371=ヒ
8372=ビ
8373=ピ
8374=フ
8375=ブ
8376=プ
8377=ヘ
8378=ベ
8379=ペ
837A=ホ
837B=ボ
837C=ポ
837D=マ
837E=ミ
8380=ム
8381=メ
8382=モ
8384=ヤ
8386=ユ
8388=ヨ
8389=ラ
838A=リ
838B=ル
838C=レ
838D=ロ
838F=ワ
8392=ヲ
8393=ン
976C=様

View File

@@ -7,7 +7,7 @@
#define MAX_TEAM_MEMBERS 4
#define DUNGEON_MAX_WILD_POKEMON 16
#define DUNGEON_MAX_POKEMON 20
#define DUNGEON_MAX_POKEMON MAX_TEAM_MEMBERS + DUNGEON_MAX_WILD_POKEMON
#define DUNGEON_MAX_SIZE_X 56
#define DUNGEON_MAX_SIZE_Y 32
#define CORRIDOR_ROOM 0xFF
@@ -100,8 +100,7 @@ struct dungeon_generation_info {
// 0x8C24: Position of the Hidden Stairs spawn, or (-1, -1) if no Hidden Stairs
struct position hidden_stairs_pos;
// 0x8C28: Spawn position of each of the team members
struct position individual_team_spawn_positions[4];
// There's another 6 words that look like spawn positions right after these 4
struct position individual_team_spawn_positions[8];
};
// Thresholds are ascending cumulative weights (0-10000)
@@ -812,7 +811,8 @@ struct dungeon {
// 0x7F2: May always just be a copy of dungeon::some_monster_sprite_to_load, but may also
// have another purpose.
enum monster_id some_monster_sprite;
struct monster monsters[20]; // 0x7F4: Info for all the monsters currently in the dungeon
struct monster monsters[MAX_TEAM_MEMBERS]; // 0x7F4: Info for all the team monsters currently in the dungeon
struct monster wild_monsters[DUNGEON_MAX_WILD_POKEMON]; // 0x10F4: Info for all the wild monsters currently in the dungeon
// 0x34F4: Array that contains the spawn stats for enemies, which are only calculated
// once at the start of the floor.
// Since the enemy spawn list of a floor can only have a maximum of 16 entries,
@@ -1259,23 +1259,7 @@ struct dungeon {
u8 field_0x3fc3;
struct trap traps[64]; // 0x3FC4: Info for all the traps on the floor
struct dungeon_generation_info gen_info; // 0x40C4: Stuff involved with dungeon generation
u8 field_0xccfc;
u8 field_0xccfd;
u8 field_0xccfe;
u8 field_0xccff;
u8 field_0xcd00;
u8 field_0xcd01;
u8 field_0xcd02;
u8 field_0xcd03;
u8 field_0xcd04;
u8 field_0xcd05;
u8 field_0xcd06;
u8 field_0xcd07;
u8 field_0xcd08;
u8 field_0xcd09;
u8 field_0xcd0a;
u8 field_0xcd0b;
// 0xCD0C: Appears to be an array for the team. Likely only the first 4 entries are used.
// 0xCD0C: Appears to be an array for the team. Likely only the first 4 entries are used.
// Possibly related to dungeon_generation_info::individual_team_spawn_positions? Possibly the
// direction to spawn each team member in?
enum direction_id unk_team_direction_array[8];
@@ -1297,134 +1281,7 @@ struct dungeon {
struct weather weather; // 0xCD38
// 0xCD60: Seems to be tile data for tiles within fixed rooms
struct tile fixed_room_tiles[8][8];
u8 field_0xd260;
u8 field_0xd261;
u8 field_0xd262;
u8 field_0xd263;
u8 field_0xd264;
u8 field_0xd265;
u8 field_0xd266;
u8 field_0xd267;
u8 field_0xd268;
u8 field_0xd269;
u8 field_0xd26a;
u8 field_0xd26b;
u8 field_0xd26c;
u8 field_0xd26d;
u8 field_0xd26e;
u8 field_0xd26f;
u8 field_0xd270;
u8 field_0xd271;
u8 field_0xd272;
u8 field_0xd273;
u8 field_0xd274;
u8 field_0xd275;
u8 field_0xd276;
u8 field_0xd277;
u8 field_0xd278;
u8 field_0xd279;
u8 field_0xd27a;
u8 field_0xd27b;
u8 field_0xd27c;
u8 field_0xd27d;
u8 field_0xd27e;
u8 field_0xd27f;
u8 field_0xd280;
u8 field_0xd281;
u8 field_0xd282;
u8 field_0xd283;
u8 field_0xd284;
u8 field_0xd285;
u8 field_0xd286;
u8 field_0xd287;
u8 field_0xd288;
u8 field_0xd289;
u8 field_0xd28a;
u8 field_0xd28b;
u8 field_0xd28c;
u8 field_0xd28d;
u8 field_0xd28e;
u8 field_0xd28f;
u8 field_0xd290;
u8 field_0xd291;
u8 field_0xd292;
u8 field_0xd293;
u8 field_0xd294;
u8 field_0xd295;
u8 field_0xd296;
u8 field_0xd297;
u8 field_0xd298;
u8 field_0xd299;
u8 field_0xd29a;
u8 field_0xd29b;
u8 field_0xd29c;
u8 field_0xd29d;
u8 field_0xd29e;
u8 field_0xd29f;
u8 field_0xd2a0;
u8 field_0xd2a1;
u8 field_0xd2a2;
u8 field_0xd2a3;
u8 field_0xd2a4;
u8 field_0xd2a5;
u8 field_0xd2a6;
u8 field_0xd2a7;
u8 field_0xd2a8;
u8 field_0xd2a9;
u8 field_0xd2aa;
u8 field_0xd2ab;
u8 field_0xd2ac;
u8 field_0xd2ad;
u8 field_0xd2ae;
u8 field_0xd2af;
u8 field_0xd2b0;
u8 field_0xd2b1;
u8 field_0xd2b2;
u8 field_0xd2b3;
u8 field_0xd2b4;
u8 field_0xd2b5;
u8 field_0xd2b6;
u8 field_0xd2b7;
u8 field_0xd2b8;
u8 field_0xd2b9;
u8 field_0xd2ba;
u8 field_0xd2bb;
u8 field_0xd2bc;
u8 field_0xd2bd;
u8 field_0xd2be;
u8 field_0xd2bf;
u8 field_0xd2c0;
u8 field_0xd2c1;
u8 field_0xd2c2;
u8 field_0xd2c3;
u8 field_0xd2c4;
u8 field_0xd2c5;
u8 field_0xd2c6;
u8 field_0xd2c7;
u8 field_0xd2c8;
u8 field_0xd2c9;
u8 field_0xd2ca;
u8 field_0xd2cb;
u8 field_0xd2cc;
u8 field_0xd2cd;
u8 field_0xd2ce;
u8 field_0xd2cf;
u8 field_0xd2d0;
u8 field_0xd2d1;
u8 field_0xd2d2;
u8 field_0xd2d3;
u8 field_0xd2d4;
u8 field_0xd2d5;
u8 field_0xd2d6;
u8 field_0xd2d7;
u8 field_0xd2d8;
u8 field_0xd2d9;
u8 field_0xd2da;
u8 field_0xd2db;
u8 field_0xd2dc;
u8 field_0xd2dd;
u8 field_0xd2de;
u8 field_0xd2df;
s16 field_0xd260[8][8];
// 0xD2E0: Appears to keep track of what tiles are the fixed room tiles when generating
// a fixed room that isn't the whole floor.
u8 fixed_room_room_index;
@@ -1654,7 +1511,7 @@ struct dungeon {
// 0x2C9E4: The total number of spawn entries loaded or to be loaded?
u16 number_sprites_loaded;
// 0x2C9E6: Highest level among all the enemies that spawn on this floor
u16 highest_enemy_level;
s16 highest_enemy_level;
// 0x2C9E8: ID of an item guaranteed to spawn on the floor, if applicable
// (e.g., certain mission types)
enum item_id guaranteed_item_id;

View File

@@ -270,8 +270,7 @@ struct monster {
s16 iq; // 0xE
s16 hp; // 0x10: Current HP
s16 max_hp_stat; // 0x12: Add to max_hp_boost for the actual max HP
u8 field_0x14;
u8 field_0x15;
s16 field_0x14;
s16 max_hp_boost; // 0x16: From Life Seeds, Sitrus Berries, etc.
u8 field_0x18;
u8 field_0x19;
@@ -292,7 +291,7 @@ struct monster {
struct item held_item; // 0x62
// 0x68: Previous held item. Used for whenever taking the X-Ray Specs or Y-Ray Specs on or off
// in order to update the camera and minimap. Changed to held_item.id after checking.
enum item_id previous_held_item_id;
s16 previous_held_item_id;
// Previous position data is used by the AI
struct position prev_pos[NUM_PREV_POS]; // 0x6A: Position X turns ago
struct ai_target ai_target; // 0x7A
@@ -309,8 +308,7 @@ struct monster {
// and restored to entity::types after statuses::roost ends.
enum type_id original_types[2];
// 0xAC: The move id to be used if statuses::bide is 1.
u8 bide_move_id;
u8 field_0xad;
s16 bide_move_id;
u8 field_0xae;
u8 field_0xaf;
// 0xB0: Unique number given to the monster when spawning to differentiate it from other
@@ -468,18 +466,13 @@ struct monster {
// 0x167: Set to true when the monster receives a critical hit. If true when the monster
// attacks, Anger Point will activate. Set to false after the monster attacks.
bool8 anger_point_flag;
u8 field_0x168;
u8 field_0x169;
s16 field_0x168;
// 0x16A: When not DIR_NONE, monster will turn in the specified direction and
// its AI will be forced to target the tile next to it in that direction.
// Used to prevent bosses from turning towards team members the moment the boss fight
// starts (which would override their intended starting facing direction).
enum direction_id force_turn : 8;
u8 field_0x16b;
u8 field_0x16c;
u8 field_0x16d;
u8 field_0x16e;
u8 field_0x16f;
u8 force_turn;
u8 unk16B[5];
// 0x170: Set to make the monster disappear when using the move U-turn.
bool8 uturn_hide_monster_flag;
// 0x171: Some kind of visual flag? Gets set to 0 temporarily when changing Shaymin form
@@ -495,9 +488,9 @@ struct monster {
u8 field_0x175;
u8 field_0x176;
// 0x177: Appears to be the direction for using sleep talk? Set to DIR_NONE when awake.
enum direction_id sleep_talk_direction : 8;
u8 sleep_talk_direction;
// 0x178: Appears to be the direction for using snore? Set to DIR_NONE when awake.
enum direction_id snore_direction : 8;
u8 snore_direction;
// 0x179: Seems to be set to 4 when the monster initally throws something and probably
// related to direction somehow. Checked in a loop for every monster.
u8 field_0x179;
@@ -511,10 +504,7 @@ struct monster {
struct position pixel_pos; // 0x182: The monster's graphical position on screen?
u8 field_0x186;
u8 field_0x187;
u8 field_0x188;
u8 field_0x189;
u8 field_0x18a;
u8 field_0x18b;
u32 field_0x188;
// 0x18C: Bitflags that cause non-damaging exclusive items to trigger on the
// attacker after they have completed their move. For example, the Eclipse Robe
// (Darkrai exclusive item) may afflict attacking enemies with the nightmare
@@ -648,8 +638,7 @@ struct monster {
u8 field_0x20d;
u8 field_0x20e;
u8 field_0x20f;
u8 hp_fractional; // 0x210: 200 * fractional_part(HP)
u8 field_0x211;
s16 hp_fractional; // 0x210: 200 * fractional_part(HP)
// 0x212: When a Pokémon can pass through walls in a hallway, this counts up to 200 before the Pokémon turns in a random direction.
s16 mobile_turn_timer;
// 0x214: Somehow related to gaining exp through a joy ribbon. Set to 0 after
@@ -726,10 +715,9 @@ struct entity {
u8 field_0x2b;
struct animation_control anim_ctrl;
u16 sprite_index; // 0xA8
u8 field_0xaa;
s8 field_0xaa;
u8 field_0xab;
u8 field_0xac;
u8 field_0xad;
s16 field_0xac;
u8 animation_group_id; // 0xAE
u8 animation_group_id_mirror; // 0xAF
u8 animation_id; // 0xB0
@@ -1142,9 +1130,9 @@ struct trap {
u8 team;
// 0x2: flags: 1-byte bitfield
//u8 flags;
bool8 f_unbreakable : 1; // If true, the trap can't be broken (for example, using a Trapbust Orb)
u8 flags_unk1 : 7;
u8 flags;
//bool8 f_unbreakable : 1; // If true, the trap can't be broken (for example, using a Trapbust Orb)
//u8 flags_unk1 : 7;
u8 field_0x3;
};

83
include/overlay_30.h Normal file
View File

@@ -0,0 +1,83 @@
#ifndef PMD_SKY_OVERLAY_30_H
#define PMD_SKY_OVERLAY_30_H
#include "dungeon_mode.h"
struct Overlay30Main {
s32 state;
s32 unk4;
s32 unk8;
u8 unkC;
s8 isGameModeRescue; // GAME_MODE_RESCUE
};
struct DataSerializer {
u8 *stream;
u8 *end;
u32 count;
};
void ov30_02382820(s32 arg0, s32 arg1, s32 isGameModeRescue);
s32 ov30_02382874(void);
u8 ov30_0238298C(void);
void ov30_023829A0(void);
void ov30_023829CC(s32 arg0, s32 arg1, s8 arg2);
s32 ov30_02382A34(void);
void ov30_02382C30(void);
void WriteQuicksaveData(void *buffer, s32 size);
void ov30_02382D80(void *buffer);
void ov30_02382E94(void *buffer);
void ov30_02382FB8(void *buffer);
void ov30_02383084(void *buffer);
void ov30_023831E8(void *buffer, struct entity* entity);
void ov30_02383C70(void *buffer);
void ov30_0238409C(void *buffer);
void ov30_02384208(void *buffer);
void ov30_02384268(void *buffer, struct item *item);
void ov30_023842B0(void *buffer, struct tile* tile);
void ov30_023842F4(void *buffer, s32 arg1);
void ov30_02384400(void *buffer);
void ov30_0238483C(void *buffer, struct tile* tile);
void ov30_023848A0(void *buffer);
void ov30_02384A20(void *buffer);
void ov30_02384A94(void *buffer);
void ov30_02384B24(void *buffer, struct item *item);
void ov30_02384B84(void *buffer);
void ov30_02384C6C(void *buffer);
void ov30_02384CD4(void *buffer);
void ov30_02384E28(void *arg0, s32 arg1, s32 index);
struct entity* ov30_023859DC(s16 id, s16 apparent_id, s32 monster_slot_index);
struct entity* ov30_02385B10(s16 id, s16 apparent_id, s32 monster_slot_index);
void ov30_02385C3C(struct DataSerializer *r0, u8 *r1, s32 r2); // InitBitWriter
void ov30_02385C54(struct DataSerializer* r0, const void* src, s32 numBits); // WriteBits
void ov30_02385C8C(struct DataSerializer *r0, u8 *r1, s32 r2); // InitBitReader
void ov30_02385CA4(struct DataSerializer* r0, void* src, s32 numBits); // ReadBits
void FinishBitSerializer(struct DataSerializer *r0);
void ov30_02385CE0(struct DataSerializer *arg0, const void *string);
void ov30_02385CF0(struct DataSerializer *arg0, const void *string);
void ov30_02385D14(struct DataSerializer *arg0, u16 r1);
void ov30_02385D34(struct DataSerializer *arg0, s16 r1);
void ov30_02385D54(struct DataSerializer *arg0, u8 r1);
void ov30_02385D74(struct DataSerializer *arg0, s32 r1);
void ov30_02385D94(struct DataSerializer *arg0, s32 r1);
void ov30_02385DB4(struct DataSerializer *arg0, s32 r1);
void ov30_02385DD4(struct DataSerializer *arg0, u8 arg1);
void ov30_02385DF8(struct DataSerializer *arg0, struct position *pos);
void ov30_02385E20(struct DataSerializer *arg0, struct position *pos);
void ov30_02385E48(struct DataSerializer *arg0, s32 *arg1);
void ov30_02385E90(struct DataSerializer *arg0, u16 *arg1);
void ov30_02385EB8(struct DataSerializer *arg0, u8 *arg1, s32 num);
u16 ov30_02385EC4(struct DataSerializer *arg0);
s16 ov30_02385EDC(struct DataSerializer *arg0);
u8 ov30_02385EF4(struct DataSerializer *arg0);
u32 ov30_02385F0C(struct DataSerializer *arg0);
s32 ov30_02385F24(struct DataSerializer *arg0);
s32 ov30_02385F3C(struct DataSerializer *arg0);
u8 ov30_02385F54(struct DataSerializer *arg0);
void ov30_02385F7C(struct DataSerializer *arg0, struct position *pos);
void ov30_02385FB0(struct DataSerializer *arg0, struct position *pos);
void ov30_02385FE4(struct DataSerializer *arg0, s32 *arg1);
void ov30_02386040(struct DataSerializer *arg0, u16 *arg1);
void ov30_02386074(struct DataSerializer *arg0, u8 *arg1, s32 num);
#endif // PMD_SKY_OVERLAY_30_H

View File

@@ -1294,6 +1294,7 @@ Overlay OVY_29
Overlay OVY_30
{
After OVY_29
Object src/overlay_30_init.o
Object asm/overlay_30.o
}
Overlay OVY_31

2218
src/overlay_30_init.c Normal file

File diff suppressed because it is too large Load Diff