Isle
Loading...
Searching...
No Matches
legovideomanager.h
Go to the documentation of this file.
1#ifndef LEGOVIDEOMANAGER_H
2#define LEGOVIDEOMANAGER_H
3
4#include "decomp.h"
5#include "legophonemelist.h"
6#include "mxvideomanager.h"
7
8#include <d3drm.h>
9#include <ddraw.h>
10
11class Lego3DManager;
12class LegoROI;
13class MxDirect3D;
14class MxStopWatch;
15struct ViewportAppData;
16
17namespace Tgl
18{
19class Renderer;
20}
21
27// VTABLE: LEGO1 0x100d9c88
28// SIZE 0x590
30public:
35
39 ~LegoVideoManager() override;
40
45 int EnableRMDevice();
46
51 int DisableRMDevice();
52
57 void EnableFullScreenMovie(MxBool p_enable);
58
64 void EnableFullScreenMovie(MxBool p_enable, MxBool p_scale);
65
71 void MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY);
72
77 void ToggleFPS(MxBool p_visible);
78
83 MxResult Tickle() override;
84
88 void Destroy() override;
89
97 MxResult Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, MxBool p_createThread) override;
98
105
110 void UpdateView(MxU32 p_x, MxU32 p_y, MxU32 p_width, MxU32 p_height) override;
111
118 virtual MxPresenter* GetPresenterAt(MxS32 p_x, MxS32 p_y);
119
124 virtual LegoPhonemeList* GetPhonemeList() { return m_phonemeRefList; }
125
132 void SetSkyColor(float p_red, float p_green, float p_blue);
133
138 void OverrideSkyColor(MxBool p_shouldOverride);
139
145 MxResult ResetPalette(MxBool p_ignoreSkyColor);
146
152 MxPresenter* GetPresenterByActionObjectName(const char* p_char);
153
157 void FUN_1007c520();
158
163 Tgl::Renderer* GetRenderer() { return m_renderer; }
164
168 Lego3DManager* Get3DManager() { return m_3dManager; }
169
173 LegoROI* GetViewROI() { return m_viewROI; }
174
178 MxDirect3D* GetDirect3D() { return m_direct3d; }
179
183 MxBool GetRender3D() { return m_render3d; }
184
188 double GetElapsedSeconds() { return m_elapsedSeconds; }
189
194 void SetRender3D(MxBool p_render3d) { m_render3d = p_render3d; }
195
200 void SetUnk0x554(MxBool p_unk0x554) { m_unk0x554 = p_unk0x554; }
201
202private:
207 MxResult CreateDirect3D();
208
213 MxResult ConfigureD3DRM();
214
218 void DrawFPS();
219
223 inline void DrawCursor();
224
226 Tgl::Renderer* m_renderer; // 0x64
227
229 Lego3DManager* m_3dManager; // 0x68
230
232 LegoROI* m_viewROI; // 0x6c
233
235 undefined4 m_unk0x70; // 0x70
236
238 MxDirect3D* m_direct3d; // 0x74
239
241 undefined4 m_unk0x78[27]; // 0x78
242
244 MxBool m_render3d; // 0xe4
245
247 MxBool m_unk0xe5; // 0xe5
248
250 MxBool m_unk0xe6; // 0xe6
251
253 PALETTEENTRY m_paletteEntries[256]; // 0xe7
254
256 LegoPhonemeList* m_phonemeRefList; // 0x4e8
257
259 MxBool m_isFullscreenMovie; // 0x4ec
260
262 MxPalette* m_palette; // 0x4f0
263
265 MxStopWatch* m_stopWatch; // 0x4f4
266
268 double m_elapsedSeconds; // 0x4f8
269
271 MxBool m_fullScreenMovie; // 0x500
272
274 MxBool m_drawCursor; // 0x501
275
277 MxS32 m_cursorXCopy; // 0x504
278
280 MxS32 m_cursorYCopy; // 0x508
281
283 MxS32 m_cursorX; // 0x50c
284
286 MxS32 m_cursorY; // 0x510
287
289 LPDIRECTDRAWSURFACE m_cursorSurface; // 0x514
290
292 RECT m_cursorRect; // 0x518
293
295 LPDIRECTDRAWSURFACE m_unk0x528; // 0x528
296
298 MxBool m_drawFPS; // 0x52c
299
301 RECT m_fpsRect; // 0x530
302
304 HFONT m_arialFont; // 0x540
305
307 SIZE m_fpsSize; // 0x544
308
310 MxFloat m_unk0x54c; // 0x54c
311
313 MxFloat m_unk0x550; // 0x550
314
316 MxBool m_unk0x554; // 0x554
317
319 MxBool m_paused; // 0x555
320
322 D3DVALUE m_back; // 0x558
323
325 D3DVALUE m_front; // 0x55c
326
328 float m_cameraWidth; // 0x560
329
331 float m_cameraHeight; // 0x564
332
334 D3DVALUE m_fov; // 0x55c
335
337 IDirect3DRMFrame* m_camera; // 0x56c
338
340 D3DRMPROJECTIONTYPE m_projection; // 0x570
341
343 ViewportAppData* m_appdata; // 0x574
344
346 D3DRMRENDERQUALITY m_quality; // 0x578
347
349 DWORD m_shades; // 0x57c
350
352 D3DRMTEXTUREQUALITY m_textureQuality; // 0x580
353
355 DWORD m_rendermode; // 0x584
356
358 BOOL m_dither; // 0x588
359
361 DWORD m_bufferCount; // 0x58c
362};
363
364// SYNTHETIC: LEGO1 0x1007ab20
365// LegoVideoManager::`scalar deleting destructor'
366
367#endif // LEGOVIDEOMANAGER_H
[AI] Central class managing the LEGO Island 3D rendering subsystem.
Definition: lego3dmanager.h:39
Specialized list class for managing LegoPhoneme objects.
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
Definition: legoroi.h:43
[AI] Extends the functionality of MxVideoManager to provide LEGO Island–specific video and 3D graphic...
MxResult ResetPalette(MxBool p_ignoreSkyColor)
[AI] Resets palette entries and re-installs base palette, restoring sky color if requested.
virtual MxPresenter * GetPresenterAt(MxS32 p_x, MxS32 p_y)
[AI] Finds a presenter at the specific screen coordinates (for hit testing).
int EnableRMDevice()
[AI] Enables the Direct3D Retained Mode (RM) rendering device, and re-creates the device/viewport if ...
void UpdateView(MxU32 p_x, MxU32 p_y, MxU32 p_width, MxU32 p_height) override
[AI] Notifies the manager of changes in view rectangle, updating the 3D device's viewport as needed.
void EnableFullScreenMovie(MxBool p_enable)
[AI] Convenience method to enable or disable fullscreen movie playback with default scaling.
MxResult Tickle() override
[AI] Performs per-frame update for all video, 3D, and interface layers.
MxDirect3D * GetDirect3D()
[AI] Returns the active Direct3D wrapper (engine/utility) object.
~LegoVideoManager() override
[AI] Releases all allocated resources and restores graphics state.
double GetElapsedSeconds()
[AI] Returns the elapsed wall clock seconds since the last Tickle update (frame time).
void FUN_1007c520()
[AI] Sets rendering state to allow PutData for all overlay presenters, disables 3D main rendering.
LegoVideoManager()
[AI] Constructs a new LegoVideoManager, initializing all graphics, rendering, and state members to de...
int DisableRMDevice()
[AI] Disables the Direct3D Retained Mode (RM) rendering device and saves/restores 3D state as needed.
void SetUnk0x554(MxBool p_unk0x554)
[AI] Used to control a non-interactive, non-main rendering update (PutData only).
MxBool GetRender3D()
[AI] Indicates if 3D rendering is enabled and active (false if paused/fullscreen movie).
Lego3DManager * Get3DManager()
[AI] Returns the Lego3DManager for this manager, which owns all 3D scene representations and view con...
void OverrideSkyColor(MxBool p_shouldOverride)
[AI] Requests that the palette override the sky color entry, for movie transitions or when re-enablin...
Tgl::Renderer * GetRenderer()
[AI] Returns the underlying renderer for this manager; normally a Direct3D Retained Mode wrapper.
LegoROI * GetViewROI()
[AI] Returns the viewpoint ROI for the current view/camera.
virtual LegoPhonemeList * GetPhonemeList()
[AI] Returns the currently installed phoneme list for in-game speech synchronization.
void Destroy() override
[AI] Cleans up graphics resources, disables overlays, removes from 3D scene and releases presenters/l...
MxResult RealizePalette(MxPalette *) override
[AI] Sets the realized palette to use for rendering and updates the display surface.
void ToggleFPS(MxBool p_visible)
[AI] Toggles display of the on-screen frames-per-second (FPS) overlay.
MxPresenter * GetPresenterByActionObjectName(const char *p_char)
[AI] Searches all active presenters for one associated with the given action object name.
void SetRender3D(MxBool p_render3d)
[AI] Enables or disables main 3D rendering (e.g., used internally on video transitions).
void MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY)
[AI] Updates the position of the custom software cursor overlay, and ensures it renders on the next f...
void SetSkyColor(float p_red, float p_green, float p_blue)
[AI] Sets the RGB color for the sky/background in the 3D view and updates the palette accordingly.
[AI] MxDirect3D provides Direct3D (D3D) rendering capabilities layered on top of MxDirectDraw,...
Definition: mxdirect3d.h:24
virtual MxResult Create()
[AI] Allocates and initializes the internal presenter list for this manager, ensuring thread safety.
[AI] Encapsulates a DirectDraw 8-bit (256 color) palette for use with DirectX rendering.
Definition: mxpalette.h:17
[AI] Abstract base class for all presenter types in the LEGO Island engine, responsible for managing ...
Definition: mxpresenter.h:20
Measures elapsed wall clock time using high resolution performance counters.
Definition: mxstopwatch.h:25
[AI] Video subsystem manager for DirectDraw/Direct3D video rendering and presenter control.
[AI] Video parameter configuration for display and rendering, encapsulates resolution,...
Definition: mxvideoparam.h:14
[AI] Main interface/factory for rendering resources and scene graphs.
Definition: tgl.h:188
DWORD D3DRMRENDERQUALITY
Definition: d3drmdef.h:88
enum _D3DRMPROJECTIONTYPE D3DRMPROJECTIONTYPE
enum _D3DRMTEXTUREQUALITY D3DRMTEXTUREQUALITY
float D3DVALUE
Definition: d3dtypes.h:28
struct IDirectDrawSurface FAR * LPDIRECTDRAWSURFACE
Definition: ddraw.h:74
typedef DWORD(FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper
unsigned int undefined4
Definition: decomp.h:28
typedef BOOL(FAR PASCAL *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
float MxFloat
[AI]
Definition: mxtypes.h:68
signed int MxS32
[AI]
Definition: mxtypes.h:38
unsigned int MxU32
[AI]
Definition: mxtypes.h:32
[AI] Namespace containing all classes related to the 3D graphics abstraction/rendering engine.