making a title page

Started by
3 comments, last by Darobat 19 years, 7 months ago
ok i finaly got my first windows game (pong) up and running and im really excited (hey we all had to start some were) and now im trying to make it so that you cna choose your back ground and so i need it to text out which background do you want 1,2 or 3 but i cant seem to get it too work and the game wont pause right. basicly i want an intruductory page (kinda like the title page to a book almost every game has one anyway if any one knows a good way to do this let me know THX :)
____________________________"This just in, 9 out of 10 americans agree that 1 out of 10 americans will disagree with the other 9"- Colin Mochrie
Advertisement
Are you using the GDI for graphics, DirectDraw, or Direct3D?

If you're using DirectDraw, before you blt() or bltfast() the secondary surface to the primary surface, you need to use lpDDSSecondary->GetDC(hWnd, &hDC); (might not be the correct arguments - it's been a while) and then after using TextOut(), etc use lpDDSSecondary->ReleaseDC(&hDC);
In WM_PAINT do a switch on game state

case WM_PAINT:    switch(uGameState)    {        case GAMESTATE_MENU:            // Draw Menu            break;        case GAMESTATE_GAME:            // Render game            break    }    break;
--------------------C++ Home - Check it out!Lol... - Amazing video
ok cool thx umm one more question is there some kind of other library i have to include (i have all the main ones) in order to play .wav sounds
#include <windows.h>
#include "Resource.h"
#include "GameEngine.h"
#include "Bitmap.h"
#include <windows.h> // include all the windows headers
#include <windowsx.h> // include useful macros
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <WINGDI.h>
____________________________"This just in, 9 out of 10 americans agree that 1 out of 10 americans will disagree with the other 9"- Colin Mochrie
yes, winmm.lib
--------------------C++ Home - Check it out!Lol... - Amazing video

This topic is closed to new replies.

Advertisement