git.ucc.asn.au
/
ipdf
/
code.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
369720106507f695ea2c5b26011b96f79a326ed9
[ipdf/code.git]
/
debugscript.h
1
#ifndef _DEBUGSCRIPT_H
2
#define _DEBUGSCRIPT_H
3
4
#include "real.h"
5
#include "view.h"
6
#include "screen.h"
7
#include <iostream>
8
#include <fstream>
9
10
namespace IPDF
11
{
12
13
class DebugScript
14
{
15
public:
16
void Load(const char *filename)
17
{
18
inp.open(filename);
19
}
20
bool Execute(View *view, Screen *scr);
21
private:
22
enum ActionType
23
{
24
AT_WaitFrame,
25
AT_Translate,
26
AT_Zoom,
27
AT_TranslatePx,
28
AT_ZoomPx,
29
AT_SetCPURendering,
30
AT_SetGPURendering,
31
AT_EnableLazyRendering,
32
AT_DisableLazyRendering,
33
AT_LoadSVG,
34
AT_Quit
35
};
36
37
struct Action
38
{
39
ActionType type;
40
Real x, y;
41
int ix, iy;
42
Real z;
43
int iz;
44
int loops;
45
std::string filename;
46
Action() : type(AT_WaitFrame), x(0), y(0), ix(0), iy(0), z(0), loops(0) {}
47
};
48
49
std::ifstream inp;
50
51
Action currentAction;
52
53
void ParseAction();
54
};
55
56
}
57
58
#endif
UCC
git Repository :: git.ucc.asn.au