|
@@ -15,16 +15,13 @@
|
|
|
#include <Model2D.h>
|
|
|
#include <Bild.h>
|
|
|
#include <Textur2D.h>
|
|
|
-
|
|
|
-namespace Framework
|
|
|
-{
|
|
|
- void initFramework();
|
|
|
- void releaseFramework();
|
|
|
-}
|
|
|
+#include <Globals.h>
|
|
|
+#include <DLLRegister.h>
|
|
|
+#include <RenderThread.h>
|
|
|
|
|
|
using namespace Framework;
|
|
|
using namespace KSGScript;
|
|
|
-
|
|
|
+/*
|
|
|
class Obj : public Zeichnung
|
|
|
{
|
|
|
private:
|
|
@@ -67,7 +64,7 @@ public:
|
|
|
}
|
|
|
~Obj()
|
|
|
{}
|
|
|
- void doMausEreignis( MausEreignis &me ) override
|
|
|
+ void doPublicMausEreignis( MausEreignis &me ) override
|
|
|
{
|
|
|
lockZeichnung();
|
|
|
maus.x = me.mx;
|
|
@@ -136,19 +133,292 @@ public:
|
|
|
|
|
|
KSGScriptEditor *obj;
|
|
|
|
|
|
+
|
|
|
+int kamera2DTest();
|
|
|
+int rotationTest();
|
|
|
+*/
|
|
|
+
|
|
|
void FClose( void *p, void *zF )
|
|
|
{
|
|
|
- StopNachrichtenSchleife( ( (WFenster*)zF )->getFensterHandle() );
|
|
|
+ StopNachrichtenSchleife( ( (WFenster *)zF )->getFensterHandle() );
|
|
|
}
|
|
|
|
|
|
-int kamera2DTest();
|
|
|
-int rotationTest();
|
|
|
+typedef bool( *Update )( char, char, char, char, int * );
|
|
|
|
|
|
int main()
|
|
|
{
|
|
|
+ initFramework();
|
|
|
+ Datei d;
|
|
|
+ d.setDatei( "data.map" );
|
|
|
+ d.open( Datei::Style::schreiben );
|
|
|
+ int i = 2000;
|
|
|
+ d.schreibe( (char *)& i, 4 ); // width
|
|
|
+ d.schreibe( (char *)& i, 4 ); // height
|
|
|
+ //team 1
|
|
|
+ i = 0;
|
|
|
+ for( int j = 0; j < 3; j++ )
|
|
|
+ {
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ }
|
|
|
+ // spieler
|
|
|
+ for( int j = 0; j < 9; j++ )
|
|
|
+ {
|
|
|
+ i = j * 100 + 50;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ }
|
|
|
+ i = 2;
|
|
|
+ d.schreibe( (char *)& i, 4 ); // barieren
|
|
|
+ i = 1000;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 267;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 20;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 0x1 | 0x40;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 0;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 10;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 0;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 500;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 20;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 267;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 0x2 | 0x40;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 500;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 0;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = -1;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ //basen
|
|
|
+ i = 1;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 200;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 50;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 10;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = -1;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ // drops
|
|
|
+ i = 1;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 300;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 500;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 30;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 2;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ float f = 1 / 18.f;
|
|
|
+ for( int j = 0; j < 18; j++ )
|
|
|
+ d.schreibe( (char *)& f, 4 );
|
|
|
+ char c = (char)textLength( "name" );
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ d.schreibe( "name", (int)c );
|
|
|
+ // schalter
|
|
|
+ i = 1;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 250;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 10;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ c = 1;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ // schienen
|
|
|
+ i = 1;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 500;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 20;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 767;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ // timer
|
|
|
+ i = 1;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 700;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 50;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 600;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ c = 1;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ c = 0;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ c = 1;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ i = 0xFFFF0000;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ c = (char)textLength( "spiel ende" );
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ d.schreibe( "spiel ende", (int)c );
|
|
|
+ // tunnel
|
|
|
+ i = 1;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 500;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 50;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 30;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 600;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ c = 1;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ // umlenkungen
|
|
|
+ i = 1;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 300;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 50;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ i = 15;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ c = 2;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ i = 10;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ c = 1;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ // trigger
|
|
|
+ i = 3;
|
|
|
+ d.schreibe( (char *)& i, 4 );
|
|
|
+ c = (char)textLength( "base team" );
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ d.schreibe( "base team", (int)c );
|
|
|
+ i = 1;
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ i = 0;
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ i = 1;
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ i = 7; // schalter aktiviert
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ // base start team change
|
|
|
+ i = 10;
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ c = 2;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ i = 155; // team von spieler
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ c = 1;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ i = 149; // spieler zuletzt schalter aktiviert
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ c = 0;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ i = 11; // zufällige base
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ c = 0;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ c = (char)textLength( "spiel ende" );
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ d.schreibe( "spiel ende", (int)c );
|
|
|
+ i = 1;
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ i = 0;
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ i = 1;
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ i = 19; // Timer läuft aus
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ i = 123; // spiel vorbei
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ c = 1;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ i = 156; // zufälliges team gewinnt :D
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ c = 0;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ c = (char)textLength( "cheat" );
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ d.schreibe( "cheat", (int)c );
|
|
|
+ i = 1;
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ i = 1;
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ i = 1;
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ i = 12; // key release
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ i = 18; // boolean rechnung
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ c = 2;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ i = 197; // konstant taste
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ c = 0;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ c = 'c';
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ i = 114; // konstant variable
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ c = 0;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ c = (char)textLength( "Betroffene Taste" );
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ d.schreibe( "Betroffene Taste", (int)c );
|
|
|
+ c = 21; // ==
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ i = 124; // spieler give item
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ c = 3;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ i = 198; // Konstant gegenstand typ
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ c = 0;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ i = 1; // pfeil
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ i = 111; // konstant integer
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ c = 0;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ i = 1;
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ i = 114; // konstant variable
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ c = 0;
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ c = (char)textLength( "Ausführender Spieler" );
|
|
|
+ d.schreibe( &c, 1 );
|
|
|
+ d.schreibe( "Ausführender Spieler", (int)c );
|
|
|
+ // variablen
|
|
|
+ i = 0;
|
|
|
+ d.schreibe( (char *)&i, 4 );
|
|
|
+ d.close();
|
|
|
+ /*int i = 0;
|
|
|
+ for( int j = 0; j < 100; j++ )
|
|
|
+ std::cout << i << i++ << "\n";
|
|
|
+ return 0;
|
|
|
//return rotationTest();
|
|
|
return kamera2DTest();
|
|
|
-
|
|
|
+
|
|
|
Datei d;
|
|
|
Datei d2;
|
|
|
d.setDatei( "data_old.map" );
|
|
@@ -286,7 +556,7 @@ int main()
|
|
|
d2.close();
|
|
|
getchar();
|
|
|
return 0;
|
|
|
-
|
|
|
+
|
|
|
|
|
|
#ifdef _DEBUG
|
|
|
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
|
|
@@ -310,17 +580,7 @@ int main()
|
|
|
Obj o;
|
|
|
b->addMember( &o );
|
|
|
|
|
|
- b->update();
|
|
|
- RenderTh *r = new RenderTh();
|
|
|
- r->setBildschirm( b->getThis() );
|
|
|
- r->setMaxFps( 60 );
|
|
|
- r->beginn();
|
|
|
- StartNachrichtenSchleife();
|
|
|
- r->beenden();
|
|
|
- r->release();
|
|
|
- f->setBildschirm( 0 );
|
|
|
- b->release();
|
|
|
- f->release();
|
|
|
+ b->update();*/
|
|
|
releaseFramework();
|
|
|
return 0;
|
|
|
}
|