annotate MM7.h @ 968:96f7beed452f

m
author Ritor1
date Wed, 08 May 2013 09:45:49 +0600
parents 016e3577865c
children c45d51b3f4f4
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2 #include "OSAPI.h"
Ritor1
parents:
diff changeset
3 #include <math.h>
Ritor1
parents:
diff changeset
4 #include <stdio.h>
Ritor1
parents:
diff changeset
5 #include <stdarg.h>
Ritor1
parents:
diff changeset
6 #include <string>
Ritor1
parents:
diff changeset
7
Ritor1
parents:
diff changeset
8 typedef unsigned int uint;
Ritor1
parents:
diff changeset
9 #define LOWORD(a) (*((unsigned short *)&a))
Ritor1
parents:
diff changeset
10 #define HIWORD(a) (*((unsigned short *)&a + 1))
Ritor1
parents:
diff changeset
11 #define SHIWORD(a) (*((short *)&a + 1))
Ritor1
parents:
diff changeset
12
Ritor1
parents:
diff changeset
13 #define LODWORD(a) (*((unsigned int *)&a))
Ritor1
parents:
diff changeset
14 #define HIDWORD(a) (*((unsigned int *)&a + 1))
Ritor1
parents:
diff changeset
15 #define SLODWORD(a) (*((int *)&a))
Ritor1
parents:
diff changeset
16 #define SHIDWORD(a) (*((int *)&a + 1))
Ritor1
parents:
diff changeset
17
Ritor1
parents:
diff changeset
18 #define LOBYTE(a) (*((unsigned char *)&a))
Ritor1
parents:
diff changeset
19 #define HIBYTE(a) (*((unsigned char *)&a + sizeof(a) - 1))
Ritor1
parents:
diff changeset
20 #define BYTE1(a) (*((unsigned char *)&a + 1))
Ritor1
parents:
diff changeset
21 #define BYTE2(a) (*((unsigned char *)&a + 2))
Ritor1
parents:
diff changeset
22 #define BYTE3(a) (*((unsigned char *)&a + 3))
Ritor1
parents:
diff changeset
23
823
c1da83d8223f More spell renames
Nomad
parents: 786
diff changeset
24 #define PID(type, id) (unsigned int)((((8 * (id))) | (type)) & 0xFFFF) // packed id
828
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 823
diff changeset
25 #define PID_TYPE(pid) (unsigned int)((pid) & 7) // extract type
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 823
diff changeset
26 #define PID_ID(pid) (unsigned int)(((pid) & 0xFFFF) >> 3) // extract value
823
c1da83d8223f More spell renames
Nomad
parents: 786
diff changeset
27
0
Ritor1
parents:
diff changeset
28
Ritor1
parents:
diff changeset
29 typedef unsigned __int16 _WORD;
Ritor1
parents:
diff changeset
30 typedef unsigned __int64 _QWORD;
Ritor1
parents:
diff changeset
31
Ritor1
parents:
diff changeset
32
Ritor1
parents:
diff changeset
33 #include "VectorTypes.h"
Ritor1
parents:
diff changeset
34 #include "IndoorCameraD3D.h"
Ritor1
parents:
diff changeset
35
Ritor1
parents:
diff changeset
36
Ritor1
parents:
diff changeset
37
Ritor1
parents:
diff changeset
38
Ritor1
parents:
diff changeset
39
Ritor1
parents:
diff changeset
40
Ritor1
parents:
diff changeset
41
Ritor1
parents:
diff changeset
42 /* 288 */
938
016e3577865c stru289 removed, some data movements
Nomad
parents: 900
diff changeset
43 /*#pragma pack(push, 1)
0
Ritor1
parents:
diff changeset
44 struct CheckHRESULT_stru0
Ritor1
parents:
diff changeset
45 {
Ritor1
parents:
diff changeset
46 void CheckHRESULT(HRESULT a2, const char *Str, int a4, unsigned int uType);
Ritor1
parents:
diff changeset
47 void *_466D09_xcpt_string(std::string a2, const char *Str, int a4);
Ritor1
parents:
diff changeset
48 void ShowMessageBox(std::string *a0, std::string lpCaption, UINT uType, std::string lpText, int line);
Ritor1
parents:
diff changeset
49 char ddraw_error(HRESULT hr, char *Str, size_t a3);
Ritor1
parents:
diff changeset
50 char dinput_error(int a1, const char *Str, int a3);
Ritor1
parents:
diff changeset
51
Ritor1
parents:
diff changeset
52 void (__thiscall ***vdestructor_ptr)(CheckHRESULT_stru0 *, bool);
Ritor1
parents:
diff changeset
53 };
938
016e3577865c stru289 removed, some data movements
Nomad
parents: 900
diff changeset
54 #pragma pack(pop)*/
0
Ritor1
parents:
diff changeset
55
Ritor1
parents:
diff changeset
56
Ritor1
parents:
diff changeset
57
Ritor1
parents:
diff changeset
58
Ritor1
parents:
diff changeset
59 /* 297 */
Ritor1
parents:
diff changeset
60 enum SoundType
Ritor1
parents:
diff changeset
61 {
Ritor1
parents:
diff changeset
62 SOUND_EndTurnBasedMode = 0xCE,
Ritor1
parents:
diff changeset
63 SOUND_StartTurnBasedMode = 0xCF,
Ritor1
parents:
diff changeset
64 SOUND_FlipOnExit = 0x4E21,
Ritor1
parents:
diff changeset
65 };
Ritor1
parents:
diff changeset
66
Ritor1
parents:
diff changeset
67
Ritor1
parents:
diff changeset
68
Ritor1
parents:
diff changeset
69 /* 362 */
Ritor1
parents:
diff changeset
70 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
71 struct TravelInfo
Ritor1
parents:
diff changeset
72 {
Ritor1
parents:
diff changeset
73 char uMapID;
Ritor1
parents:
diff changeset
74 char pSchedule[7];
Ritor1
parents:
diff changeset
75 char uDaysCount;
Ritor1
parents:
diff changeset
76 char field_9[3];
Ritor1
parents:
diff changeset
77 int x;
Ritor1
parents:
diff changeset
78 int y;
Ritor1
parents:
diff changeset
79 int z;
Ritor1
parents:
diff changeset
80 int direction;
Ritor1
parents:
diff changeset
81 int field_1C;
Ritor1
parents:
diff changeset
82 };
Ritor1
parents:
diff changeset
83 #pragma pack(pop)
Ritor1
parents:
diff changeset
84
Ritor1
parents:
diff changeset
85
Ritor1
parents:
diff changeset
86
Ritor1
parents:
diff changeset
87
Ritor1
parents:
diff changeset
88
Ritor1
parents:
diff changeset
89
513
3ee1e351e710 Some CharacterUI_LoadPaperdollTextures overflows
Nomad
parents: 481
diff changeset
90
0
Ritor1
parents:
diff changeset
91
Ritor1
parents:
diff changeset
92
Ritor1
parents:
diff changeset
93
Ritor1
parents:
diff changeset
94
Ritor1
parents:
diff changeset
95
Ritor1
parents:
diff changeset
96 /* 374 */
Ritor1
parents:
diff changeset
97 #pragma pack(push, 1)
900
4dc2252e0b03 CharacterUI_StatsTab_ShowHint fixed
Ritor1
parents: 899
diff changeset
98 struct stat_coord
0
Ritor1
parents:
diff changeset
99 {
900
4dc2252e0b03 CharacterUI_StatsTab_ShowHint fixed
Ritor1
parents: 899
diff changeset
100 __int16 x;
4dc2252e0b03 CharacterUI_StatsTab_ShowHint fixed
Ritor1
parents: 899
diff changeset
101 __int16 y;
4dc2252e0b03 CharacterUI_StatsTab_ShowHint fixed
Ritor1
parents: 899
diff changeset
102 __int16 width;
4dc2252e0b03 CharacterUI_StatsTab_ShowHint fixed
Ritor1
parents: 899
diff changeset
103 __int16 height;
0
Ritor1
parents:
diff changeset
104 };
Ritor1
parents:
diff changeset
105 #pragma pack(pop)
900
4dc2252e0b03 CharacterUI_StatsTab_ShowHint fixed
Ritor1
parents: 899
diff changeset
106 extern stat_coord stat_string_coord[26];
0
Ritor1
parents:
diff changeset
107
Ritor1
parents:
diff changeset
108 /* 376 */
Ritor1
parents:
diff changeset
109 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
110 struct stru336
Ritor1
parents:
diff changeset
111 {
Ritor1
parents:
diff changeset
112 int field_0;
Ritor1
parents:
diff changeset
113 int field_4;
Ritor1
parents:
diff changeset
114 int field_8;
Ritor1
parents:
diff changeset
115 int field_C;
Ritor1
parents:
diff changeset
116 int field_10;
Ritor1
parents:
diff changeset
117 int field_14;
Ritor1
parents:
diff changeset
118 __int16 field_18[480];
Ritor1
parents:
diff changeset
119 __int16 field_3D8[480];
Ritor1
parents:
diff changeset
120 };
Ritor1
parents:
diff changeset
121 #pragma pack(pop)
Ritor1
parents:
diff changeset
122