Skip to content

Commit

Permalink
PSMainSide_CreaturePrm progress
Browse files Browse the repository at this point in the history
  • Loading branch information
PikHacker committed Sep 29, 2023
1 parent 145f57c commit e24b94e
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 489 deletions.
4 changes: 2 additions & 2 deletions docs/recommended_todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@
### <section id="utilityU">utilityU</section>
| File | Size (bytes) | File | Size (bytes) |
| ---- | ---- | ---- | ---- |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_ObjCalc.cpp">PSMainSide_ObjCalc.cpp</a> | 9412 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/menu.cpp">menu.cpp</a> | 13538 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_CreaturePrm.cpp">PSMainSide_CreaturePrm.cpp</a> | 14244 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_TrackMap.cpp">PSMainSide_TrackMap.cpp</a> | 17206 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_CreaturePrm.cpp">PSMainSide_CreaturePrm.cpp</a> | 4104 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_ObjCalc.cpp">PSMainSide_ObjCalc.cpp</a> | 9412 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/menu.cpp">menu.cpp</a> | 13538 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_TrackMap.cpp">PSMainSide_TrackMap.cpp</a> | 17206 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_BossMgr.cpp">PSMainSide_BossMgr.cpp</a> | 19867 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_Sound.cpp">PSMainSide_Sound.cpp</a> | 28263 |


8 changes: 8 additions & 0 deletions include/JSystem/JUtility/JUTException.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,14 @@ struct JUTException : public JKRThread {
} \
P2ASSERTLINE(line, check##line)

// Used in PSMainSide_CreaturePrm
#define P2ASSERTBOUNDSLINE2(line, lowerLimitExclusive, var, upperLimitInclusive) \
bool check##line = false; \
if (var > lowerLimitExclusive && var <= upperLimitInclusive) { \
check##line = true; \
} \
P2ASSERTLINE(line, check##line)

#define P2ASSERTBOUNDSINCLUSIVELINE(line, lowerLimitInclusive, var, upperLimitInclusive) \
bool check##line = false; \
if (lowerLimitInclusive <= var && var <= upperLimitInclusive) { \
Expand Down
11 changes: 9 additions & 2 deletions include/PSM/CreaturePrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@
#define _PSM_CREATUREPRM_H

#include "PSSystem/PSCommon.h"
#include "PSGame/SoundTable.h"

namespace PSM {
struct CreaturePrm : public PSSystem::SingletonBase<CreaturePrm> {
CreaturePrm(); // inlined/unused
CreaturePrm()
{
sInstance = this;
mPersp.set(1.0f, 400.0f, 0.8f, 700.0f, 0.0f);
}

virtual ~CreaturePrm(); // _08 (weak)
virtual ~CreaturePrm() { } // _08 (weak)

// _00 = VTBL
PSGame::SoundTable::SePerspInfo mPersp; // _04
};

} // namespace PSM

#endif
14 changes: 11 additions & 3 deletions include/PSM/THPDinamics.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,29 @@ enum THP_ID {
PLAY_5 = 9,
PLAY_6 = 10,
CRIME = 11,
THP_COUNT = 12,
};

struct THPDemoDinamics {
f32 _00;
f32 _04;
f32 _08;
bool mEnableDyn;
char* mName;
};

struct THPDinamicsProc {
THPDinamicsProc(); // inlined/unused

void setSetting(THP_ID);
void setSetting(THPDemoDinamics*);
f32 dinamics(f32);
void setSetting(THP_ID id);
void setSetting(THPDemoDinamics* dyn);
f32 dinamics(f32 input);

void complessor(f32);

inline f32 doAudioDinamics(u16 vol, int val) { return 32768.0f * dinamics((vol * val >> 15) / 32768.0f); }

THPDemoDinamics* mDemoInfo; // _00
};

extern THPDinamicsProc sTHPDinamicsProc;
Expand Down
Loading

0 comments on commit e24b94e

Please sign in to comment.