-
Notifications
You must be signed in to change notification settings - Fork 1
/
tibiamovie.h
147 lines (120 loc) · 3.56 KB
/
tibiamovie.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
/*
* tibiamovie.h: duh?
*
* Copyright 2005
* See the COPYING file for more information on licensing and use.
*
*/
#define TIBIAMOVIE_VERSION "0.3.3"
#define MOVIEVERSION 2
#define TIBIAPORT 7171
#define WM_SOCKET_RECORD (WM_USER + 1)
#define WM_SOCKET_PLAY (WM_USER + 2)
#define RECORD_CHUNK_DATA 0x00
#define RECORD_CHUNK_MARKER 0x01
#define MENU_FILE_EXIT 300
#define MENU_FILE_MERGE 301
#define MENU_OPTIONS_COMPAT_MODE 302
#define MENU_OPTIONS_OLD_CLIENT 303
#define MENU_HELP_ABOUT 304
#define MERGE_ADD 100
#define MERGE_LIST 101
#define MERGE_STATIC 102
#define MERGE_TO 103
#define MERGE_STATIC2 104
#define MERGE_UP 105
#define MERGE_DOWN 106
#define MERGE_DEL 107
extern HWND wMain;
extern HWND btnRecord;
extern HWND btnServers;
extern HWND btnAddMarker;
extern HWND btnGoToMarker;
extern char saveFile[512];
extern int memorySaveCnt;
extern int debug;
extern int compatmode;
extern int oldtibia;
extern unsigned long int lastDraw;
/* proxy.c */
void ProxyAccept(HWND hwnd, int socket);
void ProxyHandleServer(HWND hwnd, char *buf);
extern int TibiaVersionFound;
//extern FILE *fp;
extern FILE * fpRecord;
#define MODE_NONE 0
#define MODE_PLAY 1
#define MODE_RECORD 2
#define MODE_RECORD_PAUSE 3
extern int mode;
extern unsigned int recordStart;
#define UMIN(a, b) ((a) < (b) ? (a) : (b))
#define UMAX(a, b) ((a) > (b) ? (a) : (b))
/* play.c */
extern int sockPlayListenCharacter;
extern int sockPlayClientCharacter;
extern int sockPlayListenServer;
extern int sockPlayClientServer;
extern char playFilename[512];
extern gzFile fpPlay;
extern int bytesPlayed;
extern int playSpeed;
extern int playing;
extern int abortPlayThread;
extern unsigned int msPlayed;
extern unsigned int msTotal;
extern int fastForwarding;
extern int *playMarkers;
extern int playMarkersCnt;
extern int nextPacket;
extern int numPackets;
extern int curPacket;
void PlayListen(int port, int *sock);
void PlayStart(void);
void PlayEnd(void);
void PlayAccept(int fromsock, int *tosock);
void PlaySendMotd(void);
void Play(void* nothing);
void DoSocketPlay(HWND hwnd, int wEvent, int wError, int sock);
void SendStatusMessage(int sock, char *message);
char *duration(unsigned int dur, char *dest);
/* end play.c */
/* memory.c */
extern int memoryActivated;
void MemoryInjectionSearch(int toggle);
void MemoryInjection(int toggle);
int AdjustPrivileges(void);
/* end memory.c */
/* main.c */
extern int mode;
void FindUnusedMovieName(void);
extern HBRUSH brushBlack, brushBlue, brushLtBlue, brushGrey, brushYellow, brushWhite;
extern HINSTANCE hInstance;
char *szClassName;
/* end main.c */
/* record.c */
struct serverData
{
unsigned long ip;
short port;
char characterName[128];
short characterLength;
};
extern struct serverData servers[1000];
extern int bytesRecorded;
extern int numMarkers;
extern char *loginservers[];
extern char customloginserver[64];
extern int loginserver_last;
void RecordFillServerBox(void);
void RecordData(unsigned char *buf, short len);
void RecordStart(void);
void RecordEnd(void);
void RecordDisconnect(void);
void DoSocketRecord(HWND hwnd, int wEvent, int wError, int sock);
void RecordAddMarker(void);
LRESULT CALLBACK RecordChooseServerProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
/* end record.c */
/* merge.c */
BOOL CALLBACK MergeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
/* end merge.c */