The LARC Game Engine
A Simple Game Engine from the Laboratory for Recreational Computing
Public Member Functions | List of all members
CWindow Class Reference

The window class. More...

#include <Window.h>

Inheritance diagram for CWindow:
CWindowDesc CSettingsManager CSettings CRenderer3D CSpriteRenderer

Public Member Functions

template<typename t0 , typename t1 , typename t2 >
int WinMain (_In_ HINSTANCE, bool, const t0 &, const t1 &, const t2 &)
 WinMain.
 
- Public Member Functions inherited from CSettingsManager
void Load ()
 Load game settings. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CSettingsManager
void SetWinSize (int, int)
 Set window size information. More...
 
- Static Protected Attributes inherited from CWindowDesc
static HWND m_Hwnd = 0
 Window handle.
 
static HINSTANCE m_hInst = 0
 Instance handle.
 
static bool m_bExitSizeMove
 User just finished moving/resizing window.
 
- Static Protected Attributes inherited from CSettingsManager
static XMLElement * m_pXmlSettings = nullptr
 Pointer to the settings tag in the XML settings file.
 
static float m_fAspectRatio = 1.0f
 Aspect ratio, width/ht.
 
- Static Protected Attributes inherited from CSettings
static char m_szName [MAX_PATH]
 Name of this game.
 
static int m_nWinWidth = 0
 Window width in pixels.
 
static int m_nWinHeight = 0
 Window height in pixels.
 
static Vector2 m_vWinCenter = Vector2::Zero
 Window center.
 

Detailed Description

CWindow handles Windows specific things. This will help you to keep the rest of your code as OS-independent as possible. Gnarly things that it handles includes making a window whose client area is a specific width and height, and making sure that the window maintains its aspect ratio if the user is brave enough to resize it by dragging on one of the window's edges or corners.