Contents
Games to Go: Le Voyage Dans La Lune:(Re)Making Games for Windows CE
 
 
Printer-Friendly VersionPrinter-Friendly Version
 
Latest News
spacer View All spacer
 
November 22, 2009
 
Video Game Watchdog National Institute On Media And The Family Shutting Down [11]
 
Modern Warfare 2 Infinity Ward's 'Most Successful PC Version' Yet [12]
 
New Tech, Design Details Of Project Natal To Emerge At Gamefest In February
spacer
Latest Jobs
spacer View All     Post a Job     RSS spacer
 
November 22, 2009
 
Sucker Punch Productions
Character Artist
 
Sucker Punch Productions
3D Environment Artist
 
Sucker Punch Productions
Network Programmer
 
Sucker Punch Productions
Texture Artist
 
Sony Online Entertainment
Brand Manager
 
Monolith Productions
Sr. Software Engineer, Engine - Monolith Productions - #113767
 
Crystal Dynamics
Sr. Level Designer
 
Gargantuan Studios
Lead World Designer
spacer
Latest Features
spacer View All spacer
 
November 22, 2009
 
arrow Upping The Craft: Susan O'Connor On Games Writing [6]
 
arrow Small Developers: Minimizing Risks in Large Productions - Part II [6]
 
arrow iPhone Piracy: The Inside Story [48]
 
arrow And Yet It Grows: Analyzing the Size and Growth of the European Game Market [5]
 
arrow NPD: Behind the Numbers, October 2009 [13]
 
arrow Reflecting On Uncharted 2: How They Did It [5]
 
arrow Sponsored Feature: Rasterization on Larrabee -- Adaptive Rasterization Helps Boost Efficiency
 
arrow Postmortem: Wadjet Eye's The Blackwell Convergence [2]
spacer
Latest Blogs
spacer View All     Post     RSS spacer
 
November 22, 2009
 
Accepting the Inherent Value of Games
 
Planckogenesis, Part II: Song Structure & Gravy Train [1]
 
Designing Games Is About Matching Personalities [1]
spacer
About
spacer News Director:
Leigh Alexander
Features Director:
Christian Nutt
Editor At Large:
Chris Remo
Advertising:
John 'Malik' Watson
Recruitment/Education:
Gina Gross
 
Features
  Games to Go: Le Voyage Dans La Lune:(Re)Making Games for Windows CE
by Jim Williams
0 comments
Share RSS
 
 
May 28, 1999 Article Start Previous Page 4 of 4
 

On Draw

The OnDraw() function within the CWizCEView class is the document/view architecture's equivalent of the standard Windows OnPaint() call. It is here that we use the standard GDI calls to blit the background bitmap to the screen:

Advertisement

CDC memDC;
memDC.CreateCompatibleDC(pDC);

//Select Bitmap into Memory DC
memDC.SelectObject(&Background);

pDC->
BitBlt(CViewOffsetX,CViewOffsetY,
CViewWidth,ViewHeight,&memDC,0,0,
SRCCOPY);

The background is a lot easier to blit than the sprites will be. Windows CE supports a subset of the ROP calls that Windows 9x and Windows NT support. pDC represents the PaintDC pointer that is passed to OnDraw. The memDC allows us to prepare the Background bitmap before blitting it to the screen. SRCCOPY does a straight copy, overwriting everything underneath. Later, when we piece together the foreground and background imagery from separate bitmaps, we'll use other ROPcodes to create a stencil.

With the variables we've set up, we can use a bitmap of whatever size we choose, and automatically adjust display for PalmPCs, H/PCs, and even the newer Pro machines with the higher resolution display. If more display types become available, it might be preferable to change the if/else statements into a switch/case procedure.

What you should see in your desktop emulation if everything went right is shown in Figure 7. I have my emulation environment set to dimensions of 480x240, a remnant of another project.

Figure 7
[zoom]

Conclusion of Episode I

In this half of the tutorial, we examined the development environment, learned a couple of differences between Windows CE and Windows 9x, judged the pros and cons of MFC for use in Windows CE game development, and set up the basics for the display functions of a Windows CE game. In the second half, we'll really get busy. I'll go into the animation requirements for sprite images (including the required bitmasks,) discuss the unique control system involved in a pen-based interface, examine the "object store", and suggest a technique for storing image data in a reusable, extensible form.

Jim has been involved in developing software since 1980, and has developed a taste for operating systems as esoteric as AmigaDOS and PalmOS. He's currently working on an RPG engine for Windows CE. His only advice for someone trying to program Windows is, "Punching the monitor hurts you more than Microsoft". He can be reached as amok@ionet.net.

 
Article Start Previous Page 4 of 4
 
Comments

none
 
Comment:
 


Submit Comment