#include <windows.h>
#include <dxerr9.h>
#include <string>
#include <dinput.h>
#include "main.h"
#include "game_manager.h"
#include "errrors_display.h"
Go to the source code of this file.
Defines | |
#define | BITMAP_FILE "../graphs/graphs.bmp" |
#define | MESSAGES_FILE "../graphs/messages.bmp" |
#define | FOND_FILE "../graphs/fond.bmp" |
#define | TX_BITMAP 85 |
#define | TY_BITMAP 64 |
#define | TX_MESSAGES_BMP 276 |
#define | TY_MESSAGES_BMP 190 |
Functions | |
bool | InitDD (HWND) |
ititialise les composants Direct Draw | |
void | CleanUp () |
Libere proprement les composants Direct Draw. | |
void | GameLoop () |
void WINAPI | DI_Term () |
Termine proprement les composants Direct Input. | |
LRESULT CALLBACK | WndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
Fonctions de callback de traitement des messages de la fenetre Windows. | |
BOOL WINAPI | DI_Init (HWND hWnd, HINSTANCE g_hinst) |
ititialise les composants Direct Input | |
int WINAPI | WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iShowCmd) |
WinMain. | |
Variables | |
CDisplay * | g_pDisplay = NULL |
l'objet DDRAW pour l'affichage | |
CSurface * | g_pText = NULL |
surface de text | |
CSurface * | g_pLeft_Time_Text = NULL |
surface du text pour afficher le temps restant | |
CSurface * | g_pScore_Text = NULL |
surface du text pour afficher le score | |
CSurface * | g_pSprites = NULL |
surface bitmap des sprites (avec clé de transparence); | |
CSurface * | g_pMessages = NULL |
surface des messages | |
CSurface * | g_pFond = NULL |
surface contenant l'image de fond d'ecran | |
LPDIRECTINPUT8 | g_lpDI |
LPDIRECTINPUTDEVICE8 | g_pKeyboard |
keyboard device | |
cGame_Manager | Game_Manager |
instanciation de l'objet de gestion du jeu | |
HWND | hWnd |
instance de la fenetre | |
Debugger | Debug_File ("output.txt") |
debugger ( fichier texte) vers lequel on envoie des infos | |
bool | g_bActive = false |
indique que je jeu est actif |
Auteur : Adrien Auclair
Ce fichier contient la fonction WinMain
On trouve aussi les fonctions d'initialisation de DirectX ( draw et ddinput)
WndProc est la fonction de traitement des messages windows
elle est utilisée pour traiter certains caracteres claviers
Definition in file main.cpp.
|
Definition at line 28 of file main.cpp. Referenced by InitDD(). |
|
Definition at line 30 of file main.cpp. Referenced by InitDD(). |
|
Definition at line 29 of file main.cpp. Referenced by InitDD(). |
|
Definition at line 34 of file main.cpp. Referenced by InitDD(). |
|
Definition at line 38 of file main.cpp. Referenced by InitDD(). |
|
Definition at line 35 of file main.cpp. Referenced by InitDD(). |
|
Definition at line 39 of file main.cpp. Referenced by InitDD(). |
|
Libere proprement les composants Direct Draw.
Definition at line 340 of file main.cpp. References g_pDisplay, g_pFond, g_pLeft_Time_Text, g_pMessages, g_pScore_Text, g_pSprites, g_pText, and SAFE_DELETE. Referenced by WndProc(). |
|
ititialise les composants Direct Input
Definition at line 175 of file main.cpp. References DI_Term(), g_lpDI, g_pKeyboard, and hWnd. Referenced by WinMain(). |
|
Termine proprement les composants Direct Input.
Definition at line 83 of file main.cpp. References g_lpDI, and g_pKeyboard. |
|
|
|
ititialise les composants Direct Draw
Definition at line 236 of file main.cpp. References BIT_DEPTH, BITMAP_FILE, CDisplay::CreateFullScreenDisplay(), CDisplay::CreatePaletteFromBitmap(), CDisplay::CreateSurface(), CDisplay::CreateSurfaceFromBitmap(), FOND_FILE, g_pDisplay, g_pFond, g_pLeft_Time_Text, g_pMessages, g_pScore_Text, g_pSprites, hWnd, MESSAGES_FILE, SAFE_RELEASE, CSurface::SetColorKey(), CDisplay::SetPalette(), TX_BITMAP, TX_MESSAGES_BMP, TX_SCREEN, TY_BITMAP, TY_MESSAGES_BMP, and TY_SCREEN. Referenced by WndProc(). |
|
WinMain.
Definition at line 357 of file main.cpp. References DI_Init(), g_bActive, Game_Manager, hWnd, cGame_Manager::Main_Loop(), TX_SCREEN, TY_SCREEN, and WndProc(). |
|
Fonctions de callback de traitement des messages de la fenetre Windows.
Definition at line 102 of file main.cpp. References cGame_Manager::bDisplay_Ennemies_Path, cGame_Manager::bDisplay_Path_Graph, cGame_Manager::bDisplay_Square_Areas, cGame_Manager::bGame_Paused, cGame_Manager::bInvincible, CleanUp(), DI_Term(), g_bActive, g_pDisplay, Game_Manager, cGame_Manager::Game_State, hWnd, InitDD(), LEVEL_FINISHED, RUNNING, cGame_Manager::Try_Start(), and CDisplay::UpdateBounds(). Referenced by WinMain(). |
|
debugger ( fichier texte) vers lequel on envoie des infos
|
|
indique que je jeu est actif
|
|
|
|
l'objet DDRAW pour l'affichage
Definition at line 46 of file main.cpp. Referenced by Call_Back_Display_Wall(), CleanUp(), cGame_Manager::Display(), cSprite_Display_Def::Display(), cBitmap_Display_Def::Display(), cSquare_Area_Debug_Displayer::Display(), cGame_Manager::Display_Debug_X(), cGame_World_Debug_Displayer::Display_Graph(), cUnit::Display_Path(), cGame_Manager::Display_Score(), cGame_Manager::Display_Time(), Draw_Line(), InitDD(), cGame_Manager::Main_Loop(), and WndProc(). |
|
surface contenant l'image de fond d'ecran
Definition at line 52 of file main.cpp. Referenced by CleanUp(), cGame_Manager::Display(), and InitDD(). |
|
keyboard device
Definition at line 55 of file main.cpp. Referenced by DI_Init(), DI_Term(), and cGame_Manager::Read_Keyboard_And_React(). |
|
surface du text pour afficher le temps restant
Definition at line 48 of file main.cpp. Referenced by CleanUp(), cGame_Manager::Display_Time(), and InitDD(). |
|
surface des messages
Definition at line 51 of file main.cpp. Referenced by CleanUp(), cBitmap_Display_Def::Display(), and InitDD(). |
|
surface du text pour afficher le score
Definition at line 49 of file main.cpp. Referenced by CleanUp(), cGame_Manager::Display_Score(), and InitDD(). |
|
surface bitmap des sprites (avec clé de transparence);
Definition at line 50 of file main.cpp. Referenced by CleanUp(), cSprite_Display_Def::Display(), and InitDD(). |
|
surface de text
Definition at line 47 of file main.cpp. Referenced by CleanUp(). |
|
|
instance de la fenetre
Definition at line 57 of file main.cpp. Referenced by CDisplay::CreateFullScreenDisplay(), CDisplay::CreateWindowedDisplay(), DI_Init(), cSprite_Display_Def::Display(), cBitmap_Display_Def::Display(), cGame_Manager::Display_Score(), cGame_Manager::Display_Time(), InitDD(), cLevel_Loader::Load(), cGame_Manager::Main_Loop(), WinMain(), and WndProc(). |