mirror of
https://github.com/pret/pmd-red.git
synced 2026-09-30 12:58:10 -05:00
more renames and splits
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
.section .rodata
|
||||
|
||||
|
||||
|
||||
|
||||
.align 2,0
|
||||
@ ???
|
||||
.string "pksdir0\0"
|
||||
.align 2,0
|
||||
@ ???
|
||||
.string "pksdir0\0"
|
||||
.align 2,0
|
||||
@ ???
|
||||
.string "pksdir0\0"
|
||||
.align 2,0
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#ifndef GUARD_CODE_8092334_H
|
||||
#define GUARD_CODE_8092334_H
|
||||
|
||||
#include "data_serializer.h"
|
||||
|
||||
void FinishBitSerializer(DataSerializer *seri);
|
||||
void InitBitReader(DataSerializer *seri, u8 *buffer, s32 bufLen);
|
||||
void InitBitWriter(DataSerializer *seri, u8 *buffer, s32 bufLen);
|
||||
void ReadBits(DataSerializer *seri, void *dst, s32 numBits);
|
||||
void WriteBits(DataSerializer *seri, void *src, s32 numBits);
|
||||
|
||||
#endif // GUARD_CODE_8092334_H
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef GUARD_CODE_8094F88_H
|
||||
#define GUARD_CODE_8094F88_H
|
||||
|
||||
#include "code_8092334.h"
|
||||
#include "data_serializer.h"
|
||||
#include "structs/str_dungeon.h"
|
||||
#include "items.h"
|
||||
#include "pokemon.h"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "constants/mailbox.h"
|
||||
#include "structs/str_wonder_mail.h"
|
||||
#include "code_8092334.h"
|
||||
#include "data_serializer.h"
|
||||
|
||||
// size: 0xC
|
||||
typedef struct subStruct_203B490
|
||||
|
||||
@@ -10,4 +10,10 @@ typedef struct DataSerializer
|
||||
/* 0xC */ u32 unkC; // Seems to be a temporary 32 bit storage
|
||||
} DataSerializer;
|
||||
|
||||
void FinishBitSerializer(DataSerializer *seri);
|
||||
void InitBitReader(DataSerializer *seri, u8 *buffer, s32 bufLen);
|
||||
void InitBitWriter(DataSerializer *seri, u8 *buffer, s32 bufLen);
|
||||
void ReadBits(DataSerializer *seri, void *dst, s32 numBits);
|
||||
void WriteBits(DataSerializer *seri, void *src, s32 numBits);
|
||||
|
||||
#endif // GUARD_DATA_SERIALIZER_H
|
||||
|
||||
@@ -686,7 +686,7 @@ extern const u8 *const gUnknown_80FE674;
|
||||
extern const u8 *const gUnknown_80FE690;
|
||||
extern const u8 *const gUnknown_80FE6B4;
|
||||
extern const u8 *const gUnknown_80FE6D4;
|
||||
extern const u8 *const gUnknown_80FE6E8;
|
||||
extern const u8 *const gText_TheLastOuting;
|
||||
extern const u8 *const gUnknown_80FE6F4;
|
||||
extern const u8 *const gUnknown_80FE708;
|
||||
extern const u8 *const gUnknown_80FE70C;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef GUARD_EXCLUSIVE_POKEMON_H
|
||||
#define GUARD_EXCLUSIVE_POKEMON_H
|
||||
|
||||
#include "code_8092334.h"
|
||||
#include "data_serializer.h"
|
||||
|
||||
|
||||
#define NUM_EXCLUSIVE_POKEMON 12
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef GUARD_ITEMS_H
|
||||
#define GUARD_ITEMS_H
|
||||
|
||||
#include "code_8092334.h"
|
||||
#include "data_serializer.h"
|
||||
#include "structs/str_items.h"
|
||||
#include "structs/str_pokemon.h"
|
||||
#include "structs/str_status_text.h"
|
||||
|
||||
@@ -50,6 +50,10 @@ FixedPoint FixedPoint_SetFromUnk(s48_16* param_1);
|
||||
FixedPoint FixedPoint_Div(FixedPoint a, FixedPoint b);
|
||||
s32 FixedPointToInt(FixedPoint a); // Always rounded up
|
||||
|
||||
#include "data_serializer.h"
|
||||
void ReadBellyBits(DataSerializer *r0, FixedPoint *dst);
|
||||
void WriteBellyBits(DataSerializer *r0, FixedPoint *src);
|
||||
|
||||
// Sometimes it's used directly as opposed to calling IntToFixedPoint
|
||||
#define IntToFixedPointMacro(x) ((FixedPoint){x, 0})
|
||||
|
||||
|
||||
@@ -318,7 +318,7 @@ SECTIONS {
|
||||
src/moves.o(.text);
|
||||
src/number_util.o(.text);
|
||||
src/code_809447C.o(.text);
|
||||
src/code_8092334.o(.text);
|
||||
src/data_serializer.o(.text);
|
||||
src/game_options.o(.text);
|
||||
src/random_mersenne_twister.o(.text);
|
||||
src/play_time.o(.text);
|
||||
@@ -686,7 +686,9 @@ SECTIONS {
|
||||
src/pokemon_abilities.o(.rodata);
|
||||
src/friend_area.o(.rodata);
|
||||
src/moves.o(.rodata);
|
||||
data/data_81076E4.o(.rodata);
|
||||
src/number_util.o(.rodata);
|
||||
src/code_809447C.o(.rodata);
|
||||
src/data_serializer.o(.rodata);
|
||||
src/game_options.o(.rodata);
|
||||
src/random_mersenne_twister.o(.rodata);
|
||||
src/play_time.o(.rodata);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "globaldata.h"
|
||||
#include "structs/str_wonder_mail.h"
|
||||
#include "code_803D0D8.h"
|
||||
#include "code_8092334.h"
|
||||
#include "data_serializer.h"
|
||||
#include "code_8094F88.h"
|
||||
#include "code_80958E8.h"
|
||||
#include "memory.h"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "structs/str_dungeon.h"
|
||||
#include "code_8092334.h"
|
||||
#include "data_serializer.h"
|
||||
#include "dungeon_info.h"
|
||||
#include "items.h"
|
||||
#include "moves.h"
|
||||
@@ -10,20 +11,6 @@
|
||||
#include "text_util.h"
|
||||
#include "strings.h"
|
||||
|
||||
// arm9.bin::02064154
|
||||
void ReadBellyBits(DataSerializer *r0, FixedPoint *dst)
|
||||
{
|
||||
ReadBits(r0, &dst->unk0, 16);
|
||||
ReadBits(r0, &dst->unk2, 16);
|
||||
}
|
||||
|
||||
// arm9.bin::02064124
|
||||
void WriteBellyBits(DataSerializer *r0, FixedPoint *src)
|
||||
{
|
||||
WriteBits(r0, &src->unk0, 16);
|
||||
WriteBits(r0, &src->unk2, 16);
|
||||
}
|
||||
|
||||
static void WriteDeathText(s16 moveID, u8 *buffer)
|
||||
{
|
||||
u16 moveID_u16;
|
||||
@@ -141,3 +128,18 @@ void sub_8094558(u32 param_1,u8 *param_2,UnkDungeonGlobal_unk1CE98_sub *param_3)
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_81139CC,param_1,0);
|
||||
sub_80073E0(param_1);
|
||||
}
|
||||
|
||||
s16 sub_8094828(u16 moveID, u8 id)
|
||||
{
|
||||
if(id != 0)
|
||||
{
|
||||
if(GetItemCategory(id) == CATEGORY_ORBS)
|
||||
return 0x223;
|
||||
else
|
||||
return 0x224;
|
||||
}
|
||||
else
|
||||
{
|
||||
return moveID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +1,9 @@
|
||||
#include "global.h"
|
||||
#include "code_8092334.h"
|
||||
#include "globaldata.h"
|
||||
#include "data_serializer.h"
|
||||
#include "memory.h"
|
||||
#include "items.h"
|
||||
|
||||
|
||||
s16 sub_8094828(u16 moveID, u8 id)
|
||||
{
|
||||
if(id != 0)
|
||||
{
|
||||
if(GetItemCategory(id) == CATEGORY_ORBS)
|
||||
return 0x223;
|
||||
else
|
||||
return 0x224;
|
||||
}
|
||||
else
|
||||
{
|
||||
return moveID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// New file here
|
||||
|
||||
|
||||
// arm9.bin::02064998
|
||||
void InitBitReader(DataSerializer *r0, u8 *buffer, s32 bufLen)
|
||||
{
|
||||
@@ -78,7 +58,7 @@ void WriteBits(DataSerializer *r0, void *src, s32 numBits)
|
||||
}
|
||||
}
|
||||
|
||||
UNUSED void sub_80948E4(DataSerializer *seri, void *src, s32 numBytes)
|
||||
static UNUSED void sub_80948E4(DataSerializer *seri, void *src, s32 numBytes)
|
||||
{
|
||||
s32 iVar1;
|
||||
u8 *curByte;
|
||||
@@ -127,4 +107,4 @@ void ReadBits(DataSerializer *r0, void *dst, s32 numBits)
|
||||
r0->unkC++;
|
||||
numBits--;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ void ShowDungeonClearedWindow(void)
|
||||
else {
|
||||
PlayDungeonFailBGM();
|
||||
}
|
||||
sub_8094558(0, gUnknown_80FE6E8,&gDungeon->unk1CE98); // The Last Outing
|
||||
sub_8094558(0, gText_TheLastOuting,&gDungeon->unk1CE98);
|
||||
while(1) {
|
||||
sub_803E668(0x36);
|
||||
UpdateDungeonMusic();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "constants/monster.h"
|
||||
#include "constants/type.h"
|
||||
#include "code_800D090.h"
|
||||
#include "code_8092334.h"
|
||||
#include "data_serializer.h"
|
||||
#include "dungeon_info.h"
|
||||
#include "items.h"
|
||||
#include "moves.h"
|
||||
|
||||
@@ -915,7 +915,7 @@ const u8 *const gUnknown_80FE674 = _("Ah, welcome〜♪");
|
||||
const u8 *const gUnknown_80FE690 = _("{POKEMON_0} was sent flying!");
|
||||
const u8 *const gUnknown_80FE6B4 = _("But it didn't go anywhere.");
|
||||
const u8 *const gUnknown_80FE6D4 = _("{POKEMON_0} can't throw items!");
|
||||
const u8 *const gUnknown_80FE6E8 = _("The Last Outing");
|
||||
const u8 *const gText_TheLastOuting = _("The Last Outing");
|
||||
const u8 *const gUnknown_80FE6F4 = _("Someone");
|
||||
const u8 *const gUnknown_80FE708 = _("Tile underfoot");
|
||||
const u8 *const gUnknown_80FE70C = _("Stairs");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "code_800D090.h"
|
||||
#include "code_8092334.h"
|
||||
#include "data_serializer.h"
|
||||
#include "constants/dungeon.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "friend_area.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "graphics_memory.h"
|
||||
#include "code_8092334.h"
|
||||
#include "data_serializer.h"
|
||||
#include "game_options.h"
|
||||
|
||||
struct unkStruct_8094CB0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "constants/colors.h"
|
||||
#include "constants/monster.h"
|
||||
#include "code_800D090.h"
|
||||
#include "code_8092334.h"
|
||||
#include "data_serializer.h"
|
||||
#include "code_8097DD0.h"
|
||||
#include "def_filearchives.h"
|
||||
#include "memory.h"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "number_util.h"
|
||||
|
||||
FixedPoint FixedPoint_Add(FixedPoint a, FixedPoint b)
|
||||
@@ -126,3 +127,16 @@ s32 FixedPointToInt(FixedPoint a) // Always rounded up
|
||||
}
|
||||
}
|
||||
|
||||
// arm9.bin::02064154
|
||||
void ReadBellyBits(DataSerializer *r0, FixedPoint *dst)
|
||||
{
|
||||
ReadBits(r0, &dst->unk0, 16);
|
||||
ReadBits(r0, &dst->unk2, 16);
|
||||
}
|
||||
|
||||
// arm9.bin::02064124
|
||||
void WriteBellyBits(DataSerializer *r0, FixedPoint *src)
|
||||
{
|
||||
WriteBits(r0, &src->unk0, 16);
|
||||
WriteBits(r0, &src->unk2, 16);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "play_time.h"
|
||||
#include "code_8092334.h"
|
||||
#include "data_serializer.h"
|
||||
|
||||
EWRAM_INIT struct PlayTimeStruct *gPlayTimeRef = {NULL};
|
||||
EWRAM_DATA struct PlayTimeStruct gPlayTime = {0};
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "text_1.h"
|
||||
#include "text_util.h"
|
||||
#include "dungeon_data.h"
|
||||
#include "number_util.h"
|
||||
|
||||
struct UnusedOffenseStruct
|
||||
{
|
||||
@@ -37,9 +38,7 @@ extern void WritePoke1LevelBits(DataSerializer*, struct unkPokeSubStruct_C*);
|
||||
void ReadDungeonLocationBits(DataSerializer*, DungeonLocation*);
|
||||
void ReadPoke1LevelBits(DataSerializer*, struct unkPokeSubStruct_C*);
|
||||
|
||||
extern void WriteBellyBits(DataSerializer*, FixedPoint *src);
|
||||
extern void WriteHiddenPowerBits(DataSerializer*, HiddenPower*);
|
||||
extern void ReadBellyBits(DataSerializer*, FixedPoint *dst);
|
||||
extern void ReadHiddenPowerBits(DataSerializer*, HiddenPower*);
|
||||
s16 GetPokemonEvolveConditions(s16 index, unkEvolve *r1);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "rescue_team_info.h"
|
||||
#include "code_8092334.h"
|
||||
#include "data_serializer.h"
|
||||
#include "text_util.h"
|
||||
#include "event_flag.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user