Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions include/GameOriginInfo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
RB3Enhanced - GameOriginInfo.h
*/

typedef struct _GameOriginInfo
{
char *gameOrigin;
int num;
} GameOriginInfo;

extern int numGameOrigins;
extern GameOriginInfo originInfo[100];
4 changes: 2 additions & 2 deletions include/GemHooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
#include "rb3/Symbol.h"

int WillBeNoStrumHook(int *gameGemListPtr, int *multiGemInfoPtr);
int *GetWidgetByNameHook(int *gemManager, Symbol sym);
int AddGameGemHook(int *gameGemList, GameGem *gem, NoStrumState gemType);
int *GetWidgetByNameHook(int *gemManager, Symbol name);
int AddGameGemHook(GameGemList *gameGemList, GameGem *gem, NoStrumState noStrumState);
Symbol GetSlotColorHook(int *bandUser);
1 change: 1 addition & 0 deletions include/GlobalSymbols.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ typedef struct _GlobalSymbols
Symbol colorShuffle;
Symbol mirrorMode;
Symbol blackBackground;
Symbol gemShuffle;

// gem widgets
Symbol greenGem;
Expand Down
4 changes: 2 additions & 2 deletions include/LocaleHooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
#include "rb3/Symbol.h"

char *LocalizeHook(int thisLocale, Symbol sym, int fail);
void SetSystemLanguageHook(Symbol lang, int r4);
int IsSupportedLanguageHook(Symbol lang, int r4);
void SetSystemLanguageHook(Symbol lang, int cheat);
int IsSupportedLanguageHook(Symbol lang, int cheat);
2 changes: 1 addition & 1 deletion include/OvershellHooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ typedef struct _OvershellListEntry
char icon;
} OvershellListEntry;

void BuildInstrumentSelectionList(OvershellSlot *thisOvershellSlot, ControllerType controllerType, BandUser *bandUser);
void OvershellPartSelectProviderReload(OvershellSlot *thisOvershellSlot, ControllerType controllerType, BandUser *bandUser);

// Not overshell related but this is the only place we use them and IDK how to correctly organise code
void PrepareSomeVectorMaybe(int *r3, int r4, int r5);
Expand Down
10 changes: 5 additions & 5 deletions include/QuazalHooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
Quazal is the creator of the networking middleware used by RB3.
*/

#include "rb3/Quazal/StepSequenceJobStep.h"
#include "rb3/Quazal/Step.h"

extern void OperatorEqualsFmt(char *r3, char *r4);
void OperatorEqualsFmtHook(char *r3, char *r4);
extern int StepSequenceJobSetStep(int *unk, StepSequenceJobStep *step);
int StepSequenceJobSetStepHook(int *unk, StepSequenceJobStep *step);
extern void OperatorEqualsFmt(char *thisString, char *szString);
void OperatorEqualsFmtHook(char *thisString, char *szString);
extern int StepSequenceJobSetStep(int *thisStepSequenceJob, Step *oStep);
int StepSequenceJobSetStepHook(int *thisStepSequenceJob, Step *oStep);
6 changes: 6 additions & 0 deletions include/SetlistHooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
Hooks for modifying the setlist/song selection screen.
*/

#include "rb3/MusicLibrary.h"
#include "rb3/BandLabel.h"
#include "rb3/SortNode.h"
#include "rb3/Rnd/RndMat.h"
#include "rb3/Mem.h"

void SetSongAndArtistNameHook(BandLabel *label, SortNode *sortNode);
void SetSongNameFromNodeHook(BandLabel *label, SortNode *sortNode);
RndMat *MusicLibraryMatHook(MusicLibrary *thisMusicLibrary, int unk, int unk2, int *listSlot);
SongMetadata *SongMetadataConstructorHook(SongMetadata *thisSongMetadata, DataArray *data, DataArray *backupData, char isOnDisc);
char SongMetadataLoadHook(SongMetadata *thisSongMetadata, BinStream *stream);
327 changes: 187 additions & 140 deletions include/ports.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion include/rb3/App.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
#define _APP_H

extern void AppConstructor(void *thisApp, int argc, char **argv);
extern void *NewFile(char *fileName, int flags); // doesn't belong to a namespace?
extern void *NewFile(char *iFilename, int iMode); // doesn't belong to a namespace?

#endif // _APP_H
2 changes: 1 addition & 1 deletion include/rb3/Archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ typedef struct _Archive
} Archive;

extern void ArchiveInit(void);
extern void ArchiveConstructor(Archive *thisArchive, char *path, int unknown);
extern void ArchiveConstructor(Archive *thisArchive, char *path, int heap_headroom);
extern void ArchiveDestructor(Archive *thisArchive);
extern void ArchiveMerge(Archive *thisArchive, Archive *otherArchive);
extern void ArchiveSetLocationHardDrive(Archive *thisArchive);
Expand Down
3 changes: 2 additions & 1 deletion include/rb3/BandLabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ typedef struct _BandLabel

extern void SetSongAndArtistName(BandLabel *label, SortNode *unk);
extern void SetSongNameFromNode(BandLabel *label, SortNode *unk);
extern void BandLabelSetDisplayText(BandLabel *label, char *text, int unk);
extern void BandLabelSetDisplayText(BandLabel *label, char *text, char clear_token);
extern int MusicLibraryMat(void *thisMusicLibrary, int data, int unk2, int *listSlot); // returns the material for UIListMeshes in the music library

#endif // _BANDLABEL_H
2 changes: 1 addition & 1 deletion include/rb3/BandSongMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ typedef struct _BandSongMgr

extern int GetSongIDFromShortname(BandSongMgr *thisSongMgr, Symbol shortName, int fail); // fail seems to be unused on retail builds, but it would simulate a failure on debug builds
extern SongMetadata *GetMetadata(BandSongMgr *thisSongMgr, int songId);
extern int SongMgrGetRankedSongs(BandSongMgr *thisSongMgr, void *vector, char demosIfGameModeAllows, char includeRestricted);
extern int SongMgrGetRankedSongs(BandSongMgr *thisSongMgr, void *songs, char demosIfGameModeAllows, char includeRestricted);

#endif // _BANDSONGMGR_H
107 changes: 81 additions & 26 deletions include/rb3/BandUser.h
Original file line number Diff line number Diff line change
@@ -1,48 +1,103 @@
#ifndef _BANDUSER_H
#define _BANDUSER_H

#include "rb3/String.h"
#include "rb3/Symbol.h"
#include "rb3/Track.h"

typedef enum _Difficulty
{
EASY = 0,
MEDIUM = 1,
HARD = 2,
EXPERT = 3
kDifficultyEasy = 0,
kDifficultyMedium = 1,
kDifficultyHard = 2,
kDifficultyExpert = 3
} Difficulty;

typedef enum _TrackType
{
BASS = 2,
DRUMS = 0,
GUITAR = 1,
HARMONIES = 7,
KEYS = 4,
PRO_BASS = 8,
PRO_GUITAR = 6,
PRO_KEYS = 5,
VOCALS = 3
kTrackDrum = 0,
kTrackGuitar = 1,
kTrackBass = 2,
kTrackVocals = 3,
kTrackKeys = 4,
kTrackRealKeys = 5,
kTrackRealGuitar = 6,
kTrackRealGuitar22Fret = 7,
kTrackRealBass = 8,
kTrackRealBass22Fret = 9,
kTrackNone = 10,
kTrackPending = 11,
kTrackPendingVocals = 12
} TrackType;

typedef enum _ControllerType
{
DRUM_CONT = 0,
GUITAR_CONT = 1,
VOX_CONT = 2,
KEYBOARD_CONT = 3,
PRO_GUITAR_CONT = 4,
kControllerDrum = 0,
kControllerGuitar = 1,
kControllerVocals = 2,
kControllerKeys = 3,
kControllerRealGuitar = 4,
kControllerNone = 5
} ControllerType;

typedef enum _PreferredScoreType
{
kScoreDrum = 0,
kScoreBass = 1,
kScoreGuitar = 2,
kScoreVocals = 3,
kScoreHarmony = 4,
kScoreKeys = 5,
kScoreRealDrum = 6,
kScoreRealGuitar = 7,
kScoreRealBass = 8,
kScoreRealKeys = 9,
kScoreBand = 10
} PreferredScoreType;

typedef struct _BandUser
{
// BandUser members
int unknown_0x0;
int unknown_0x4;
Difficulty difficulty;
int unknown_0xc;
TrackType trackType;
ControllerType controllerType;
int unknown_0x14;
int unknown_0x18;
int unknown_0x1c;
int unknown_0x20;
Difficulty mDifficulty;
char mUnknown;
char pad[3];
TrackType mTrackType;
ControllerType mControllerType;
char mTrackSelected;
char mUnknown2;
char pad2[2];
PreferredScoreType mPreferredScoreType;
int mOvershellState;
String mOvershellFocus;
void *mChar;
#ifdef RB3E_XBOX
char mGameplayOptions[0x48];
#else
char mGameplayOptions[0x38];
#endif
char mAutoplay;
char pad3[3];
#ifdef RB3E_WII
int mUnknownBool;
#endif
Symbol mPreviousAward;
float mLastHitFraction;
Track *mTrack;
void *mPlayer;
char mParticipating;
#ifdef RB3E_XBOX
char pad4[3];
int mUnknown3;
#else
char mIsWiiRemoteController;
char mJustDisconnected;
char pad4;
#endif

// User members
// TODO
} BandUser;

#endif // _BANDUSER_H
2 changes: 1 addition & 1 deletion include/rb3/BandUserMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "rb3/BandUser.h"

// gives you the number of band users in the current band
extern int GetBandUsers(int thisBandUserMgr, int unknown, int unknown2);
extern int GetBandUsers(int thisBandUserMgr, int pUsers, int flags);
// returns the BandUser in a particular overshell slot (overshell slots are left to right, 0-3, so vocals for example is nearly always going to be 2)
extern BandUser *GetBandUserFromSlot(int thisBandUserMgr, int slot);

Expand Down
7 changes: 7 additions & 0 deletions include/rb3/BinStream.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#ifndef _BINSTREAM_H
#define _BINSTREAM_H

typedef enum _SeekType
{
kSeekBegin = 0,
kSeekCur = 1,
kSeekEnd = 2,
} SeekType;

typedef struct _BinStream BinStream;

typedef void (*BinStreamDestructor_t)(BinStream *thisBinStream, int unk);
Expand Down
12 changes: 8 additions & 4 deletions include/rb3/ChunkStream.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#ifndef _CHUNKSTREAM_H
#define _CHUNKSTREAM_H

#include "rb3/BinStream.h"
#include "rb3/File.h"
#include "rb3/Platform.h"

typedef struct _ChunkStream ChunkStream;

typedef int (*ChunkStreamDestructor_t)(ChunkStream *thisChunkStream, int unk);
Expand All @@ -9,9 +13,9 @@ typedef int (*ChunkStreamTell_t)(ChunkStream *thisChunkStream);
typedef int (*ChunkStreamEOF_t)(ChunkStream *thisChunkStream);
typedef int (*ChunkStreamFail_t)(ChunkStream *thisChunkStream);
typedef char *(*ChunkStreamName_t)(ChunkStream *thisChunkStream);
typedef char *(*ChunkStreamReadImpl_t)(ChunkStream *thisChunkStream, void *unk, int unk2);
typedef char *(*ChunkStreamWriteImpl_t)(ChunkStream *thisChunkStream, void *unk, int unk2);
typedef char *(*ChunkStreamSeekImpl_t)(ChunkStream *thisChunkStream, int unk, int seekType);
typedef char *(*ChunkStreamReadImpl_t)(ChunkStream *thisChunkStream, void *data, int bytes);
typedef char *(*ChunkStreamWriteImpl_t)(ChunkStream *thisChunkStream, void *data, int bytes);
typedef char *(*ChunkStreamSeekImpl_t)(ChunkStream *thisChunkStream, int offset, SeekType seekType);
typedef int (*ChunkStreamReturnsZero_t)();

typedef struct _ChunkStream_vtable
Expand All @@ -34,6 +38,6 @@ struct _ChunkStream
ChunkStream_vtable *vtable;
};

ChunkStream *ChunkStreamConstructor(ChunkStream *thisChunkStream, char *fileName, int fileType, int flags, char unk2, int platform, char unk3);
ChunkStream *ChunkStreamConstructor(ChunkStream *thisChunkStream, char *fileName, FileType fileType, int chunkSize, char compress, Platform platform, char cached);

#endif // _CHUNKSTREAM_H
2 changes: 1 addition & 1 deletion include/rb3/Data.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ typedef struct _DataArray
short mNodeCount;
short mRefCount;
short mLine;
short mUnknown;
short mDeprecated; // assuming this is for them to mark scripts or functions as being deprecated and etc.?
} DataArray;

// gets a pointer to the addr of a DTA function
Expand Down
10 changes: 9 additions & 1 deletion include/rb3/File.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#ifndef _FILE_H
#define _FILE_H

typedef enum _FileType
{
kRead = 0,
kWrite = 1,
kReadNoArk = 2,
kAppend = 3
} FileType;

// flags can be used to check the existence of files both inside and outside the ARK, similar to how the NewFile flags work
char FileExists(char *path, int flags);
char FileExists(char *iFilename, int iMode);

#endif // _FILE_H
15 changes: 15 additions & 0 deletions include/rb3/FilePath.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef _FILEPATH_H
#define _FILEPATH_H

#include "String.h"

typedef struct _FilePath
{
String path;
} FilePath;

// even though the structure of FilePath is very simplistic we need to use the constructor as it calls
// extra functions to properly construct paths and etc.
FilePath *FilePathConstructor(FilePath *thisFilePath, char *path);

#endif // _FILEPATH_H
7 changes: 5 additions & 2 deletions include/rb3/FileStream.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef _FILESTREAM_H
#define _FILESTREAM_H

#include "rb3/BinStream.h"
#include "rb3/File.h"

typedef struct _FileStream FileStream;

typedef int (*FileStreamDestructor_t)(FileStream *thisFileStream, int unk);
Expand All @@ -11,7 +14,7 @@ typedef int (*FileStreamFail_t)(FileStream *thisFileStream);
typedef char *(*FileStreamName_t)(FileStream *thisFileStream);
typedef char *(*FileStreamReadImpl_t)(FileStream *thisFileStream, void *data, int bytes);
typedef char *(*FileStreamWriteImpl_t)(FileStream *thisFileStream, void *data, int bytes);
typedef char *(*FileStreamSeekImpl_t)(FileStream *thisFileStream, int offset, int seekType);
typedef char *(*FileStreamSeekImpl_t)(FileStream *thisFileStream, int offset, SeekType seekType);
typedef int (*FileStreamReturnsZero_t)();

typedef struct _FileStream_vtable
Expand All @@ -36,6 +39,6 @@ struct _FileStream
char unk[0x256];
};

FileStream *FileStreamConstructor(FileStream *thisFileStream, char *fileName, int fileType, char littleEndian);
FileStream *FileStreamConstructor(FileStream *thisFileStream, char *fileName, FileType fileType, char littleEndian);

#endif // _FILESTREAM_H
Loading
Loading