make lots of define files

This commit is contained in:
DizzyEggg
2017-09-07 19:45:32 +02:00
parent 8bfdc42d0e
commit 4a1b2967ca
18 changed files with 379 additions and 100 deletions

23
include/battle_message.h Normal file
View File

@@ -0,0 +1,23 @@
#ifndef GUARD_BATTLE_MESSAGE_H
#define GUARD_BATTLE_MESSAGE_H
struct StringInfoBattle
{
u16 currentMove;
u16 lastMove;
u16 lastItem;
u8 lastAbility;
u8 scrActive;
u8 unk1605E;
u8 hpScale;
u8 StringBank;
u8 moveType;
u8 abilities[4];
u8 textBuffs[3][0x10];
};
void BufferStringBattle(u16 stringID);
u32 StrCpyDecodeToDisplayedStringBattle(const u8* src);
u32 StrCpyDecodeBattle(const u8* src, u8* dst);
#endif // GUARD_BATTLE_MESSAGE_H

48
include/berry.h Normal file
View File

@@ -0,0 +1,48 @@
#ifndef GUARD_BERRY_H
#define GUARD_BERRY_H
enum
{
BERRY_FIRMNESS_UNKNOWN,
BERRY_FIRMNESS_VERY_SOFT,
BERRY_FIRMNESS_SOFT,
BERRY_FIRMNESS_HARD,
BERRY_FIRMNESS_VERY_HARD,
BERRY_FIRMNESS_SUPER_HARD,
};
void ClearEnigmaBerries(void);
void SetEnigmaBerry(u8 *src);
u32 GetEnigmaBerryChecksum(struct EnigmaBerry *enigmaBerry);
bool32 IsEnigmaBerryValid(void);
const struct Berry *GetBerryInfo(u8 berry);
struct BerryTree *GetBerryTreeInfo(u8 id);
bool32 FieldObjectInteractionWaterBerryTree(void);
bool8 IsPlayerFacingPlantedBerryTree(void);
bool8 TryToWaterBerryTree(void);
void ClearBerryTrees(void);
bool32 BerryTreeGrow(struct BerryTree *tree);
void BerryTreeTimeUpdate(s32 minutes);
void PlantBerryTree(u8 id, u8 berry, u8 stage, bool8 sparkle);
void RemoveBerryTree(u8 id);
u8 GetBerryTypeByBerryTreeId(u8 id);
u8 GetStageByBerryTreeId(u8);
u8 ItemIdToBerryType(u16 item);
u16 BerryTypeToItemId(u16 berry);
void GetBerryNameByBerryType(u8 berry, u8 *string);
void ResetBerryTreeSparkleFlag(u8 id);
u8 BerryTreeGetNumStagesWatered(struct BerryTree *tree);
u8 GetNumStagesWateredByBerryTreeId(u8 id);
u8 CalcBerryYieldInternal(u16 max, u16 min, u8 water);
u8 CalcBerryYield(struct BerryTree *tree);
u8 GetBerryCountByBerryTreeId(u8 id);
u16 GetStageDurationByBerryType(u8);
void FieldObjectInteractionGetBerryTreeData(void);
void sub_80B4EE4(void);
void FieldObjectInteractionPlantBerryTree(void);
void FieldObjectInteractionPickBerryTree(void);
void FieldObjectInteractionRemoveBerryTree(void);
u8 PlayerHasBerries(void);
void ResetBerryTreeSparkleFlags(void);
#endif // GUARD_BERRY_H

6
include/coins.h Normal file
View File

@@ -0,0 +1,6 @@
#ifndef GUARD_COINS_H
#define GUARD_COINS_H
void SetCoins(u16 newValue);
#endif // GUARD_COINS_H

7
include/dewford_trend.h Normal file
View File

@@ -0,0 +1,7 @@
#ifndef GUARD_DEWFORDTREND_H
#define GUARD_DEWFORDTREND_H
void InitDewfordTrend(void);
void UpdateDewfordTrendPerDay(u16);
#endif // GUARD_DEWFORDTREND_H

33
include/easy_chat.h Normal file
View File

@@ -0,0 +1,33 @@
#ifndef GUARD_EASYCHAT_H
#define GUARD_EASYCHAT_H
// Taken from Pokeruby, check if it's correct
enum
{
EC_GROUP_POKEMON,
EC_GROUP_TRAINER,
EC_GROUP_STATUS,
EC_GROUP_BATTLE,
EC_GROUP_GREETINGS,
EC_GROUP_PEOPLE,
EC_GROUP_VOICES,
EC_GROUP_SPEECH,
EC_GROUP_ENDINGS,
EC_GROUP_FEELINGS,
EC_GROUP_CONDITIONS,
EC_GROUP_ACTIONS,
EC_GROUP_LIFESTYLE,
EC_GROUP_HOBBIES,
EC_GROUP_TIME,
EC_GROUP_MISC,
EC_GROUP_ADJECTIVES,
EC_GROUP_EVENTS,
EC_GROUP_MOVE_1,
EC_GROUP_MOVE_2,
EC_GROUP_TRENDY_SAYING,
EC_GROUP_POKEMON_2,
};
void InitEasyChatPhrases(void);
#endif // GUARD_EASYCHAT_H

View File

@@ -155,7 +155,7 @@ struct SaveBlock2
/*0x90*/ u8 filler_90[0x8];
/*0x98*/ struct Time localTimeOffset;
/*0xA0*/ struct Time lastBerryTreeUpdate;
/*0xA8*/ u8 filler_A8[0x4];
/*0xA8*/ u32 field_A8;
/*0xAC*/ u32 encryptionKey;
// TODO: fix and verify labels

6
include/lilycove_lady.h Normal file
View File

@@ -0,0 +1,6 @@
#ifndef GUARD_LILYCOVE_LADY_H
#define GUARD_LILYCOVE_LADY_H
void SetLilycoveLady(void);
#endif //GUARD_LILYCOVE_LADY_H

View File

@@ -3,6 +3,8 @@
extern bool32 gFlashMemoryPresent;
void ClearSav2(void);
void ClearSav1(void);
void CheckForFlashMemory(void);
void MoveSaveBlocks_ResetHeap(void);
bool32 GetSecretBase2Field_9(void);

12
include/lottery_corner.h Normal file
View File

@@ -0,0 +1,12 @@
#ifndef GUARD_LOTTERY_CORNER_H
#define GUARD_LOTTERY_CORNER_H
void ResetLotteryCorner(void);
void SetRandomLotteryNumber(u16 i);
void RetrieveLotteryNumber(void);
void PickLotteryCornerTicket(void);
void SetLotteryNumber(u32 lotteryNum);
u32 GetLotteryNumber(void);
void SetLotteryNumber16_Unused(u16 lotteryNum);
#endif // GUARD_LOTTERY_CORNER_H

View File

@@ -0,0 +1,6 @@
#ifndef GUARD_MAUVILLE_OLD_MAN_H
#define GUARD_MAUVILLE_OLD_MAN_H
void SetMauvilleOldMan(void);
#endif // GUARD_MAUVILLE_OLD_MAN_H

6
include/money.h Normal file
View File

@@ -0,0 +1,6 @@
#ifndef GUARD_MONEY_H
#define GUARD_MONEY_H
void SetMoney(u32* moneyPtr, u32 newValue);
#endif // GUARD_MONEY_H

View File

@@ -8,5 +8,6 @@ void SetDefaultOptions(void);
void ClearPokedexFlags(void);
void WarpToTruck(void);
void NewGameInitData(void);
void ResetMiniGamesResults(void);
#endif // GUARD_NEW_GAME_H

45
include/pokeblock.h Normal file
View File

@@ -0,0 +1,45 @@
#ifndef GUARD_POKEBLOCK_H
#define GUARD_POKEBLOCK_H
enum
{
PBLOCK_CLR_BLACK,
PBLOCK_CLR_RED,
PBLOCK_CLR_BLUE,
PBLOCK_CLR_PINK,
PBLOCK_CLR_GREEN,
PBLOCK_CLR_YELLOW
};
enum
{
PBLOCK_COLOR,
PBLOCK_SPICY,
PBLOCK_DRY,
PBLOCK_SWEET,
PBLOCK_BITTER,
PBLOCK_SOUR,
PBLOCK_FEEL,
};
void ClearPokeblocks(void);
/*
void sub_810B96C(void);
u8 sub_810BA50(s16, s16, u8);
u8 sub_810C9B0(struct Pokeblock *);
s16 GetPokeblockData(const struct Pokeblock *, u8);
u8 sub_810C9E8(struct Pokeblock *);
void sub_810BA7C(u8);
bool8 PokeblockClearIfExists(u8);
s16 PokeblockGetGain(u8, const struct Pokeblock *);
u8 sub_810CB68(u8, u8*);
void PokeblockCopyName(struct Pokeblock *pokeblock, u8 *dest);
void CB2_PreparePokeblockFeedScene(void);
#include "main.h"
void sub_8136130(struct Pokeblock *, MainCallback);
*/
#endif // GUARD_POKEBLOCK_H

View File

@@ -0,0 +1,12 @@
#ifndef GUARD_POKEMON_SIZE_RECORD_H
#define GUARD_POKEMON_SIZE_RECORD_H
void InitSeedotSizeRecord(void);
void GetSeedotSizeRecordInfo(void);
void CompareSeedotSize(void);
void InitLotadSizeRecord(void);
void GetLotadSizeRecordInfo(void);
void CompareLotadSize(void);
#endif // GUARD_POKEMON_SIZE_RECORD_H

11
include/roamer.h Normal file
View File

@@ -0,0 +1,11 @@
#ifndef GUARD_ROAMER_H
#define GUARD_ROAMER_H
void ClearRoamerData(void);
void ClearRoamerLocationData(void);
void UpdateLocationHistoryForRoamer(void);
void RoamerMoveToOtherLocationSet(void);
void RoamerMove();
u8 TryStartRoamerEncounter(void);
#endif // GUARD_ROAMER_H

59
include/script.h Normal file
View File

@@ -0,0 +1,59 @@
#ifndef GUARD_SCRIPT_H
#define GUARD_SCRIPT_H
struct ScriptContext;
typedef bool8 (*ScrCmdFunc)(struct ScriptContext *);
typedef u8 Script[];
struct ScriptContext
{
u8 stackDepth;
u8 mode;
u8 comparisonResult;
u8 (*nativePtr)(void);
const u8 *scriptPtr;
const u8 *stack[20];
ScrCmdFunc *cmdTable;
ScrCmdFunc *cmdTableEnd;
u32 data[4];
};
#define ScriptReadByte(ctx) (*(ctx->scriptPtr++))
void InitScriptContext(struct ScriptContext *ctx, void *cmdTable, void *cmdTableEnd);
u8 SetupBytecodeScript(struct ScriptContext *ctx, const u8 *ptr);
void SetupNativeScript(struct ScriptContext *ctx, void *ptr);
void StopScript(struct ScriptContext *ctx);
u8 RunScriptCommand(struct ScriptContext *ctx);
u8 ScriptPush(struct ScriptContext *ctx, const u8 *ptr);
const u8 *ScriptPop(struct ScriptContext *ctx);
void ScriptJump(struct ScriptContext *ctx, u8 *ptr);
void ScriptCall(struct ScriptContext *ctx, u8 *ptr);
void ScriptReturn(struct ScriptContext *ctx);
u16 ScriptReadHalfword(struct ScriptContext *ctx);
u32 ScriptReadWord(struct ScriptContext *ctx);
void ScriptContext2_Enable(void);
void ScriptContext2_Disable(void);
bool8 ScriptContext2_IsEnabled(void);
void ScriptContext1_Init(void);
bool8 ScriptContext2_RunScript(void);
void ScriptContext1_SetupScript(const u8 *ptr);
void ScriptContext1_Stop(void);
void EnableBothScriptContexts(void);
void ScriptContext2_RunNewScript(const u8 *ptr);
u8 *mapheader_get_tagged_pointer(u8 tag);
void mapheader_run_script_by_tag(u8 tag);
u8 *mapheader_get_first_match_from_tagged_ptr_list(u8 tag);
void mapheader_run_script_with_tag_x1(void);
void mapheader_run_script_with_tag_x3(void);
void mapheader_run_script_with_tag_x5(void);
void mapheader_run_script_with_tag_x6(void);
bool8 mapheader_run_first_tag2_script_list_match(void);
void mapheader_run_first_tag4_script_list_match(void);
u32 CalculateRamScriptChecksum(void);
void ClearRamScript(void);
bool8 InitRamScript(u8 *script, u16 scriptSize, u8 mapGroup, u8 mapNum, u8 objectId);
u8 *GetRamScript(u8 objectId, u8 *script);
#endif // GUARD_SCRIPT_H