mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-26 09:41:15 +00:00
Merge branch 'master' of https://github.com/isledecomp/isle into renaming
This commit is contained in:
commit
4111cb7275
@ -19,6 +19,7 @@ ContinuationIndentWidth: 4
|
|||||||
IncludeBlocks: Regroup
|
IncludeBlocks: Regroup
|
||||||
IndentAccessModifiers: false
|
IndentAccessModifiers: false
|
||||||
IndentWidth: 4
|
IndentWidth: 4
|
||||||
|
InsertNewlineAtEOF: true
|
||||||
PointerAlignment: Left
|
PointerAlignment: Left
|
||||||
SpaceAfterCStyleCast: true
|
SpaceAfterCStyleCast: true
|
||||||
TabWidth: 4
|
TabWidth: 4
|
||||||
|
|||||||
@ -25,7 +25,12 @@ This repository currently has only one goal: accuracy to the original executable
|
|||||||
|
|
||||||
In general, we're not exhaustively strict about coding style, but there are some preferable guidelines to follow that have been adopted from what we know about the original codebase:
|
In general, we're not exhaustively strict about coding style, but there are some preferable guidelines to follow that have been adopted from what we know about the original codebase:
|
||||||
|
|
||||||
- Indent: 2 spaces
|
### Formatting
|
||||||
|
|
||||||
|
We are currently using [clang-format](https://clang.llvm.org/docs/ClangFormat.html) with a configuration file that aims to replicate the code formatting employed by the original developers. There are [integrations](https://clang.llvm.org/docs/ClangFormat.html#vim-integration) available for most editors and IDEs. The required `clang-format` version is `17.x`.
|
||||||
|
|
||||||
|
### Naming conventions
|
||||||
|
|
||||||
- `PascalCase` for classes, function names, and enumerations.
|
- `PascalCase` for classes, function names, and enumerations.
|
||||||
- `m_camelCase` for member variables.
|
- `m_camelCase` for member variables.
|
||||||
- `g_camelCase` for global variables.
|
- `g_camelCase` for global variables.
|
||||||
|
|||||||
@ -18,4 +18,4 @@ Ambulance::Ambulance()
|
|||||||
this->m_unk172 = 0;
|
this->m_unk172 = 0;
|
||||||
this->m_unk13c = 40.0;
|
this->m_unk13c = 40.0;
|
||||||
this->m_unk17c = 1.0;
|
this->m_unk17c = 1.0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,4 +4,4 @@
|
|||||||
CarRace::CarRace()
|
CarRace::CarRace()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,4 +5,4 @@ extern const char* g_parseExtraTokens;
|
|||||||
extern const char* g_strWORLD;
|
extern const char* g_strWORLD;
|
||||||
extern const char* g_strACTION;
|
extern const char* g_strACTION;
|
||||||
|
|
||||||
#endif // DEFINE_H
|
#endif // DEFINE_H
|
||||||
|
|||||||
@ -9,4 +9,4 @@ DuneBuggy::DuneBuggy()
|
|||||||
{
|
{
|
||||||
this->m_unk13c = 25.0;
|
this->m_unk13c = 25.0;
|
||||||
this->m_unk164 = 1.0;
|
this->m_unk164 = 1.0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,4 +22,4 @@ GifMapEntry* GifMap::FindNode(const char*& string)
|
|||||||
current = current->m_left;
|
current = current->m_left;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,4 +66,4 @@ class GifManager : public GifManagerBase {
|
|||||||
undefined m_unk[0x1c];
|
undefined m_unk[0x1c];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GIFMANAGER_H
|
#endif // GIFMANAGER_H
|
||||||
|
|||||||
@ -8,4 +8,4 @@ Jetski::Jetski()
|
|||||||
this->m_unk13c = 25.0;
|
this->m_unk13c = 25.0;
|
||||||
this->m_unk150 = 2.0;
|
this->m_unk150 = 2.0;
|
||||||
this->m_unk148 = 1;
|
this->m_unk148 = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,4 +4,4 @@
|
|||||||
JukeBox::JukeBox()
|
JukeBox::JukeBox()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|||||||
@ -147,3 +147,4 @@ MxLong LegoEntity::Notify(MxParam& p)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,4 +4,4 @@
|
|||||||
LegoFlcTexturePresenter::LegoFlcTexturePresenter()
|
LegoFlcTexturePresenter::LegoFlcTexturePresenter()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|||||||
@ -236,4 +236,4 @@ void LegoInputManager::KillTimer()
|
|||||||
LegoOmni* omni = LegoOmni::GetInstance();
|
LegoOmni* omni = LegoOmni::GetInstance();
|
||||||
::KillTimer(omni->GetWindowHandle(), m_timer);
|
::KillTimer(omni->GetWindowHandle(), m_timer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,4 +3,4 @@
|
|||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
|
|
||||||
// Uncomment when member class variables are fleshed out.
|
// Uncomment when member class variables are fleshed out.
|
||||||
// DECOMP_SIZE_ASSERT(LegoMeterPresenter, 0x94); // 0x1000a163
|
// DECOMP_SIZE_ASSERT(LegoMeterPresenter, 0x94); // 0x1000a163
|
||||||
|
|||||||
@ -224,4 +224,4 @@ float LegoNavController::CalculateNewVel(float p_targetVel, float p_currentVel,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return newVel;
|
return newVel;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -164,4 +164,4 @@ void LegoPathActor::VTable0xa4()
|
|||||||
void LegoPathActor::VTable0xa8()
|
void LegoPathActor::VTable0xa8()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,4 +39,4 @@ LegoFileStream* LegoFileStream::FUN_10006030(MxString p_str)
|
|||||||
Write(data, (MxS16) fullLength);
|
Write(data, (MxS16) fullLength);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,4 +43,4 @@ struct MxAtomIdCounterCompare {
|
|||||||
|
|
||||||
class MxAtomIdCounterSet : public set<MxAtomIdCounter*, MxAtomIdCounterCompare> {};
|
class MxAtomIdCounterSet : public set<MxAtomIdCounter*, MxAtomIdCounterCompare> {};
|
||||||
|
|
||||||
#endif // MXATOMIDCOUNTER_H
|
#endif // MXATOMIDCOUNTER_H
|
||||||
|
|||||||
@ -75,4 +75,4 @@ MxResult MxAudioManager::InitPresenters()
|
|||||||
void MxAudioManager::Destroy()
|
void MxAudioManager::Destroy()
|
||||||
{
|
{
|
||||||
Destroy(FALSE);
|
Destroy(FALSE);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -105,4 +105,4 @@ void MxBackgroundAudioManager::DestroyMusic()
|
|||||||
Streamer()->Close(m_script.GetInternal());
|
Streamer()->Close(m_script.GetInternal());
|
||||||
m_musicEnabled = FALSE;
|
m_musicEnabled = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,4 +4,4 @@
|
|||||||
MxCompositeMediaPresenter::MxCompositeMediaPresenter()
|
MxCompositeMediaPresenter::MxCompositeMediaPresenter()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,4 +11,4 @@ MxControlPresenter::MxControlPresenter()
|
|||||||
this->m_unk52 = 0;
|
this->m_unk52 = 0;
|
||||||
this->m_unk58 = 0;
|
this->m_unk58 = 0;
|
||||||
this->m_unk54 = 0;
|
this->m_unk54 = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,4 +20,4 @@ void MxDSActionList::Destroy(MxDSAction* p_action)
|
|||||||
{
|
{
|
||||||
if (p_action)
|
if (p_action)
|
||||||
delete p_action;
|
delete p_action;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,4 +38,4 @@ MxDSAction* MxDSAnim::Clone()
|
|||||||
*clone = *this;
|
*clone = *this;
|
||||||
|
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,4 +38,4 @@ MxDSAction* MxDSEvent::Clone()
|
|||||||
*clone = *this;
|
*clone = *this;
|
||||||
|
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,4 +91,4 @@ void MxDSMediaAction::CopyMediaSrcPath(const char* p_mediaSrcPath)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
this->m_mediaSrcPath = NULL;
|
this->m_mediaSrcPath = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -151,4 +151,4 @@ void MxDSMultiAction::SetAtomId(MxAtomId p_atomId)
|
|||||||
MxDSAction* action;
|
MxDSAction* action;
|
||||||
while (cursor.Next(action))
|
while (cursor.Next(action))
|
||||||
action->SetAtomId(p_atomId);
|
action->SetAtomId(p_atomId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -191,4 +191,4 @@ MxDSObject* DeserializeDSObjectDispatch(char** p_source, MxS16 p_flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -84,4 +84,4 @@ MxLong MxDSParallelAction::GetDuration()
|
|||||||
this->m_duration *= this->m_loopCount;
|
this->m_duration *= this->m_loopCount;
|
||||||
|
|
||||||
return this->m_duration;
|
return this->m_duration;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -129,4 +129,4 @@ void MxDSSelectAction::Deserialize(char** p_source, MxS16 p_unk24)
|
|||||||
}
|
}
|
||||||
|
|
||||||
*p_source += extraFlag;
|
*p_source += extraFlag;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,4 +78,4 @@ MxLong MxDSSerialAction::GetDuration()
|
|||||||
}
|
}
|
||||||
|
|
||||||
return this->m_duration;
|
return this->m_duration;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,4 +60,4 @@ MxDSAction* MxDSSound::Clone()
|
|||||||
*clone = *this;
|
*clone = *this;
|
||||||
|
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,4 +38,4 @@ MxDSAction* MxDSStill::Clone()
|
|||||||
*clone = *this;
|
*clone = *this;
|
||||||
|
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,4 +89,4 @@ void MxDSStreamingAction::FUN_100CD2D0()
|
|||||||
|
|
||||||
this->m_duration -= duration;
|
this->m_duration -= duration;
|
||||||
this->m_unka8 += duration;
|
this->m_unka8 += duration;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,10 +42,8 @@ class HashTableParent : public MxCore {
|
|||||||
m_customDestructor = Destroy;
|
m_customDestructor = Destroy;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100afd30
|
|
||||||
static void Destroy(T*){};
|
static void Destroy(T*){};
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100afcd0
|
|
||||||
virtual MxS8 Compare(T*, T*) = 0;
|
virtual MxS8 Compare(T*, T*) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -72,7 +70,6 @@ class MxHashTable : protected HashTableParent<T> {
|
|||||||
|
|
||||||
virtual MxS8 Compare(T*, T*) = 0;
|
virtual MxS8 Compare(T*, T*) = 0;
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100afdc0
|
|
||||||
virtual MxU32 Hash(T*) = 0;
|
virtual MxU32 Hash(T*) = 0;
|
||||||
|
|
||||||
// FIXME: use of friend here?
|
// FIXME: use of friend here?
|
||||||
@ -154,7 +151,6 @@ class MxHashTableCursor : public MxCore {
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
// OFFSET: LEGO1 0x100b0bd0
|
|
||||||
MxHashTable<T>::~MxHashTable()
|
MxHashTable<T>::~MxHashTable()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < m_numSlots; i++) {
|
for (int i = 0; i < m_numSlots; i++) {
|
||||||
@ -175,7 +171,6 @@ MxHashTable<T>::~MxHashTable()
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
// OFFSET: LEGO1 0x100b7ab0
|
|
||||||
inline void MxHashTable<T>::Resize()
|
inline void MxHashTable<T>::Resize()
|
||||||
{
|
{
|
||||||
// Save a reference to the current table
|
// Save a reference to the current table
|
||||||
@ -185,10 +180,10 @@ inline void MxHashTable<T>::Resize()
|
|||||||
|
|
||||||
switch (m_resizeOption) {
|
switch (m_resizeOption) {
|
||||||
case HASH_TABLE_OPT_EXPAND_ADD:
|
case HASH_TABLE_OPT_EXPAND_ADD:
|
||||||
m_numSlots = old_size + m_increaseAmount;
|
m_numSlots += m_increaseAmount;
|
||||||
break;
|
break;
|
||||||
case HASH_TABLE_OPT_EXPAND_MULTIPLY:
|
case HASH_TABLE_OPT_EXPAND_MULTIPLY:
|
||||||
m_numSlots = old_size * m_increaseFactor;
|
m_numSlots *= m_increaseFactor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,7 +207,6 @@ inline void MxHashTable<T>::Resize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
// OFFSET: LEGO1 0x100b7b80
|
|
||||||
inline void MxHashTable<T>::_NodeInsert(MxHashTableNode<T>* p_node)
|
inline void MxHashTable<T>::_NodeInsert(MxHashTableNode<T>* p_node)
|
||||||
{
|
{
|
||||||
int bucket = p_node->m_hash % m_numSlots;
|
int bucket = p_node->m_hash % m_numSlots;
|
||||||
|
|||||||
@ -65,4 +65,4 @@ class MxMatrixData : public MxMatrix {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXMATRIX_H
|
#endif // MXMATRIX_H
|
||||||
|
|||||||
@ -99,4 +99,4 @@ void MxMediaManager::StopPresenters()
|
|||||||
|
|
||||||
while (cursor.Next(presenter))
|
while (cursor.Next(presenter))
|
||||||
presenter->EndAction();
|
presenter->EndAction();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,4 +36,4 @@ void MxMIDIPresenter::DoneTickle()
|
|||||||
if (!MusicManager()->GetMIDIInitialized()) {
|
if (!MusicManager()->GetMIDIInitialized()) {
|
||||||
this->EndAction();
|
this->EndAction();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -143,4 +143,4 @@ MxResult MxMusicManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
|||||||
m_criticalSection.Leave();
|
m_criticalSection.Leave();
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,4 +40,4 @@ class MxMusicManager : public MxAudioManager {
|
|||||||
void InitData();
|
void InitData();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXMUSICMANAGER_H
|
#endif // MXMUSICMANAGER_H
|
||||||
|
|||||||
@ -186,4 +186,4 @@ MxResult MxNotificationManager::Send(MxCore* p_listener, MxNotificationParam* p_
|
|||||||
}
|
}
|
||||||
|
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,4 +37,4 @@ MxBool MxRegion::vtable20()
|
|||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,4 +26,4 @@ void MxSemaphore::Wait(MxU32 p_timeoutMS)
|
|||||||
void MxSemaphore::Release(MxU32 p_releaseCount)
|
void MxSemaphore::Release(MxU32 p_releaseCount)
|
||||||
{
|
{
|
||||||
ReleaseSemaphore(m_hSemaphore, p_releaseCount, NULL);
|
ReleaseSemaphore(m_hSemaphore, p_releaseCount, NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,4 +21,4 @@ class MxSemaphore {
|
|||||||
HANDLE m_hSemaphore;
|
HANDLE m_hSemaphore;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MX_SEMAPHORE_H
|
#endif // MX_SEMAPHORE_H
|
||||||
|
|||||||
@ -184,4 +184,4 @@ MxStreamerSubClass1::MxStreamerSubClass1(undefined4 size)
|
|||||||
for (int i = 0; i >= 0; i--) {
|
for (int i = 0; i >= 0; i--) {
|
||||||
ptr[i] = 0;
|
ptr[i] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,4 +96,4 @@ MxResult MxTickleThread::Run()
|
|||||||
Sleep(timeRemainingMS);
|
Sleep(timeRemainingMS);
|
||||||
}
|
}
|
||||||
return MxThread::Run();
|
return MxThread::Run();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
#include "mxtype17notificationparam.h"
|
#include "mxtype17notificationparam.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(MxType17NotificationParam, 0x2c)
|
DECOMP_SIZE_ASSERT(MxType17NotificationParam, 0x2c)
|
||||||
|
|||||||
@ -17,4 +17,4 @@ class MxType17NotificationParam : public MxNotificationParam {
|
|||||||
MxU16 m_unk28;
|
MxU16 m_unk28;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXTYPE17NOTIFICATIONPARAM_H
|
#endif // MXTYPE17NOTIFICATIONPARAM_H
|
||||||
|
|||||||
@ -35,4 +35,4 @@ class MxUnkList {
|
|||||||
MxU32 m_count;
|
MxU32 m_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXUNKLIST_H
|
#endif // MXUNKLIST_H
|
||||||
|
|||||||
@ -21,4 +21,13 @@ class MxVariableTable : public MxHashTable<MxVariable> {
|
|||||||
virtual MxU32 Hash(MxVariable*); // +0x18
|
virtual MxU32 Hash(MxVariable*); // +0x18
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100b0bd0 TEMPLATE
|
||||||
|
// MxHashTable<MxVariable>::~MxHashTable<MxVariable>
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100b7ab0 TEMPLATE
|
||||||
|
// MxHashTable<MxVariable>::Resize
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100b7b80 TEMPLATE
|
||||||
|
// MxHashTable<MxVariable>::_NodeInsert
|
||||||
|
|
||||||
#endif // MXVARIABLETABLE_H
|
#endif // MXVARIABLETABLE_H
|
||||||
|
|||||||
@ -10,4 +10,4 @@ PizzaMissionStateEntry* PizzaMissionState::GetState(MxU8 id)
|
|||||||
if (m_state[i].m_id == id)
|
if (m_state[i].m_id == id)
|
||||||
return m_state + i;
|
return m_state + i;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,4 +20,4 @@ RaceStateEntry* RaceState::GetState(MxU8 id)
|
|||||||
if (m_state[i].m_id == id)
|
if (m_state[i].m_id == id)
|
||||||
return m_state + i;
|
return m_state + i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,4 +4,4 @@
|
|||||||
Radio::~Radio()
|
Radio::~Radio()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|||||||
@ -324,4 +324,4 @@ MxBool Score::VTable0x64()
|
|||||||
DeleteScript();
|
DeleteScript();
|
||||||
m_unkf8 = 2;
|
m_unkf8 = 2;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user