mirror of
https://github.com/TheOnlyZac/sly1.git
synced 2025-02-17 05:38:37 +00:00
Improve documentation
This commit is contained in:
parent
cf76638356
commit
811fa2ab1d
@ -13,10 +13,12 @@
|
|||||||
* @brief Basic object.
|
* @brief Basic object.
|
||||||
*
|
*
|
||||||
* Base class for most objects.
|
* Base class for most objects.
|
||||||
|
*
|
||||||
|
* @todo Declare virtual methods.
|
||||||
*/
|
*/
|
||||||
struct BASIC
|
struct BASIC
|
||||||
{
|
{
|
||||||
int field_0x0;
|
int field_0x0; // placeholder for vtable
|
||||||
CSidebag *psidebag;
|
CSidebag *psidebag;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Horizontal text justification.
|
* @brief Horizontal text justification.
|
||||||
*/
|
*/
|
||||||
typedef enum JH
|
typedef enum JH
|
||||||
{
|
{
|
||||||
JH_Nil = -1,
|
JH_Nil = -1,
|
||||||
@ -22,7 +22,7 @@ typedef enum JH
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Vertical text justification.
|
* @brief Vertical text justification.
|
||||||
*/
|
*/
|
||||||
typedef enum JV
|
typedef enum JV
|
||||||
{
|
{
|
||||||
JV_Nil = -1,
|
JV_Nil = -1,
|
||||||
@ -34,7 +34,7 @@ typedef enum JV
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief RGBA color value.
|
* @brief RGBA color value.
|
||||||
*/
|
*/
|
||||||
struct RGBA
|
struct RGBA
|
||||||
{
|
{
|
||||||
uchar bRed;
|
uchar bRed;
|
||||||
@ -54,20 +54,51 @@ struct RGBA
|
|||||||
class CTextBox
|
class CTextBox
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* @brief Sets the position of the text box.
|
||||||
|
*
|
||||||
|
* @param x X position.
|
||||||
|
* @param y Y position.
|
||||||
|
*/
|
||||||
void SetPos(float x, float y);
|
void SetPos(float x, float y);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the size of the text box.
|
||||||
|
*
|
||||||
|
* @param dx Width.
|
||||||
|
* @param dy Height.
|
||||||
|
*/
|
||||||
void SetSize(float dx, float dy);
|
void SetSize(float dx, float dy);
|
||||||
void SetTextColor(RGBA* rgba);
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the text color.
|
||||||
|
*
|
||||||
|
* @param rgba RGBA color value.
|
||||||
|
*/
|
||||||
|
void SetTextColor(RGBA *rgba);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the horizontal text justification.
|
||||||
|
*
|
||||||
|
* @param jh Horizontal text justification.
|
||||||
|
*/
|
||||||
void SetHorizontalJust(JH jh);
|
void SetHorizontalJust(JH jh);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the vertical text justification.
|
||||||
|
*
|
||||||
|
* @param jv Vertical text justification.
|
||||||
|
*/
|
||||||
void SetVerticalJust(JV jv);
|
void SetVerticalJust(JV jv);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float m_x;
|
float m_x; // X position.
|
||||||
float m_y;
|
float m_y; // Y position.
|
||||||
float m_dx;
|
float m_dx; // Width.
|
||||||
float m_dy;
|
float m_dy; // Height.
|
||||||
RGBA m_rgba;
|
RGBA m_rgba; // Text color.
|
||||||
enum JH m_jh;
|
enum JH m_jh; // Horizontal text justification.
|
||||||
enum JV m_jv;
|
enum JV m_jv; // Vertical text justification;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* BINOC_H */
|
#endif /* BINOC_H */
|
||||||
|
@ -165,8 +165,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
void Align(int n);
|
void Align(int n);
|
||||||
|
|
||||||
// MARK: Read Methods
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Reads a byte from the stream.
|
* @brief Reads a byte from the stream.
|
||||||
*
|
*
|
||||||
|
@ -8,16 +8,22 @@
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Related to file location.
|
||||||
|
*/
|
||||||
struct FCL
|
struct FCL
|
||||||
{
|
{
|
||||||
uint isector;
|
uint isector;
|
||||||
uint cb;
|
uint cb;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief File location.
|
||||||
|
*/
|
||||||
class CFileLocation
|
class CFileLocation
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FCL fcl;
|
FCL fcl; // File sector and size.
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CAT_H
|
#endif // CAT_H
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
* @brief Checkpoint.
|
* @brief Checkpoint.
|
||||||
*
|
*
|
||||||
* @todo Define struct.
|
* @todo Define struct.
|
||||||
*
|
|
||||||
* @note CHKPNT : ALO : LO : BASIC
|
|
||||||
*/
|
*/
|
||||||
struct CHKPNT : public ALO
|
struct CHKPNT : public ALO
|
||||||
{
|
{
|
||||||
@ -24,13 +22,15 @@ struct CHKPNT : public ALO
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Checkpoint Manager
|
* @brief Checkpoint Manager.
|
||||||
|
*
|
||||||
|
* @todo Fill in missing fields.
|
||||||
*/
|
*/
|
||||||
struct CHKMGR
|
struct CHKMGR
|
||||||
{
|
{
|
||||||
int cbitChk;
|
int cbitChk; // Count of values in abitChk.
|
||||||
int unk_0x8;
|
int *abitChk; // Unknown, name/type may be wrong.
|
||||||
int padding[128];
|
int padding[128]; // Temporary padding
|
||||||
int fChkDirty;
|
int fChkDirty;
|
||||||
VECTOR posVolChkpnt;
|
VECTOR posVolChkpnt;
|
||||||
int csSaved[129]; // type may be wrong
|
int csSaved[129]; // type may be wrong
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Class ID.
|
* @brief Class ID.
|
||||||
|
*
|
||||||
|
* @note Values are based on May 19 build, and may not be accurate to release.
|
||||||
*/
|
*/
|
||||||
enum CID
|
enum CID
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
struct CM; // Forward declaration
|
struct CM; // Forward declaration
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Unknown.
|
* @brief Unknown Kind.
|
||||||
*/
|
*/
|
||||||
enum CFK
|
enum CFK
|
||||||
{
|
{
|
||||||
@ -198,7 +198,7 @@ struct CPASEG : public CPLCY
|
|||||||
*
|
*
|
||||||
* Unknown usage.
|
* Unknown usage.
|
||||||
*
|
*
|
||||||
* @note Might be unused in the final game based on the name.
|
* @note Might be unused in release build, based on the name.
|
||||||
*/
|
*/
|
||||||
struct CPTN : public CPLCY
|
struct CPTN : public CPLCY
|
||||||
{
|
{
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
#ifndef DIFFICULTY_H
|
#ifndef DIFFICULTY_H
|
||||||
#define DIFFICULTY_H
|
#define DIFFICULTY_H
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
#include <chkpnt.h>
|
#include <chkpnt.h>
|
||||||
|
@ -11,6 +11,14 @@
|
|||||||
#include <sw.h>
|
#include <sw.h>
|
||||||
#include <cid.h>
|
#include <cid.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the DL for the SW object with the given OID.
|
||||||
|
*
|
||||||
|
* @param psw The SW object.
|
||||||
|
* @param oid The OID of the object.
|
||||||
|
*
|
||||||
|
* @return The DL for the object, or NULL if the object was not found.
|
||||||
|
*/
|
||||||
DL *PdlFromSwOid(SW *psw, OID oid);
|
DL *PdlFromSwOid(SW *psw, OID oid);
|
||||||
|
|
||||||
void MatchSwObject(LO *ploMatch, int grffsoMask, int fIncludeRemoved, int fProxyMatch, LO *ploContext, int cploMax, int *pcploMatch, LO **aplo, int *pcpaloBest);
|
void MatchSwObject(LO *ploMatch, int grffsoMask, int fIncludeRemoved, int fProxyMatch, LO *ploContext, int cploMax, int *pcploMatch, LO **aplo, int *pcpaloBest);
|
||||||
@ -23,12 +31,29 @@ LO *PloFindSwNearest(SW *psw, OID oid, LO *ploContext);
|
|||||||
|
|
||||||
LO *PloFindSwChild(SW *psw, OID oid, ALO *paloAncestor);
|
LO *PloFindSwChild(SW *psw, OID oid, ALO *paloAncestor);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Checks if the given CID is derived from another.
|
||||||
|
*
|
||||||
|
* @param cid The CID to check.
|
||||||
|
* @param cidAncestor The CID to check against.
|
||||||
|
*
|
||||||
|
* @retval 1 if the CID is derived from the ancestor.
|
||||||
|
* @retval 0 if the CID is not derived from the ancestor.
|
||||||
|
*/
|
||||||
int FIsCidDerivedFrom(int cid, int cidAncestor);
|
int FIsCidDerivedFrom(int cid, int cidAncestor);
|
||||||
|
|
||||||
int CploFindSwObjectsByClass(SW *psw, int grffso, CID cid, LO *ploContext, int cploMax, LO **aplo);
|
int CploFindSwObjectsByClass(SW *psw, int grffso, CID cid, LO *ploContext, int cploMax, LO **aplo);
|
||||||
|
|
||||||
LO *PloFindSwObjectByClass(SW *psw, int grffso, CID cid, LO *ploContext);
|
LO *PloFindSwObjectByClass(SW *psw, int grffso, CID cid, LO *ploContext);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Finds the common parent of two LOs.
|
||||||
|
*
|
||||||
|
* @param plo The first LO.
|
||||||
|
* @param ploOther The second LO.
|
||||||
|
*
|
||||||
|
* @return The common parent of the two LOs.
|
||||||
|
*/
|
||||||
ALO *PaloFindLoCommonParent(LO *plo, LO *ploOther);
|
ALO *PaloFindLoCommonParent(LO *plo, LO *ploOther);
|
||||||
|
|
||||||
#endif // FIND_H
|
#endif // FIND_H
|
||||||
|
@ -12,6 +12,9 @@
|
|||||||
#include <shd.h>
|
#include <shd.h>
|
||||||
#include <cm.h>
|
#include <cm.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Unknown.
|
||||||
|
*/
|
||||||
struct RO
|
struct RO
|
||||||
{
|
{
|
||||||
MATRIX4 mat;
|
MATRIX4 mat;
|
||||||
@ -38,12 +41,36 @@ struct FLASH : public ALO
|
|||||||
undefined4 unk2;
|
undefined4 unk2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Initializes the given flash.
|
||||||
|
*
|
||||||
|
* @param pflash Flash to initialize.
|
||||||
|
*/
|
||||||
void InitFlash(FLASH *pflash);
|
void InitFlash(FLASH *pflash);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Loads a flash from the given binary input stream.
|
||||||
|
*
|
||||||
|
* @param pflash Where to load the flash.
|
||||||
|
* @param pbis Binary input stream.
|
||||||
|
*/
|
||||||
void LoadFlashFromBrx(FLASH *pflash, CBinaryInputStream *pbis);
|
void LoadFlashFromBrx(FLASH *pflash, CBinaryInputStream *pbis);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Updates the given flash.
|
||||||
|
*
|
||||||
|
* @param pflash Flash to update.
|
||||||
|
* @param dt Delta time.
|
||||||
|
*/
|
||||||
void UpdateFlash(FLASH *pflash, float dt);
|
void UpdateFlash(FLASH *pflash, float dt);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Renders the given flash.
|
||||||
|
*
|
||||||
|
* @param pflash Flash to render.
|
||||||
|
* @param pcm Game camera.
|
||||||
|
* @param pro Render options(?).
|
||||||
|
*/
|
||||||
void RenderFlashSelf(FLASH *pflash, CM *pcm, RO *pro);
|
void RenderFlashSelf(FLASH *pflash, CM *pcm, RO *pro);
|
||||||
|
|
||||||
int FPosFlashWithin(FLASH *pflash, VECTOR *ppos);
|
int FPosFlashWithin(FLASH *pflash, VECTOR *ppos);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @file fly.h
|
* @file fly.h
|
||||||
*
|
*
|
||||||
* @brief Fly critters.
|
* @brief Flies.
|
||||||
*/
|
*/
|
||||||
#ifndef FLY_H
|
#ifndef FLY_H
|
||||||
#define FLY_H
|
#define FLY_H
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Scaled font ratio.
|
||||||
|
*/
|
||||||
struct SFR
|
struct SFR
|
||||||
{
|
{
|
||||||
float rx, ry;
|
float rx, ry;
|
||||||
|
13
include/rat.h
Normal file
13
include/rat.h
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/**
|
||||||
|
* @file rat.h
|
||||||
|
*
|
||||||
|
* @brief Rats.
|
||||||
|
*/
|
||||||
|
#ifndef RAT_H
|
||||||
|
#define RAT_H
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
// ...
|
||||||
|
|
||||||
|
#endif // RAT_H
|
Loading…
x
Reference in New Issue
Block a user