Tomb Raider Script Loader Unit Test.
More...
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <zlib.h>
#include "global.h"
#include "Script.h"
#include "ScriptTest.h"
Go to the source code of this file.
|
static int | printDataScript (Script &s, bool strings) |
|
static int | test (const char *file, unsigned int n) |
|
static int | readPayloadChunk (const unsigned char *data, unsigned int size, const char *file) |
|
static int | runForPayload (unsigned int n, bool print, bool printData) |
|
int | main (int argc, char *argv[]) |
|
Tomb Raider Script Loader Unit Test.
- Author
- xythobuz
Definition in file Script.cpp.
#define printStrings |
( |
|
cnt, |
|
|
|
acc, |
|
|
|
name |
|
) |
| |
Value:{ \
std::cout << name << " (" << cnt << ")" << std::endl; \
for (unsigned int i = 0; i < cnt; i++) { \
std::cout << " " << acc(i) << std::endl; \
} \
std::cout << std::endl; \
}
Definition at line 17 of file Script.cpp.
#define printStrings2D |
( |
|
c, |
|
|
|
cnt, |
|
|
|
acc, |
|
|
|
name |
|
) |
| |
Value:{ \
std::cout << name << " (" << c << "*" << cnt << ")" << std::endl; \
for (unsigned int a = 0; a < cnt; a++) { \
std::cout << " "; \
for (unsigned int i = 0; i < c; i++) { \
std::cout << acc(i, a); \
if (i < (c - 1)) \
std::cout << " | "; \
} \
std::cout << std::endl; \
} \
std::cout << std::endl; \
}
Definition at line 25 of file Script.cpp.
#define registerLambda |
( |
|
x, |
|
|
|
y |
|
) |
| |
Value:{ \
s.registerScriptHandler(x, [](bool hasOperand, uint16_t operand) { \
std::cout << "\t" << y; \
if (hasOperand) \
std::cout << " (" << operand << ")"; \
std::cout << std::endl; \
return 0; \
}); \
}
Definition at line 39 of file Script.cpp.
static int printDataScript |
( |
Script & |
s, |
|
|
bool |
strings |
|
) |
| |
|
static |
static int test |
( |
const char * |
file, |
|
|
unsigned int |
n |
|
) |
| |
|
static |
static int readPayloadChunk |
( |
const unsigned char * |
data, |
|
|
unsigned int |
size, |
|
|
const char * |
file |
|
) |
| |
|
static |
static int runForPayload |
( |
unsigned int |
n, |
|
|
bool |
print, |
|
|
bool |
printData |
|
) |
| |
|
static |
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |