📄 srv.h
字号:
/* the public header file for project SRV */
#ifndef __SRV_H__
#define __SRV_H__
#include <stdio.h>
typedef unsigned long DWORD;
typedef unsigned short WORD;
typedef unsigned char BYTE;
extern FILE *in;
struct replay_sub_header_0 __attribute__ ((__packed__)) {
WORD minor_ver; // 0 so far
WORD major_ver; // For patch 1.xx
WORD build;
WORD flags; // 0x8000 in LAN/multi, 0x0000 in single
DWORD length_ms;
DWORD checksum; // CRC32 checksum of header
};
struct replay_sub_header_1 __attribute__ ((__packed__)) {
DWORD ver_str; // WAR3 or W3XP for normal vs. expansion
DWORD major_ver; // For patch 1.xx
WORD build;
WORD flags; // 0x8000 in LAN/multi, 0x0000 in single
DWORD length_ms;
DWORD checksum; // CRC32 checksum of header
};
struct replay_header __attribute__ ((__packed__)) {
char header[28]; // reads Warcraft III recorded game...
DWORD offset;
DWORD size;
DWORD header_ver;
DWORD uncomp_size;
DWORD blocks; // number of 8192K blocks
union {
struct replay_sub_header_0 sub_0;
struct replay_sub_header_1 sub_1;
};
};
struct replay_block_header __attribute__ ((__packed__)) {
WORD size;
WORD uncomp_size;
DWORD unknown; // possible checksum?
void *data;
};
struct slot_s {
int status; /* status == -1: not exist *
* 0: open *
* 1: closed *
* 2: computer *
* 3: observer *
* 4: player */
char *name;
};
#endif //__SRV_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -