-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
89 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include "AOptions.h" | ||
|
||
TPCCHAR AOptions::sm_szOptionsDir = TNULL; | ||
TPCCHAR AOptions::sm_szOptionsName = "Options"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#pragma once | ||
#include "Toshi/Defines.h" | ||
#include "PPropertyParser/PProperties.h" | ||
|
||
class AOptions | ||
{ | ||
public: | ||
enum Result | ||
{ | ||
|
||
}; | ||
|
||
TINT GetAutoSaveState() const | ||
{ | ||
return m_iAutoSaveState; | ||
} | ||
|
||
private: | ||
static TPCCHAR sm_szOptionsName; | ||
static TPCCHAR sm_szOptionsDir; | ||
static const TINT sm_iSlot = -1; | ||
static const TINT sm_iPort = -1; | ||
|
||
TINT m_iAutoSaveState; // 0x1C | ||
PProperty *m_pCurProps; // 0x24 | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,53 @@ | ||
#pragma once | ||
#include "Defines.h" | ||
#include "TKernel/TObject.h" | ||
#include "TFreeList.h" | ||
#include "TQList.h" | ||
#include "PPropertyValue.h" | ||
#include "PPropertyName.h" | ||
#include "TPCString.h" | ||
|
||
class PPROPERTYPARSER_EXPORTS PProperty : public Toshi::TQList<PProperty>::TNode | ||
class PPROPERTYPARSER_EXPORTS PProperties : Toshi::TObject | ||
{ | ||
DECLARE_FREELIST(PProperty) | ||
DECLARE_DYNAMIC(PProperties) | ||
|
||
public: | ||
class PPROPERTYPARSER_EXPORTS PProperty : public Toshi::TQList<PProperty>::TNode | ||
{ | ||
DECLARE_FREELIST(PProperty) | ||
|
||
void SetLine(TINT a_iLine) { m_iLine = a_iLine; } | ||
public: | ||
|
||
TINT GetLine() const { return m_iLine; } | ||
const PPropertyName& GetName() const { return m_oName; } | ||
const PPropertyValue& GetValue() const { return m_oValue; } | ||
void SetLine(TINT a_iLine) { m_iLine = a_iLine; } | ||
|
||
private: | ||
// 0x0 m_pNext | ||
// 0x4 m_pPrev | ||
PPropertyName m_oName; // 0x8 | ||
PPropertyValue m_oValue; // 0x10 | ||
TINT m_iLine; // 0x18 | ||
Toshi::TPCString m_sComment; // 0x1C | ||
TINT GetLine() const { return m_iLine; } | ||
const PPropertyName &GetName() const { return m_oName; } | ||
const PPropertyValue &GetValue() const { return m_oValue; } | ||
|
||
private: | ||
// 0x0 m_pNext | ||
// 0x4 m_pPrev | ||
PPropertyName m_oName; // 0x8 | ||
PPropertyValue m_oValue; // 0x10 | ||
TINT m_iLine; // 0x18 | ||
Toshi::TPCString m_sComment; // 0x1C | ||
}; | ||
|
||
PProperties() | ||
{ | ||
m_pParentProps = TNULL; | ||
m_iPropCount = 0; | ||
} | ||
|
||
PProperties(PProperties *a_pParentProps) | ||
{ | ||
m_pParentProps = a_pParentProps; | ||
m_iPropCount = 0; | ||
} | ||
|
||
const PProperty *FindProperty(const Toshi::TPCString &a_szProperty, Toshi::TQList<PProperty>::Iterator &a_oProperties); | ||
|
||
PProperties *m_pParentProps; // 0x8 | ||
Toshi::TQList<PProperty> m_oPropsQueue; // 0xC | ||
TINT m_iPropCount; //0x14 | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
#include "PPropertyParser/PProperties.h" | ||
|
||
IMPLEMENT_FREELIST(PProperty, 0, 8) | ||
TOSHI_NAMESPACE_USING | ||
|
||
IMPLEMENT_FREELIST(PProperties::PProperty, 0, 8) | ||
IMPLEMENT_DYNCREATE(PProperties, TObject) | ||
|
||
const PProperties::PProperty *PProperties::FindProperty(const Toshi::TPCString &a_szProperty, TQList<PProperty>::Iterator &a_oProperties) | ||
{ | ||
for (auto it = a_oProperties; it != m_oPropsQueue.End(); it++) { | ||
} | ||
return nullptr; | ||
} |