Trying to develop a simple outline for a game engine.. This program is simply supposed to populate a window with a bunch of skeleton icons. This is my first time trying to include resources into my program so I'm not sure if I'm doing it right.
Skeleton.h <----Suspected error here.. but it's just like out the book
Code:#pragma once #include <windows.h> #include "Resource.h" #include "GameEngine.h" //Globals GameEngine* _pGame;
Compiler: Default compiler
Building Makefile: "F:\Dev-Cpp\Makefile.win"
Executing make clean
rm -f GameEngineDriver.o GameEngine.o Skeleton.o Skeleton_private.res Skeleton.exe
g++.exe -c GameEngineDriver.cpp -o GameEngineDriver.o -I"F:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"F:/Dev-Cpp/include/c++/3.4.2/backward" -I"F:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"F:/Dev-Cpp/include/c++/3.4.2" -I"F:/Dev-Cpp/include"
GameEngineDriver.cpp: In function `int WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*, int)':
GameEngineDriver.cpp:13: error: `GameInitialize' undeclared (first use this function)
GameEngineDriver.cpp:13: error: (Each undeclared identifier is reported only once for each function it appears in.)
GameEngineDriver.cpp:43: error: 'class GameEngine' has no member named 'GetFrameDelay'
GameEngineDriver.cpp:44: error: `GameCycle' undeclared (first use this function)
GameEngineDriver.cpp:54: error: `GameEnd' undeclared (first use this function)
make.exe: *** [GameEngineDriver.o] Error 1
It seems like my project is not responding to the skeleton class.. which is where all the above functions are defined. Can anyone else get this code to compile..?? I think that if I can get a program like this to work.. I will have an easier time in getting future windows projects to compile.
I'm also not clear about GameEngineDriver.cpp (GameEngineDriver.cpp is my own addition to the program to facilitate the need for a WinMain( )) In the book, HandleEvent( ) is functionally defined, but never called. This is where I think it should go:
Code://I think this: return (int)msg.wParam; //should be this: GameEngine::HandleEvent(hWindow, msg, wParam, lParam)