Merge branch 'master' into link
This commit is contained in:
@@ -1,12 +1,6 @@
|
||||
#ifndef GUARD_BLEND_PALETTE_H
|
||||
#define GUARD_BLEND_PALETTE_H
|
||||
|
||||
// Exported type declarations
|
||||
void BlendPalette(u16 palOffset, u16 numEntries, u8 coeff, u16 blendColor);
|
||||
|
||||
// Exported RAM declarations
|
||||
|
||||
// Exported ROM declarations
|
||||
|
||||
void BlendPalette(u16, u16, u8, u16);
|
||||
|
||||
#endif //GUARD_BLEND_PALETTE_H
|
||||
#endif // GUARD_BLEND_PALETTE_H
|
||||
|
||||
15
include/constants/rgb.h
Normal file
15
include/constants/rgb.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef GUARD_RGB_H
|
||||
#define GUARD_RGB_H
|
||||
|
||||
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
|
||||
|
||||
#define RGB_BLACK RGB(0, 0, 0)
|
||||
#define RGB_WHITE RGB(31, 31, 31)
|
||||
#define RGB_RED RGB(31, 0, 0)
|
||||
#define RGB_GREEN RGB(0, 31, 0)
|
||||
#define RGB_BLUE RGB(0, 0, 31)
|
||||
#define RGB_YELLOW RGB(31, 31, 0)
|
||||
#define RGB_MAGENTA RGB(31, 0, 31)
|
||||
#define RGB_CYAN RGB(0, 31, 31)
|
||||
|
||||
#endif // GUARD_RGB_H
|
||||
39
include/constants/weather.h
Normal file
39
include/constants/weather.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef GUARD_CONSTANTS_WEATHER_H
|
||||
#define GUARD_CONSTANTS_WEATHER_H
|
||||
|
||||
#define WEATHER_NONE 0
|
||||
#define WEATHER_CLOUDS 1
|
||||
#define WEATHER_SUNNY 2
|
||||
#define WEATHER_RAIN_LIGHT 3
|
||||
#define WEATHER_SNOW 4
|
||||
#define WEATHER_RAIN_MED 5
|
||||
#define WEATHER_FOG_1 6
|
||||
#define WEATHER_ASH 7
|
||||
#define WEATHER_SANDSTORM 8
|
||||
#define WEATHER_FOG_2 9
|
||||
#define WEATHER_FOG_3 10
|
||||
#define WEATHER_SHADE 11
|
||||
#define WEATHER_DROUGHT 12
|
||||
#define WEATHER_RAIN_HEAVY 13
|
||||
#define WEATHER_BUBBLES 14
|
||||
#define WEATHER_ROUTE119_CYCLE 20
|
||||
#define WEATHER_ROUTE123_CYCLE 21
|
||||
|
||||
// These are used in maps' coord_weather_event entries.
|
||||
// They are not a one-to-one mapping with the engine's
|
||||
// internal weather constants above.
|
||||
#define COORD_EVENT_WEATHER_CLOUDS 1
|
||||
#define COORD_EVENT_WEATHER_SUNNY 2
|
||||
#define COORD_EVENT_WEATHER_RAIN_LIGHT 3
|
||||
#define COORD_EVENT_WEATHER_SNOW 4
|
||||
#define COORD_EVENT_WEATHER_RAIN_MED 5
|
||||
#define COORD_EVENT_WEATHER_FOG_1 6
|
||||
#define COORD_EVENT_WEATHER_FOG_2 7
|
||||
#define COORD_EVENT_WEATHER_ASH 8
|
||||
#define COORD_EVENT_WEATHER_SANDSTORM 9
|
||||
#define COORD_EVENT_WEATHER_SHADE 10
|
||||
#define COORD_EVENT_WEATHER_DROUGHT 11
|
||||
#define COORD_EVENT_WEATHER_ROUTE119_CYCLE 20
|
||||
#define COORD_EVENT_WEATHER_ROUTE123_CYCLE 21
|
||||
|
||||
#endif // GUARD_CONSTANTS_WEATHER_H
|
||||
6
include/coord_event_weather.h
Normal file
6
include/coord_event_weather.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_COORD_EVENT_WEATHER_H
|
||||
#define GUARD_COORD_EVENT_WEATHER_H
|
||||
|
||||
void DoCoordEventWeather(u8);
|
||||
|
||||
#endif // GUARD_COORD_EVENT_WEATHER_H
|
||||
@@ -78,5 +78,6 @@ void FieldEffectStop(struct Sprite *sprite, u8 id);
|
||||
u8 CreateTrainerSprite(u8 trainerSpriteID, s16 x, s16 y, u8 subpriority, u8 *buffer);
|
||||
void sub_80B7FC8(void);
|
||||
void FieldEffectActiveListRemove(u8 id);
|
||||
void MultiplyInvertedPaletteRGBComponents(u16, u8, u8, u8);
|
||||
|
||||
#endif //GUARD_FIELD_EFFECTS_H
|
||||
|
||||
@@ -1,7 +1,31 @@
|
||||
#ifndef GUARD_FIELDMAPOBJHELP_H
|
||||
#define GUARD_FIELDMAPOBJHELP_H
|
||||
#ifndef GUARD_FIELD_MAP_OBJ_HELPERS_H
|
||||
#define GUARD_FIELD_MAP_OBJ_HELPERS_H
|
||||
|
||||
// Exported type declarations
|
||||
|
||||
// Exported RAM declarations
|
||||
extern u8 *gUnknown_020375B8;
|
||||
|
||||
// Exported ROM declarations
|
||||
void sub_8097AC8(struct Sprite *);
|
||||
void npc_sync_anim_pause_bits(struct MapObject *);
|
||||
void oamt_npc_ministep_reset(struct Sprite *, u8, u8);
|
||||
u8 sub_8097F78(struct MapObject *);
|
||||
bool8 obj_npc_ministep(struct Sprite *sprite);
|
||||
bool8 sub_80976EC(struct Sprite *sprite);
|
||||
void sub_80976DC(struct Sprite *, u8);
|
||||
void sub_809783C(struct Sprite *, u8, u8, u8);
|
||||
void DoShadowFieldEffect(struct MapObject *);
|
||||
u8 sub_809785C(struct Sprite *);
|
||||
u8 sub_80978E4(struct Sprite *);
|
||||
void obj_anim_image_set_and_seek(struct Sprite *, u8, u8);
|
||||
bool8 sub_80979BC(struct Sprite *);
|
||||
void sub_8097750(struct Sprite *);
|
||||
bool8 sub_8097758(struct Sprite *);
|
||||
void sub_8097FA4(struct MapObject *);
|
||||
void sub_8098044(u8);
|
||||
void UnfreezeMapObjects(void);
|
||||
void FreezeMapObjectsExceptOne(u8 mapObjectId);
|
||||
void sub_8097B78(u8, u8);
|
||||
|
||||
#endif
|
||||
#endif //GUARD_FIELD_MAP_OBJ_HELPERS_H
|
||||
|
||||
@@ -34,5 +34,6 @@ void sub_808BCE8(void);
|
||||
|
||||
void sub_808D074(u8);
|
||||
void GetXYCoordsOneStepInFrontOfPlayer(s16 *xPtr, s16 *yPtr);
|
||||
u8 GetRivalAvatarGraphicsIdByStateIdAndGender(u8, u8);
|
||||
|
||||
#endif //GUARD_FIELD_PLAYER_AVATAR_H
|
||||
|
||||
@@ -2,5 +2,7 @@
|
||||
#define GUARD_FIELD_SPECIALS_H
|
||||
|
||||
u8 GetLeadMonIndex(void);
|
||||
u8 sub_813B260(void);
|
||||
u16 get_unknown_box_id(void);
|
||||
|
||||
#endif // GUARD_FIELD_SPECIALS_H
|
||||
|
||||
@@ -1,12 +1,177 @@
|
||||
#ifndef GUARD_WEATHER_H
|
||||
#define GUARD_WEATHER_H
|
||||
|
||||
void fade_screen(u8, s8);
|
||||
#include "sprite.h"
|
||||
|
||||
// Controls how the weather should be changing the screen palettes.
|
||||
enum {
|
||||
WEATHER_PAL_STATE_CHANGING_WEATHER,
|
||||
WEATHER_PAL_STATE_SCREEN_FADING_IN,
|
||||
WEATHER_PAL_STATE_SCREEN_FADING_OUT,
|
||||
WEATHER_PAL_STATE_IDLE,
|
||||
};
|
||||
|
||||
struct Weather
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
struct Sprite *rainSprites[24];
|
||||
struct Sprite *snowflakeSprites[101];
|
||||
struct Sprite *cloudSprites[3];
|
||||
} s1;
|
||||
struct
|
||||
{
|
||||
u8 filler0[0xA0];
|
||||
struct Sprite *fog1Sprites[20];
|
||||
struct Sprite *ashSprites[20];
|
||||
struct Sprite *fog2Sprites[20];
|
||||
struct Sprite *sandstormSprites1[20];
|
||||
struct Sprite *sandstormSprites2[5];
|
||||
} s2;
|
||||
} sprites;
|
||||
u8 gammaShifts[19][32];
|
||||
u8 altGammaShifts[19][32];
|
||||
s8 gammaIndex;
|
||||
s8 gammaTargetIndex;
|
||||
u8 gammaStepDelay;
|
||||
u8 gammaStepFrameCounter;
|
||||
u16 fadeDestColor;
|
||||
u8 palProcessingState;
|
||||
u8 fadeScreenCounter;
|
||||
bool8 readyForInit;
|
||||
u8 taskId;
|
||||
u8 unknown_6CA;
|
||||
u8 unknown_6CB;
|
||||
u16 initStep;
|
||||
u16 finishStep;
|
||||
u8 currWeather;
|
||||
u8 nextWeather;
|
||||
u8 weatherGfxLoaded;
|
||||
bool8 weatherChangeComplete;
|
||||
u8 weatherPicSpritePalIndex;
|
||||
u8 altGammaSpritePalIndex;
|
||||
u16 unknown_6D6;
|
||||
u8 unknown_6D8;
|
||||
u8 unknown_6D9;
|
||||
u8 rainSpriteCount;
|
||||
u8 unknown_6DB;
|
||||
u8 unknown_6DC;
|
||||
u8 rainStrength;
|
||||
/*0x6DE*/ u8 cloudSpritesCreated;
|
||||
u8 filler_6DF[1];
|
||||
u16 unknown_6E0;
|
||||
u16 unknown_6E2;
|
||||
u8 snowflakeSpriteCount;
|
||||
u8 unknown_6E5;
|
||||
u16 unknown_6E6;
|
||||
u16 thunderCounter;
|
||||
u8 unknown_6EA;
|
||||
u8 unknown_6EB;
|
||||
u8 unknown_6EC;
|
||||
u8 unknown_6ED;
|
||||
u16 fog1ScrollPosX;
|
||||
u16 unknown_6F0;
|
||||
u16 unknown_6F2;
|
||||
u8 lightenedFogSpritePals[6];
|
||||
u8 lightenedFogSpritePalsCount;
|
||||
u8 fog1SpritesCreated;
|
||||
u16 unknown_6FC;
|
||||
u16 unknown_6FE;
|
||||
u8 ashSpritesCreated;
|
||||
u8 filler_701[3];
|
||||
u32 unknown_704;
|
||||
u32 unknown_708;
|
||||
u8 filler_70C[2];
|
||||
u16 unknown_70E;
|
||||
u16 unknown_710;
|
||||
u16 unknown_712;
|
||||
u16 unknown_714;
|
||||
u8 sandstormSprites1Created;
|
||||
u8 sandstormSprites2Created;
|
||||
u16 unknown_718;
|
||||
u16 unknown_71A;
|
||||
u16 unknown_71C;
|
||||
u16 unknown_71E;
|
||||
u16 unknown_720;
|
||||
u16 unknown_722;
|
||||
u8 fog2SpritesCreated;
|
||||
u8 filler_725[1];
|
||||
u16 unknown_726;
|
||||
u16 unknown_728;
|
||||
u16 unknown_72A;
|
||||
u16 unknown_72C;
|
||||
u8 unknown_72E;
|
||||
u8 filler_72F;
|
||||
u16 currBlendEVA;
|
||||
u16 currBlendEVB;
|
||||
u16 targetBlendEVA;
|
||||
u16 targetBlendEVB;
|
||||
u8 blendUpdateCounter;
|
||||
u8 blendFrameCounter;
|
||||
u8 blendDelay;
|
||||
u8 filler_73B[0x3C-0x3B];
|
||||
s16 unknown_73C;
|
||||
s16 unknown_73E;
|
||||
s16 unknown_740;
|
||||
s16 unknown_742;
|
||||
u8 filler_744[0xD-4];
|
||||
s8 loadDroughtPalsIndex;
|
||||
u8 loadDroughtPalsOffset;
|
||||
};
|
||||
|
||||
void StartWeather(void);
|
||||
void ChangeWeather(u8 weather);
|
||||
void sub_807C988(u8 effect);
|
||||
void sub_807C9B4(u8 effect);
|
||||
void Task_WeatherInit(u8);
|
||||
void Task_WeatherMain(u8);
|
||||
void sub_807CAE8(void);
|
||||
void nullsub_38(void);
|
||||
void SetWeatherScreenFadeOut(void);
|
||||
|
||||
enum
|
||||
{
|
||||
FADE_FROM_BLACK,
|
||||
FADE_TO_BLACK,
|
||||
FADE_FROM_WHITE,
|
||||
FADE_TO_WHITE,
|
||||
};
|
||||
|
||||
void FadeScreen(u8, s8);
|
||||
// ...
|
||||
void UpdateSpritePaletteWithWeather(u8 tag);
|
||||
void ApplyWeatherGammaShiftToPal(u8);
|
||||
// ...
|
||||
void Weather_SetBlendCoeffs(u8, u8);
|
||||
// ...
|
||||
void PlayRainSoundEffect(void);
|
||||
// ...
|
||||
void SetSav1Weather(u32);
|
||||
u8 GetSav1Weather(void);
|
||||
void sub_80AEDBC(void);
|
||||
|
||||
void SetSav1WeatherFromCurrMapHeader(void);
|
||||
// ...
|
||||
void DoCurrentWeather(void);
|
||||
void sub_8080750();
|
||||
|
||||
bool8 IsWeatherNotFadingIn(void);
|
||||
bool8 IsWeatherChangeComplete(void);
|
||||
void SetWeather(u32);
|
||||
void UpdateWeatherPerDay(u16);
|
||||
void PreservePaletteInWeather(u8 index);
|
||||
void ResetPreservedPalettesInWeather(void);
|
||||
extern void ResetDroughtWeatherPaletteLoading(void);
|
||||
void ResetDroughtWeatherPaletteLoading(void);
|
||||
bool8 LoadDroughtWeatherPalettes(void);
|
||||
u8 GetCurrentWeather(void);
|
||||
void LoadCustomWeatherSpritePalette(const u16 *palette);
|
||||
|
||||
|
||||
extern struct Weather gWeather;
|
||||
|
||||
extern struct Weather *const gWeatherPtr;
|
||||
|
||||
#endif // GUARD_WEATHER_H
|
||||
|
||||
@@ -60,11 +60,6 @@
|
||||
|
||||
#define TOTAL_OBJ_TILE_COUNT 1024
|
||||
|
||||
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
|
||||
|
||||
#define RGB_BLACK RGB(0, 0, 0)
|
||||
#define RGB_WHITE RGB(31, 31, 31)
|
||||
|
||||
#define WIN_RANGE(a, b) (((a) << 8) | (b))
|
||||
|
||||
#endif // GUARD_GBA_DEFINES
|
||||
|
||||
@@ -122,6 +122,27 @@
|
||||
|
||||
#define DmaFillLarge32(dmaNum, value, dest, size, block) DmaFillLarge(dmaNum, value, dest, size, block, 32)
|
||||
|
||||
#define DmaClearLarge(dmaNum, dest, size, block, bit) \
|
||||
{ \
|
||||
void *_dest = dest; \
|
||||
u32 _size = size; \
|
||||
while (1) \
|
||||
{ \
|
||||
DmaFill##bit(dmaNum, 0, _dest, (block)); \
|
||||
_dest += (block); \
|
||||
_size -= (block); \
|
||||
if (_size <= (block)) \
|
||||
{ \
|
||||
DmaFill##bit(dmaNum, 0, _dest, _size); \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define DmaClearLarge16(dmaNum, dest, size, block) DmaClearLarge(dmaNum, dest, size, block, 16)
|
||||
|
||||
#define DmaClearLarge32(dmaNum, dest, size, block) DmaClearLarge(dmaNum, dest, size, block, 32)
|
||||
|
||||
#define DmaCopyDefvars(dmaNum, src, dest, size, bit) \
|
||||
{ \
|
||||
const void *_src = src; \
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
#define POKEMON_NAME_LENGTH 10
|
||||
#define OT_NAME_LENGTH 7
|
||||
|
||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define max(a, b) ((a) >= (b) ? (a) : (b))
|
||||
|
||||
#define HEAP_SIZE 0x1C000
|
||||
|
||||
extern u8 gStringVar1[];
|
||||
|
||||
@@ -195,8 +195,10 @@ extern struct LinkPlayer gLinkPlayers[5];
|
||||
extern u16 word_3002910[];
|
||||
extern bool8 gReceivedRemoteLinkPlayers;
|
||||
extern u32 gUnknown_020223C0;
|
||||
extern bool8 gLinkVSyncDisabled;
|
||||
extern u32 gLinkStatus;
|
||||
|
||||
void Task_DestroySelf(u8);
|
||||
void Task_DestroySelf(u8 taskId);
|
||||
void OpenLink(void);
|
||||
void CloseLink(void);
|
||||
u16 LinkMain2(const u16 *);
|
||||
|
||||
@@ -66,5 +66,7 @@ void InitFlashTimer(void);
|
||||
void DoSoftReset(void);
|
||||
void ClearPokemonCrySongs(void);
|
||||
void RestoreSerialTimer3IntrHandlers(void);
|
||||
void StartTimer1(void);
|
||||
void SeedRngAndSetTrainerId(void);
|
||||
|
||||
#endif // GUARD_MAIN_H
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
//
|
||||
// Created by scott on 9/7/2017.
|
||||
//
|
||||
|
||||
#ifndef GUARD_MAP_OBJ_8097404_H
|
||||
#define GUARD_MAP_OBJ_8097404_H
|
||||
|
||||
// Exported type declarations
|
||||
|
||||
// Exported RAM declarations
|
||||
extern void *gUnknown_020375B8;
|
||||
|
||||
// Exported ROM declarations
|
||||
void sub_8097AC8(struct Sprite *);
|
||||
void npc_sync_anim_pause_bits(struct MapObject *);
|
||||
void oamt_npc_ministep_reset(struct Sprite *, u8, u8);
|
||||
u8 sub_8097F78(struct MapObject *);
|
||||
bool8 obj_npc_ministep(struct Sprite *sprite);
|
||||
bool8 sub_80976EC(struct Sprite *sprite);
|
||||
void sub_80976DC(struct Sprite *, u8);
|
||||
void sub_809783C(struct Sprite *, u8, u8, u8);
|
||||
void DoShadowFieldEffect(struct MapObject *);
|
||||
u8 sub_809785C(struct Sprite *);
|
||||
u8 sub_80978E4(struct Sprite *);
|
||||
void obj_anim_image_set_and_seek(struct Sprite *, u8, u8);
|
||||
bool8 sub_80979BC(struct Sprite *);
|
||||
void sub_8097750(struct Sprite *);
|
||||
bool8 sub_8097758(struct Sprite *);
|
||||
void sub_8097FA4(struct MapObject *);
|
||||
void sub_8098044(u8);
|
||||
void UnfreezeMapObjects(void);
|
||||
void sub_80974D0(u8 mapObjectId);
|
||||
|
||||
#endif //GUARD_MAP_OBJ_8097404_H
|
||||
@@ -36,7 +36,7 @@ void copy_decompressed_tile_data_to_vram_autofree(u8 arg0, const void *arg1, boo
|
||||
s8 ProcessMenuInputNoWrap_(void);
|
||||
void do_scheduled_bg_tilemap_copies_to_vram(void);
|
||||
void clear_scheduled_bg_copies_to_vram(void);
|
||||
void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const struct TextColor *color, s8 speed, const u8 *str);
|
||||
void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const struct TextColor *color, s8 speed, const u8 *str);
|
||||
void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 a2, u16 a3);
|
||||
void sub_81995E4(u8 windowId, u8 optionsNo, const struct MenuAction *actions, const u8 *actionIds);
|
||||
void sub_8197DF8(u8 windowId, bool8 copyToVram);
|
||||
|
||||
6
include/mystery_event_menu.h
Normal file
6
include/mystery_event_menu.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_MYSTERY_EVENT_MENU_H
|
||||
#define GUARD_MYSTERY_EVENT_MENU_H
|
||||
|
||||
void CB2_InitMysteryEventMenu(void);
|
||||
|
||||
#endif // GUARD_MYSTERY_EVENT_MENU_H
|
||||
@@ -1,12 +1,89 @@
|
||||
#ifndef GUARD_NAMING_SCREEN_H
|
||||
#define GUARD_NAMING_SCREEN_H
|
||||
|
||||
#define NAMING_SCREEN_PLAYER 0
|
||||
#define NAMING_SCREEN_BOX 1
|
||||
#define NAMING_SCREEN_CAUGHT_MON 2
|
||||
#define NAMING_SCREEN_3 3
|
||||
#define NAMING_SCREEN_WALDA 4
|
||||
#include "main.h"
|
||||
|
||||
void DoNamingScreen(u8 caseId, u8* dst, u16 monSpecies, u8 monGender, u32 monPersonality, void (*callback)(void));
|
||||
#define KBEVENT_NONE 0
|
||||
#define KBEVENT_PRESSED_A 5
|
||||
#define KBEVENT_PRESSED_B 6
|
||||
#define KBEVENT_PRESSED_SELECT 8
|
||||
#define KBEVENT_PRESSED_START 9
|
||||
|
||||
enum
|
||||
{
|
||||
NAMING_SCREEN_PLAYER,
|
||||
NAMING_SCREEN_BOX,
|
||||
NAMING_SCREEN_CAUGHT_MON,
|
||||
NAMING_SCREEN_3,
|
||||
NAMING_SCREEN_WALDA,
|
||||
};
|
||||
|
||||
struct NamingScreenTemplate
|
||||
{
|
||||
u8 copyExistingString;
|
||||
u8 maxChars;
|
||||
u8 iconFunction;
|
||||
u8 addGenderIcon;
|
||||
u8 initialPage;
|
||||
u8 unused;
|
||||
const u8 *title;
|
||||
};
|
||||
|
||||
struct NamingScreenData {
|
||||
/*0x0*/ u8 tilemapBuffer1[0x800];
|
||||
/*0x800*/ u8 tilemapBuffer2[0x800];
|
||||
/*0x800*/ u8 tilemapBuffer3[0x800];
|
||||
/*0x1800*/ u8 textBuffer[0x10];
|
||||
/*0x1810*/ u8 tileBuffer[0x600];
|
||||
/*0x1E10*/ u8 state;
|
||||
/*0x1E11*/ u8 windows[5];
|
||||
/*0x1E16*/ u16 inputCharBaseXPos;
|
||||
/*0x1E18*/ u16 bg1vOffset;
|
||||
/*0x1E1A*/ u16 bg2vOffset;
|
||||
/*0x1E1C*/ u16 bg1Priority;
|
||||
/*0x1E1E*/ u16 bg2Priority;
|
||||
/*0x1E20*/ u8 bgToReveal;
|
||||
/*0x1E21*/ u8 bgToHide;
|
||||
/*0x1E22*/ u8 currentPage;
|
||||
/*0x1E23*/ u8 cursorSpriteId;
|
||||
/*0x1E24*/ u8 selectBtnFrameSpriteId;
|
||||
/*0x1E25*/ u8 keyRepeatStartDelayCopy;
|
||||
/*0x1E28*/ const struct NamingScreenTemplate *template;
|
||||
/*0x1E2C*/ u8 templateNum;
|
||||
/*0x1E30*/ u8 *destBuffer;
|
||||
/*0x1E34*/ u16 monSpecies;
|
||||
/*0x1E36*/ u16 monGender;
|
||||
/*0x1E38*/ u32 monPersonality;
|
||||
/*0x1E3C*/ MainCallback returnCallback;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
PAGE_UPPER,
|
||||
PAGE_LOWER,
|
||||
PAGE_OTHERS,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
MAIN_STATE_BEGIN_FADE_IN,
|
||||
MAIN_STATE_WAIT_FADE_IN,
|
||||
MAIN_STATE_HANDLE_INPUT,
|
||||
MAIN_STATE_MOVE_TO_OK_BUTTON,
|
||||
MAIN_STATE_START_PAGE_SWAP,
|
||||
MAIN_STATE_WAIT_PAGE_SWAP,
|
||||
MAIN_STATE_6,
|
||||
MAIN_STATE_UPDATE_SENT_TO_PC_MESSAGE,
|
||||
MAIN_STATE_BEGIN_FADE_OUT,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
INPUT_STATE_DISABLED,
|
||||
INPUT_STATE_ENABLED,
|
||||
INPUT_STATE_2,
|
||||
};
|
||||
|
||||
void DoNamingScreen(u8 templateNum, u8 *destBuffer, u16 monSpecies, u16 monGender, u32 monPersonality, MainCallback returnCallback);
|
||||
|
||||
#endif // GUARD_NAMING_SCREEN_H
|
||||
|
||||
@@ -6,16 +6,22 @@
|
||||
|
||||
extern const u16 gUnknown_0860F074[];
|
||||
|
||||
void sub_81971D0(void);
|
||||
void sub_8197200(void);
|
||||
void sub_81973A4(void);
|
||||
void sub_81973C4(u8, u8);
|
||||
void sub_819746C(u8 windowId, bool8 copyToVram);
|
||||
void sub_81973FC(u8, u8);
|
||||
u16 AddTextPrinterParametrized(u8 windowId, u8 fontId, const u8 *str, u8 speed, void ( *callback)(u16, struct TextPrinter *), u8 fgColor, u8 bgColor, u8 shadowColor);
|
||||
u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 speed, void ( *callback)(u16, struct TextPrinter *), u8 fgColor, u8 bgColor, u8 shadowColor);
|
||||
void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback);
|
||||
void sub_8197434(u8 a0, u8 a1);
|
||||
void SetStandardWindowBorderStyle(u8 a0, u8 a1);
|
||||
void sub_8197930(void);
|
||||
u8 GetPlayerTextSpeed(void);
|
||||
void sub_81978B0(u16 arg0);
|
||||
u16 sub_8197224(void);
|
||||
int sub_8196094(void);
|
||||
void sub_8196080(u8*);
|
||||
void AddTextPrinterForMessage(u8);
|
||||
|
||||
#endif // GUARD_NEW_MENU_HELPERS_H
|
||||
|
||||
@@ -69,6 +69,8 @@ void warp1_set_2(s8 mapGroup, s8 mapNum, s8 warpNum);
|
||||
void c2_load_new_map(void);
|
||||
void copy_saved_warp2_bank_and_enter_x_to_warp1(u8 unused);
|
||||
void mapldr_default(void);
|
||||
u8 get_map_light_from_warp0(void);
|
||||
bool8 is_light_level_1_2_3_5_or_6(u8 a1);
|
||||
|
||||
bool32 sub_80875C8(void);
|
||||
bool32 sub_8087634(void);
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
#ifndef GUARD_POKEMON_ANIMATION_H
|
||||
#define GUARD_POKEMON_ANIMATION_H
|
||||
|
||||
void LaunchAnimationTaskForFrontSprite(struct Sprite* sprite, u8 frontAnimId);
|
||||
void LaunchAnimationTaskForBackSprite(struct Sprite* sprite, u8 backAnimId);
|
||||
u8 GetSpeciesBackAnimSet(u16 species);
|
||||
void LaunchAnimationTaskForFrontSprite(struct Sprite *sprite, u8 frontAnimId);
|
||||
void StartMonSummaryAnimation(struct Sprite *sprite, u8 frontAnimId);
|
||||
void LaunchAnimationTaskForBackSprite(struct Sprite *sprite, u8 backAnimSet);
|
||||
void SetSpriteCB_MonAnimDummy(struct Sprite *sprite);
|
||||
|
||||
#endif // GUARD_POKEMON_ANIMATION_H
|
||||
|
||||
@@ -5,9 +5,11 @@ const u8 *GetMonIconPtr(u16 speciesId, u32 personality, u32 frameNo);
|
||||
const u16 *GetValidMonIconPalettePtr(u16 speciesId);
|
||||
u16 GetUnownLetterByPersonality(u32 personality);
|
||||
u16 sub_80D2E84(u16 speciesId);
|
||||
void sub_80D2F04(void);
|
||||
void sub_80D2F68(u16 iconId);
|
||||
u8 sub_80D2D78(u16 iconId, void callback(struct Sprite *), u16 x, u16 y, u16 a4, u8 a5);
|
||||
void sub_80D2FF0(u16 iconId);
|
||||
void sub_80D2EF8(struct Sprite *sprite);
|
||||
u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality, int a7);
|
||||
|
||||
#endif // GUARD_POKEMON_ICON_H
|
||||
|
||||
47
include/scanline_effect.h
Normal file
47
include/scanline_effect.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef GUARD_SCANLINE_EFFECT_H
|
||||
#define GUARD_SCANLINE_EFFECT_H
|
||||
|
||||
// DMA control value to ransfer a single 16-bit value at HBlank
|
||||
#define SCANLINE_EFFECT_DMACNT_16BIT (((DMA_ENABLE | DMA_START_HBLANK | DMA_REPEAT | DMA_SRC_INC | DMA_DEST_INC | DMA_16BIT | DMA_DEST_RELOAD) << 16) | 1)
|
||||
|
||||
#define SCANLINE_EFFECT_REG_BG0HOFS (REG_ADDR_BG0HOFS - REG_ADDR_BG0HOFS)
|
||||
#define SCANLINE_EFFECT_REG_BG0VOFS (REG_ADDR_BG0VOFS - REG_ADDR_BG0HOFS)
|
||||
#define SCANLINE_EFFECT_REG_BG1HOFS (REG_ADDR_BG1HOFS - REG_ADDR_BG0HOFS)
|
||||
#define SCANLINE_EFFECT_REG_BG1VOFS (REG_ADDR_BG1VOFS - REG_ADDR_BG0HOFS)
|
||||
#define SCANLINE_EFFECT_REG_BG2HOFS (REG_ADDR_BG2HOFS - REG_ADDR_BG0HOFS)
|
||||
#define SCANLINE_EFFECT_REG_BG2VOFS (REG_ADDR_BG2VOFS - REG_ADDR_BG0HOFS)
|
||||
#define SCANLINE_EFFECT_REG_BG3HOFS (REG_ADDR_BG3HOFS - REG_ADDR_BG0HOFS)
|
||||
#define SCANLINE_EFFECT_REG_BG3VOFS (REG_ADDR_BG3VOFS - REG_ADDR_BG0HOFS)
|
||||
|
||||
struct ScanlineEffectParams
|
||||
{
|
||||
volatile void *dmaDest;
|
||||
u32 dmaControl;
|
||||
u8 initState;
|
||||
u8 unused9;
|
||||
};
|
||||
|
||||
struct ScanlineEffect
|
||||
{
|
||||
void *dmaSrcBuffers[2];
|
||||
volatile void *dmaDest;
|
||||
u32 dmaControl;
|
||||
void (*setFirstScanlineReg)(void);
|
||||
u8 srcBuffer;
|
||||
u8 state;
|
||||
u8 unused16;
|
||||
u8 unused17;
|
||||
u8 waveTaskId;
|
||||
};
|
||||
|
||||
extern struct ScanlineEffect gScanlineEffect;
|
||||
|
||||
extern u16 gScanlineEffectRegBuffers[][0x3C0];
|
||||
|
||||
void ScanlineEffect_Stop(void);
|
||||
void ScanlineEffect_Clear(void);
|
||||
void ScanlineEffect_SetParams(struct ScanlineEffectParams);
|
||||
void ScanlineEffect_InitHBlankDmaTransfer(void);
|
||||
u8 ScanlineEffect_InitWave(u8 startLine, u8 endLine, u8 frequency, u8 amplitude, u8 delayInterval, u8 regOffset, bool8 a7);
|
||||
|
||||
#endif // GUARD_SCANLINE_EFFECT_H
|
||||
@@ -233,6 +233,7 @@ extern s16 gSpriteCoordOffsetX;
|
||||
extern s16 gSpriteCoordOffsetY;
|
||||
|
||||
extern struct Sprite gSprites[];
|
||||
extern struct OamMatrix gOamMatrices[];
|
||||
|
||||
void ResetSpriteData(void);
|
||||
void AnimateSprites(void);
|
||||
|
||||
@@ -204,4 +204,15 @@ extern const u8 gText_Frame[];
|
||||
extern const u8 gText_OptionMenuCancel[];
|
||||
extern const u8 gText_ButtonMode[];
|
||||
|
||||
extern const u8 gText_MaleSymbol[];
|
||||
extern const u8 gText_FemaleSymbol[];
|
||||
|
||||
// mystery event menu text
|
||||
extern const u8 gText_EventSafelyLoaded[];
|
||||
extern const u8 gText_LoadErrorEndingSession[];
|
||||
extern const u8 gText_PressAToLoadEvent[];
|
||||
extern const u8 gText_LoadingEvent[];
|
||||
extern const u8 gText_DontRemoveCableTurnOff[];
|
||||
extern const u8 gText_LinkStandby2[];
|
||||
|
||||
#endif //GUARD_STRINGS_H
|
||||
|
||||
@@ -185,6 +185,13 @@ struct __attribute__((packed)) TextColor
|
||||
u8 shadowColor;
|
||||
};
|
||||
|
||||
struct AlignedTextColor // because sometimes it's necessary
|
||||
{
|
||||
u8 fgColor;
|
||||
u8 bgColor;
|
||||
u8 shadowColor;
|
||||
};
|
||||
|
||||
extern u8 gStringVar1[];
|
||||
extern u8 gStringVar2[];
|
||||
extern u8 gStringVar3[];
|
||||
|
||||
8
include/time_events.h
Normal file
8
include/time_events.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef GUARD_TIME_EVENTS_H
|
||||
#define GUARD_TIME_EVENTS_H
|
||||
|
||||
void UpdateMirageRnd(u16);
|
||||
u8 IsMirageIslandPresent(void);
|
||||
void UpdateBirchState(u16);
|
||||
|
||||
#endif // GUARD_TIME_EVENTS_H
|
||||
@@ -1,22 +0,0 @@
|
||||
#ifndef GUARD_unknown_task_H
|
||||
#define GUARD_unknown_task_H
|
||||
|
||||
// Exported type declarations
|
||||
struct UnknownTaskStruct
|
||||
{
|
||||
volatile void *dest;
|
||||
u32 control;
|
||||
u8 unk8;
|
||||
u8 unk9;
|
||||
};
|
||||
|
||||
extern struct UnknownTaskStruct gUnknown_0831AC70;
|
||||
|
||||
// Exported RAM declarations
|
||||
|
||||
// Exported ROM declarations
|
||||
void ScanlineEffect_Stop(void);
|
||||
void sub_80BA038(struct UnknownTaskStruct arg0);
|
||||
void sub_80BA0A8(void);
|
||||
|
||||
#endif // GUARD_unknown_task_H
|
||||
Reference in New Issue
Block a user