mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Properly decouple squirrel and game code. This makes it easier to reverse engineer more of this squirrel system, and to compile them as individual libraries later on when moving to CMake to significantly decrease compile times.
31 lines
530 B
C
31 lines
530 B
C
#ifndef SQSTATE_H
|
|
#define SQSTATE_H
|
|
#include "squirrel.h"
|
|
|
|
#pragma pack(push, 1)
|
|
struct SQSharedState
|
|
{
|
|
uint8_t gap0[17256];
|
|
#if !defined (GAMEDLL_S0) && !defined (GAMEDLL_S1) && !defined (GAMEDLL_S2)
|
|
uint8_t gap1[32];
|
|
#endif
|
|
void* _printfunc;
|
|
uint8_t gap4390[33];
|
|
SQChar _contextname[7];
|
|
};
|
|
#pragma pack(pop)
|
|
|
|
struct SQBufState
|
|
{
|
|
const SQChar* buf;
|
|
const SQChar* bufTail;
|
|
const SQChar* bufCopy;
|
|
|
|
SQBufState(const SQChar* code)
|
|
{
|
|
buf = code;
|
|
bufTail = code + strlen(code);
|
|
bufCopy = code;
|
|
}
|
|
};
|
|
#endif // SQSTATE_H
|