Browse Source

Projektdateien hinzufügen.

Kolja Strohm 5 years ago
parent
commit
bbe012ab8f

BIN
Neuer Ordner/Test.exe


BIN
Neuer Ordner/framework.dll


BIN
Neuer Ordner/ship.ltdb


BIN
Neuer Ordner/ship.m2


+ 28 - 0
Test.sln

@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26430.16
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test\Test.vcxproj", "{84C1FC9D-25BD-4100-BE76-6CF501A231BB}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{84C1FC9D-25BD-4100-BE76-6CF501A231BB}.Debug|x64.ActiveCfg = Debug|x64
+		{84C1FC9D-25BD-4100-BE76-6CF501A231BB}.Debug|x64.Build.0 = Debug|x64
+		{84C1FC9D-25BD-4100-BE76-6CF501A231BB}.Debug|x86.ActiveCfg = Debug|Win32
+		{84C1FC9D-25BD-4100-BE76-6CF501A231BB}.Debug|x86.Build.0 = Debug|Win32
+		{84C1FC9D-25BD-4100-BE76-6CF501A231BB}.Release|x64.ActiveCfg = Release|x64
+		{84C1FC9D-25BD-4100-BE76-6CF501A231BB}.Release|x64.Build.0 = Release|x64
+		{84C1FC9D-25BD-4100-BE76-6CF501A231BB}.Release|x86.ActiveCfg = Release|Win32
+		{84C1FC9D-25BD-4100-BE76-6CF501A231BB}.Release|x86.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

BIN
Test.zip


BIN
Test/Framework.dll


BIN
Test/KSGScript.dll


+ 326 - 0
Test/Main.cpp

@@ -0,0 +1,326 @@
+
+#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>
+
+namespace Framework
+{
+    void initFramework();
+    void releaseFramework();
+}
+
+using namespace Framework;
+using namespace KSGScript;
+
+class Obj : public Zeichnung
+{
+private:
+    Model2D mdl;
+    Model2D mdlA;
+    Model2D mdlB;
+    Punkt maus;
+    Punkt mausAlt;
+    Vertex hp;
+    Vertex speed;
+    Textur2D txt;
+    float rot;
+
+public:
+    Obj()
+    {
+        M2Datei d;
+        d.setPfad( "ship.m2" );
+        d.leseDaten();
+        Model2DData *m = d.ladeModel( "ship" );
+        mdl.setModel( m );
+        mdl.setStyle( Model2D::Style::Mesh | Model2D::Style::Textur | Model2D::Style::Sichtbar );
+        mdl.setFarbe( 0xFFFFFFFF );
+        mdl.setPosition( 150, 150 );
+        mdlA.setStyle( Model2D::Style::Mesh | Model2D::Style::Textur );
+        mdlA.setFarbe( 0xFFFFFFFF );
+        mdlA.setPosition( 50, 50 );
+        mdlB.setStyle( Model2D::Style::Mesh | Model2D::Style::Textur );
+        mdlB.setFarbe( 0xFFFFFFFF );
+        mdlB.setPosition( 250, 50 );
+        hp = Vertex( 0, 0 );
+        mausAlt = Punkt( 0, 0 );
+        maus = Punkt( 0, 0 );
+        LTDBDatei td;
+        td.setDatei( new Text( "ship.ltdb" ) );
+        td.leseDaten( 0 );
+        Bild *b = td.laden( 0, new Text( "a.png" ) );
+        txt.setTexturZ( b );
+        mdl.setTextur( txt.getThis(), "ship" );
+    }
+    ~Obj()
+    {}
+    void doMausEreignis( MausEreignis &me ) override
+    {
+        lockZeichnung();
+        maus.x = me.mx;
+        maus.y = me.my;
+        if( me.id == ME_RLinks )
+        {
+            mausAlt.x = me.mx;
+            mausAlt.y = me.my;
+        }
+        hp = Vertex( 0, 0 );
+        speed = Vertex( 0, 0 );
+        if( mdl.zModel()->calcHitPoint( mausAlt - Vertex( 150, 150 ), maus - mausAlt, "ship", hp, speed, rot ) )
+        {
+            if( me.id == ME_RRechts )
+            {
+                Polygon2D a;
+                Polygon2D b;
+                Punkt pa;
+                Punkt pb;
+                mdl.zModel()->split( mausAlt - Vertex( 150, 150 ), maus - mausAlt, "ship", a, b, pa, pb, []()
+                {
+                    return rand() / (double)RAND_MAX;
+                } );
+                Array< Polygon2D > *aa = new Array< Polygon2D >();
+                aa->add( a );
+                Model2DData *ad = new Model2DData();
+                ad->erstelleModell( aa );
+                Array< Polygon2D > *ba = new Array< Polygon2D >();
+                ba->add( b );
+                Model2DData *bd = new Model2DData();
+                bd->erstelleModell( ba );
+                mdlA.setModel( ad );
+                mdlB.setModel( bd );
+                mdlA.setTextur( txt.getThis() );
+                mdlB.setTextur( txt.getThis() );
+                mdlA.addStyle( Model2D::Style::Sichtbar );
+                mdlB.addStyle( Model2D::Style::Sichtbar );
+            }
+        }
+        unlockZeichnung();
+    }
+    bool tick( double t ) override
+    {
+        return 1;
+    }
+    void render( Bild &bild ) override
+    {
+        lockZeichnung();
+        mdl.render( bild );
+        mdlA.render( bild );
+        mdlB.render( bild );
+        bild.fillCircle( maus.x, maus.y, 1, 0xFFFF0000 );
+        bild.drawLinie( mausAlt, maus, 0xFF00FF00 );
+        bild.fillCircle( hp.x + 150, hp.y + 150, 1, 0xFF0000FF );
+        bild.drawLinie( Punkt( 150, 150 ), speed + Punkt( 150, 150 ), 0xFF00FF00 );
+        for( int i = 1; i < 10; i++ )
+        {
+            Vertex pos = hp + ( maus - mausAlt ) * i + Vertex( 150, 150 );
+            Vertex pos2 = hp + ( maus - mausAlt ) * ( i - 1 ) + Vertex( 150, 150 );
+            bild.drawLinie( pos, pos2, 0xFFFF0000 );
+            bild.fillCircle( pos.x, pos.y, 1, 0xFF00FFFF );
+        }
+        unlockZeichnung();
+    }
+};
+
+KSGScriptEditor *obj;
+
+void FClose( void *p, void *zF )
+{
+    StopNachrichtenSchleife( ( (WFenster*)zF )->getFensterHandle() );
+}
+
+int kamera2DTest();
+int rotationTest();
+
+int main()
+{
+    //return rotationTest();
+    return kamera2DTest();
+    
+    Datei d;
+    Datei d2;
+    d.setDatei( "data_old.map" );
+    d2.setDatei( "data.map" );
+    d2.open( Datei::Style::schreiben );
+    d.open( Datei::Style::lesen );
+    int ressourceAnz = 0;
+    d.lese( (char*)&ressourceAnz, 4 );
+    d2.schreibe( (char*)&ressourceAnz, 4 );
+    for( int i = 0; i < ressourceAnz; i++ )
+    {
+        int j = 0;
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        char len = 0;
+        d.lese( &len, 1 );
+        d2.schreibe( (char*)&len, 1 );
+        Text txt;
+        txt.fillText( '0', len + 1 );
+        d.lese( txt, len );
+        d2.schreibe( (char*)txt, len );
+    }
+    d.lese( (char*)&ressourceAnz, 4 );
+    d2.schreibe( (char*)&ressourceAnz, 4 );
+    d.lese( (char*)&ressourceAnz, 4 );
+    d2.schreibe( (char*)&ressourceAnz, 4 );
+    d.lese( (char*)&ressourceAnz, 4 );
+    d2.schreibe( (char*)&ressourceAnz, 4 );
+    for( int i = 0; i < ressourceAnz; i++ )
+    {
+        int j = 0;
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        double f = 0;
+        d.lese( (char*)&f, 8 );
+        d2.schreibe( (char*)&f, 8 );
+        d.lese( (char*)&f, 8 );
+        d2.schreibe( (char*)&f, 8 );
+        char t = 0;
+        d.lese( &t, 1 );
+        d2.schreibe( (char*)&t, 1 );
+    }
+    for( int i = 0; i < 9; i++ )
+    {
+        int j = 0;
+        double f = 0;
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&f, 8 );
+        d2.schreibe( (char*)&f, 8 );
+        d.lese( (char*)&f, 8 );
+        f = 5;
+        d2.schreibe( (char*)&f, 8 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&f, 8 );
+        d2.schreibe( (char*)&f, 8 );
+        d.lese( (char*)&f, 8 );
+        d2.schreibe( (char*)&f, 8 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&f, 8 );
+        d2.schreibe( (char*)&f, 8 );
+        double antriebsEffizienz = 100;
+        d.lese( (char*)&antriebsEffizienz, 8 );
+        d2.schreibe( (char*)&antriebsEffizienz, 8 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+    }
+    for( int i = 0; i < 3; i++ )
+    {
+        int j = 0;
+        double f = 0;
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&f, 8 );
+        d2.schreibe( (char*)&f, 8 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&f, 8 );
+        d2.schreibe( (char*)&f, 8 );
+        d.lese( (char*)&f, 8 );
+        d2.schreibe( (char*)&f, 8 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+        d.lese( (char*)&f, 8 );
+        d2.schreibe( (char*)&f, 8 );
+        double antriebsEffizienz = 0;
+        d.lese( (char*)&antriebsEffizienz, 8 );
+        d2.schreibe( (char*)&antriebsEffizienz, 8 );
+        d.lese( (char*)&j, 4 );
+        d2.schreibe( (char*)&j, 4 );
+    }
+    d.close();
+    d2.close();
+    getchar();
+    return 0;
+    
+
+#ifdef _DEBUG
+    _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
+#endif
+    initFramework();
+    WFenster *f = new WFenster();
+    WNDCLASS fc = F_Normal( 0 );
+    fc.lpszClassName = "Test";
+    f->erstellen( WS_OVERLAPPEDWINDOW, fc );
+    f->setSize( 900, 900 );
+    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( 300, 300 );
+    f->setBildschirm( b->getThis() );
+    b->setTestRend( 0 );
+
+    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();
+    releaseFramework();
+    return 0;
+}

+ 126 - 0
Test/RotationTest.cpp

@@ -0,0 +1,126 @@
+#include <Fenster.h>
+#include <Bildschirm.h>
+#include <RenderThread.h>
+#include <Welt2D.h>
+#include <M2Datei.h>
+#include <Model2D.h>
+#include <DateiSystem.h>
+#include <Textur2D.h>
+#include <Kamera2D.h>
+#include <iostream>
+#include <Bild.h>
+
+using namespace Framework;
+
+namespace Framework
+{
+    void initFramework();
+    void releaseFramework();
+}
+
+void FClose( void *p, void *zF );
+
+extern Punkt p1;
+extern Punkt p2;
+Model2DObject *obj;
+Model2DObject *obj2;
+
+int rotationTest()
+{
+    p1 = Punkt( -1, -1 );
+    initFramework();
+
+    Welt2D w2d;
+    Welt2D *w2 = &w2d;
+    Kamera2D kam2d;
+    Kamera2D *kam2 = &kam2d;
+
+    WNDCLASS wndC = Framework::F_Normal( 0 );
+    wndC.lpszClassName = "Kamera 2D Test";
+    WFenster f;
+    f.erstellen( WS_OVERLAPPEDWINDOW, wndC );
+    f.setPosition( Punkt( 100, 100 ) );
+    f.setSize( 900, 900 );
+    f.setVSchließAktion( FClose );
+    f.setMausAktion( [ w2, kam2 ]( void *p, void *o, MausEreignis me )
+    {
+        p2 = Punkt( me.mx, me.my );
+        if( me.id == ME_RRechts )
+        {
+            Vertex wp = kam2->getWorldCoordinates( Punkt( me.mx, me.my ) );
+            w2->explosion( wp, 100000, 10000 );
+        }
+        if( me.id == ME_RLinks )
+        {
+            if( p1 == Punkt( -1, -1 ) )
+                p1 = Punkt( me.mx, me.my );
+            else
+            {
+                w2->impuls( kam2->getWorldCoordinates( p1 ), kam2->getWorldDirection( Vertex( me.mx, me.my ) - (Vertex)p1 ) );
+                p1 = Punkt( -1, -1 );
+            }
+        }
+        return 1;
+    } );
+    f.setTastaturAktion( _ret1TE );
+    f.setAnzeigeModus( 1 );
+
+    Bildschirm2D b( f.getThis() );
+    b.update();
+    b.setTestRend( 0 );
+    b.setFill( 0 );
+    f.setBildschirm( b.getThis() );
+
+    RenderTh rth;
+    rth.setBildschirm( b.getThis() );
+    rth.setRenderFunktion( []( void*a, void*rth, Bild*c )
+    {
+        c->fillRegion( 0, 0, c->getBreite(), c->getHeight(), 0xFF000000 );
+        std::cout << "FPS: " << ( 1 / ( (RenderTh*)rth )->getRenderTickZeit() ) << " | Zeit pro Tick:" << ( (RenderTh*)rth )->getRenderTickZeit() << "\n";
+        if( p1 != Punkt( -1, -1 ) )
+            c->drawLinie( p1, p2, 0xFFFFFFFF );
+        obj2->setDrehung( obj->getDrehung() );
+        Vertex speed( 1, 0 );
+        speed = speed.rotation( obj->getDrehung() );
+        float faktor = -1;
+        if( obj->getDrehung() > PI )
+            faktor = -faktor;
+        if( obj->getDrehung() < -PI )
+            faktor = -faktor;
+        obj2->addDrehung( faktor * speed.angle( Vertex( 1, 0 ) ) );
+    } );
+
+    M2Datei d;
+    d.setPfad( "ship.m2" );
+    d.leseDaten();
+    Model2DData *m = d.ladeModel( "ship" );
+    LTDBDatei td;
+    td.setDatei( new Text( "ship.ltdb" ) );
+    td.leseDaten( 0 );
+    Bild *bt = td.laden( 0, new Text( "a.png" ) );
+    Textur2D txt;
+    txt.setTexturZ( bt );
+    obj = new Model2DObject();
+    obj->setModel( m->getThis() );
+    obj->setTextur( txt.getThis(), "ship" );
+    obj->setDrehungSpeed( -0.5 );
+    w2d.addObject( obj );
+    obj2 = new Model2DObject();
+    obj2->setPosition( 200, 0 );
+    obj2->setModel( m->getThis() );
+    obj2->setTextur( txt.getThis(), "ship" );
+    w2d.addObject( obj2 );
+
+    rth.beginn();
+
+    kam2d.setStyle( Kamera2D::Style::Sichtbar );
+    kam2d.setSize( 900, 900 );
+    kam2d.setWelt( w2d.getThis() );
+    b.addMember( &kam2d );
+
+    StartNachrichtenSchleife();
+
+    rth.beenden();
+
+    return 0;
+}

BIN
Test/Test.exe


+ 165 - 0
Test/Test.vcxproj

@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <VCProjectVersion>15.0</VCProjectVersion>
+    <ProjectGuid>{84C1FC9D-25BD-4100-BE76-6CF501A231BB}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>Test</RootNamespace>
+    <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v141</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v141</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v141</PlatformToolset>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v141</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="Shared">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <IncludePath>..\..\Framework;..\..\ksgScript\ksgScript\Include;$(IncludePath)</IncludePath>
+    <LibraryPath>..\..\Framework\x64\Debug;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <IncludePath>..\..\Framework;..\..\ksgScript\ksgScript\Include;$(IncludePath)</IncludePath>
+    <LibraryPath>..\..\Framework\x64\Release;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <AdditionalDependencies>Framework.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+    <CustomBuildStep>
+      <Command>copy "..\..\Framework\x64\Debug\Framework.dll" "framework.dll"</Command>
+      <Outputs>kopieren;%(Outputs)</Outputs>
+    </CustomBuildStep>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>Framework.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+    <CustomBuildStep>
+      <Command>copy "..\..\Framework\x64\Release\Framework.dll" "framework.dll"</Command>
+    </CustomBuildStep>
+    <CustomBuildStep>
+      <Outputs>kopieren;%(Outputs)</Outputs>
+    </CustomBuildStep>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="Main.cpp" />
+    <ClCompile Include="RotationTest.cpp" />
+    <ClCompile Include="TestKamera2D.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 28 - 0
Test/Test.vcxproj.filters

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Quelldateien">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Headerdateien">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Ressourcendateien">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="Main.cpp">
+      <Filter>Quelldateien</Filter>
+    </ClCompile>
+    <ClCompile Include="TestKamera2D.cpp">
+      <Filter>Quelldateien</Filter>
+    </ClCompile>
+    <ClCompile Include="RotationTest.cpp">
+      <Filter>Quelldateien</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 120 - 0
Test/TestKamera2D.cpp

@@ -0,0 +1,120 @@
+#include <Fenster.h>
+#include <Bildschirm.h>
+#include <RenderThread.h>
+#include <Welt2D.h>
+#include <M2Datei.h>
+#include <Model2D.h>
+#include <DateiSystem.h>
+#include <Textur2D.h>
+#include <Kamera2D.h>
+#include <iostream>
+#include <Bild.h>
+
+using namespace Framework;
+
+namespace Framework
+{
+    void initFramework();
+    void releaseFramework();
+}
+
+void FClose( void *p, void *zF );
+
+Punkt p1;
+Punkt p2;
+
+int kamera2DTest()
+{
+    p1 = Punkt( -1, -1 );
+    initFramework();
+
+    Welt2D w2d;
+    w2d.setAirResistance( 0.001 );
+    w2d.setCircular( 1 );
+    w2d.setSize( 5000, 5000 );
+    w2d.setSize( 1 );
+    Welt2D *w2 = &w2d;
+    Kamera2D kam2d;
+    Kamera2D *kam2 = &kam2d;
+
+    WNDCLASS wndC = Framework::F_Normal( 0 );
+    wndC.lpszClassName = "Kamera 2D Test";
+    WFenster f;
+    f.erstellen( WS_OVERLAPPEDWINDOW, wndC );
+    f.setPosition( Punkt( 100, 100 ) );
+    f.setSize( 900, 900 );
+    f.setVSchließAktion( FClose );
+    f.setMausAktion( [ w2, kam2 ]( void *p, void *o, MausEreignis me )
+    {
+        p2 = Punkt( me.mx, me.my );
+        if( me.id == ME_RRechts )
+        {
+            Vertex wp = kam2->getWorldCoordinates( Punkt( me.mx, me.my ) );
+            w2->explosion( wp, 100000, 10000 );
+        }
+        if( me.id == ME_RLinks )
+        {
+            if( p1 == Punkt( -1, -1 ) )
+                p1 = Punkt( me.mx, me.my );
+            else
+            {
+                w2->impuls( kam2->getWorldCoordinates( p1 ), kam2->getWorldDirection( Vertex( me.mx, me.my ) - (Vertex)p1 ) );
+                p1 = Punkt( -1, -1 );
+            }
+        }
+        return 1;
+    } );
+    f.setTastaturAktion( _ret1TE );
+    f.setAnzeigeModus( 1 );
+
+    Bildschirm2D b( f.getThis() );
+    b.update();
+    b.setTestRend( 0 );
+    b.setFill( 0 );
+    f.setBildschirm( b.getThis() );
+    
+    RenderTh rth;
+    rth.setBildschirm( b.getThis() );
+    rth.setRenderFunktion( []( void*a, void*rth, Bild*c )
+    {
+        c->fillRegion( 0, 0, c->getBreite(), c->getHeight(), 0xFF000000 );
+        std::cout << "FPS: " << (1 / (( RenderTh*)rth)->getRenderTickZeit()) << " | Zeit pro Tick:" << ( (RenderTh*)rth )->getRenderTickZeit() << "\n";
+        if( p1 != Punkt( -1, -1 ) )
+            c->drawLinie( p1, p2, 0xFFFFFFFF );
+    } );
+    rth.beginn();
+
+    M2Datei d;
+    d.setPfad( "ship.m2" );
+    d.leseDaten();
+    Model2DData *m = d.ladeModel( "ship" );
+    LTDBDatei td;
+    td.setDatei( new Text( "ship.ltdb" ) );
+    td.leseDaten( 0 );
+    Bild *bt = td.laden( 0, new Text( "a.png" ) );
+    Textur2D txt;
+    txt.setTexturZ( bt );
+    for( int i = 0; i < 100; i++ )
+    {
+        Model2DObject *mdl = new Model2DObject();
+        mdl->setModel( m->getThis() );
+        mdl->setPosition( (float)(rand() / 16 - RAND_MAX / 32), (float)(rand() / 16 - RAND_MAX / 32) );
+        mdl->setSpeed( (float)rand() / 128 - (float)rand() / 128, (float)rand() / 128 - (float)rand() / 128 );
+        mdl->setDrehungSpeed( (float)rand() / ( RAND_MAX / 2 ) - (float)rand() / ( RAND_MAX / 2 ) );
+        mdl->setTextur( txt.getThis(), "ship" );
+        w2d.addObject( mdl );
+    }
+
+    kam2d.setStyle( Kamera2D::Style::Sichtbar );
+    kam2d.setSize( 900, 900 );
+    kam2d.setWelt( w2d.getThis() );
+    kam2d.setZoom( 0.3f );
+    
+    b.addMember( &kam2d );
+
+    StartNachrichtenSchleife();
+
+    rth.beenden();
+
+    return 0;
+}

BIN
Test/asteroids.ltdb


BIN
Test/asteroids.m2


BIN
Test/data.map


BIN
Test/data_old.map


BIN
Test/data_old2.map


BIN
Test/normal.ltds


BIN
Test/ship.ltdb


BIN
Test/ship.m2


BIN
Test/ship2.m2


+ 382 - 0
Test/test.cpp

@@ -0,0 +1,382 @@
+#include <KSGSStandart.h>
+
+var int besitzStatus;
+var int erwerbbarStatus;
+var Bild goldBild;
+var Bild silberBild;
+var Bild kupferBild;
+
+class TextErscheinen
+{
+private:
+	var TextFeld beschreibung;
+	var Text txt;
+	var int num;
+	var int län;
+	var double z;
+public:
+	func void init( int besitzStatus )
+	{
+		initTextFeld( beschreibung, 5, 5, 545, 180, "", 0x101 );
+		txt = "Dies ist eine Karte für das Spiel Linie\n";
+		txt += "Maximale Spieleranzahl: 10\n";
+		txt += "Teamanzahl: 10\n";
+		txt += "Maximale Spieler pro Team: 1\n";
+		txt += "Spieltyp: Alle gegen Alle\n";
+		if( besitzStatus == 1 )
+		{
+			txt += "Du besitzt die Testversion dieser Karte.\n";
+			txt += "Anzahl verbleibender Spiele: ";
+			txt += Rückruf( "GetTestVersionVerbleibend" );
+		}
+		if( besitzStatus == 2 )
+		{
+			txt += "Du besitzt die Vollversion dieser Karte.";
+		}
+		län = txt.getLänge();
+		num = 0;
+		z = 0;
+	}
+	func bool next( double zeit )
+	{
+		z += zeit;
+		if( ( z > 0.03 ) && ( num < län ) )
+		{
+			var Text t;
+			t = beschreibung.getText();
+			while( z > 0.03 )
+			{
+				z -= 0.03;
+				t.anhängen( txt.getTeilText( num, num + 1 ) );
+				num += 1;
+				if( num < län )
+				{
+					break;
+				}
+			}
+			beschreibung.setText( t );
+			return true;
+		}
+		return false;
+	}
+	func void render( Bild b )
+	{
+		beschreibung.render( b );
+	}
+};
+
+class TestVersion
+{
+private:
+	var double y;
+	var int x;
+	var double yS;
+	var int alpha;
+	var TextFeld tve;
+	var TextFeld tvkosten;
+	var TextFeld tvGoldTF;
+	var TextFeld tvSilberTF;
+	var TextFeld tvKupferTF;
+	var BildO tvGoldBildO;
+	var BildO tvSilberBildO;
+	var BildO tvKupferBildO;
+	var Knopf tvKaufen;
+	var TextFeld tvNGK;
+public:
+	func void init()
+	{
+		yS = 150;
+		x = 0;
+		y = 0;
+		alpha = 0;
+		initTextFeld( tve, 5, 0, 300, 20, "", 0x101 );
+		initTextFeld( tvkosten, 5, 25, 50, 20, "", 0x701 );
+		initTextFeld( tvGoldTF, 60, 25, 0, 0, "", 0x701 );
+		initTextFeld( tvSilberTF, 90, 25, 0, 0, "", 0x701 );
+		initTextFeld( tvKupferTF, 120, 25, 0, 0, "", 0x701 );
+		initTextFeld( tvNGK, 5, 75, 200, 20, "", 0x101 );
+		if( ( besitzStatus == 0 ) && ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 2 ) )
+		{
+			tve.setText( "10 Spiele Testversion" );
+			tvkosten.setText( "Kosten: " );
+			var int preis;
+			preis = Rückruf( "GetPreis", 0 );
+			var Text preisT = preis / 10000;
+			tvGoldTF.setText( preisT );
+			preisT = ( preis / 100 ) % 100;
+			tvSilberTF.setText( preisT );
+			preisT = preis % 100;
+			tvKupferTF.setText( preisT );
+			tvGoldTF.setGrößeNachText();
+			tvSilberTF.setGrößeNachText();
+			tvKupferTF.setGrößeNachText();
+			tvGoldTF.setGröße( tvGoldTF.getBreite(), 20 );
+			tvSilberTF.setGröße( tvSilberTF.getBreite(), 20 );
+			tvKupferTF.setGröße( tvKupferTF.getBreite(), 20 );
+			tvSilberTF.setPosition( tvSilberTF.getX() + tvGoldTF.getBreite(), tvSilberTF.getY() );
+			tvKupferTF.setPosition( tvKupferTF.getX() + tvGoldTF.getBreite() + tvSilberTF.getBreite(), tvSilberTF.getY() );
+			initBildO( tvGoldBildO, 60 + tvGoldTF.getBreite(), 25, goldBild );
+			initBildO( tvSilberBildO, 90 + tvGoldTF.getBreite() + tvSilberTF.getBreite(), 25, silberBild );
+			initBildO( tvKupferBildO, 120 + tvGoldTF.getBreite() + tvSilberTF.getBreite() + tvKupferTF.getBreite(), 25, kupferBild );
+			initKnopf( tvKaufen, 5, 50, 100, 20, "Erwerben" );
+			tvKaufen.setMausEreignis( "tvKME" );
+			if( preis > Rückruf( "GetKupfer" ) )
+			{
+				tvKaufen.löscheStyle( 0x2 );
+				tvNGK.setText( "Du hast nicht genug Geld." );
+			}
+		}
+	}
+	func bool tick( double z )
+	{
+		if( ( alpha == 255 ) && ( y >= 280 ) )
+		{
+			return tvKaufen.tick( z );
+		}
+		alpha += ( z * 100 );
+		if( alpha > 255 )
+		{
+			alpha = 255;
+		}
+		y += ( yS * z );
+		yS -= ( z * 40 );
+		if( yS < 0 )
+		{
+			yS = 0;
+		}
+		if( y > 280 )
+		{
+			y = 280;
+		}
+		return true;
+	}
+	func void maus( MausEreignis me )
+	{
+		me.setMy( me.my - y );
+		tvKaufen.doMausEreignis( me );
+		me.setMy( me.my + y );
+	}
+	func void render( Bild b )
+	{
+		if( ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 2 ) )
+		{
+			b.setAlpha( alpha );
+			if( b.setDrawOptions( 0, y, 300, 200 ) )
+			{
+				tve.render( b );
+				tvkosten.render( b );
+				tvGoldTF.render( b );
+				tvSilberTF.render( b );
+				tvKupferTF.render( b );
+				tvGoldBildO.render( b );
+				tvSilberBildO.render( b );
+				tvKupferBildO.render( b );
+				tvKaufen.render( b );
+				tvNGK.render( b );
+				b.releaseDrawOptions();
+			}
+			b.releaseAlpha();
+		}
+	}
+};
+
+class VollVersion
+{
+private:
+	var double y;
+	var int x;
+	var double yS;
+	var int alpha;
+	var TextFeld vve;
+	var TextFeld vvkosten;
+	var TextFeld vvGoldTF;
+	var TextFeld vvSilberTF;
+	var TextFeld vvKupferTF;
+	var BildO vvGoldBildO;
+	var BildO vvSilberBildO;
+	var BildO vvKupferBildO;
+	var Knopf vvKaufen;
+	var TextFeld vvNGK;
+public:
+	func void init()
+	{
+		yS = 150;
+		x = 0;
+		y = 0;
+		alpha = 0;
+		initTextFeld( vve, 0, 0, 100, 20, "", 0x101 );
+		initTextFeld( vvkosten, 410, 25, 50, 20, "", 0x701 );
+		initTextFeld( vvGoldTF, 470, 25, 0, 0, "", 0x701 );
+		initTextFeld( vvSilberTF, 500, 25, 0, 0, "", 0x701 );
+		initTextFeld( vvKupferTF, 530, 25, 0, 0, "", 0x701 );
+		initTextFeld( vvNGK, 390, 75, 160, 20, "", 0x101 );
+		if( ( besitzStatus == 0 ) && ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 1 ) )
+		{
+			vve.setText( "Vollversion" );
+			vve.setGrößeNachText();
+			vve.setPosition( 550 - vve.getBreite(), vve.getY() );
+			vvkosten.setText( "Kosten: " );
+			var int preis;
+			preis = Rückruf( "GetPreis", 1 );
+			var Text preisT = preis / 10000;
+			vvGoldTF.setText( preisT );
+			preisT = ( preis / 100 ) % 100;
+			vvSilberTF.setText( preisT );
+			preisT = preis % 100;
+			vvKupferTF.setText( preisT );
+			vvGoldTF.setGrößeNachText();
+			vvSilberTF.setGrößeNachText();
+			vvKupferTF.setGrößeNachText();
+			vvGoldTF.setGröße( vvGoldTF.getBreite(), 20 );
+			vvSilberTF.setGröße( vvSilberTF.getBreite(), 20 );
+			vvKupferTF.setGröße( vvKupferTF.getBreite(), 20 );
+			vvKupferTF.setPosition( vvKupferTF.getX() - vvKupferTF.getBreite(), vvKupferTF.getY() );
+			vvSilberTF.setPosition( ( vvSilberTF.getX() - vvKupferTF.getBreite() ) - vvSilberTF.getBreite(), vvSilberTF.getY() );
+			vvGoldTF.setPosition( ( ( vvGoldTF.getX() - vvKupferTF.getBreite() ) - vvSilberTF.getBreite() ) - vvGoldTF.getBreite(), vvGoldTF.getY() );
+			vvkosten.setPosition( vvGoldTF.getX() - 55, vvkosten.getY() );
+			initBildO( vvGoldBildO, vvGoldTF.getX() + vvGoldTF.getBreite(), 25, goldBild );
+			initBildO( vvSilberBildO, vvSilberTF.getX() + vvSilberTF.getBreite(), 25, silberBild );
+			initBildO( vvKupferBildO, vvKupferTF.getX() + vvKupferTF.getBreite(), 25, kupferBild );
+			initKnopf( vvKaufen, 450, 50, 100, 20, "Erwerben" );
+			vvKaufen.setMausEreignis( "vvKME" );
+			if( preis > Rückruf( "GetKupfer" ) )
+			{
+				vvKaufen.löscheStyle( 0x2 );
+				vvNGK.setText( "Du hast nicht genug Geld." );
+			}
+		}
+	}
+	func bool tick( double z )
+	{
+		if( ( alpha == 255 ) && ( y >= 280 ) )
+		{
+			return vvKaufen.tick( z );
+		}
+		alpha += ( z * 100 );
+		if( alpha > 255 )
+		{
+			alpha = 255;
+		}
+		y += ( yS * z );
+		yS -= ( z * 40 );
+		if( yS < 0 )
+		{
+			yS = 0;
+		}
+		if( y > 280 )
+		{
+			y = 280;
+		}
+		return true;
+	}
+	func void maus( MausEreignis me )
+	{
+		me.setMy( me.my - y );
+		vvKaufen.doMausEreignis( me );
+		me.setMy( me.my + y );
+	}
+	func void render( Bild b )
+	{
+		if( ( erwerbbarStatus != 0 ) && ( erwerbbarStatus != 1 ) )
+		{
+			b.setAlpha( alpha );
+			if( b.setDrawOptions( 0, y, 700, 200 ) )
+			{
+				vve.render( b );
+				vvkosten.render( b );
+				vvGoldTF.render( b );
+				vvSilberTF.render( b );
+				vvKupferTF.render( b );
+				vvGoldBildO.render( b );
+				vvSilberBildO.render( b );
+				vvKupferBildO.render( b );
+				vvKaufen.render( b );
+				vvNGK.render( b );
+				b.releaseDrawOptions();
+			}
+			b.releaseAlpha();
+		}
+	}
+};
+
+var TextErscheinen beschreibung;
+var TestVersion tv;
+var VollVersion vv;
+
+func void start()
+{
+	besitzStatus = Rückruf( "GetBesitzStatus" );
+	erwerbbarStatus = Rückruf( "GetErwerbbarStatus" );
+	goldBild = Rückruf( "GetBild", "data/bilder/system.ltdb", "system.ltdb/gold.jpg" );
+	silberBild = Rückruf( "GetBild", "data/bilder/system.ltdb", "system.ltdb/silber.jpg" );
+	kupferBild = Rückruf( "GetBild", "data/bilder/system.ltdb", "system.ltdb/kupfer.jpg" );
+	beschreibung.init( besitzStatus );
+	tv.init();
+	vv.init();
+}
+
+func void initTextFeld( TextFeld tf, int x, int y, int br, int hö, Text t, int style )
+{
+	tf.setPosition( x, y );
+	tf.setGröße( br, hö );
+	tf.setStyle( style );
+	tf.setSchriftFarbe( 0xFFFFFFFF );
+	tf.setText( t );
+}
+
+func void initBildO( BildO bo, int x, int y, Bild b )
+{
+	bo.setPosition( x, y );
+	bo.setGröße( b.getBreite(), b.getHöhe() );
+	bo.setStyle( 0x1 );
+	bo.setBild( b );
+}
+
+func void initKnopf( Knopf k, int x, int y, int br, int hö, Text t )
+{
+	k.setPosition( x, y );
+	k.setGröße( br, hö );
+	k.setText( t );
+	k.addStyle( 0x1 );
+}
+
+func bool maus( MausEreignis me )
+{
+	tv.maus( me );
+	vv.maus( me );
+	return me.verarbeitet;
+}
+
+func bool tick( double z )
+{
+	var bool ret;
+	ret = beschreibung.next( z );
+	ret |= tv.tick( z );
+	ret |= vv.tick( z );
+	return ret;
+}
+
+func void render( Bild rObj )
+{
+	beschreibung.render( rObj );
+	tv.render( rObj );
+	vv.render( rObj );
+}
+
+func bool tvKME( MausEreignis me )
+{
+	if( me.id == 3 )
+	{
+		Rückruf( "Kaufen", 0 );
+	}
+	return true;
+}
+
+func bool vvKME( MausEreignis me )
+{
+	if( me.id == 3 )
+	{
+		Rückruf( "Kaufen", 1 );
+	}
+	return true;
+}

+ 88 - 0
Test/tmp.cpp

@@ -0,0 +1,88 @@
+#include <KSGSStandart.h>
+
+class TextErscheinen
+{
+private:
+    var TextFeld beschreibung;
+    var Text txt;
+    var int num;
+    var int län;
+    var double z;
+public:
+    func void init()
+    {
+        initTextFeld( beschreibung, 5, 5, 568, 418, "", 0x101 );
+        txt = "Bei dem spiel Linie bewegen sich die Spieler duch ein Spielfeld und können nur ihre Richtung beeinflussen. Dabei hinterlässt Jeder Spieler eine Linie die nicht berührt werden darf. Viel spaß wünscht ihnen Kolja-Strohm Games.";
+        län = txt.getLänge();
+        num = 0;
+        z = 0;
+    }
+    func bool next( double zeit )
+    {
+        z += zeit;
+        if( ( z > 0.03 ) && ( num < län ) )
+        {
+            var Text t;
+            t = beschreibung.getText();
+            while( z > 0.03 )
+            {
+                z -= 0.03;
+                t.anhängen( txt.getTeilText( num, num + 1 ) );
+                num += 1;
+                if( num >= län )
+                {
+                    break;
+                }
+            }
+            beschreibung.setText( t );
+            beschreibung.setTextNachGröße();
+            return true;
+        }
+        return false;
+    }
+    func void render( Bild b )
+    {
+        beschreibung.render( b );
+    }
+};
+
+var TextErscheinen beschreibung;
+
+func void start()
+{
+    beschreibung.init();
+}
+
+func void initTextFeld( TextFeld tf, int x, int y, int br, int hö, Text t, int style )
+{
+    tf.setPosition( x, y );
+    tf.setGröße( br, hö );
+    tf.setStyle( style );
+    tf.setSchriftFarbe( 0xFFFFFFFF );
+    tf.setText( t );
+}
+
+func void initKnopf( Knopf k, int x, int y, int br, int hö, Text t )
+{
+    k.setPosition( x, y );
+    k.setGröße( br, hö );
+    k.setText( t );
+    k.addStyle( 0x1 );
+}
+
+func bool maus( MausEreignis me )
+{
+    return me.verarbeitet;
+}
+
+func bool tick( double z )
+{
+    var bool ret;
+    ret = beschreibung.next( z );
+    return ret;
+}
+
+func void render( Bild rObj )
+{
+    beschreibung.render( rObj );
+}