Skip to Content
Programming 2D Games
book

Programming 2D Games

by Charles Kelly
June 2012
Beginner
438 pages
15h 26m
English
A K Peters/CRC Press
Content preview from Programming 2D Games
593.9. Fullscreen or Windowed
//-----------------------------------------------
// Constants
//-----------------------------------------------
// window
const char CLASS_NAME[] = "Spacewar";
const char GAME_TITLE[] = "Game Engine Part 1";
const bool FULLSCREEN = false; // windowed or fullscreen
const UINT GAME_WIDTH = 640; // width of game in pixels
const UINT GAME_HEIGHT = 480; // height of game in pixels
Listing 3.21. Constants
// Initialize Graphics, throws GameError
graphics->initialize(hwnd, GAME_WIDTH, GAME_HEIGHT, FULLSCREEN);
Listing 3.22. Initializing graphics in Winmain.
If fullscreen is true, we are setting the format of the back buer to D3DFMT_X8R8G8B8 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning 3D Game Programming

Beginning 3D Game Programming

Tom Miller

Publisher Resources

ISBN: 9781466508705