isle-portable/LEGO1/omni/include/mxstring.h
Anonymous Maarten bb4db6caac
Use SDL3 functions in more locations (#44)
* Use strcasecmp, strncasecmp, strlwr, strupr and itoa from SDL

* Use SDL_GetTicks instead of timeGetTime

* Use MxDSFile::OPEN_READ instead of OF_READ

* Use SDL_IOStream to read bitmaps

* Use SDL_LogXXX instead of OutputDebugString

* Undo mxvideoparam.h change

* Revert "Undo mxvideoparam.h change"

This reverts commit 4a20cf6c46.

* Fix _MxTrace

* Reapply "Undo mxvideoparam.h change"

This reverts commit b3a09dc520.

* fix _MxTrace

* Use __declspec(dllexport) for exporting symbols from dll

Refactored CMake script such that all objects are passed to the lego1 library.

* clang-format

* fix msvc build

* MSVC fixed for real now?

* Forgot about d3drm_guid

* Fix naming issue

* Use Uint64 in LegoCarBuild::Tickle for dTime
2024-12-24 18:04:46 -07:00

54 lines
1.3 KiB
C++

#ifndef MXSTRING_H
#define MXSTRING_H
#include "lego1_export.h"
#include "mxcore.h"
// VTABLE: LEGO1 0x100dc110
// VTABLE: BETA10 0x101c1be0
// SIZE 0x10
class MxString : public MxCore {
public:
MxString();
MxString(const MxString& p_str);
MxString(const char* p_str);
MxString(const char* p_str, MxU16 p_maxlen);
LEGO1_EXPORT ~MxString() override;
void Reverse();
void ToUpperCase();
void ToLowerCase();
void NormalizePath() { NormalizePath(m_data); }
MxString& operator=(const MxString& p_str);
const MxString& operator=(const char* p_str);
MxString operator+(const MxString& p_str) const;
MxString operator+(const char* p_str) const;
MxString& operator+=(const char* p_str);
static void CharSwap(char* p_a, char* p_b);
static void NormalizePath(char* p_path);
// FUNCTION: BETA10 0x10017c50
char* GetData() const { return m_data; }
// FUNCTION: BETA10 0x10067630
const MxU16 GetLength() const { return m_length; }
// FUNCTION: BETA10 0x100d8a30
MxBool Equal(const MxString& p_str) const { return strcmp(m_data, p_str.m_data) == 0; }
// FUNCTION: BETA10 0x1012a810
MxS8 Compare(const MxString& p_str) const { return strcmp(m_data, p_str.m_data); }
// SYNTHETIC: LEGO1 0x100ae280
// SYNTHETIC: BETA10 0x1012c9d0
// MxString::`scalar deleting destructor'
private:
char* m_data; // 0x08
MxU16 m_length; // 0x0c
};
#endif // MXSTRING_H