Skip to content

Commit

Permalink
start of source tree reorganization
Browse files Browse the repository at this point in the history
  • Loading branch information
tariq-nasheed committed Apr 10, 2024
1 parent c2a914e commit 54dcc40
Show file tree
Hide file tree
Showing 215 changed files with 263 additions and 289 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ add_library(hypermania SHARED

target_include_directories(hypermania PRIVATE
src/${MOD_NAME}/
src/${MOD_NAME}/Objects
src/${MOD_NAME}/Mania
src/${MOD_NAME}/Objects/
src/${MOD_NAME}/Objects/Boilerplate
src/GameAPI/C/
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

ObjectItemBox *ItemBox;
void (*ItemBox_State_Broken)(void);
void (*ItemBox_Break)(EntityItemBox*, EntityPlayer*);
void (*ItemBox_Break)(EntityBase*, EntityBase*);
7 changes: 7 additions & 0 deletions src/hypermania/Mania/ItemBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,11 @@ typedef struct {
#endif
} EntityItemBox;

// Object Struct
extern ObjectItemBox* ItemBox;

// Imported Functions
extern void (*ItemBox_State_Broken)();
extern void (*ItemBox_Break)(EntityBase* itemBox, EntityBase* player);

#endif //! MANIA_ITEMBOX_H
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions src/hypermania/Mania/SaveGame.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,25 @@ typedef struct {
#endif
} SaveRAM;

typedef enum {
SAVEGAME_BLANK,
SAVEGAME_INPROGRESS,
SAVEGAME_COMPLETE,
} SaveGameStates;

typedef enum {
SAVERECALL_NORMAL,
SAVERECALL_DISABLED,
SAVERECALL_BROKENITEMBOX,
} SaveRecallStates;

extern SaveRAM* (*SaveGame_GetSaveRAM)(void);
extern void (*SaveGame_SaveGameState)(void);
extern int32* (*SaveGame_GetDataPtr)(int32 slot, bool32 encore);

#define OBJ_SAVE_SETUP \
IMPORT_PUBLIC_FUNC(SaveGame_GetSaveRAM); \
IMPORT_PUBLIC_FUNC(SaveGame_SaveGameState); \
IMPORT_PUBLIC_FUNC(SaveGame_GetDataPtr)

#endif //! MANIA_SAVEGAME_H
File renamed without changes.
2 changes: 2 additions & 0 deletions src/hypermania/Mania/ScoreBonus.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ typedef struct {
Animator animator;
} EntityScoreBonus;

extern ObjectScoreBonus* ScoreBonus;

#endif //! MANIA_SCOREBONUS_H
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions src/hypermania/Mania/Zone.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,9 @@ typedef struct {
int32 fadeColor;
} EntityZone;

extern ObjectZone* Zone;
extern int32 (*Zone_GetZoneID)();
extern void (*Zone_StartFadeIn)(int32, int32);
extern void (*Zone_StartFadeOut)(int32, int32);

#endif //! MANIA_ZONE_H
42 changes: 21 additions & 21 deletions src/hypermania/ModFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@
#include "HyperManiaVariables.h"

#include "Objects/Player.h"
#include "Objects/Boilerplate/SaveGame.h"
#include "Objects/Boilerplate/Animals.h"
#include "Objects/Boilerplate/Camera.h"
#include "Objects/Boilerplate/CollapsingPlatform.h"
#include "Objects/Boilerplate/Debris.h"
#include "Objects/Boilerplate/Explosion.h"
#include "Objects/Boilerplate/FXFade.h"
#include "Objects/Boilerplate/ItemBox.h"
#include "Objects/Boilerplate/Ring.h"
#include "Objects/Boilerplate/ScoreBonus.h"
#include "Objects/Boilerplate/Zone.h"
#include "Boilerplate/Music.h"
#include "Boilerplate/Global/PauseMenu.h"
#include "Boilerplate/Global/InvincibleStars.h"

#include "Objects/Boilerplate/CPZ/CPZSetup.h"
#include "Objects/Boilerplate/OOZ/OOZSetup.h"
#include "Objects/Boilerplate/HCZ/HCZSetup.h"
#include "Objects/Boilerplate/MMZ/FarPlane.h"
#include "Objects/Boilerplate/ERZ/ERZStart.h"
#include "Objects/Boilerplate/BSS/BSS_Setup.h"
#include "Mania/SaveGame.h"
#include "Mania/Animals.h"
#include "Mania/Camera.h"
#include "Mania/CollapsingPlatform.h"
#include "Mania/Debris.h"
#include "Mania/Explosion.h"
#include "Mania/FXFade.h"
#include "Mania/ItemBox.h"
#include "Mania/Ring.h"
#include "Mania/ScoreBonus.h"
#include "Mania/Zone.h"
#include "Mania/Music.h"
#include "Mania/Global/PauseMenu.h"
#include "Mania/Global/InvincibleStars.h"

#include "Mania/CPZ/CPZSetup.h"
#include "Mania/OOZ/OOZSetup.h"
#include "Mania/HCZ/HCZSetup.h"
#include "Mania/MMZ/FarPlane.h"
#include "Mania/ERZ/ERZStart.h"
#include "Mania/BSS/BSS_Setup.h"


extern bool32 HPZ_SuperSpecialStage; // bad hack variable for testing purposes, will be removed later, please understand
Expand Down
40 changes: 20 additions & 20 deletions src/hypermania/Objects/All.c
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
#include "ModFunctions.h"

#include "Boilerplate/SaveGame.c"
#include "Boilerplate/Animals.c"
#include "Boilerplate/Camera.c"
#include "Boilerplate/CollapsingPlatform.c"
#include "Boilerplate/Explosion.c"
#include "Boilerplate/FXFade.c"
#include "Boilerplate/Ring.c"
#include "Boilerplate/ScoreBonus.c"
#include "Boilerplate/ItemBox.c"
#include "Boilerplate/Zone.c"
#include "Boilerplate/Music.c"
#include "Boilerplate/Global/PauseMenu.c"
#include "Boilerplate/Global/InvincibleStars.c"
#include "Mania/SaveGame.c"
#include "Mania/Animals.c"
#include "Mania/Camera.c"
#include "Mania/CollapsingPlatform.c"
#include "Mania/Explosion.c"
#include "Mania/FXFade.c"
#include "Mania/Ring.c"
#include "Mania/ScoreBonus.c"
#include "Mania/ItemBox.c"
#include "Mania/Zone.c"
#include "Mania/Music.c"
#include "Mania/Global/PauseMenu.c"
#include "Mania/Global/InvincibleStars.c"

#include "Boilerplate/CPZ/CPZSetup.c"
#include "Boilerplate/OOZ/OOZSetup.c"
#include "Boilerplate/HCZ/HCZSetup.c"
#include "Boilerplate/MMZ/FarPlane.c"
#include "Boilerplate/ERZ/ERZStart.c"
#include "Boilerplate/BSS/BSS_Setup.c"
#include "Mania/CPZ/CPZSetup.c"
#include "Mania/OOZ/OOZSetup.c"
#include "Mania/HCZ/HCZSetup.c"
#include "Mania/MMZ/FarPlane.c"
#include "Mania/ERZ/ERZStart.c"
#include "Mania/BSS/BSS_Setup.c"

// im sorry jesus
typedef struct {
Expand All @@ -44,7 +44,7 @@ uint32 sonic3_emerald_lookup[7] = { 0, 1, 3, 2, 4, 6, 5 };
#include "UISaveSlot.c"
#include "LevelSelect.c"
#include "PlaneSeeSaw.c"
#include "Boilerplate/Debris.c"
#include "Mania/Debris.c"

#include "SuperFlicky.c"
#include "HyperStars.c"
Expand Down
14 changes: 0 additions & 14 deletions src/hypermania/Objects/Boilerplate/ItemBox.h

This file was deleted.

27 changes: 0 additions & 27 deletions src/hypermania/Objects/Boilerplate/SaveGame.h

This file was deleted.

8 changes: 0 additions & 8 deletions src/hypermania/Objects/Boilerplate/ScoreBonus.h

This file was deleted.

11 changes: 0 additions & 11 deletions src/hypermania/Objects/Boilerplate/Zone.h

This file was deleted.

Loading

0 comments on commit 54dcc40

Please sign in to comment.