Braces on newlines

This commit is contained in:
Zac 2024-11-12 04:48:42 +00:00 committed by GitHub
parent 618a1f4157
commit 8d59898e3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 40 additions and 19 deletions

View File

@ -9,7 +9,8 @@
#include "common.h"
#include <screen.h>
struct BINOC : public BLOT {
struct BINOC : public BLOT
{
void *vtbinoc;
undefined1 padding_0[116];
float value0;

View File

@ -63,14 +63,15 @@ enum UIS
UIS_Paused = 4,
UIS_Unpausing = 5,
UIS_WorldMap = 6,
//todo What is 7?
// todo What is 7?
UIS_Wiping = 8,
UIS_Max = 9
};
struct BLOT
{
union {
union
{
VTBLOT *pvtblot;
VTNOTE *pvtnote;
};
@ -102,7 +103,6 @@ struct BLOT
undefined4 *pfnsmack;
};
// MARK: Timer
/**
@ -147,12 +147,24 @@ struct CTR : public BLOT
void *pv;
};
struct TRUNKCTR : public CTR { };
struct CRUSHERCTR : public CTR { };
struct LIFECTR : public CTR { };
struct CLUECTR : public CTR { };
struct KEYCTR : public CTR { };
struct COINCTR : public CTR { };
struct TRUNKCTR : public CTR
{
};
struct CRUSHERCTR : public CTR
{
};
struct LIFECTR : public CTR
{
};
struct CLUECTR : public CTR
{
};
struct KEYCTR : public CTR
{
};
struct COINCTR : public CTR
{
};
extern LIFECTR g_lifectr;
extern CLUECTR g_cluectr;
@ -173,7 +185,7 @@ extern TOTALS g_totals;
struct NOTE : public BLOT
{
struct NOTE* unk278;
struct NOTE *unk278;
};
extern NOTE g_note;

View File

@ -5,7 +5,8 @@ INCLUDE_ASM(const s32, "P2/binoc", InitBei);
INCLUDE_ASM(const s32, "P2/binoc", GEvaluateBei);
void InitBinoc(BINOC *binoc, BLOTK blotk) {
void InitBinoc(BINOC *binoc, BLOTK blotk)
{
binoc->width = 640.0f;
binoc->height = 492.80001f;
binoc->value0 = 15.0f;
@ -13,9 +14,10 @@ void InitBinoc(BINOC *binoc, BLOTK blotk) {
InitBlot(binoc, blotk);
}
void ResetBinoc(BINOC* binoc) {
void ResetBinoc(BINOC *binoc)
{
binoc->pvtblot->pfnSetBlotAchzDraw(binoc, 0);
SetBinocLookat(binoc, (ALO *) 0);
SetBinocLookat(binoc, (ALO *)0);
binoc->dxReticle = 0.0f;
binoc->dyReticle = 0.0f;
binoc->uCompassBarOffset = 0.4f;
@ -68,17 +70,22 @@ INCLUDE_ASM(const s32, "P2/binoc", SetBinocAchzDraw);
INCLUDE_ASM(const s32, "P2/binoc", FDoneBinocAchz);
void SetBinocLookat(BINOC *binoc, ALO *paloLookat) {
void SetBinocLookat(BINOC *binoc, ALO *paloLookat)
{
binoc->paloLookat = paloLookat;
}
void SetBinocZoom(BINOC *binoc, float zoom) {
void SetBinocZoom(BINOC *binoc, float zoom)
{
float cappedZoom = zoom * 0.01f;
float one = 1.0f;
float zero = 0.0f;
if (cappedZoom < zero) {
if (cappedZoom < zero)
{
cappedZoom = zero;
} else if (cappedZoom > one) {
}
else if (cappedZoom > one)
{
cappedZoom = one;
}
binoc->zoom = cappedZoom;
@ -90,7 +97,8 @@ INCLUDE_ASM(const s32, "P2/binoc", FUN_00136648);
INCLUDE_ASM(const s32, "P2/binoc", DrawBinoc);
void GetBinocReticleFocus(BINOC *binoc, float *dxReticle, float *dyReticle) {
void GetBinocReticleFocus(BINOC *binoc, float *dxReticle, float *dyReticle)
{
*dxReticle = binoc->dxReticle + 320.0f;
*dyReticle = binoc->dyReticle + 180.40001f;
}