Merge master into ObjEvent rename

This commit is contained in:
GriffinR
2019-12-06 21:37:17 -05:00
167 changed files with 3292 additions and 1686 deletions

View File

@@ -69,9 +69,9 @@
#define VAR_DEOXYS_ROCK_STEP_COUNT 0x4034
#define VAR_DEOXYS_ROCK_LEVEL 0x4035
#define VAR_PC_BOX_TO_SEND_MON 0x4036
#define VAR_UNUSUAL_WEATHER_LOCATION 0x4037
#define VAR_UNUSUAL_WEATHER_STEP_COUNTER 0x4038
#define VAR_SHOULD_END_UNUSUAL_WEATHER 0x4039
#define VAR_ABNORMAL_WEATHER_LOCATION 0x4037
#define VAR_ABNORMAL_WEATHER_STEP_COUNTER 0x4038
#define VAR_SHOULD_END_ABNORMAL_WEATHER 0x4039
#define VAR_FARAWAY_ISLAND_STEP_COUNTER 0x403A
#define VAR_REGICE_STEPS_1 0x403B
#define VAR_REGICE_STEPS_2 0x403C

View File

@@ -1,66 +1,66 @@
#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_ALTERNATING 15
#define WEATHER_ROUTE119_CYCLE 20
#define WEATHER_ROUTE123_CYCLE 21
#define WEATHER_NONE 0
#define WEATHER_SUNNY_CLOUDS 1
#define WEATHER_SUNNY 2
#define WEATHER_RAIN 3
#define WEATHER_SNOW 4 // Unused
#define WEATHER_RAIN_THUNDERSTORM 5
#define WEATHER_FOG_HORIZONTAL 6
#define WEATHER_VOLCANIC_ASH 7
#define WEATHER_SANDSTORM 8
#define WEATHER_FOG_DIAGONAL 9 // Unused
#define WEATHER_UNDERWATER 10 // Unused
#define WEATHER_SHADE 11 // Original name was closer to WEATHER_CLOUDY/OVERCAST
#define WEATHER_DROUGHT 12
#define WEATHER_DOWNPOUR 13
#define WEATHER_UNDERWATER_BUBBLES 14
#define WEATHER_ABNORMAL 15 // The alternating weather during Groudon/Kyogre conflict
#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
#define COORD_EVENT_WEATHER_SUNNY_CLOUDS 1
#define COORD_EVENT_WEATHER_SUNNY 2
#define COORD_EVENT_WEATHER_RAIN 3
#define COORD_EVENT_WEATHER_SNOW 4
#define COORD_EVENT_WEATHER_RAIN_THUNDERSTORM 5
#define COORD_EVENT_WEATHER_FOG_HORIZONTAL 6
#define COORD_EVENT_WEATHER_FOG_DIAGONAL 7
#define COORD_EVENT_WEATHER_VOLCANIC_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
// These are the "unusual weather events" that are used
// These are the "abnormal weather events" that are used
// to find Kyogre and Groudon.
#define UNUSUAL_WEATHER_COUNT_PER_LEGENDARY 8
#define UNUSUAL_WEATHER_GROUDON_LOCATIONS_START 1
#define UNUSUAL_WEATHER_KYOGRE_LOCATIONS_START 1 + UNUSUAL_WEATHER_COUNT_PER_LEGENDARY
#define ABNORMAL_WEATHER_COUNT_PER_LEGENDARY 8
#define ABNORMAL_WEATHER_GROUDON_LOCATIONS_START 1
#define ABNORMAL_WEATHER_KYOGRE_LOCATIONS_START 1 + ABNORMAL_WEATHER_COUNT_PER_LEGENDARY
#define UNUSUAL_WEATHER_NONE 0
#define ABNORMAL_WEATHER_NONE 0
// Groudon locations
#define UNUSUAL_WEATHER_ROUTE_114_NORTH 1
#define UNUSUAL_WEATHER_ROUTE_114_SOUTH 2
#define UNUSUAL_WEATHER_ROUTE_115_WEST 3
#define UNUSUAL_WEATHER_ROUTE_115_EAST 4
#define UNUSUAL_WEATHER_ROUTE_116_NORTH 5
#define UNUSUAL_WEATHER_ROUTE_116_SOUTH 6
#define UNUSUAL_WEATHER_ROUTE_118_EAST 7
#define UNUSUAL_WEATHER_ROUTE_118_WEST 8
#define ABNORMAL_WEATHER_ROUTE_114_NORTH 1
#define ABNORMAL_WEATHER_ROUTE_114_SOUTH 2
#define ABNORMAL_WEATHER_ROUTE_115_WEST 3
#define ABNORMAL_WEATHER_ROUTE_115_EAST 4
#define ABNORMAL_WEATHER_ROUTE_116_NORTH 5
#define ABNORMAL_WEATHER_ROUTE_116_SOUTH 6
#define ABNORMAL_WEATHER_ROUTE_118_EAST 7
#define ABNORMAL_WEATHER_ROUTE_118_WEST 8
// Kyogre locations
#define UNUSUAL_WEATHER_ROUTE_105_NORTH 9
#define UNUSUAL_WEATHER_ROUTE_105_SOUTH 10
#define UNUSUAL_WEATHER_ROUTE_125_WEST 11
#define UNUSUAL_WEATHER_ROUTE_125_EAST 12
#define UNUSUAL_WEATHER_ROUTE_127_NORTH 13
#define UNUSUAL_WEATHER_ROUTE_127_SOUTH 14
#define UNUSUAL_WEATHER_ROUTE_129_WEST 15
#define UNUSUAL_WEATHER_ROUTE_129_EAST 16
#define ABNORMAL_WEATHER_ROUTE_105_NORTH 9
#define ABNORMAL_WEATHER_ROUTE_105_SOUTH 10
#define ABNORMAL_WEATHER_ROUTE_125_WEST 11
#define ABNORMAL_WEATHER_ROUTE_125_EAST 12
#define ABNORMAL_WEATHER_ROUTE_127_NORTH 13
#define ABNORMAL_WEATHER_ROUTE_127_SOUTH 14
#define ABNORMAL_WEATHER_ROUTE_129_WEST 15
#define ABNORMAL_WEATHER_ROUTE_129_EAST 16
#endif // GUARD_CONSTANTS_WEATHER_H

View File

@@ -546,7 +546,7 @@ extern const u8 EventScript_FallDownHole[];
extern const u8 BattleFrontier_BattlePyramidEmptySquare_EventScript_252BE8[];
extern const u8 EventScript_FieldPoison[];
extern const u8 EventScript_EggHatch[];
extern const u8 UnusualWeather_EventScript_EndEventAndCleanup_1[];
extern const u8 AbnormalWeather_EventScript_EndEventAndCleanup_1[];
extern const u8 IslandCave_EventScript_OpenRegiEntrance[];
extern const u8 MauvilleCity_EventScript_RegisterWallyCall[];
extern const u8 Route119_EventScript_ScottWonAtFortreeGymCall[];

View File

@@ -10,7 +10,7 @@ u16 GetPCBoxToSendMon(void);
bool8 InMultiBattleRoom(void);
void UpdateTrainerFansAfterLinkBattle(void);
void IncrementBirthIslandRockStepCount(void);
bool8 UnusualWeatherHasExpired(void);
bool8 AbnormalWeatherHasExpired(void);
bool8 ShouldDoBrailleRegicePuzzle(void);
bool32 ShouldDoWallyCall(void);
bool32 ShouldDoScottFortreeCall(void);

View File

@@ -3,13 +3,13 @@
#include "sprite.h"
#define MAX_RAIN_SPRITES 24
#define NUM_CLOUD_SPRITES 3
#define NUM_FOG1_SPRITES 20
#define NUM_ASH_SPRITES 20
#define NUM_FOG2_SPRITES 20
#define NUM_SANDSTORM_SPRITES 20
#define NUM_SWIRL_SANDSTORM_SPRITES 5
#define MAX_RAIN_SPRITES 24
#define NUM_CLOUD_SPRITES 3
#define NUM_FOG_HORIZONTAL_SPRITES 20
#define NUM_ASH_SPRITES 20
#define NUM_FOG_DIAGONAL_SPRITES 20
#define NUM_SANDSTORM_SPRITES 20
#define NUM_SWIRL_SANDSTORM_SPRITES 5
// Controls how the weather should be changing the screen palettes.
enum
@@ -42,9 +42,9 @@ struct Weather
struct
{
u8 filler0[0xA0];
struct Sprite *fog1Sprites[NUM_FOG1_SPRITES];
struct Sprite *fogHSprites[NUM_FOG_HORIZONTAL_SPRITES];
struct Sprite *ashSprites[NUM_ASH_SPRITES];
struct Sprite *fog2Sprites[NUM_FOG2_SPRITES];
struct Sprite *fogDSprites[NUM_FOG_DIAGONAL_SPRITES];
struct Sprite *sandstormSprites1[NUM_SANDSTORM_SPRITES];
struct Sprite *sandstormSprites2[NUM_SWIRL_SANDSTORM_SPRITES];
} s2;
@@ -75,7 +75,7 @@ struct Weather
u8 targetRainSpriteCount;
u8 rainSpriteCount;
u8 rainSpriteVisibleDelay;
u8 isHeavyRain;
u8 isDownpour;
u8 rainStrength;
/*0x6DE*/ u8 cloudSpritesCreated;
u8 filler_6DF[1];
@@ -89,12 +89,12 @@ struct Weather
u8 unknown_6EB;
u8 unknown_6EC;
u8 thunderTriggered;
u16 fog1ScrollPosX;
u16 fog1ScrollCounter;
u16 fog1ScrollOffset;
u16 fogHScrollPosX;
u16 fogHScrollCounter;
u16 fogHScrollOffset;
u8 lightenedFogSpritePals[6];
u8 lightenedFogSpritePalsCount;
u8 fog1SpritesCreated;
u8 fogHSpritesCreated;
u16 ashBaseSpritesX;
u16 unknown_6FE;
u8 ashSpritesCreated;
@@ -108,13 +108,13 @@ struct Weather
u16 sandstormWaveCounter;
u8 sandstormSpritesCreated;
u8 sandstormSwirlSpritesCreated;
u16 fog2BaseSpritesX;
u16 fog2PosY;
u16 fog2ScrollXCounter;
u16 fog2ScrollYCounter;
u16 fog2XOffset;
u16 fog2YOffset;
u8 fog2SpritesCreated;
u16 fogDBaseSpritesX;
u16 fogDPosY;
u16 fogDScrollXCounter;
u16 fogDScrollYCounter;
u16 fogDXOffset;
u16 fogDYOffset;
u8 fogDSpritesCreated;
u8 filler_725[1];
u16 bubblesDelayCounter;
u16 bubblesDelayIndex;
@@ -145,7 +145,7 @@ extern struct Weather *const gWeatherPtr;
extern const u16 gUnknown_083970E8[];
// field_weather_effect.c
extern const u8 gWeatherFog1Tiles[];
extern const u8 gWeatherFogHorizontalTiles[];
void StartWeather(void);
void SetNextWeather(u8 weather);
@@ -186,22 +186,22 @@ void Sunny_InitVars(void);
void Sunny_Main(void);
void Sunny_InitAll(void);
bool8 Sunny_Finish(void);
void LightRain_InitVars(void);
void LightRain_Main(void);
void LightRain_InitAll(void);
bool8 LightRain_Finish(void);
void Rain_InitVars(void);
void Rain_Main(void);
void Rain_InitAll(void);
bool8 Rain_Finish(void);
void Snow_InitVars(void);
void Snow_Main(void);
void Snow_InitAll(void);
bool8 Snow_Finish(void);
void MedRain_InitVars(void);
void Rain_Main(void);
void MedRain_InitAll(void);
bool8 Rain_Finish(void);
void Fog1_InitVars(void);
void Fog1_Main(void);
void Fog1_InitAll(void);
bool8 Fog1_Finish(void);
void Thunderstorm_InitVars(void);
void Thunderstorm_Main(void);
void Thunderstorm_InitAll(void);
bool8 Thunderstorm_Finish(void);
void FogHorizontal_InitVars(void);
void FogHorizontal_Main(void);
void FogHorizontal_InitAll(void);
bool8 FogHorizontal_Finish(void);
void Ash_InitVars(void);
void Ash_Main(void);
void Ash_InitAll(void);
@@ -210,14 +210,10 @@ void Sandstorm_InitVars(void);
void Sandstorm_Main(void);
void Sandstorm_InitAll(void);
bool8 Sandstorm_Finish(void);
void Fog2_InitVars(void);
void Fog2_Main(void);
void Fog2_InitAll(void);
bool8 Fog2_Finish(void);
void Fog1_InitVars(void);
void Fog1_Main(void);
void Fog1_InitAll(void);
bool8 Fog1_Finish(void);
void FogDiagonal_InitVars(void);
void FogDiagonal_Main(void);
void FogDiagonal_InitAll(void);
bool8 FogDiagonal_Finish(void);
void Shade_InitVars(void);
void Shade_Main(void);
void Shade_InitAll(void);
@@ -226,10 +222,8 @@ void Drought_InitVars(void);
void Drought_Main(void);
void Drought_InitAll(void);
bool8 Drought_Finish(void);
void HeavyRain_InitVars(void);
void Rain_Main(void);
void HeavyRain_InitAll(void);
bool8 Rain_Finish(void);
void Downpour_InitVars(void);
void Downpour_InitAll(void);
void Bubbles_InitVars(void);
void Bubbles_Main(void);
void Bubbles_InitAll(void);