1 |
bearsoft |
1.1 |
#include "../../String/String.h"
|
2 |
|
|
#include "../../String/StringInput.h"
|
3 |
|
|
#include "../../System/System.h"
|
4 |
|
|
#include "Lw3dEngine.h"
|
5 |
|
|
#include "../../System/SystemDefine.h"
|
6 |
|
|
#include "../../Sdl/SdlSetup.h"
|
7 |
|
|
#include "../../Screen/ScreenData.h"
|
8 |
|
|
|
9 |
|
|
Lw3dEngine::Lw3dEngine(){}
|
10 |
|
|
Lw3dEngine::~Lw3dEngine(){}
|
11 |
|
|
|
12 |
|
|
void Lw3dEngine::run()
|
13 |
|
|
{
|
14 |
|
|
SdlSetup *sdlSetup = new SdlSetup();
|
15 |
|
|
|
16 |
|
|
ScreenData::setWidth(320);
|
17 |
|
|
ScreenData::setHeight(240);
|
18 |
|
|
ScreenData::setBitPlan(32);
|
19 |
|
|
|
20 |
|
|
sdlSetup->setupScreen();
|
21 |
|
|
|
22 |
|
|
engine3d= new Engine3d(ScreenData::getChunkyBuffer(),ScreenData::getWidth(),ScreenData::getHeight());
|
23 |
|
|
|
24 |
|
|
engine3d->init();
|
25 |
|
|
|
26 |
|
|
while(sdlSetup->getDone())
|
27 |
|
|
{
|
28 |
|
|
engine3d->run(0, sdlSetup->getMousex()-(ScreenData::getWidth()/2), sdlSetup->getMousey()-(ScreenData::getHeight()/2), 0);
|
29 |
|
|
sdlSetup->updateScreen();
|
30 |
|
|
sdlSetup->events();
|
31 |
|
|
}
|
32 |
|
|
|
33 |
|
|
delete engine3d;
|
34 |
|
|
sdlSetup->quit();
|
35 |
|
|
|
36 |
|
|
delete sdlSetup;
|
37 |
|
|
} |