World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Viewport.h
См. документацию.
1 #pragma once
2 
3 #include <cstdint>
4 
5 /* 149 */
6 #pragma pack(push, 1)
7 struct Viewport {
8  inline Viewport() {
9  field_of_view = 65536 / 2;
10  SetScreen(0, 0, 639, 479);
11  }
12 
13  void SetScreen(int uX, int uY, int uZ, int uW);
14  void SetFOV(float fov);
15  void SetViewport(int uX, int uY, int uZ, int uW);
16  bool Contains(unsigned int x, unsigned int y);
17 
31 };
32 #pragma pack(pop)
33 
34 extern struct Viewport *pViewport;
35 
36 /* 201 */
37 #pragma pack(push, 1)
38 struct ViewingParams {
39  inline ViewingParams() {
40  draw_sw_outlines = false;
41  draw_d3d_outlines = false;
42  field_4C = 0;
43  }
44 
45  void CenterOnPartyZoomIn();
46  void InitGrayPalette();
47  void MapViewUp();
48  void MapViewLeft();
49  void MapViewDown();
50  void MapViewRight();
51  void CenterOnPartyZoomOut();
52  void AdjustPosition();
53  void _443365();
54 
55  int uSomeX; // game viewport co ords
56  int uSomeY;
57  int uSomeZ;
58  int uSomeW;
59 
60  unsigned int uScreen_topL_X;
61  unsigned int uScreen_topL_Y;
62  unsigned int uScreen_BttmR_X;
63  unsigned int uScreen_BttmR_Y;
64  int field_20;
65  unsigned int uMinimapZoom;
66  int field_28;
67  unsigned int uMapBookMapZoom;
72  int field_3C;
73  class Image *location_minimap; // unsigned int uTextureID_LocationMap; ::40
75  int field_48;
76  int field_4C;
79  int field_58;
80  int field_5C;
81  int field_60;
82  int field_64;
83  int field_68;
85 };
86 #pragma pack(pop)
87 
88 extern struct ViewingParams *viewparams;
uint16_t
unsigned __int16 uint16_t
Definition: SDL_config.h:37
ViewingParams::field_48
int field_48
Definition: Viewport.h:75
Viewport::uScreenWidth
int uScreenWidth
Definition: Viewport.h:26
int16_t
signed __int16 int16_t
Definition: SDL_config.h:36
Viewport
Definition: Viewport.h:7
Viewport::uViewportTL_Y
int uViewportTL_Y
Definition: Viewport.h:23
ViewingParams::location_minimap
class Image * location_minimap
Definition: Viewport.h:73
ViewingParams::field_68
int field_68
Definition: Viewport.h:83
ViewingParams::field_28
int field_28
Definition: Viewport.h:66
Viewport::Contains
bool Contains(unsigned int x, unsigned int y)
Definition: Viewport.cpp:67
ViewingParams::indoor_center_x
int16_t indoor_center_x
Definition: Viewport.h:70
ViewingParams::draw_d3d_outlines
int draw_d3d_outlines
Definition: Viewport.h:78
Viewport::uScreen_TL_X
int uScreen_TL_X
Definition: Viewport.h:18
ViewingParams::MapViewDown
void MapViewDown()
Definition: Viewport.cpp:105
Viewport::SetViewport
void SetViewport(int uX, int uY, int uZ, int uW)
Definition: Viewport.cpp:72
ViewingParams::field_4C
int field_4C
Definition: Viewport.h:76
ViewingParams::uScreen_topL_Y
unsigned int uScreen_topL_Y
Definition: Viewport.h:61
ViewingParams::uScreen_BttmR_X
unsigned int uScreen_BttmR_X
Definition: Viewport.h:62
ViewingParams::field_60
int field_60
Definition: Viewport.h:81
Viewport::uScreen_TL_Y
int uScreen_TL_Y
Definition: Viewport.h:19
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
Viewport::uScreen_BR_Y
int uScreen_BR_Y
Definition: Viewport.h:21
ViewingParams::uScreen_topL_X
unsigned int uScreen_topL_X
Definition: Viewport.h:60
ViewingParams::MapViewRight
void MapViewRight()
Definition: Viewport.cpp:111
Image
Definition: Image.h:19
ViewingParams::uMinimapZoom
unsigned int uMinimapZoom
Definition: Viewport.h:65
ViewingParams::uSomeY
int uSomeY
Definition: Viewport.h:56
ViewingParams::indoor_center_y
int16_t indoor_center_y
Definition: Viewport.h:71
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
Viewport::uScreenHeight
int uScreenHeight
Definition: Viewport.h:27
ViewingParams::AdjustPosition
void AdjustPosition()
Definition: Viewport.cpp:146
viewparams
struct ViewingParams * viewparams
Definition: mm7_data.cpp:22
ViewingParams
Definition: Viewport.h:38
Viewport::SetFOV
void SetFOV(float fov)
Definition: Viewport.cpp:62
Viewport::uScreen_BR_X
int uScreen_BR_X
Definition: Viewport.h:20
ViewingParams::field_58
int field_58
Definition: Viewport.h:79
Viewport::uViewportBR_X
int uViewportBR_X
Definition: Viewport.h:24
Viewport::uScreenCenterY
int uScreenCenterY
Definition: Viewport.h:29
ViewingParams::uSomeZ
int uSomeZ
Definition: Viewport.h:57
ViewingParams::InitGrayPalette
void InitGrayPalette()
Definition: Viewport.cpp:172
ViewingParams::field_5C
int field_5C
Definition: Viewport.h:80
ViewingParams::uSomeX
int uSomeX
Definition: Viewport.h:55
ViewingParams::_443365
void _443365()
Definition: Viewport.cpp:177
Viewport::uViewportBR_Y
int uViewportBR_Y
Definition: Viewport.h:25
Viewport::field_of_view
int field_of_view
Definition: Viewport.h:30
pViewport
struct Viewport * pViewport
Definition: mm7_data.cpp:21
ViewingParams::CenterOnPartyZoomOut
void CenterOnPartyZoomOut()
Definition: Viewport.cpp:117
Viewport::Viewport
Viewport()
Definition: Viewport.h:8
ViewingParams::pPalette
uint16_t pPalette[256]
Definition: Viewport.h:84
Viewport::uScreenCenterX
int uScreenCenterX
Definition: Viewport.h:28
ViewingParams::ViewingParams
ViewingParams()
Definition: Viewport.h:39
ViewingParams::field_3C
int field_3C
Definition: Viewport.h:72
Viewport::SetScreen
void SetScreen(int uX, int uY, int uZ, int uW)
Definition: Viewport.cpp:26
ViewingParams::bRedrawGameUI
int bRedrawGameUI
Definition: Viewport.h:74
ViewingParams::CenterOnPartyZoomIn
void CenterOnPartyZoomIn()
Definition: Viewport.cpp:127
ViewingParams::sViewCenterY
int sViewCenterY
Definition: Viewport.h:69
ViewingParams::field_64
int field_64
Definition: Viewport.h:82
ViewingParams::MapViewUp
void MapViewUp()
Definition: Viewport.cpp:93
ViewingParams::sViewCenterX
int sViewCenterX
Definition: Viewport.h:68
ViewingParams::draw_sw_outlines
int draw_sw_outlines
Definition: Viewport.h:77
ViewingParams::uScreen_BttmR_Y
unsigned int uScreen_BttmR_Y
Definition: Viewport.h:63
ViewingParams::uMapBookMapZoom
unsigned int uMapBookMapZoom
Definition: Viewport.h:67
Viewport::uViewportTL_X
int uViewportTL_X
Definition: Viewport.h:22
ViewingParams::uSomeW
int uSomeW
Definition: Viewport.h:58
ViewingParams::MapViewLeft
void MapViewLeft()
Definition: Viewport.cpp:99
ViewingParams::field_20
int field_20
Definition: Viewport.h:64