• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
falcon93

Exit game from another class (Input)

51 posts in this topic

Hi everyone!

How can I exit my game from another class when I'm not in the game loop?
If I want to quit the game from the gameloop itself, I just write:

[code]<BR>...<BR>PostQuitMessage(0); return 0; break;<BR>...<BR>[/code]


However, I'm handeling all my keyboard input in my InputEngine.cpp:

[source lang="cpp"]
#include <dinput.h>
#include "InputEngine.h"


#pragma comment (lib, "dinput8.lib")
#pragma comment (lib, "dxguid.lib")


InputEngine::InputEngine(HINSTANCE hInstance, HWND hWnd)
{
DirectInput8Create(hInstance, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&din, NULL);
din->CreateDevice(GUID_SysKeyboard, &dinkeyboard, NULL);

dinkeyboard->SetDataFormat(&c_dfDIKeyboard);
dinkeyboard->SetCooperativeLevel(hWnd, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND);
}


InputEngine::~InputEngine(void)
{
}


void InputEngine::Update(void)
{
dinkeyboard->Acquire();
dinkeyboard->GetDeviceState(256, (LPVOID)keystate);

HandleInput();
}


void InputEngine::HandleInput(void)
{
if (keystate[DIK_ESCAPE] & 0x80)
{
PostQuitMessage(0);
}
}
[/source]


How can I exit the game from my InputEngine.cpp? Or is it a better way to handle keyboard input?

Please help :)
0

Share this post


Link to post
Share on other sites
It's probably cleaner to set a flag (a boolean variable) indicating that we should exit, and the main loop can check it. There are a few other alternatives (`exit', throw an exception, `longjmp'), but I wouldn't recommend any of them: The part of the code that reads the keyboard should be concerned only with reading the keyboard, not with things like how to exit the game.
0

Share this post


Link to post
Share on other sites
[quote name='falcon93' timestamp='1310916091' post='4836379']
If I want to quit the game from the gameloop itself, I just write:

[code]
...
PostQuitMessage(0); return 0; break;
...
[/code]
[/quote]

You don't need to `break' after you `return'. This probably means that you are not sure what `break' does; you may think it's part of the syntax for `switch', but it's not.
0

Share this post


Link to post
Share on other sites
Ok, I'll try around with a bool, I'm replying as soon as I've tried it out :)


Nah, I've programmed in C# before, so I know what a break does. Shortly said, it jumps out of a loop, but only one "level". So if you have one loop inside the other, it will just jump out from the loop it was declared in. As the WinMain is an int function, I guess it just neccessery that I use this?:

[code]
...
PostQuitMessage(0); return 0;
...
[/code]

Is it normal that the Main.h file behaves strange compared with the other .h files?
0

Share this post


Link to post
Share on other sites
[quote name='falcon93' timestamp='1310918241' post='4836391']
Is it normal that the Main.h file behaves strange compared with the other .h files?
[/quote]

No, `Main.h' is just a name. In what way is it behaving strange?
0

Share this post


Link to post
return will return the value and exit the function, so any code after a return statement is redundant - whether that be in main(), or any other function.
0

Share this post


Link to post
Share on other sites
Well, I've played around with some defferent ways now, but none seems to work. What I thought was that I could use a bool as statement in my game loop, and by changing the value of the bool, quitting the game:

[code]
while (!quit)
{
// quit = true will quit the game
}
[/code]


This, however, didn't work. And what struggles is my Main.h file. This is my whole code in my Main Header file (Main.h):

[code]
#include "InputEngine.h"
#include "GraphicsEngine.h"


#define SCREEN_WIDTH 1280
#define SCREEN_HEIGHT 1024


#pragma once


class Main
{

public:
InputEngine* input_engine;
GraphicsEngine* graphics_engine;

public:
bool quit;

};
[/code]

As you see, there's a bool called quit, and it is public.


Here I try to use the bool in my Main.cpp file:

[code]
while(!quit)
{
}
[/code]

But I get one error:

[quote name="Visual Studio - Error Window"]
IntelliSence: identifier "quit" is undefined
[/quote]

What am I doing wrong?

0

Share this post


Link to post
Share on other sites
[quote name='falcon93' timestamp='1310921773' post='4836412']
Well, I've played around with some defferent ways now, but none seems to work. What I thought was that I could use a bool as statement in my game loop, and by changing the value of the bool, quitting the game:

[code]
while (!quit)
{
// quit = true will quit the game
}
[/code]


This, however, didn't work. And what struggles is my Main.h file. This is my whole code in my Main Header file (Main.h):

[code]
#include "InputEngine.h"
#include "GraphicsEngine.h"


#define SCREEN_WIDTH 1280
#define SCREEN_HEIGHT 1024


#pragma once


class Main
{

public:
InputEngine* input_engine;
GraphicsEngine* graphics_engine;

public:
bool quit;

};
[/code]

As you see, there's a bool called quit, and it is public.


Here I try to use the bool in my Main.cpp file:

[code]
while(!quit)
{
}
[/code]

But I get one error:

[quote name="Visual Studio - Error Window"]
IntelliSence: identifier "quit" is undefined
[/quote]

What am I doing wrong?


[/quote]

Can you post the whole of your main.cpp?
0

Share this post


Link to post
Share on other sites
[source lang="cpp"]
#include <Windows.h>
#include "Main.h"
#include "InputEngine.h"
#include "GraphicsEngine.h"


LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_DESTROY: PostQuitMessage(0); return 0; break;
}

return DefWindowProc(hWnd, message, wParam, lParam);
}


int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
quit = false;

WNDCLASSEX wc;
ZeroMemory(&wc, sizeof(WNDCLASSEX));

wc.cbSize = sizeof(WNDCLASSEX);
wc.hInstance = hInstance;
wc.lpfnWndProc = WindowProc;
wc.lpszClassName = L"AvoidBallClass";
wc.style = CS_VREDRAW | CS_HREDRAW;

RegisterClassEx(&wc);

HWND hWnd;
hWnd = CreateWindowEx(NULL, L"AvoidBallClass", L"AvoidBall", WS_OVERLAPPED, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, NULL, NULL, hInstance, NULL);
ShowWindow(hWnd, nCmdShow);

MSG msg;

InputEngine* input_engine = new InputEngine(hInstance, hWnd);

GraphicsEngine* graphics_engine = new GraphicsEngine(hWnd);
graphics_engine->InitGraphics();

while (true)
{
while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}

input_engine->Update();

graphics_engine->Update();
graphics_engine->Draw();
}

// TODO: Clean

return msg.wParam;
}
[/source]

0

Share this post


Link to post
Share on other sites
This is a problem:
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){ quit = false;

The 'quit' variable is not declared in function, and doesn't seem to be a global.

I realize you created it in your 'Main.h', but you created it within a class, and WinMain is not part of that class.
Therefore WinMain cannot access 'quit' variable.
0

Share this post


Link to post
Share on other sites
Now I'm really confused :blink:

WinMain, isn't that the programs entry [i]method[/i] ? Why isn't then WinMain a part of my class Main?



Anyways; I've tried decalring the bool inside the WinMain method, and now atleast it doesn't say that it's undefined. It still doesn't work though. I've pasted both Main.cpp and InputEngine.cpp below. Could anyone please take a look and please help me with what I've done wrong?

Main.cpp
[source lang="cpp"]
#include <Windows.h>
#include "Main.h"
#include "InputEngine.h"
#include "GraphicsEngine.h"


LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_DESTROY: PostQuitMessage(0); return 0; break;
}

return DefWindowProc(hWnd, message, wParam, lParam);
}


int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
bool quit = false;

WNDCLASSEX wc;
ZeroMemory(&wc, sizeof(WNDCLASSEX));

wc.cbSize = sizeof(WNDCLASSEX);
wc.hInstance = hInstance;
wc.lpfnWndProc = WindowProc;
wc.lpszClassName = L"AvoidBallClass";
wc.style = CS_VREDRAW | CS_HREDRAW;

RegisterClassEx(&wc);

HWND hWnd;
hWnd = CreateWindowEx(NULL, L"AvoidBallClass", L"AvoidBall", WS_OVERLAPPED, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, NULL, NULL, hInstance, NULL);
ShowWindow(hWnd, nCmdShow);

MSG msg;

InputEngine* input_engine = new InputEngine(hInstance, hWnd);

GraphicsEngine* graphics_engine = new GraphicsEngine(hWnd);
graphics_engine->InitGraphics();

while (!quit)
{
while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}

input_engine->Update();

if (input_engine->escape == true)
{
quit = true;
}

graphics_engine->Update();
graphics_engine->Draw();
}

// TODO: Clean

return msg.wParam;
}
[/source]


InputEngine.cpp
[source lang="cpp"]
#include <dinput.h>
#include "InputEngine.h"
#include "Main.h"


#pragma comment (lib, "dinput8.lib")
#pragma comment (lib, "dxguid.lib")


InputEngine::InputEngine(HINSTANCE hInstance, HWND hWnd)
{
DirectInput8Create(hInstance, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&din, NULL);
din->CreateDevice(GUID_SysKeyboard, &dinkeyboard, NULL);

dinkeyboard->SetDataFormat(&c_dfDIKeyboard);
dinkeyboard->SetCooperativeLevel(hWnd, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND);
}


InputEngine::~InputEngine(void)
{
}


void InputEngine::Update(void)
{
dinkeyboard->Acquire();
dinkeyboard->GetDeviceState(256, (LPVOID)keystate);

HandleInput();
}


void InputEngine::HandleInput(void)
{
if (keystate[DIK_LEFT] & 0x80)
{
escape = true;
}
}
[/source]
0

Share this post


Link to post
Share on other sites
Sorry for beeing unclear :wink:

Well, I've looked deeper into the problem, and I know where the problem is, I don't know how to solve it thoguh. The problem is that my code register button presses for all buttons except the escape button. I tried to change IDK_ESCAPE to IDK_SPACE and it worked perfect. So the question is, what's wrong with the DIK_ESCAPE?


[code]
if (keystate[DIK_ESCAPE] & 0x80)
{
escape = true;
}
[/code]


[source lang="cpp"]
#include <dinput.h>
#include "InputEngine.h"
#include "Main.h"


#pragma comment (lib, "dinput8.lib")
#pragma comment (lib, "dxguid.lib")


InputEngine::InputEngine(HINSTANCE hInstance, HWND hWnd)
{
escape = false;

DirectInput8Create(hInstance, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&din, NULL);
din->CreateDevice(GUID_SysKeyboard, &dinkeyboard, NULL);

dinkeyboard->SetDataFormat(&c_dfDIKeyboard);
dinkeyboard->SetCooperativeLevel(hWnd, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND);
}


InputEngine::~InputEngine(void)
{
}


void InputEngine::Update(void)
{
dinkeyboard->Acquire();
dinkeyboard->GetDeviceState(256, (LPVOID)keystate);

HandleInput();
}


void InputEngine::HandleInput(void)
{
if (keystate[DIK_ESCAPE] & 0x80)
{
escape = true;
}
}
[/source]
0

Share this post


Link to post
Share on other sites
I have a feeling is a signed-vs-unsigned char issue (masking off the high bit does weird things on signed chars) but the real solution is that you should not use DirectInput in the first place.
1

Share this post


Link to post
Share on other sites
What should I use instead? You know, I'm so motivated about getting better at programming, so'll try to learn almost anything. Please share your idea with me? :)
0

Share this post


Link to post
Share on other sites
no - winMain is not part of the Main class.

When your program begins it will search for the entry point. It is going to search for the WinMain function with the correct return type and parameters. The fact that you have defined this in the .cpp of the Main class is irrelevant - You could put the WinMain function in any .cpp file you like - it will still work.

I tend to stick the entry point in its own .cpp file.
2

Share this post


Link to post
Share on other sites
[quote name='falcon93' timestamp='1310934704' post='4836477']
What should I use instead? You know, I'm so motivated about getting better at programming, so'll try to learn almost anything. Please share your idea with me? :)
[/quote]

Since you're apparently on Windows, look into "raw input."
0

Share this post


Link to post
Share on other sites
[quote name='falcon93' timestamp='1310933160' post='4836469']
Sorry for beeing unclear :wink:

Well, I've looked deeper into the problem, and I know where the problem is, I don't know how to solve it thoguh. The problem is that my code register button presses for all buttons except the escape button. I tried to change IDK_ESCAPE to IDK_SPACE and it worked perfect. So the question is, what's wrong with the DIK_ESCAPE?


[code]
if (keystate[DIK_ESCAPE] & 0x80)
{
escape = true;
}
[/code]


[source lang="cpp"]
#include <dinput.h>
#include "InputEngine.h"
#include "Main.h"


#pragma comment (lib, "dinput8.lib")
#pragma comment (lib, "dxguid.lib")


InputEngine::InputEngine(HINSTANCE hInstance, HWND hWnd)
{
escape = false;

DirectInput8Create(hInstance, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&din, NULL);
din->CreateDevice(GUID_SysKeyboard, &dinkeyboard, NULL);

dinkeyboard->SetDataFormat(&c_dfDIKeyboard);
dinkeyboard->SetCooperativeLevel(hWnd, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND);
}


InputEngine::~InputEngine(void)
{
}


void InputEngine::Update(void)
{
dinkeyboard->Acquire();
dinkeyboard->GetDeviceState(256, (LPVOID)keystate);

HandleInput();
}


void InputEngine::HandleInput(void)
{
if (keystate[DIK_ESCAPE] & 0x80)
{
escape = true;
}
}
[/source]
[/quote]

Your real problem is that you are trying to use DirectInput for keyboard input MS itself has said you shouldn't do this. Read [url="http://www.gamedev.net/blog/233/entry-1567278-reasons-not-to-use-directinput-for-keyboard-input/"]this[/url] for more info and the link to the MS stuff


0

Share this post


Link to post
Share on other sites
Ok, I'll give Raw Input a try. I'll be back as soon as I've tried it out, hopefully successfully :wink:
0

Share this post


Link to post
Share on other sites
Ok, I've been trying the Raw input stuff, but now I'm stuck again :(


Firstly, my Input class has a CheckInput method that requires a LPARAM variable from the games message handler. How am I supposed to be able to access it? Here's the code:

[source lang="cpp"]
#include <Windows.h>
#include "Main.h"
#include "Graphics.h"
#include "Input.h"
#include "Player.h"


LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_DESTROY: PostQuitMessage(0); return 0;
}

return DefWindowProc(hWnd, message, wParam, lParam);
}


int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
WNDCLASSEX wc;
ZeroMemory(&wc, sizeof(WNDCLASSEX));

wc.cbSize = sizeof(WNDCLASSEX);
wc.hInstance = hInstance;
wc.lpfnWndProc = WindowProc;
wc.lpszClassName = L"AvoidBallClass";
wc.style = CS_VREDRAW | CS_HREDRAW;

RegisterClassEx(&wc);

HWND hWnd;
hWnd = CreateWindowEx(NULL, L"AvoidBallClass", L"AvoidBall", WS_OVERLAPPED, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, NULL, NULL, hInstance, NULL);
ShowWindow(hWnd, nCmdShow);

MSG msg;

Graphics* graphics = new Graphics(hWnd);
Input* input = new Input();
Player* player = new Player(*graphics, 100, 100);

while (true)
{
while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}

input->CheckInput(lParam);

graphics->Begin();
graphics->Draw(*player->sprite, player->x, player->y);
graphics->End();
}

// TODO: Clean up resources.

return msg.wParam;
}
[/source]

As you can see on row 50, I need to access the lParam parameter from the WindowProc method. How can I do that?



Also, this is my Input class. Does this seem to be correct, or have I missed anything? (havn't managed to test it due to the above problem). Code:

[source cpp="cpp"]
#include <Windows.h>
#include "Input.h"
#include "Main.h"


Input::Input()
{
RAWINPUTDEVICE rid[1];

rid[0].usUsagePage = 1;
rid[0].usUsage = 6;
rid[0].dwFlags = 0;
rid[0].hwndTarget = NULL;

RegisterRawInputDevices(rid, 1, sizeof(RAWINPUTDEVICE));
}


Input::~Input(void)
{
}


void Input::CheckInput(LPARAM lParam)
{
UINT bufferSize;
GetRawInputData((HRAWINPUT)lParam, RID_INPUT, NULL, &bufferSize, sizeof (RAWINPUTHEADER));
BYTE* buffer=new BYTE[bufferSize];
GetRawInputData((HRAWINPUT)lParam, RID_INPUT, (LPVOID)buffer, &bufferSize, sizeof (RAWINPUTHEADER));

RAWINPUT* raw = (RAWINPUT*) buffer;
if (raw->header.dwType == RIM_TYPEKEYBOARD)
{
USHORT keyCode = raw->data.keyboard.VKey;

switch (keyCode)
{
case VK_LEFT: MessageBox(NULL, L"Left", NULL, NULL); break;
case VK_RIGHT: MessageBox(NULL, L"Right", NULL, NULL); break;
case VK_UP: MessageBox(NULL, L"Up", NULL, NULL); break;
case VK_DOWN: MessageBox(NULL, L"Down", NULL, NULL); break;
}
}
}
[/source]
0

Share this post


Link to post
Share on other sites
The problem is that you use a class instead of simply putting your code in the message loop function. Here's how i do it:

[code]
LRESULT CALLBACK MsgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
//Process quit message
case WM_DESTROY:
case WM_CLOSE:
PostQuitMessage(0);
break;


case WM_KEYDOWN:
if(wParam == VK_ESCAPE){
PostQuitMessage(0);
break;
}
pKeyState[wParam] = true;
pVortez3DEngine->OnKeyDown((UINT)wParam);
break;
case WM_KEYUP:
pKeyState[wParam] = false;
pVortez3DEngine->OnKeyUp((UINT)wParam);
break;


default: break;
}

return DefWindowProc(hWnd, uMsg, wParam, lParam);
}

You can put more stuff there like mouse input and such. Also notice the pVortez3DEngine->OnKeyUp((UINT)wParam); wich mean that you can process all you input in another function if you want to. KeyState is simply an array of 256 bool that can be used to tell if one or multiple keys are pressed. As for the game loop, it should be done like this (that's why im using a pointer to my class object above).

void CVortez3DEngine::GameLoop()
{
MSG msg;
bool done = false;

// Application loop.
while(!done){
if(PeekMessage(&msg, NULL, NULL, NULL, PM_REMOVE)){
// If a quit message is received then stop rendering and quit the app.
if(msg.message == WM_QUIT){
done = true;
}
TranslateMessage(&msg); // Translate any messages.
DispatchMessage(&msg); // Dispatch any messages.
} else {
EngineTimer.Tick(); // Update engine timer
UpdateScene(EngineTimer.g_ElapsedTime); // Control the game flow
RenderScene(); // Render a frame.
}
}
}

void CVortez3DEngine::OnKeyDown(UINT KeyPressed){}
{
// Your code...
}

void CVortez3DEngine::OnKeyUp(UINT KeyPressed){}
{
// Your code...
}
[/code]
0

Share this post


Link to post
Share on other sites
Won't I get a windows delay when I use this method?

Anyway, I tried adding this
[code]
switch (message)
{
case WM_DESTROY: PostQuitMesssage(0); return 0;
case WM_KEYDOWN: if (wParam == VK_ESCAPE) { MessageBox(NULL, "Button Pressed!", NULL, NULL); } break;
}
[/code]
into the message loop, but nothing happend :/

Also, how can you reach the pKeyState and the OnKeyDown method from inside the msgProc?
0

Share this post


Link to post
Share on other sites
[quote=falcon93]
Won't I get a windows delay when I use this method?
[/quote]

Calling a messagebox here is probably a bad idea since it will block all message processed by this window. You could use messagebeep(0) instead or something similar(debugger breakpoint, file input, ect).

[quote=falcon93]
Also, how can you reach the pKeyState and the OnKeyDown method from inside the msgProc?
[/quote]

Im using a pointer to my main class, so i can use it anywhere in this file, it need to be initialised before you start the message loop, or it could be created dynamically like this:

[code]
#include "Vortez3DEngine.h"

CVortez3DEngine *pVortez3DEngine = NULL;

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
// Create the game engine object
pEngine = new CVortez3DEngine;

if(pEngine->InitEngine()){
pEngine->StartEngine();
}
pEngine->ShutdownEngine();

delete pEngine;
}
[/code]
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0