Niotso  git revision 558726a9f13d7c3423a683dd2f4323589b66c310
The New Implementation of The Sims Online
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Macros | Enumerations | Functions | Variables
hitutils.h File Reference

Go to the source code of this file.

Classes

struct  instruction_t
 
struct  variable_t
 
struct  ByteReaderContext
 

Macros

#define min(x, y)   ((x) < (y) ? (x) : (y))
 
#define max(x, y)   ((x) > (y) ? (x) : (y))
 
#define read_uint32(x)   (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*2)) | ((x)[3]<<(8*3)))
 
#define read_uint16(x)   (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)))
 
#define write_uint32(dest, src)
 
#define write_uint16(dest, src)
 
#define OPERAND_BYTES(x)   (x)
 
#define OPERAND(x, y)   ((y)<<((x)*4+4))
 
#define UNIMPLEMENTED   ((uint32_t)~0)
 
#define InstructionCount   96
 
#define TSOVariableCount   82
 
#define TS1VariableCount   87
 
#define ConstantCount   72
 

Enumerations

enum  { VERSION_TS1 = 1, VERSION_TSO }
 
enum  operand_t {
  o_byte = 1, o_dword, o_address, o_variable,
  o_jump
}
 

Functions

char * strdup (const char *__s)
 
static void Shutdown ()
 
static void Shutdown_M (const char *Message,...)
 

Variables

static const uint8_t HITHeader [] = {'H','I','T','!',0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,'T','R','A','X'}
 
static const instruction_t Instructions []
 
static const variable_t TSOVariables []
 
static const variable_t TS1Variables []
 
static const variable_t Constants []
 
static const char SHStringTable []
 
static const uint8_t SymbolTableHeader []
 

Macro Definition Documentation

#define ConstantCount   72
#define InstructionCount   96
#define max (   x,
 
)    ((x) > (y) ? (x) : (y))
#define min (   x,
 
)    ((x) < (y) ? (x) : (y))
#define OPERAND (   x,
 
)    ((y)<<((x)*4+4))
#define OPERAND_BYTES (   x)    (x)
#define read_uint16 (   x)    (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)))
#define read_uint32 (   x)    (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*2)) | ((x)[3]<<(8*3)))
#define TS1VariableCount   87
#define TSOVariableCount   82
#define UNIMPLEMENTED   ((uint32_t)~0)
#define write_uint16 (   dest,
  src 
)
Value:
do {\
(dest)[0] = ((src)&0x00FF)>>(8*0); \
(dest)[1] = ((src)&0xFF00)>>(8*1); \
} while(0)
#define write_uint32 (   dest,
  src 
)
Value:
do {\
(dest)[0] = ((src)&0x000000FF)>>(8*0); \
(dest)[1] = ((src)&0x0000FF00)>>(8*1); \
(dest)[2] = ((src)&0x00FF0000)>>(8*2); \
(dest)[3] = ((src)&0xFF000000)>>(8*3); \
} while(0)

Enumeration Type Documentation

anonymous enum
Enumerator
VERSION_TS1 
VERSION_TSO 
enum operand_t
Enumerator
o_byte 
o_dword 
o_address 
o_variable 
o_jump 

Function Documentation

static void Shutdown ( )
static
static void Shutdown_M ( const char *  Message,
  ... 
)
static
char* strdup ( const char *  __s)

Variable Documentation

const variable_t Constants[]
static
const uint8_t HITHeader[] = {'H','I','T','!',0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,'T','R','A','X'}
static
const instruction_t Instructions[]
static
const char SHStringTable[]
static
Initial value:
=
"\0.text"
"\0.shstrtab"
"\0.symtab"
"\0.strtab"
"\0.rel.text"
const uint8_t SymbolTableHeader[]
static
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xF1, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00
}
const variable_t TS1Variables[]
static
const variable_t TSOVariables[]
static