mirror of
https://github.com/TheOnlyZac/sly1.git
synced 2024-11-23 21:59:53 +00:00
Reformat documentation
This commit is contained in:
parent
a73978ad44
commit
ec4558f3dd
@ -4,7 +4,7 @@
|
||||
|
||||
/**
|
||||
* Unknown
|
||||
*/
|
||||
*/
|
||||
struct ACTLA
|
||||
{
|
||||
int fUseTarget;
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
/**
|
||||
* Animation Segment
|
||||
*/
|
||||
*/
|
||||
struct ASEG
|
||||
{
|
||||
int padding[15];
|
||||
|
12
src/P2/bas.h
12
src/P2/bas.h
@ -4,7 +4,7 @@
|
||||
|
||||
/**
|
||||
* Binary Async Stream Kind
|
||||
*/
|
||||
*/
|
||||
enum BASK : int
|
||||
{
|
||||
BASK_Nil = -1,
|
||||
@ -15,7 +15,7 @@ enum BASK : int
|
||||
|
||||
/**
|
||||
* Binary Async Stream
|
||||
*/
|
||||
*/
|
||||
class CBinaryAsyncStream
|
||||
{
|
||||
public:
|
||||
@ -35,19 +35,17 @@ public:
|
||||
* @brief Constructs a new CBinaryAsyncStream.
|
||||
*
|
||||
* @param pvSpool Pointer to the spool
|
||||
*/
|
||||
*/
|
||||
CBinaryAsyncStream(void* pvSpool);
|
||||
|
||||
/**
|
||||
* @brief Destroys the CBinaryAsyncStream.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
~CBinaryAsyncStream();
|
||||
|
||||
/**
|
||||
* @brief Closes the stream.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
void Close();
|
||||
};
|
||||
|
||||
|
57
src/P2/bis.h
57
src/P2/bis.h
@ -12,7 +12,7 @@ typedef unsigned char byte; //todo move to util header
|
||||
* Binary Input Stream Kind
|
||||
*
|
||||
* Types of binary stream that can be opened
|
||||
*/
|
||||
*/
|
||||
enum BISK : int
|
||||
{
|
||||
BISK_Nil = -1,
|
||||
@ -26,7 +26,7 @@ enum BISK : int
|
||||
* Binary Input Stream
|
||||
*
|
||||
* Used to read binary data from files on the disc.
|
||||
*/
|
||||
*/
|
||||
class CBinaryInputStream
|
||||
{
|
||||
public:
|
||||
@ -61,7 +61,7 @@ public:
|
||||
* @brief Constructs a new CBinaryInputStream.
|
||||
*
|
||||
* @param fileName Name of the file to open
|
||||
*/
|
||||
*/
|
||||
CBinaryInputStream(std::string fileName); // Used for file object
|
||||
|
||||
/**
|
||||
@ -73,7 +73,7 @@ public:
|
||||
*
|
||||
* @retval 0 File is not open
|
||||
* @retval 1 File is open
|
||||
*/
|
||||
*/
|
||||
int FOpenFile(CFileLocation* pfl);
|
||||
|
||||
/**
|
||||
@ -84,7 +84,7 @@ public:
|
||||
*
|
||||
* @retval 0 Sector is not open
|
||||
* @retval 1 Sector is open
|
||||
*/
|
||||
*/
|
||||
int FOpenSector(uint32_t isector, uint32_t cb);
|
||||
|
||||
/**
|
||||
@ -92,14 +92,14 @@ public:
|
||||
*
|
||||
* @param cb Number of bytes to open
|
||||
* @param pv Pointer to the memory location
|
||||
*/
|
||||
*/
|
||||
void OpenMemory(int cb, void* pv);
|
||||
|
||||
/**
|
||||
* @brief Decrements the number of async bytes remaining.
|
||||
*
|
||||
* @param cb Number of bytes to decrement
|
||||
*/
|
||||
*/
|
||||
void DecrementCdReadLimit(int cb);
|
||||
|
||||
/**
|
||||
@ -110,7 +110,7 @@ public:
|
||||
*
|
||||
* @param cb Number of bytes to read
|
||||
* @param pv Pointer to the memory location
|
||||
*/
|
||||
*/
|
||||
void Read(int cb, void *pv);
|
||||
|
||||
/**
|
||||
@ -121,137 +121,136 @@ public:
|
||||
*
|
||||
* @param cb Number of bytes to read
|
||||
* @param pv Pointer to the memory location
|
||||
*/
|
||||
*/
|
||||
void Read_Modified(int cb, void* pv); // Used for file object
|
||||
|
||||
/**
|
||||
* @brief Aligns the stream to a certain number of bytes.
|
||||
*
|
||||
* @param n Number of bytes to align to
|
||||
*/
|
||||
*/
|
||||
void Align(int n);
|
||||
|
||||
/**
|
||||
* @brief Aligns the file object to a certain number of bytes.
|
||||
*
|
||||
* @param n Number of bytes to align to
|
||||
*/
|
||||
*/
|
||||
void Align_Modified(int n); // Used for file object
|
||||
|
||||
/**
|
||||
* @brief Reads a byte from the stream.
|
||||
*
|
||||
* @return The byte read
|
||||
*/
|
||||
*/
|
||||
byte U8Read();
|
||||
|
||||
/**
|
||||
* @brief Reads a byte from the file object.
|
||||
*
|
||||
* @return The byte read
|
||||
*/
|
||||
*/
|
||||
byte U8Read_Modified(); // Used for file object
|
||||
|
||||
/**
|
||||
* @brief Reads a 16-bit unsigned integer from the stream.
|
||||
*
|
||||
* @return The 16-bit unsigned integer read
|
||||
*/
|
||||
*/
|
||||
uint16_t U16Read();
|
||||
|
||||
/**
|
||||
* @brief Reads a 16-bit unsigned integer from the file object.
|
||||
*
|
||||
* @return The 16-bit unsigned integer read
|
||||
*/
|
||||
*/
|
||||
uint16_t U16Read_Modified(); // Used for file object
|
||||
|
||||
/**
|
||||
* @brief Reads a 32-bit unsigned integer from the stream.
|
||||
*
|
||||
* @return The 32-bit unsigned integer read
|
||||
*/
|
||||
*/
|
||||
uint32_t U32Read();
|
||||
|
||||
/**
|
||||
* @brief Reads a 32-bit unsigned integer from the file object.
|
||||
*
|
||||
* @return The 32-bit unsigned integer read
|
||||
*/
|
||||
*/
|
||||
uint32_t U32Read_Modified(); // Used for file object
|
||||
|
||||
/**
|
||||
* @brief Reads a 8-bit signed integer from the stream.
|
||||
*
|
||||
* @return The 8-bit signed integer read
|
||||
*/
|
||||
*/
|
||||
int8_t S8Read();
|
||||
|
||||
/**
|
||||
* @brief Reads a 8-bit signed integer from the file object.
|
||||
*
|
||||
* @return The 8-bit signed integer read
|
||||
*/
|
||||
*/
|
||||
int8_t S8Read_Modified(); // Used for file object
|
||||
|
||||
/**
|
||||
* @brief Reads a 16-bit signed integer from the stream.
|
||||
*
|
||||
* @return The 16-bit signed integer read
|
||||
*/
|
||||
*/
|
||||
int16_t S16Read();
|
||||
|
||||
/**
|
||||
* @brief Reads a 16-bit signed integer from the file object.
|
||||
*
|
||||
* @return The 16-bit signed integer read
|
||||
*/
|
||||
*/
|
||||
int16_t S16Read_Modified(); // Used for file object
|
||||
|
||||
/**
|
||||
* @brief Reads a 32-bit signed integer from the stream.
|
||||
*
|
||||
* @return The 32-bit signed integer read
|
||||
*/
|
||||
*/
|
||||
int32_t S32Read();
|
||||
|
||||
/**
|
||||
* @brief Reads a 32-bit signed integer from the file object.
|
||||
*
|
||||
* @return The 32-bit signed integer read
|
||||
*/
|
||||
*/
|
||||
int32_t S32Read_Modified(); // Used for file object
|
||||
|
||||
/**
|
||||
* @brief Reads a 32-bit floating point number from the stream.
|
||||
*
|
||||
* @return The 32-bit floating point number read
|
||||
*/
|
||||
*/
|
||||
float F32Read();
|
||||
|
||||
/**
|
||||
* @brief Reads a 32-bit floating point number from the file object.
|
||||
*
|
||||
* @return The 32-bit floating point number read
|
||||
*/
|
||||
*/
|
||||
float F32Read_Modified(); // Used for file object
|
||||
|
||||
/**
|
||||
* @brief Reads a string from the stream.
|
||||
*
|
||||
* @param pachz Pointer where the string will be stored
|
||||
*/
|
||||
*/
|
||||
void ReadStringSw(char** pachz);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Closes the stream.
|
||||
*/
|
||||
*/
|
||||
void Close();
|
||||
|
||||
/**
|
||||
* @brief Closes the file object.
|
||||
*/
|
||||
*/
|
||||
void Close_Modified(); // Used for file object
|
||||
|
||||
~CBinaryInputStream();
|
||||
|
@ -12,7 +12,7 @@
|
||||
* @param isplice The splice index of the LO.
|
||||
*
|
||||
* @return Pointer to the new object.
|
||||
*/
|
||||
*/
|
||||
SW* PloNew(CID cid, SW* csw, ALO* paloParent, OID oid, int isplice);
|
||||
|
||||
/**
|
||||
@ -21,5 +21,5 @@ SW* PloNew(CID cid, SW* csw, ALO* paloParent, OID oid, int isplice);
|
||||
* @param oid The stock OID.
|
||||
*
|
||||
* @return The level object index.
|
||||
*/
|
||||
*/
|
||||
int IploFromStockOid(int oid);
|
||||
|
28
src/P2/cat.h
28
src/P2/cat.h
@ -7,7 +7,7 @@ typedef unsigned int uint; //todo move to util header
|
||||
* File Location
|
||||
*
|
||||
* Stores the file location and size in bytes.
|
||||
*/
|
||||
*/
|
||||
struct FCL
|
||||
{
|
||||
uint isector; // File ISO Sector Offset.
|
||||
@ -18,7 +18,7 @@ struct FCL
|
||||
* File Key
|
||||
*
|
||||
* Used to identify the file type.
|
||||
*/
|
||||
*/
|
||||
enum FK {
|
||||
FK_Nil = -1,
|
||||
FK_BrxWorld = 0, // Level File
|
||||
@ -35,7 +35,7 @@ enum FK {
|
||||
* WAL Entry
|
||||
*
|
||||
* Stores the file key and file location & size.
|
||||
*/
|
||||
*/
|
||||
struct WALE {
|
||||
char* pchzKey; // File Name used for searching for file to load
|
||||
struct FCL* pfcl; // File location and size.
|
||||
@ -43,7 +43,7 @@ struct WALE {
|
||||
|
||||
/**
|
||||
* Handles information about the file sector and size.
|
||||
*/
|
||||
*/
|
||||
class CFileLocation
|
||||
{
|
||||
public:
|
||||
@ -54,7 +54,7 @@ public:
|
||||
|
||||
/**
|
||||
* Handles the WAC and WAL files.
|
||||
*/
|
||||
*/
|
||||
class CWalCatalog
|
||||
{
|
||||
public:
|
||||
@ -74,7 +74,7 @@ public:
|
||||
*
|
||||
* @param pflWac WAC File Location and Size.
|
||||
* @param pflWal WAL File Location and Size.
|
||||
*/
|
||||
*/
|
||||
void Init(CFileLocation* pflWac, CFileLocation* pflWal);
|
||||
|
||||
/**
|
||||
@ -85,7 +85,7 @@ public:
|
||||
* @param pflResult Stores the file location and size.
|
||||
*
|
||||
* @return 1 if file is found, 0 if file is not found.
|
||||
*/
|
||||
*/
|
||||
int FFindFile(char* pchzKey, FK fk, CFileLocation* pflResult);
|
||||
|
||||
/**
|
||||
@ -99,7 +99,7 @@ public:
|
||||
*
|
||||
* @retval 1 if file is found
|
||||
* @retval 0 if file is not found.
|
||||
*/
|
||||
*/
|
||||
int FDefaultWorld(char* pchzResult, CFileLocation* pflResult);
|
||||
|
||||
/**
|
||||
@ -107,18 +107,18 @@ public:
|
||||
*
|
||||
* @param pwale Stores the file key and file location & size.
|
||||
* @param pflResult Stores the file location and size.
|
||||
*/
|
||||
*/
|
||||
void BuildFl(WALE* pwale, CFileLocation* pflResult);
|
||||
|
||||
/**
|
||||
* @brief Not implemented
|
||||
*/
|
||||
*/
|
||||
void Reload(); // todo
|
||||
};
|
||||
|
||||
/**
|
||||
* Related to the WAC and WAL files.
|
||||
*/
|
||||
*/
|
||||
class CCatalog
|
||||
{
|
||||
public:
|
||||
@ -126,7 +126,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Initializes the catalog.
|
||||
*/
|
||||
*/
|
||||
void Init();
|
||||
|
||||
/**
|
||||
@ -137,7 +137,7 @@ public:
|
||||
* @param pflResult Stores the file location and size.
|
||||
*
|
||||
* @note not implemented
|
||||
*/
|
||||
*/
|
||||
int FFindFile(char* pchzKey, FK fk, CFileLocation* pflResult); // todo
|
||||
|
||||
/**
|
||||
@ -151,6 +151,6 @@ public:
|
||||
*
|
||||
* @retval 1 if file is found
|
||||
* @retval 0 if file is not found.
|
||||
*/
|
||||
*/
|
||||
int FDefaultWorld(char* pchzResult, CFileLocation* pflResult);
|
||||
};
|
||||
|
@ -4,7 +4,7 @@ typedef unsigned long long TICK;
|
||||
|
||||
/**
|
||||
* Clock
|
||||
*/
|
||||
*/
|
||||
struct CLOCK
|
||||
{
|
||||
static TICK s_tickLastRaw;
|
||||
@ -26,14 +26,14 @@ extern float g_rtClock;
|
||||
* @brief Sets the tick rate of the global clock.
|
||||
*
|
||||
* @param rt The new tick rate.
|
||||
*/
|
||||
*/
|
||||
void SetClockRate(float rt);
|
||||
|
||||
/**
|
||||
* @brief Calculates and updates clock values according to time elapsed.
|
||||
*
|
||||
* @param pclock Pointer to the clock.
|
||||
*/
|
||||
*/
|
||||
void MarkClockTick(CLOCK* pclock);
|
||||
|
||||
/**
|
||||
@ -42,7 +42,7 @@ void MarkClockTick(CLOCK* pclock);
|
||||
* Only updates the real clock values (those which are determined by the EE clock cyclerate).
|
||||
*
|
||||
* @param pclock Pointer to the clock.
|
||||
*/
|
||||
*/
|
||||
void MarkClockTickRealOnly(CLOCK* pclock);
|
||||
|
||||
/**
|
||||
@ -50,7 +50,7 @@ void MarkClockTickRealOnly(CLOCK* pclock);
|
||||
*
|
||||
* @param pclock Pointer to the clock.
|
||||
* @param t The new time.
|
||||
*/
|
||||
*/
|
||||
void ResetClock(CLOCK* pclock, float t);
|
||||
|
||||
/**
|
||||
@ -58,19 +58,19 @@ void ResetClock(CLOCK* pclock, float t);
|
||||
*
|
||||
* @param pclock Pointer to the clock.
|
||||
* @param fEnabled The new value of the fEnabled flag.
|
||||
*/
|
||||
*/
|
||||
void SetClockEnabled(CLOCK* pclock, bool fEnabled);
|
||||
|
||||
/**
|
||||
* @brief Initializes some values and starts the global clock.
|
||||
*/
|
||||
*/
|
||||
void StartupClock();
|
||||
|
||||
/**
|
||||
* @brief Gets the current tick.
|
||||
*
|
||||
* @return The current tick.
|
||||
*/
|
||||
*/
|
||||
TICK TickNow();
|
||||
|
||||
/**
|
||||
@ -79,5 +79,5 @@ TICK TickNow();
|
||||
* @param nParam The new debug rate.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
//void SetClockDebugRate(int nParam);
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* Game Camera
|
||||
*/
|
||||
*/
|
||||
struct CM
|
||||
{
|
||||
// todo
|
||||
@ -17,5 +17,5 @@ extern CM* g_pcm;
|
||||
* @brief Sets up the game camera.
|
||||
*
|
||||
* @param pcm Pointer to the camera.
|
||||
*/
|
||||
*/
|
||||
void SetupCm(CM* pcm);
|
||||
|
@ -17,14 +17,14 @@ struct COIN
|
||||
* @return 0 on success; nonzero on failure.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
//int InitCoin(Coin* pcoin);
|
||||
|
||||
/**
|
||||
* @brief Handles when the player touches a coin.
|
||||
*
|
||||
* @param pcoin Pointer to the coin.
|
||||
*/
|
||||
*/
|
||||
void OnCoinSmack(COIN* pcoin);
|
||||
|
||||
/**
|
||||
@ -34,7 +34,7 @@ void OnCoinSmack(COIN* pcoin);
|
||||
* @param dprizes The new prize.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
//void SetcoinDprizes(Coin* pcoin, Dprizes dprizes);
|
||||
|
||||
/**
|
||||
@ -44,5 +44,5 @@ void OnCoinSmack(COIN* pcoin);
|
||||
* @param dt Time elapsed since the last frame.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
//void UpdateCoin(Coin* pcoin, float dt);
|
||||
|
@ -7,7 +7,7 @@ typedef unsigned char byte;
|
||||
|
||||
/**
|
||||
* @brief Dialog Kind
|
||||
*/
|
||||
*/
|
||||
enum DIALOGK
|
||||
{
|
||||
DIALOGK_Binoc = 0,
|
||||
@ -18,7 +18,7 @@ enum DIALOGK
|
||||
|
||||
/**
|
||||
* @brief Dialog State
|
||||
*/
|
||||
*/
|
||||
enum DIALOGS
|
||||
{
|
||||
DIALOGS_Enabled = 0,
|
||||
@ -32,7 +32,7 @@ enum DIALOGS
|
||||
|
||||
/**
|
||||
* @brief Dialog
|
||||
*/
|
||||
*/
|
||||
struct DIALOG
|
||||
{
|
||||
int padding[0xB8];
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
/**
|
||||
* @brief Difficulty Prize State.
|
||||
*/
|
||||
*/
|
||||
enum DPS
|
||||
{
|
||||
DPS_Normal = 0x0,
|
||||
@ -18,7 +18,7 @@ enum DPS
|
||||
* Stores values related to a particular difficulty level.
|
||||
*
|
||||
* @note Name is not official
|
||||
*/
|
||||
*/
|
||||
struct DIFFICULTYLEVEL
|
||||
{
|
||||
LM suckLm;
|
||||
@ -47,7 +47,7 @@ struct DIFFICULTYLEVEL
|
||||
* @brief Difficulty.
|
||||
*
|
||||
* Tracks values that don't change across difficulty levels, and a pointer to the current difficulty level
|
||||
*/
|
||||
*/
|
||||
struct DIFFICULTY
|
||||
{
|
||||
int field_0x0;
|
||||
@ -71,7 +71,7 @@ static DIFFICULTYLEVEL g_difficultyEasy, g_difficultyMedium, g_difficultyHard;
|
||||
* @brief Called when game loads, clears the difficulty struct.
|
||||
*
|
||||
* @param pdifficulty Pointer to the difficulty.
|
||||
*/
|
||||
*/
|
||||
void OnDifficultyGameLoad(DIFFICULTY* pdifficulty);
|
||||
|
||||
/**
|
||||
@ -80,7 +80,7 @@ void OnDifficultyGameLoad(DIFFICULTY* pdifficulty);
|
||||
* Sets the difficulty value based on the current level.
|
||||
*
|
||||
* @param pdifficulty Pointer to the difficulty.
|
||||
*/
|
||||
*/
|
||||
void OnDifficultyWorldPreLoad(DIFFICULTY* pdifficulty);
|
||||
|
||||
/**
|
||||
@ -89,14 +89,14 @@ void OnDifficultyWorldPreLoad(DIFFICULTY* pdifficulty);
|
||||
* Gives the player suck charms if they are below the threshold.
|
||||
*
|
||||
* @param pdifficulty Pointer to the difficulty.
|
||||
*/
|
||||
*/
|
||||
void OnDifficultyWorldPostLoad(DIFFICULTY* pdifficulty);
|
||||
|
||||
/**
|
||||
* @brief Stubbed, does nothing.
|
||||
*
|
||||
* @param pdifficulty Pointer to the difficulty.
|
||||
*/
|
||||
*/
|
||||
void OnDifficultyInitialTeleport(DIFFICULTY* pdifficulty);
|
||||
|
||||
/**
|
||||
@ -106,7 +106,7 @@ void OnDifficultyInitialTeleport(DIFFICULTY* pdifficulty);
|
||||
*
|
||||
* @param scalar The amount to increase the suck value by.
|
||||
* @param pdifficulty Pointer to the difficulty.
|
||||
*/
|
||||
*/
|
||||
void OnDifficultyPlayerDeath(float scalar, DIFFICULTY* pdifficulty);
|
||||
|
||||
/**
|
||||
@ -116,7 +116,7 @@ void OnDifficultyPlayerDeath(float scalar, DIFFICULTY* pdifficulty);
|
||||
*
|
||||
* @param pdifficulty Pointer to the difficulty.
|
||||
* @param pchkpnt Pointer to the checkpoint.
|
||||
*/
|
||||
*/
|
||||
void OnDifficultyTriggerCheckpoint(DIFFICULTY* pdifficulty, CHKPNT* pchkpnt);
|
||||
|
||||
/**
|
||||
@ -125,7 +125,7 @@ void OnDifficultyTriggerCheckpoint(DIFFICULTY* pdifficulty, CHKPNT* pchkpnt);
|
||||
* Resets the suck values.
|
||||
*
|
||||
* @param pdifficulty Pointer to the difficulty.
|
||||
*/
|
||||
*/
|
||||
void OnDifficultyCollectKey(DIFFICULTY* pdifficulty);
|
||||
|
||||
//void OnDifficultyAward(Difficulty* pdifficulty, int ccoinMin, int ccoinMax, Vector* ppos);
|
||||
@ -140,7 +140,7 @@ void OnDifficultyCollectKey(DIFFICULTY* pdifficulty);
|
||||
*
|
||||
* @param nParam The amount to change the suck value by.
|
||||
* @param pdifficulty Pointer to the difficulty.
|
||||
*/
|
||||
*/
|
||||
void ChangeSuck(float nParam, DIFFICULTY* pdifficulty);
|
||||
|
||||
//void ResetSuckChkpnts(int nParam);
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
/**
|
||||
* Horizontal justification
|
||||
*/
|
||||
*/
|
||||
enum JH
|
||||
{
|
||||
JH_Left = 0,
|
||||
@ -14,7 +14,7 @@ enum JH
|
||||
|
||||
/**
|
||||
* Vertical justification
|
||||
*/
|
||||
*/
|
||||
enum JV
|
||||
{
|
||||
JV_Top = 0,
|
||||
@ -25,7 +25,7 @@ enum JV
|
||||
|
||||
/**
|
||||
* 4-byte color value
|
||||
*/
|
||||
*/
|
||||
struct RGBA {
|
||||
BYTE bRed;
|
||||
BYTE bGreen;
|
||||
@ -37,7 +37,7 @@ struct RGBA {
|
||||
* ScaleFactorRatio or ScaleFontRatio
|
||||
*
|
||||
* Unknown, used by CFont class (probably to scale fonts)
|
||||
*/
|
||||
*/
|
||||
struct SFR
|
||||
{
|
||||
float rx;
|
||||
@ -50,7 +50,7 @@ struct _vtbl_ptr_type; // todo: fix type
|
||||
* Font class
|
||||
*
|
||||
* Represents a font used for text rendering
|
||||
*/
|
||||
*/
|
||||
class CFont
|
||||
{
|
||||
protected:
|
||||
@ -75,7 +75,7 @@ private:
|
||||
* Text box class
|
||||
*
|
||||
* Represents a text box used for text rendering
|
||||
*/
|
||||
*/
|
||||
class CTextBox
|
||||
{
|
||||
private:
|
||||
|
@ -17,17 +17,17 @@ static FRM* g_pfrmOpen;
|
||||
* @brief Opens a new frame.
|
||||
*
|
||||
* Additionally increments the frame count.
|
||||
*/
|
||||
*/
|
||||
void OpenFrame();
|
||||
|
||||
/**
|
||||
* @brief Closes the current frame.
|
||||
*/
|
||||
*/
|
||||
void CloseFrame();
|
||||
|
||||
/**
|
||||
* @brief Clears the pending frame.
|
||||
*
|
||||
* @param pfrm Pointer to the frame.
|
||||
*/
|
||||
*/
|
||||
void ClearPendingFrame(FRM* pfrm);
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Object ID
|
||||
*
|
||||
* There are a lot more that are not represented here.
|
||||
*/
|
||||
*/
|
||||
enum OID : int
|
||||
{
|
||||
OID_Unknown = 0x0,
|
||||
@ -26,7 +26,7 @@ enum OID : int
|
||||
|
||||
/**
|
||||
* Collision ID?
|
||||
*/
|
||||
*/
|
||||
enum CID : int
|
||||
{
|
||||
CID_Nil = -1,
|
||||
@ -197,7 +197,7 @@ enum CID : int
|
||||
|
||||
/**
|
||||
* World ID
|
||||
*/
|
||||
*/
|
||||
enum WID : int
|
||||
{
|
||||
// Intro
|
||||
@ -264,7 +264,7 @@ enum WID : int
|
||||
|
||||
/**
|
||||
* Game stats
|
||||
*/
|
||||
*/
|
||||
struct GAME {
|
||||
int cAlarmsTriggered;
|
||||
int fTimedChallenge;
|
||||
@ -285,7 +285,7 @@ struct GAME {
|
||||
* @brief Resets the game state values to their defaults.
|
||||
*
|
||||
* @param pgs Pointer to the game state.
|
||||
*/
|
||||
*/
|
||||
void InitGameState(GS* pgs);
|
||||
|
||||
//void SetupGame(char* pchzWorld, GRFTRANS grftrans)
|
||||
@ -294,7 +294,7 @@ void InitGameState(GS* pgs);
|
||||
* @brief Updates the game timers.
|
||||
*
|
||||
* @param dt Delta time.
|
||||
*/
|
||||
*/
|
||||
void UpdateGameState(float dt);
|
||||
|
||||
//GRFLS GrflsFromWid(WID wid)
|
||||
@ -303,7 +303,7 @@ void UpdateGameState(float dt);
|
||||
* @brief Clears the given level state struct.
|
||||
*
|
||||
* @param pls Pointer to the level state.
|
||||
*/
|
||||
*/
|
||||
void ClearLs(LS* pls);
|
||||
|
||||
//void UnloadGame();
|
||||
@ -313,7 +313,7 @@ void ClearLs(LS* pls);
|
||||
|
||||
/**
|
||||
* @brief Resets the lives and charms to their default values, and resets checkpoints.
|
||||
*/
|
||||
*/
|
||||
void RetryGame();
|
||||
|
||||
//void StartGame();
|
||||
@ -322,21 +322,21 @@ void RetryGame();
|
||||
* @brief Sets the number of charms the player has.
|
||||
*
|
||||
* @param nParam The number of charms.
|
||||
*/
|
||||
*/
|
||||
void SetCcharm(int nParam);
|
||||
|
||||
/**
|
||||
* @brief Sets the number of lives the player has.
|
||||
*
|
||||
* @param nParam The number of lives.
|
||||
*/
|
||||
*/
|
||||
void SetClife(int nParam);
|
||||
|
||||
/**
|
||||
* @brief Sets the number of coins the player has.
|
||||
*
|
||||
* @param nParam The number of coins.
|
||||
*/
|
||||
*/
|
||||
void SetCcoin(int nParam);
|
||||
|
||||
/**
|
||||
@ -344,7 +344,7 @@ void SetCcoin(int nParam);
|
||||
*
|
||||
* @retval true if the player has charms, or infinite charms cheat is enabled.
|
||||
* @retval false otherwise.
|
||||
*/
|
||||
*/
|
||||
bool FCharmAvailable();
|
||||
|
||||
|
||||
@ -356,7 +356,7 @@ bool FCharmAvailable();
|
||||
* @brief Clears the given game struct.
|
||||
*
|
||||
* @param pgame Pointer to the game struct.
|
||||
*/
|
||||
*/
|
||||
void OnGameLoad(GAME* pgame);
|
||||
|
||||
//void OnGameWorldTransition(GAME* pgame);
|
||||
@ -379,5 +379,5 @@ void OnGameLoad(GAME* pgame);
|
||||
* when there was a powerup that allowed you to have more than 2 charms.
|
||||
*
|
||||
* @return The max charm count.
|
||||
*/
|
||||
*/
|
||||
int CcharmMost();
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
/**
|
||||
* Unknown
|
||||
*/
|
||||
*/
|
||||
struct SBB {
|
||||
int n;
|
||||
struct CRef ref;
|
||||
|
26
src/P2/gs.h
26
src/P2/gs.h
@ -5,12 +5,12 @@
|
||||
*
|
||||
* Not to be confused with Graphic Synthesizer, which is the name of the PS2's GPU
|
||||
* and is also abbreviated as GS.
|
||||
*/
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Game State Flags
|
||||
*/
|
||||
*/
|
||||
enum FGS
|
||||
{
|
||||
FGS_FirstClue = 0x1,
|
||||
@ -22,7 +22,7 @@ enum FGS
|
||||
|
||||
/**
|
||||
* World State Flags
|
||||
*/
|
||||
*/
|
||||
enum FWS
|
||||
{
|
||||
FWS_Visited = 0x1,
|
||||
@ -35,7 +35,7 @@ enum FWS
|
||||
|
||||
/**
|
||||
* Level State Flags
|
||||
*/
|
||||
*/
|
||||
enum FLS
|
||||
{
|
||||
FLS_Visited = 0x1,
|
||||
@ -47,7 +47,7 @@ enum FLS
|
||||
|
||||
/**
|
||||
* Game World ID
|
||||
*/
|
||||
*/
|
||||
enum GAMEWORLD
|
||||
{
|
||||
GAMEWORLD_Intro = 0,
|
||||
@ -61,7 +61,7 @@ enum GAMEWORLD
|
||||
|
||||
/**
|
||||
* World Level ID
|
||||
*/
|
||||
*/
|
||||
enum WORLDLEVEL : int
|
||||
{
|
||||
WORLDLEVEL_Approach = 0,
|
||||
@ -78,7 +78,7 @@ enum WORLDLEVEL : int
|
||||
|
||||
/**
|
||||
* Level State
|
||||
*/
|
||||
*/
|
||||
struct LS
|
||||
{
|
||||
FLS fls; // Level state flags
|
||||
@ -97,7 +97,7 @@ struct LS
|
||||
|
||||
/**
|
||||
* World State
|
||||
*/
|
||||
*/
|
||||
struct WS
|
||||
{
|
||||
LS als[9]; // Level states array
|
||||
@ -110,7 +110,7 @@ struct WS
|
||||
|
||||
/**
|
||||
* Game State
|
||||
*/
|
||||
*/
|
||||
typedef int GRFGS;
|
||||
typedef int GRFVAULT;
|
||||
struct GS
|
||||
@ -136,7 +136,7 @@ struct GS
|
||||
* Level Info
|
||||
*
|
||||
* Used by the game to load the level.
|
||||
*/
|
||||
*/
|
||||
struct PchzLevel // maybe wrong name
|
||||
{
|
||||
double lsn_and_unk_ciphers;
|
||||
@ -164,7 +164,7 @@ extern PchzLevel pchzLevelTable[];
|
||||
*
|
||||
* @note This function is temporary and should be removed when support for loading
|
||||
* the actual level data is added.
|
||||
*/
|
||||
*/
|
||||
void PopulatePchzLevelTable();
|
||||
|
||||
/**
|
||||
@ -173,7 +173,7 @@ void PopulatePchzLevelTable();
|
||||
* @return Flags indicating what has been completed on the save file.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
int FGameCompletion();
|
||||
|
||||
/**
|
||||
@ -182,5 +182,5 @@ int FGameCompletion();
|
||||
* @param pgs Pointer to the game state.
|
||||
*
|
||||
* @return Percent completion as an integer out of 100.
|
||||
*/
|
||||
*/
|
||||
int CalculatePercentCompletion(GS* pgs);
|
||||
|
36
src/P2/joy.h
36
src/P2/joy.h
@ -9,7 +9,7 @@ typedef short GRFBTN;
|
||||
|
||||
/**
|
||||
* Joypad buttons
|
||||
*/
|
||||
*/
|
||||
enum PadButtons
|
||||
{
|
||||
NOT_PRESSED = 0,
|
||||
@ -33,7 +33,7 @@ enum PadButtons
|
||||
|
||||
/**
|
||||
* Joypad state
|
||||
*/
|
||||
*/
|
||||
enum JOYS
|
||||
{
|
||||
JOYS_Initing = 0,
|
||||
@ -45,7 +45,7 @@ enum JOYS
|
||||
|
||||
/**
|
||||
* Joypad kind
|
||||
*/
|
||||
*/
|
||||
enum JOYK
|
||||
{
|
||||
JOYK_Unknown = 0,
|
||||
@ -58,7 +58,7 @@ enum JOYK
|
||||
|
||||
/**
|
||||
* Rumble state
|
||||
*/
|
||||
*/
|
||||
enum RUMS
|
||||
{
|
||||
RUMS_Dead = 0,
|
||||
@ -71,7 +71,7 @@ enum RUMS
|
||||
|
||||
/**
|
||||
* Rumble intensity
|
||||
*/
|
||||
*/
|
||||
struct RUMINS
|
||||
{
|
||||
int fHighSpeedMotor;
|
||||
@ -82,7 +82,7 @@ struct RUMINS
|
||||
|
||||
/**
|
||||
* Rumble pattern
|
||||
*/
|
||||
*/
|
||||
struct RUMPAT
|
||||
{
|
||||
int crumins;
|
||||
@ -94,7 +94,7 @@ struct RUMPAT
|
||||
*
|
||||
* Combines the rumble state, rumble pattern, and rumble intensity along with the
|
||||
* port and slot of the controller.
|
||||
*/
|
||||
*/
|
||||
struct RUMBLE
|
||||
{
|
||||
int nPort;
|
||||
@ -108,7 +108,7 @@ struct RUMBLE
|
||||
|
||||
/**
|
||||
* Joypad
|
||||
*/
|
||||
*/
|
||||
struct JOY
|
||||
{
|
||||
// joypad info
|
||||
@ -157,7 +157,7 @@ struct JOY
|
||||
|
||||
/**
|
||||
* Cheat Flags
|
||||
*/
|
||||
*/
|
||||
enum FCHT
|
||||
{
|
||||
FCHT_None = 0x0,
|
||||
@ -170,7 +170,7 @@ enum FCHT
|
||||
|
||||
/**
|
||||
* ??? Kind
|
||||
*/
|
||||
*/
|
||||
enum DPK
|
||||
{
|
||||
DPK_None = 0,
|
||||
@ -203,14 +203,14 @@ extern char chetkido_buffer[]; // temp
|
||||
* @param pjoy Pointer to the joypad
|
||||
* @param joys Joypad state
|
||||
* @param joyk Joypad kind
|
||||
*/
|
||||
*/
|
||||
void SetJoyJoys(JOY* pjoy, JOYS joys, JOYK joyk);
|
||||
|
||||
/**
|
||||
* @brief Updates the given joypad.
|
||||
*
|
||||
* @param pjoy Pointer to the joypad
|
||||
*/
|
||||
*/
|
||||
void UpdateJoy(JOY* pjoy);
|
||||
|
||||
/**
|
||||
@ -218,7 +218,7 @@ void UpdateJoy(JOY* pjoy);
|
||||
*
|
||||
* @param prumble Pointer to the rumble
|
||||
* @param rums Rumble state
|
||||
*/
|
||||
*/
|
||||
void SetRumbleRums(RUMBLE* prumble, RUMS rums);
|
||||
|
||||
/**
|
||||
@ -227,12 +227,12 @@ void SetRumbleRums(RUMBLE* prumble, RUMS rums);
|
||||
* @param prumble Pointer to the rumble
|
||||
* @param nPort Port of the controller
|
||||
* @param nSlot Slot of the controller
|
||||
*/
|
||||
*/
|
||||
void InitRumble(RUMBLE* prumble, int nPort, int nSlot);
|
||||
|
||||
/**
|
||||
* @brief Updates the check for cheat code entry.
|
||||
*/
|
||||
*/
|
||||
void UpdateCodes();
|
||||
|
||||
/**
|
||||
@ -242,7 +242,7 @@ void UpdateCodes();
|
||||
* is is a reload code.
|
||||
*
|
||||
* @param nparam Cheat code to check
|
||||
*/
|
||||
*/
|
||||
void AddFcht(int nParam);
|
||||
|
||||
/**
|
||||
@ -251,7 +251,7 @@ void AddFcht(int nParam);
|
||||
* @param mask Unknown
|
||||
*
|
||||
* @todo Figure out what this function does and implement it.
|
||||
*/
|
||||
*/
|
||||
void AddGrfusr(int mask);
|
||||
|
||||
/**
|
||||
@ -266,5 +266,5 @@ void AddGrfusr(int mask);
|
||||
*
|
||||
* @note Unofficial name because the real name is unknown.
|
||||
* @todo Implement rendering the string on the screen.
|
||||
*/
|
||||
*/
|
||||
void CheatActivateChetkido();
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
/**
|
||||
* Keyhole
|
||||
*/
|
||||
*/
|
||||
struct KEYHOLE
|
||||
{
|
||||
// todo
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* Light shadow & midtone
|
||||
*/
|
||||
*/
|
||||
struct LSM
|
||||
{
|
||||
float uShadow;
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* Level Object
|
||||
*/
|
||||
*/
|
||||
struct LO {
|
||||
struct BASIC field0_0x0;
|
||||
enum OID oid;
|
||||
|
@ -4,7 +4,7 @@ typedef struct MATRIX4 GRFDP;
|
||||
|
||||
/**
|
||||
* 4x4 Matrix
|
||||
*/
|
||||
*/
|
||||
struct MATRIX4
|
||||
{
|
||||
float mat[4][4];
|
||||
@ -12,7 +12,7 @@ struct MATRIX4
|
||||
|
||||
/**
|
||||
* 3x3 Matrix
|
||||
*/
|
||||
*/
|
||||
struct MATRIX3
|
||||
{
|
||||
float mat[3][3];
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
/**
|
||||
* Mpeg Audio State
|
||||
*/
|
||||
*/
|
||||
enum MAUDS
|
||||
{
|
||||
MAUDS_Dead = 0,
|
||||
@ -25,7 +25,7 @@ enum MAUDS
|
||||
|
||||
/**
|
||||
* MPEG video info
|
||||
*/
|
||||
*/
|
||||
struct sceMpeg {
|
||||
int width;
|
||||
int height;
|
||||
@ -43,7 +43,7 @@ struct sceMpeg {
|
||||
/**
|
||||
* QueueOutput IOP
|
||||
* Todo: Inherit from CQueueOutput class once that exists
|
||||
*/
|
||||
*/
|
||||
class CQueueOutputIop /* : public CQueueOutput */
|
||||
{
|
||||
private:
|
||||
@ -58,7 +58,7 @@ private:
|
||||
|
||||
/**
|
||||
* MPEG Audio
|
||||
*/
|
||||
*/
|
||||
class CMpegAudio
|
||||
{
|
||||
MAUDS m_mauds; // current state
|
||||
@ -75,7 +75,7 @@ class CMpegAudio
|
||||
|
||||
/**
|
||||
* MPEG video
|
||||
*/
|
||||
*/
|
||||
class CMpeg
|
||||
{
|
||||
public:
|
||||
@ -100,7 +100,7 @@ public:
|
||||
* @brief Executes the mpegs stored as OIDs on the mpeg struct.
|
||||
*
|
||||
* @note Unofficial name
|
||||
*/
|
||||
*/
|
||||
void ExecuteOids();
|
||||
|
||||
/**
|
||||
@ -110,28 +110,28 @@ public:
|
||||
*
|
||||
* @todo Function is only partially implemented.
|
||||
* @todo Double check whether oid is supposed to be a pointer.
|
||||
*/
|
||||
*/
|
||||
void Execute(OID* oid); // todo
|
||||
|
||||
/**
|
||||
* @brief Starts the mpeg.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
void Start(); // todo
|
||||
|
||||
/**
|
||||
* @brief Updates the mpeg.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
void Update(); // todo
|
||||
|
||||
/**
|
||||
* @brief Finishes the mpeg.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
void Finish(); // todo
|
||||
};
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* Game Phase
|
||||
*/
|
||||
*/
|
||||
enum PHASE
|
||||
{
|
||||
PHASE_None = 0,
|
||||
@ -24,5 +24,5 @@ void SetPhase(PHASE phase);
|
||||
|
||||
/**
|
||||
* @brief Clears the current game phase.
|
||||
*/
|
||||
*/
|
||||
void ClearPhase(PHASE phase = PHASE_None);
|
||||
|
@ -6,7 +6,7 @@ typedef bool BOOL; // todo: move to util header
|
||||
|
||||
/**
|
||||
* Unknown, maybe program or progress?
|
||||
*/
|
||||
*/
|
||||
class CProg
|
||||
{
|
||||
public:
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Unknown
|
||||
*
|
||||
* todo: implement
|
||||
*/
|
||||
*/
|
||||
class CRef
|
||||
{
|
||||
public:
|
||||
|
@ -9,7 +9,7 @@
|
||||
* @param pcm The camera to render with.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
void RenderSw(SW* psw, CM* pcm);
|
||||
|
||||
/**
|
||||
@ -19,5 +19,5 @@ void RenderSw(SW* psw, CM* pcm);
|
||||
* @param pcm The camera to draw with.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
void DrawSw(SW* psw, CM* pcm);
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* Blot State
|
||||
*/
|
||||
*/
|
||||
enum BLOTS
|
||||
{
|
||||
BLOTS_Hidden = 0,
|
||||
@ -16,7 +16,7 @@ enum BLOTS
|
||||
* Blot
|
||||
*
|
||||
* Used to draw screen objects
|
||||
*/
|
||||
*/
|
||||
struct BLOT
|
||||
{
|
||||
// todo
|
||||
@ -30,19 +30,19 @@ struct BLOT
|
||||
* @param blots The state to set.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
void SetBlotBlots(BLOT* pblot, BLOTS blots);
|
||||
|
||||
/**
|
||||
* @brief Renders the BLOT object.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
void RenderBlots();
|
||||
|
||||
/**
|
||||
* @brief Draws the BLOT object.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
void DrawBlots();
|
||||
|
@ -5,7 +5,7 @@ typedef unsigned char byte;
|
||||
|
||||
/**
|
||||
* Sensor State
|
||||
*/
|
||||
*/
|
||||
enum SENSORS
|
||||
{
|
||||
MAX
|
||||
@ -15,7 +15,7 @@ enum SENSORS
|
||||
* Sensor
|
||||
*
|
||||
* todo: fix missing fields and rewrite
|
||||
*/
|
||||
*/
|
||||
struct SENSOR
|
||||
{
|
||||
undefined4 field_0x0;
|
||||
|
@ -9,7 +9,7 @@
|
||||
*
|
||||
* The sidebag is used to store the results of the parallel computation until
|
||||
* the main computation is ready to use them.
|
||||
*/
|
||||
*/
|
||||
struct CSidebag {
|
||||
int m_csbb;
|
||||
struct SBB m_asbb[16];
|
||||
|
@ -8,7 +8,7 @@ typedef unsigned char byte; //todo move to util header
|
||||
* A slotheap is a heap of fixed size slots. The slots are allocated in a
|
||||
* contiguous block of memory. The slotheap maintains a pointer to the next
|
||||
* free slot.
|
||||
*/
|
||||
*/
|
||||
struct SLOTHEAP {
|
||||
int cb; // size of each slot
|
||||
byte* ab; // pointer to the block of memory
|
||||
@ -21,7 +21,7 @@ struct SLOTHEAP {
|
||||
* Slot
|
||||
*
|
||||
* Represents one slot in the slotheap.
|
||||
*/
|
||||
*/
|
||||
struct SLOT {
|
||||
struct SLOT* pslotNext; // pointer to the next slot in the free list
|
||||
};
|
||||
|
@ -12,7 +12,7 @@ typedef int GRFPVA;
|
||||
* A scene object is a physical object in the game world.
|
||||
*
|
||||
* todo: identify missing fields and rewrite
|
||||
*/
|
||||
*/
|
||||
struct SO
|
||||
{
|
||||
char padding[0x2e0];
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
/**
|
||||
* EASND
|
||||
*/
|
||||
*/
|
||||
struct EASND {
|
||||
uint16_t csfxid;
|
||||
uint16_t asfxid[6];
|
||||
@ -23,7 +23,7 @@ struct sound {
|
||||
|
||||
/**
|
||||
* Sound Effect ID
|
||||
*/
|
||||
*/
|
||||
enum SFXID {
|
||||
SFXID_Nil = -1,
|
||||
SFXID_CaneHandleUnlock = 0,
|
||||
@ -480,7 +480,7 @@ enum SFXID {
|
||||
* ??? Kind
|
||||
*
|
||||
* Categorizes sound effects into groups.
|
||||
*/
|
||||
*/
|
||||
enum MVGK {
|
||||
MVGK_Nil = -1,
|
||||
MVGK_Effects = 0,
|
||||
@ -497,7 +497,7 @@ enum MVGK {
|
||||
|
||||
/**
|
||||
* ??? Unknown
|
||||
*/
|
||||
*/
|
||||
struct ISI {
|
||||
enum SFXID sfxid;
|
||||
struct LM lmRepeat;
|
||||
|
@ -15,7 +15,7 @@ typedef int GRFPVA;
|
||||
* physical speaker in the real world. More research is needed.
|
||||
*
|
||||
* todo: identify undefined fields
|
||||
*/
|
||||
*/
|
||||
struct SPEAKER
|
||||
{
|
||||
char padding[0x2e0];
|
||||
@ -38,7 +38,7 @@ struct SPEAKER
|
||||
|
||||
/**
|
||||
* Dialog Player
|
||||
*/
|
||||
*/
|
||||
struct DP
|
||||
{
|
||||
GRFDP grfdp;
|
||||
|
@ -18,7 +18,7 @@ struct PSL {
|
||||
*
|
||||
* The scene world is the game world. It contains all the objects in the game
|
||||
* world, and is responsible for rendering them.
|
||||
*/
|
||||
*/
|
||||
struct SW {
|
||||
LO field0_0x0;
|
||||
int cpsoAll; // count of all scene objects
|
||||
@ -129,7 +129,7 @@ extern SW* g_psw;
|
||||
* @param pbis Pointer to the binary input stream.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
void SetupBulkDataFromBrx(int fLoadBulkData, CBinaryInputStream* pbis);
|
||||
|
||||
/**
|
||||
@ -139,7 +139,7 @@ void SetupBulkDataFromBrx(int fLoadBulkData, CBinaryInputStream* pbis);
|
||||
* @param pbis Pointer to the binary input stream.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
void LoadSwFromBrx(SW* psw, CBinaryInputStream* pbis);
|
||||
|
||||
/**
|
||||
@ -148,5 +148,5 @@ void LoadSwFromBrx(SW* psw, CBinaryInputStream* pbis);
|
||||
* @param psw Pointer to the scene world.
|
||||
*
|
||||
* @todo Implement this function.
|
||||
*/
|
||||
*/
|
||||
void DeleteSw(SW* psw);
|
||||
|
@ -19,7 +19,7 @@ typedef int GRFTRANS;
|
||||
* Transition data
|
||||
*
|
||||
* Responsible for holding data bout a level transition.
|
||||
*/
|
||||
*/
|
||||
struct TRANS
|
||||
{
|
||||
uint32_t fSet;
|
||||
@ -31,7 +31,7 @@ struct TRANS
|
||||
|
||||
/**
|
||||
* Transition Flags
|
||||
*/
|
||||
*/
|
||||
enum FTRANS {
|
||||
GRFTRANS_None = 0,
|
||||
FTRANS_Checkpoint = 1,
|
||||
@ -47,7 +47,7 @@ enum FTRANS {
|
||||
* Holds data about the level file.
|
||||
*
|
||||
* note: name is not official
|
||||
*/
|
||||
*/
|
||||
struct LevelTableStruct
|
||||
{
|
||||
CFileLocation fileLocation; /* Ciphers for lsn and size */
|
||||
@ -62,7 +62,7 @@ struct LevelTableStruct
|
||||
|
||||
/**
|
||||
* Transition
|
||||
*/
|
||||
*/
|
||||
class CTransition
|
||||
{
|
||||
protected:
|
||||
|
@ -4,7 +4,7 @@
|
||||
* UI state
|
||||
*
|
||||
* Might not be accurate as it seems to differ from the May proto
|
||||
*/
|
||||
*/
|
||||
enum UIS
|
||||
{
|
||||
UIS_Splash = 0,
|
||||
|
@ -6,5 +6,5 @@
|
||||
*
|
||||
* @param psw The SW struct to update
|
||||
* @param dt Delta time
|
||||
*/
|
||||
*/
|
||||
void UpdateSwObjects(SW* psw, float dt);
|
||||
|
@ -86,7 +86,7 @@ BOOL FFloatsNear(float g1, float g2, float gEpsilon)
|
||||
* Solves a quadratic equation of the form ax^2 + bx + c = 0
|
||||
* Returns the number of solutions found (0, 1, or 2)
|
||||
* If there are two solutions, they are returned in ax[0] and ax[1]
|
||||
*/
|
||||
*/
|
||||
int CSolveQuadratic(float a, float b, float c, float* ax)
|
||||
{
|
||||
float rad = (b * b) - 4.0 * a * c;
|
||||
|
@ -9,7 +9,7 @@ typedef unsigned int undefined4;
|
||||
|
||||
/**
|
||||
* Limits for a float
|
||||
*/
|
||||
*/
|
||||
struct LM
|
||||
{
|
||||
float gMin, gMax;
|
||||
@ -142,7 +142,7 @@ float GTrunc(float g);
|
||||
* @param gDivisor The divisor.
|
||||
*
|
||||
* @return The positive remainder of the division.
|
||||
*/
|
||||
*/
|
||||
float GModPositive(float gDividend, float gDivisor);
|
||||
|
||||
//void FitClq(float g0, float g1, float u, float gU, CLQ* pclq);
|
||||
|
36
src/P2/vec.h
36
src/P2/vec.h
@ -8,7 +8,7 @@ typedef int GRFPVA;
|
||||
|
||||
/**
|
||||
* Vector3 with X, Y, and Z
|
||||
*/
|
||||
*/
|
||||
struct VECTOR
|
||||
{
|
||||
float x;
|
||||
@ -19,7 +19,7 @@ struct VECTOR
|
||||
|
||||
/**
|
||||
* Unknown
|
||||
*/
|
||||
*/
|
||||
struct BSPC
|
||||
{
|
||||
int cbsp;
|
||||
@ -29,7 +29,7 @@ struct BSPC
|
||||
|
||||
/**
|
||||
* Constraint Type
|
||||
*/
|
||||
*/
|
||||
enum CT
|
||||
{
|
||||
CT_Tangent = 1,
|
||||
@ -40,7 +40,7 @@ enum CT
|
||||
|
||||
/**
|
||||
* Constraint
|
||||
*/
|
||||
*/
|
||||
struct CONSTR
|
||||
{
|
||||
struct VECTOR normal;
|
||||
@ -49,7 +49,7 @@ struct CONSTR
|
||||
|
||||
/**
|
||||
* Unknown
|
||||
*/
|
||||
*/
|
||||
struct CLQ
|
||||
{
|
||||
float g0;
|
||||
@ -65,7 +65,7 @@ struct CLQ
|
||||
* @param pvec Pointer to the vector
|
||||
* @param ppan Float pointer to store the pan result
|
||||
* @param ptilt Float pointer to store the tilt result
|
||||
*/
|
||||
*/
|
||||
void CalculateVectorPanTilt(VECTOR* pvec, float* ppan, float* ptilt);
|
||||
|
||||
/**
|
||||
@ -74,7 +74,7 @@ void CalculateVectorPanTilt(VECTOR* pvec, float* ppan, float* ptilt);
|
||||
* @param param_1 Unknown vector
|
||||
* @param param_2 Unknown vector
|
||||
* @param param_3 Unknown vector
|
||||
*/
|
||||
*/
|
||||
void ConvertDeulToW(VECTOR* param_1, VECTOR* param_2, VECTOR* param_3);
|
||||
|
||||
/**
|
||||
@ -86,7 +86,7 @@ void ConvertDeulToW(VECTOR* param_1, VECTOR* param_2, VECTOR* param_3);
|
||||
* @param param_4 Unknown
|
||||
*
|
||||
* @note This is an educated guess and may not be accurate.
|
||||
*/
|
||||
*/
|
||||
bool FCalculateMuzzleVelocity(VECTOR* param_1, VECTOR* param_2, VECTOR* param_3, VECTOR* param_4, SO* param_5);
|
||||
|
||||
/**
|
||||
@ -98,7 +98,7 @@ bool FCalculateMuzzleVelocity(VECTOR* param_1, VECTOR* param_2, VECTOR* param_3,
|
||||
* @param param_4 Unknown
|
||||
*
|
||||
* @note This is an educated guess and may not be accurate.
|
||||
*/
|
||||
*/
|
||||
uint32_t FCalculateMuzzleVelocityAngle(VECTOR* param_1, VECTOR* param_2, float param_3, VECTOR* param_4, SO* param_5);
|
||||
|
||||
/**
|
||||
@ -111,14 +111,14 @@ uint32_t FCalculateMuzzleVelocityAngle(VECTOR* param_1, VECTOR* param_2, float p
|
||||
* @param unk_float1 Unknown float
|
||||
* @param unk_float2 Unknown float
|
||||
* @param presult Pointer to store the resulting point
|
||||
*/
|
||||
*/
|
||||
void FindClosestPointBetweenLines(VECTOR* pA, VECTOR* pB, VECTOR* pC, VECTOR* pD, float* unk_float1, float* unk_float2, VECTOR* presult);
|
||||
|
||||
/**
|
||||
* @brief Finds the closest point between two line segments.
|
||||
*
|
||||
* @todo Static analysis of parameters and return values.
|
||||
*/
|
||||
*/
|
||||
void FindClosestPointBetweenLineSegments(VECTOR* param_1, VECTOR* param_2, VECTOR* param_3, VECTOR* param_4, VECTOR param_5, float* param_6, VECTOR* param_7);
|
||||
|
||||
/**
|
||||
@ -126,7 +126,7 @@ void FindClosestPointBetweenLineSegments(VECTOR* param_1, VECTOR* param_2, VECTO
|
||||
*
|
||||
* @param pvec Pointer to the vector
|
||||
* @param presult Pointer to store the resulting normal vector
|
||||
*/
|
||||
*/
|
||||
void GetNormalVector(VECTOR* pvec, VECTOR* presult);
|
||||
|
||||
/**
|
||||
@ -138,7 +138,7 @@ void GetNormalVector(VECTOR* pvec, VECTOR* presult);
|
||||
* @param param_4 Unknown
|
||||
*
|
||||
* @todo Static analysis
|
||||
*/
|
||||
*/
|
||||
void GetNormalVectors(VECTOR* param_1, VECTOR* param_2, VECTOR* param_3, VECTOR* param_4);
|
||||
|
||||
/**
|
||||
@ -147,7 +147,7 @@ void GetNormalVectors(VECTOR* param_1, VECTOR* param_2, VECTOR* param_3, VECTOR*
|
||||
* @param pvec Pointer to the vector
|
||||
* @param glength Length to limit the vector to
|
||||
* @param presult Pointer to store the resulting vector
|
||||
*/
|
||||
*/
|
||||
void LimitVectorLength(VECTOR* pvec, float glength, VECTOR* presult);
|
||||
|
||||
/**
|
||||
@ -158,7 +158,7 @@ void LimitVectorLength(VECTOR* pvec, float glength, VECTOR* presult);
|
||||
* @param param_3 Unknown
|
||||
*
|
||||
* @return Angle between vectors in radians
|
||||
*/
|
||||
*/
|
||||
long RadBetweenVectors(VECTOR* pvec1, VECTOR* pvec2, VECTOR* param_3);
|
||||
|
||||
/**
|
||||
@ -168,7 +168,7 @@ long RadBetweenVectors(VECTOR* pvec1, VECTOR* pvec2, VECTOR* param_3);
|
||||
* @param y Y coordinate
|
||||
* @param z Z coordinate
|
||||
* @param pvec Pointer to the vector
|
||||
*/
|
||||
*/
|
||||
void SetVectorCylind(float x, float y, float z, VECTOR* pvec);
|
||||
|
||||
/**
|
||||
@ -178,7 +178,7 @@ void SetVectorCylind(float x, float y, float z, VECTOR* pvec);
|
||||
* @param y Y coordinate
|
||||
* @param z Z coordinate
|
||||
* @param pvec Pointer to the vector
|
||||
*/
|
||||
*/
|
||||
void SetVectorSphere(float z, float y, float x, VECTOR* pvec);
|
||||
|
||||
/**
|
||||
@ -188,5 +188,5 @@ void SetVectorSphere(float z, float y, float x, VECTOR* pvec);
|
||||
* @param pvec2 Vector to project onto
|
||||
*
|
||||
* @return Scalar projection of vec1 onto vec2
|
||||
*/
|
||||
*/
|
||||
float SProjectVector(VECTOR* pvec1, VECTOR* pvec2);
|
||||
|
@ -11,7 +11,7 @@ typedef unsigned char byte;
|
||||
|
||||
/**
|
||||
* Wipe Kind
|
||||
*/
|
||||
*/
|
||||
enum WIPEK
|
||||
{
|
||||
WIPEK_Fade = 0,
|
||||
@ -64,7 +64,7 @@ extern WIPE* g_pwipe;
|
||||
* @param wipek Wipe kind
|
||||
*
|
||||
* @todo Figure out what oidWarp is used for.
|
||||
*/
|
||||
*/
|
||||
void WipeToWorldWarp(LevelTableStruct* pchzWorld, OID oidWarp, WIPEK wipek);
|
||||
|
||||
/**
|
||||
@ -73,7 +73,7 @@ void WipeToWorldWarp(LevelTableStruct* pchzWorld, OID oidWarp, WIPEK wipek);
|
||||
* @param pwipe Pointer to the wipe
|
||||
* @param ptrans Pointer to the transition
|
||||
* @param wipek Wipe kind
|
||||
*/
|
||||
*/
|
||||
void ActivateWipe(WIPE* pwipe, TRANS* ptrans, WIPEK wipek);
|
||||
|
||||
/**
|
||||
@ -81,14 +81,14 @@ void ActivateWipe(WIPE* pwipe, TRANS* ptrans, WIPEK wipek);
|
||||
*
|
||||
* @param pwipe Pointer to the wipe
|
||||
* @param wipes Wipe state
|
||||
*/
|
||||
*/
|
||||
void SetWipeWipes(WIPE* pwipe, WIPES wipes);
|
||||
|
||||
/**
|
||||
* @brief Draws a wipe.
|
||||
*
|
||||
* @param pwipe Pointer to the wipe
|
||||
*/
|
||||
*/
|
||||
void DrawWipe(WIPE* pwipe);
|
||||
|
||||
/**
|
||||
@ -98,7 +98,7 @@ void DrawWipe(WIPE* pwipe);
|
||||
*
|
||||
* @brief pwipe Pointer to the wipe
|
||||
* @brief pjoy Pointer to the joypad
|
||||
*/
|
||||
*/
|
||||
void UpdateWipe(WIPE* pwipe, JOY* pjoy);
|
||||
|
||||
/**
|
||||
@ -107,7 +107,7 @@ void UpdateWipe(WIPE* pwipe, JOY* pjoy);
|
||||
* Sets the wipe state to Idle.
|
||||
*
|
||||
* @param pwipe Pointer to the wipe
|
||||
*/
|
||||
*/
|
||||
void InitWipe(WIPE* pwipe);
|
||||
|
||||
/**
|
||||
@ -116,7 +116,7 @@ void InitWipe(WIPE* pwipe);
|
||||
* @param pwipe Pointer to the wipe
|
||||
* @param ptrans Pointer to the transition
|
||||
* @param wipek Wipe kind
|
||||
*/
|
||||
*/
|
||||
void SetWipeButtonTrans(WIPE* pwipe, TRANS* ptrans, WIPEK wipek);
|
||||
|
||||
/**
|
||||
@ -125,5 +125,5 @@ void SetWipeButtonTrans(WIPE* pwipe, TRANS* ptrans, WIPEK wipek);
|
||||
* @param pwipe Pointer to the wipe
|
||||
* @param pjoy Pointer to the joypad
|
||||
* @param wipesNew New wipe state
|
||||
*/
|
||||
*/
|
||||
int FCatchWipeButtonTrans(WIPE* pwipe, JOY* pjoy, WIPES wipesNew);
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Unknown
|
||||
*
|
||||
* Possibly WorldMap?
|
||||
*/
|
||||
*/
|
||||
struct WM
|
||||
{
|
||||
// todo
|
||||
@ -13,7 +13,7 @@ struct WM
|
||||
|
||||
/**
|
||||
* ??? State
|
||||
*/
|
||||
*/
|
||||
enum WMS
|
||||
{
|
||||
WMS_ZERO = 0, // temp
|
||||
@ -29,5 +29,5 @@ enum WMS
|
||||
*
|
||||
* @param pwm Pointer to the WM
|
||||
* @param pwms Pointer to the WM state
|
||||
*/
|
||||
*/
|
||||
void SetWmWms(WM* pwm, WMS wms);
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* EXIT State
|
||||
*/
|
||||
*/
|
||||
enum EXITS
|
||||
{
|
||||
EXITS_Blocked = 0,
|
||||
@ -21,7 +21,7 @@ enum EXITS
|
||||
* Exit
|
||||
*
|
||||
* An invisible warp triugger in the world that brings you to a new level.
|
||||
*/
|
||||
*/
|
||||
struct EXIT
|
||||
{
|
||||
int padding[183];
|
||||
@ -54,5 +54,5 @@ struct EXIT
|
||||
*
|
||||
* @param pexit Pointer to the EXIT
|
||||
* @param exits EXIT state
|
||||
*/
|
||||
*/
|
||||
void SetExitExits(EXIT* pexit, EXITS exits);
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Zap
|
||||
*
|
||||
* A volume that damages the player upon contact.
|
||||
*/
|
||||
*/
|
||||
struct ZAP
|
||||
{
|
||||
// todo
|
||||
@ -16,7 +16,7 @@ struct ZAP
|
||||
|
||||
/**
|
||||
* Zap Kind?
|
||||
*/
|
||||
*/
|
||||
enum ZOK
|
||||
{
|
||||
ZOK_Inherit = 0,
|
||||
|
Loading…
Reference in New Issue
Block a user