Fix conflicts

This commit is contained in:
DizzyEggg
2018-11-12 19:22:23 +01:00
41 changed files with 829 additions and 818 deletions

View File

@@ -1,6 +1,8 @@
#ifndef GUARD_BERRY_H
#define GUARD_BERRY_H
#define BERRY_NONE 0
enum
{
BERRY_FIRMNESS_UNKNOWN,
@@ -21,6 +23,17 @@ enum
FLAVOR_COUNT
};
enum
{
BERRY_STAGE_NO_BERRY, // there is no tree planted and the soil is completely flat.
BERRY_STAGE_PLANTED,
BERRY_STAGE_SPROUTED,
BERRY_STAGE_TALLER,
BERRY_STAGE_FLOWERING,
BERRY_STAGE_BERRIES,
BERRY_STAGE_SPARKLING = 0xFF,
};
#define NUM_BERRIES 44
extern const u8 *const gBerryTreeEventObjectGraphicsIdTablePointers[];
@@ -29,7 +42,6 @@ extern const u8 *const gBerryTreePaletteSlotTablePointers[];
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);
@@ -37,28 +49,20 @@ bool32 EventObjectInteractionWaterBerryTree(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 Bag_ChooseBerry(void);
void EventObjectInteractionGetBerryTreeData(void);
void EventObjectInteractionPlantBerryTree(void);
void EventObjectInteractionPickBerryTree(void);
void EventObjectInteractionRemoveBerryTree(void);
u8 PlayerHasBerries(void);
bool8 PlayerHasBerries(void);
void ResetBerryTreeSparkleFlags(void);
extern const struct Berry gBerries[];

View File

@@ -75,14 +75,14 @@ struct PairedPalettes
struct LockedAnimEventObjects
{
u8 eventObjectIds[NUM_EVENT_OBJECTS];
u8 eventObjectIds[EVENT_OBJECTS_COUNT];
u8 count;
};
extern const struct SpriteFrameImage gEventObjectPicTable_PechaBerryTree[];
extern const u8 gReflectionEffectPaletteMap[];
void sub_808D438(void);
void ResetEventObjects(void);
u8 GetMoveDirectionAnimNum(u8);
u8 GetEventObjectIdByLocalIdAndMap(u8, u8, u8);
bool8 TryGetEventObjectIdByLocalIdAndMap(u8, u8, u8, u8 *);
@@ -180,9 +180,7 @@ u8 ZCoordToPriority(u8);
void EventObjectUpdateZCoord(struct EventObject *pObject);
void SetObjectSubpriorityByZCoord(u8, struct Sprite *, u8);
bool8 IsZCoordMismatchAt(u8, s16, s16);
void UpdateEventObjectSpriteSubpriorityAndVisibility(struct Sprite *);
void UnfreezeEventObject(struct EventObject *);
void oamt_npc_ministep_reset(struct Sprite *, u8, u8);
u8 FindLockedEventObjectIndex(struct EventObject *);
bool8 obj_npc_ministep(struct Sprite *sprite);
bool8 sub_80976EC(struct Sprite *sprite);

View File

@@ -7,16 +7,16 @@ struct CameraObject
{
void (*callback)(struct CameraObject *);
u32 spriteId;
s32 unk8;
s32 unkC;
s32 movementSpeedX;
s32 movementSpeedY;
s32 x;
s32 y;
};
// Exported RAM declarations
extern struct CameraObject gUnknown_03005DD0;
extern u16 gUnknown_03005DEC;
extern u16 gUnknown_03005DE8;
extern struct CameraObject gFieldCamera;
extern u16 gTotalCameraPixelOffsetX;
extern u16 gTotalCameraPixelOffsetY;
// Exported ROM declarations
void DrawWholeMapView(void);

View File

@@ -25,7 +25,7 @@ struct FieldInput
void FieldClearPlayerInput(struct FieldInput *pStruct);
void FieldGetPlayerInput(struct FieldInput *pStruct, u16 keys, u16 heldKeys);
int sub_809C014(struct FieldInput *pStruct);
int ProcessPlayerFieldInput(struct FieldInput *pStruct);
u8 *sub_80682A8(struct MapPosition *, u8, u8);
void overworld_poison_timer_set(void);
void RestartWildEncounterImmunitySteps(void);

View File

@@ -179,8 +179,8 @@ bool8 sub_80B7B94(struct Task *, struct EventObject *, struct Sprite *);
bool8 sub_80B7BCC(struct Task *, struct EventObject *, struct Sprite *);
bool8 sub_80B7BF4(struct Task *, struct EventObject *, struct Sprite *);
void sub_80B7D14(struct Task *);
void sub_80B7D34(struct Task *);
static void EscapeRopeFieldEffect_Step0(struct Task *);
static void EscapeRopeFieldEffect_Step1(struct Task *);
void sub_80B7EC4(struct Task *);
void sub_80B7EE8(struct Task *);

View File

@@ -18,7 +18,7 @@ u8 FindTallGrassFieldEffectSpriteId(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s
void sub_8155F80(struct Sprite*);
void UpdateShadowFieldEffect(struct Sprite*);
void UpdateTallGrassFieldEffect(struct Sprite*);
void sub_81561D0(struct Sprite*);
void WaitFieldEffectSpriteAnim(struct Sprite*);
void UpdateAshFieldEffect(struct Sprite*);
void UpdateSurfBlobFieldEffect(struct Sprite*);
void sub_8156194(struct Sprite*);

View File

@@ -13,7 +13,7 @@ enum {
FLDPSN_FNT
};
void sub_80F972C(void);
int DoPoisonFieldEffect(void);
void ExecuteWhiteOut(void);
s32 DoPoisonFieldEffect(void);
#endif //GUARD_FIELD_POISON_H

View File

@@ -11,7 +11,7 @@ void sub_80FA5E4(s16 id, s16 x, s16 y);
void sub_80FA794(s16 x, s16 y);
void CreateRecordMixingSprite(void);
void DestroyRecordMixingSprite(void);
void overworld_poison_effect(void);
void FldeffPoison_Start(void);
void sub_80FA970(s16);
void sub_80FA9D0(void);
bool8 sub_80FADE4(u16, u8);

View File

@@ -1,7 +0,0 @@
#ifndef GUARD_FLDEFF_TELEPORT_H
#define GUARD_FLDEFF_TELEPORT_H
void hm_teleport_run_dp02scr(void);
void sub_817C94C(void);
#endif // GUARD_FLDEFF_TELEPORT_H

View File

@@ -1,8 +1,6 @@
#ifndef GUARD_GLOBAL_FIELDMAP_H
#define GUARD_GLOBAL_FIELDMAP_H
#define NUM_EVENT_OBJECTS 16
enum
{
CONNECTION_SOUTH = 1,
@@ -228,14 +226,14 @@ struct EventObjectGraphicsInfo
/*0x20*/ const union AffineAnimCmd *const *affineAnims;
};
#define PLAYER_AVATAR_FLAG_ON_FOOT (1 << 0)
#define PLAYER_AVATAR_FLAG_MACH_BIKE (1 << 1)
#define PLAYER_AVATAR_FLAG_ACRO_BIKE (1 << 2)
#define PLAYER_AVATAR_FLAG_SURFING (1 << 3)
#define PLAYER_AVATAR_FLAG_ON_FOOT (1 << 0)
#define PLAYER_AVATAR_FLAG_MACH_BIKE (1 << 1)
#define PLAYER_AVATAR_FLAG_ACRO_BIKE (1 << 2)
#define PLAYER_AVATAR_FLAG_SURFING (1 << 3)
#define PLAYER_AVATAR_FLAG_UNDERWATER (1 << 4)
#define PLAYER_AVATAR_FLAG_5 (1 << 5)
#define PLAYER_AVATAR_FLAG_6 (1 << 6)
#define PLAYER_AVATAR_FLAG_DASH (1 << 7)
#define PLAYER_AVATAR_FLAG_5 (1 << 5)
#define PLAYER_AVATAR_FLAG_6 (1 << 6)
#define PLAYER_AVATAR_FLAG_DASH (1 << 7)
enum
{
@@ -311,7 +309,7 @@ struct Camera
s32 y;
};
extern struct EventObject gEventObjects[NUM_EVENT_OBJECTS];
extern struct EventObject gEventObjects[EVENT_OBJECTS_COUNT];
extern u8 gSelectedEventObject;
extern struct MapHeader gMapHeader;
extern struct PlayerAvatar gPlayerAvatar;

View File

@@ -119,22 +119,22 @@ enum LanguageId
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
// capacities of various saveblock objects
#define DAYCARE_MON_COUNT 2
#define POKEBLOCKS_COUNT 40
#define EVENT_OBJECTS_COUNT 16
#define DAYCARE_MON_COUNT 2
#define POKEBLOCKS_COUNT 40
#define EVENT_OBJECTS_COUNT 16
#define BERRY_TREES_COUNT 128
#define FLAGS_COUNT 300
#define VARS_COUNT 256
#define MAIL_COUNT 16
#define SECRET_BASES_COUNT 20
#define TV_SHOWS_COUNT 25
#define POKE_NEWS_COUNT 16
#define PC_ITEMS_COUNT 50
#define BAG_ITEMS_COUNT 30
#define BAG_KEYITEMS_COUNT 30
#define BAG_POKEBALLS_COUNT 16
#define BAG_TMHM_COUNT 64
#define BAG_BERRIES_COUNT 46
#define MAIL_COUNT 16
#define SECRET_BASES_COUNT 20
#define TV_SHOWS_COUNT 25
#define POKE_NEWS_COUNT 16
#define PC_ITEMS_COUNT 50
#define BAG_ITEMS_COUNT 30
#define BAG_KEYITEMS_COUNT 30
#define BAG_POKEBALLS_COUNT 16
#define BAG_TMHM_COUNT 64
#define BAG_BERRIES_COUNT 46
#define PYRAMID_BAG_ITEMS_COUNT 10
#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode.

View File

@@ -77,7 +77,7 @@ bool8 MetatileBehavior_IsBerryTreeSoil(u8);
bool8 MetatileBehavior_IsAshGrass(u8);
bool8 MetatileBehavior_IsFootprints(u8);
bool8 MetatileBehavior_IsBridge(u8);
u8 MetatileBehavior_GetBridgeSth(u8);
u8 MetatileBehavior_GetBridgeType(u8);
u8 MetatileBehavior_8089510(u8);
bool8 MetatileBehavior_IsLandWildEncounter(u8);
bool8 MetatileBehavior_IsWaterWildEncounter(u8);

View File

@@ -47,13 +47,13 @@ void Overworld_SetEventObjTemplateMovementType(u8 localId, u8 movementType);
const struct MapLayout *GetMapLayout(void);
void ApplyCurrentWarp(void);
void set_warp2_warp3_to_neg_1(void);
void SetWarpData(struct WarpData *warp, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
bool32 IsDummyWarp(struct WarpData *warp);
static void SetWarpData(struct WarpData *warp, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
static bool32 IsDummyWarp(struct WarpData *warp);
struct MapHeader const *const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum);
struct MapHeader const *const GetDestinationWarpMapHeader(void);
void LoadCurrentMapData(void);
void LoadSaveblockMapHeader(void);
void SetPlayerCoordsFromWarp(void);
static void LoadCurrentMapData(void);
static void LoadSaveblockMapHeader(void);
static void SetPlayerCoordsFromWarp(void);
void WarpIntoMap(void);
void Overworld_SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
void warp1_set_2(s8 mapGroup, s8 mapNum, s8 warpId);
@@ -67,7 +67,7 @@ void sub_8084D5C(s16 a1, s16 a2);
void sub_8084DD4(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
void sub_8084E14(void);
void SetFixedDiveWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
void SetFixedDiveWarpAsDestination(void);
static void SetFixedDiveWarpAsDestination(void);
void SetFixedHoleWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
void SetFixedHoleWarpAsDestination(s16 x, s16 y);
void warp1_set_to_sav1w(void);
@@ -75,7 +75,7 @@ void sub_8084F2C(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
void sub_8084F6C(u8 a1);
void sub_8084FAC(void);
const struct MapConnection *GetMapConnection(u8 dir);
bool8 SetDiveWarp(u8 dir, u16 x, u16 y);
static bool8 SetDiveWarp(u8 dir, u16 x, u16 y);
bool8 SetDiveWarpEmerge(u16 x, u16 y);
bool8 SetDiveWarpDive(u16 x, u16 y);
void mliX_load_map(u8 mapGroup, u8 mapNum);
@@ -105,7 +105,7 @@ void UpdateAmbientCry(s16 *state, u16 *delayCounter);
u8 GetMapTypeByGroupAndId(s8 mapGroup, s8 mapNum);
u8 GetMapTypeByWarpData(struct WarpData *warp);
u8 Overworld_GetMapTypeOfSaveblockLocation(void);
u8 get_map_light_from_warp0(void);
u8 GetLastUsedWarpMapType(void);
bool8 is_map_type_1_2_3_5_or_6(u8 mapType);
bool8 Overworld_MapTypeAllowsTeleportAndFly(u8 mapType);
bool8 Overworld_MapTypeIsIndoors(u8 mapType);