123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- #include <iostream>
- #include <Fenster.h>
- #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>
- 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 );
- 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;
- }
|