12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- #include <Bildschirm.h>
- #include <RenderThread.h>
- #include <KSGScript.h>
- #include <MausEreignis.h>
- #include <TastaturEreignis.h>
- #include <Schrift.h>
- #include <DateiSystem.h>
- #include <time.h>
- #include <Textfeld.h>
- #include <Datei.h>
- #include <M2Datei.h>
- #include <Model2D.h>
- #include <Bild.h>
- #include <Textur2D.h>
- #include <MiniGameV.h>
- #include "Minigames.h"
- #include <DateiSystem.h>
- #include "DLLDateien.h"
- #include <Network.h>
- #include <Globals.h>
- #include <iostream>
- #include <string>
- #include <XML.h>
- struct HINSTANCE__;
- using namespace Framework;
- void FClose( void *p, void *zF )
- {
- StopNachrichtenSchleife( ( (WFenster*)zF )->getFensterHandle() );
- }
- void doStuff()
- {
- Network::Start( 1 );
- WFenster *f = new WFenster();
- WNDCLASS fc = F_Normal( 0 );
- fc.lpszClassName = "Test";
- f->erstellen( WS_OVERLAPPEDWINDOW, fc );
- f->setSize( 800, 500 );
- f->setPosition( Punkt( 100, 100 ) );
- f->setVSchließAktion( FClose );
- f->setMausAktion( _ret1ME );
- f->setTastaturAktion( _ret1TE );
- f->setAnzeigeModus( 1 );
- Bildschirm *b = new Bildschirm3D( f->getThis() );
- b->setBackBufferSize( 800, 500 );
- f->setBildschirm( b->getThis() );
- b->setTestRend( 0 );
- LTDSDatei sd;
- sd.setPfad( new Text( "normal.ltds" ) );
- sd.leseDaten();
- Schrift *schrift = sd.ladeSchrift();
- DLLDateien dlls;
- API *api = new API( f );
- MiniGames *mGames = new MiniGames( schrift, dlls.getThis(), b, api );
- b->addMember( mGames->getThis() );
- b->update();
- RenderTh *r = new RenderTh();
- r->setBildschirm( b->getThis() );
- r->setMaxFps( 60 );
- r->setTickFunktion( []( void*p, void*o, double t )
- {
- if( getTastenStand( T_F1 ) )
- std::cout << t << "\n";
- } );
- r->beginn();
- StartNachrichtenSchleife();
- r->beenden();
- r->release();
- mGames->release();
- f->setBildschirm( 0 );
- b->release();
- f->release();
- schrift->release();
- delete api;
- Network::Exit();
- }
- int main()
- {
- #ifdef _DEBUG
- _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
- #endif
- initFramework();
- doStuff();
- releaseFramework();
- return 0;
- }
|