Browse Source

Bessere Interfacestruktur für Schreiber und Leser hinzugefügt

Kolja Strohm 3 years ago
parent
commit
f4143f6026
13 changed files with 155 additions and 101 deletions
  1. 1 0
      Array.h
  2. 19 19
      DX12PixelShader.h
  3. 21 21
      DX12VertexShader.h
  4. 5 4
      Datei.h
  5. 1 0
      Framework.vcxproj
  6. 3 0
      Framework.vcxproj.filters
  7. 12 6
      Reader.h
  8. 19 13
      Text.cpp
  9. 3 1
      Text.h
  10. 2 1
      TextFeld.h
  11. 17 17
      UIPixelShader.h
  12. 19 19
      UIVertexShader.h
  13. 33 0
      Writer.h

+ 1 - 0
Array.h

@@ -64,6 +64,7 @@ namespace Framework
             *this = *next;
             return *next;
         }
+#pragma warning( once : 26495 )
     };
 
     template< class TYP >

+ 19 - 19
DX12PixelShader.h

@@ -92,10 +92,10 @@ ret
 
 const BYTE DX12PixelShaderBytes[] =
 {
-     68,  88,  66,  67, 230, 213, 
-    188, 133, 252, 250, 229,  20, 
-    253, 240,  16, 194, 174,  82, 
-     96, 145,   1,   0,   0,   0, 
+     68,  88,  66,  67,  21, 229, 
+    101, 247, 144,  69, 159, 176, 
+    164, 224,  65,  41, 172, 245, 
+    175,   8,   1,   0,   0,   0, 
     184,  91,   0,   0,   6,   0, 
       0,   0,  56,   0,   0,   0, 
      36,   2,   0,   0, 188,   2, 
@@ -763,11 +763,11 @@ const BYTE DX12PixelShaderBytes[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0, 148,  46, 
-     49,   1, 244, 109,  23,  94, 
-      1,   0,   0,   0, 165,  28, 
-     57, 163, 129, 254,  18,  75, 
-    169, 175,   1,  21, 114, 123, 
-    237,  79,   0,   0,   0,   0, 
+     49,   1,  25,  37, 243,  94, 
+      1,   0,   0,   0,  40, 148, 
+    114,  16, 212, 244, 179,  67, 
+    144, 101,  51, 193,  97,  40, 
+    130, 207,   0,   0,   0,   0, 
       0,   0,   0,   0,   1,   0, 
       0,   0,   1,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -938,8 +938,8 @@ const BYTE DX12PixelShaderBytes[] =
       3,   0, 242,  56,   1,   0, 
      43, 236,   3,   0,  28,  19, 
       2,   0,  65,  36,   1,   0, 
-    236, 179,   1,   0, 133, 187, 
-      3,   0, 125,  10,   2,   0, 
+    236, 179,   1,   0, 172, 161, 
+      1,   0, 125,  10,   2,   0, 
     125, 181,   2,   0, 200,  81, 
       2,   0, 193,  33,   3,   0, 
      65, 185,   2,   0, 140, 239, 
@@ -1788,8 +1788,8 @@ const BYTE DX12PixelShaderBytes[] =
     117, 114, 101,  50,  68,  32, 
     115, 104,  97, 100,  27, 226, 
      48,   1, 128,   0,   0,   0, 
-    129, 224, 181, 228,  24, 199, 
-    213,   1,   1,   0,   0,   0, 
+    224, 219, 240, 205,  14,  74, 
+    214,   1,   1,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -2348,7 +2348,7 @@ const BYTE DX12PixelShaderBytes[] =
       0,   0,  23,   0,   1,   0, 
       5,  16,   0,   0,  14,   0, 
      23,  21,   0,  16,   0,   0, 
-      3,   2,  96,   3,   0,   0, 
+      3,   2, 208,   3,   0,   0, 
     242, 241,  10,   0,  24,  21, 
       8,  16,   0,   0,   1,   0, 
       1,   0,  10,   0,  24,  21, 
@@ -3427,7 +3427,7 @@ const BYTE DX12PixelShaderBytes[] =
       2,   0,   9,   0, 220,   4, 
       0,   0,   0,   0,   0,   0, 
     156,   1,   0,   0,   1,   0, 
-      0,   0, 120, 125,  69,   3, 
+      0,   0,  24, 127, 205,   3, 
       0,   0,   0,   0,   0,   0, 
       0,   0, 109,  97, 105, 110, 
       0, 110, 111, 110, 101,   0, 
@@ -3494,10 +3494,10 @@ const BYTE DX12PixelShaderBytes[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0, 148,  46,  49,   1, 
-    244, 109,  23,  94,   1,   0, 
-      0,   0, 165,  28,  57, 163, 
-    129, 254,  18,  75, 169, 175, 
-      1,  21, 114, 123, 237,  79, 
+     25,  37, 243,  94,   1,   0, 
+      0,   0,  40, 148, 114,  16, 
+    212, 244, 179,  67, 144, 101, 
+     51, 193,  97,  40, 130, 207, 
     128,   0,   0,   0,  47,  76, 
     105, 110, 107,  73, 110, 102, 
     111,   0,  47, 110,  97, 109, 

+ 21 - 21
DX12VertexShader.h

@@ -129,10 +129,10 @@ ret
 
 const BYTE DX12VertexShaderBytes[] =
 {
-     68,  88,  66,  67,  71,  16, 
-     23, 156, 206, 133, 189, 107, 
-    226, 122, 216,  43,  62, 210, 
-     26, 122,   1,   0,   0,   0, 
+     68,  88,  66,  67, 107, 144, 
+    122, 236,  74, 225,   7, 191, 
+    167, 142, 149, 255,  43,  28, 
+    214, 120,   1,   0,   0,   0, 
     108,  78,   0,   0,   6,   0, 
       0,   0,  56,   0,   0,   0, 
     124,   2,   0,   0,  16,   3, 
@@ -915,11 +915,11 @@ const BYTE DX12VertexShaderBytes[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-    148,  46,  49,   1, 245, 109, 
-     23,  94,   1,   0,   0,   0, 
-    118, 225, 128, 225, 151, 124, 
-     28,  66, 150, 143, 128, 178, 
-     18, 232, 202, 212,   0,   0, 
+    148,  46,  49,   1,  26,  37, 
+    243,  94,   1,   0,   0,   0, 
+    203, 134,  75,  72, 201,  51, 
+    137,  72, 142, 164, 219, 143, 
+     97,   6, 226, 225,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       1,   0,   0,   0,   1,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -1095,7 +1095,7 @@ const BYTE DX12VertexShaderBytes[] =
       0,   0, 103, 159,   1,   0, 
     179, 120,   1,   0, 238,  97, 
       2,   0,  90,  28,   0,   0, 
-    204,  75,   3,   0,  53, 174, 
+    234,  21,   1,   0,  53, 174, 
       3,   0, 206,  21,   0,   0, 
     193, 205,   3,   0, 207, 193, 
       1,   0,  62,   3,   3,   0, 
@@ -1684,8 +1684,8 @@ const BYTE DX12VertexShaderBytes[] =
     112, 111, 115, 105, 116, 105, 
     111, 110,  32, 111, 102,  32, 
      27, 226,  48,   1, 128,   0, 
-      0,   0, 172, 251, 252, 228, 
-     24, 199, 213,   1,   1,   0, 
+      0,   0, 219,  68,  56, 206, 
+     14,  74, 214,   1,   1,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -2200,7 +2200,7 @@ const BYTE DX12VertexShaderBytes[] =
      12,  16,   0,   0,   1,   0, 
       1,   0,  14,   0,  23,  21, 
      13,  16,   0,   0,  36,   2, 
-    144, 120,   0,   0, 242, 241, 
+     64, 121,   0,   0, 242, 241, 
      10,   0,  24,  21,  14,  16, 
       0,   0,   1,   0,   0,   2, 
      18,   0,  22,  21,  10,  16, 
@@ -3148,19 +3148,19 @@ const BYTE DX12VertexShaderBytes[] =
       1,   0,   0,   0,   0,   0, 
       0,   0,  24,   4,   0,   0, 
      32,   0,   0,  96,   0,   0, 
-    202, 212,   0,   0,   0,   0, 
+    226, 225,   0,   0,   0,   0, 
       0,   0,   0,   0,   2,   0, 
       9,   0, 132,   5,   0,   0, 
       0,   0,   0,   0, 236,   2, 
       0,   0,   1,   0,   0,   0, 
-     72, 122, 130,   3,   0,   0, 
+    232, 126,  85,   3,   0,   0, 
       0,   0,   0,   0,   0,   0, 
     109,  97, 105, 110,   0, 110, 
     111, 110, 101,   0,   0,   0, 
      45, 186,  46, 241,   1,   0, 
       0,   0,   0,   0,   0,   0, 
      24,   4,   0,   0,  32,   0, 
-      0,  96,   0,   0, 202, 212, 
+      0,  96,   0,   0, 226, 225, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   2,   0,   2,   0, 
       7,   0,   0,   0,   0,   0, 
@@ -3219,11 +3219,11 @@ const BYTE DX12VertexShaderBytes[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-    148,  46,  49,   1, 245, 109, 
-     23,  94,   1,   0,   0,   0, 
-    118, 225, 128, 225, 151, 124, 
-     28,  66, 150, 143, 128, 178, 
-     18, 232, 202, 212, 129,   0, 
+    148,  46,  49,   1,  26,  37, 
+    243,  94,   1,   0,   0,   0, 
+    203, 134,  75,  72, 201,  51, 
+    137,  72, 142, 164, 219, 143, 
+     97,   6, 226, 225, 129,   0, 
       0,   0,  47,  76, 105, 110, 
     107,  73, 110, 102, 111,   0, 
      47, 110,  97, 109, 101, 115, 

+ 5 - 4
Datei.h

@@ -3,6 +3,7 @@
 
 #include "Array.h"
 #include "Reader.h"
+#include "Writer.h"
 #include <fstream>
 
 namespace Framework
@@ -16,7 +17,7 @@ namespace Framework
     class Datei; //! aus dieser Datei
 
     //! Ließt und schreibt in eine Datei
-    class Datei : public Reader
+    class Datei : public Reader, public Writer
     {
     public:
         class Style
@@ -73,11 +74,11 @@ namespace Framework
         //! Setzt die Position des Bytes, das als nächstes überschrieben wird
         //! \param pos Der Index des Bytes
         //! \param ende 1, wenn der Index vom ende der Datei zählt. 0, wenn der Index vom Beginn der Datei zählt
-        DLLEXPORT void setSPosition( __int64 pos, bool ende );
+        DLLEXPORT void setSPosition( __int64 pos, bool ende ) override;
         //! Schreibt in die Datei
         //! \param bytes Ein Array von bytes, die geschrieben werden sollen.
         //! \param len Wie viele Bytes in die Datei geschrieben werden sollen
-        DLLEXPORT void schreibe( const char *bytes, int len );
+        DLLEXPORT void schreibe( const char *bytes, int len ) override;
         //! Ließt aus der Datei
         //! \param bytes Ein Array, der mit Bytes aus der Datei gefüllt werden soll
         //! \param len Wie viele Bytes aus der Datei gelesen werden sollen
@@ -129,7 +130,7 @@ namespace Framework
         DLLEXPORT __int64 getLPosition() const override;
         //! Gibt den Index des Bytes aus der Datei zurück, welches als nächstes überschrieben werden würde
         //! return -1, falls ein Fehler aufgetreten ist. Sonst die Position des Schreibzeigers
-        DLLEXPORT __int64 getSPosition() const;
+        DLLEXPORT __int64 getSPosition() const override;
         //! Prüft, ob die Datei vollständig gelesen wurde
         //!  return 1, wenn die Datei vollständig gelesen wurde. 0, sonst
         DLLEXPORT bool istEnde() const override;

+ 1 - 0
Framework.vcxproj

@@ -258,6 +258,7 @@ copy "x64\Release\Framework.dll" "..\..\Spiele Platform\SMP\Fertig\x64\framework
     <ClInclude Include="UIMLView.h" />
     <ClInclude Include="Welt2D.h" />
     <ClInclude Include="Welt3D.h" />
+    <ClInclude Include="Writer.h" />
     <ClInclude Include="XML.h" />
     <ClInclude Include="Zeichnung.h" />
     <ClInclude Include="Prozess.h" />

+ 3 - 0
Framework.vcxproj.filters

@@ -324,6 +324,9 @@
     <ClInclude Include="Slider.h">
       <Filter>Headerdateien\Framework\Objekte2D</Filter>
     </ClInclude>
+    <ClInclude Include="Writer.h">
+      <Filter>Headerdateien\Framework</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="Maus.cpp">

+ 12 - 6
Reader.h

@@ -6,13 +6,8 @@ namespace Framework
 {
     class Text;
 
-    class Reader
+    class StreamReader
     {
-    public:
-        //! Setzt die Position des Bytes, das als nächstes gelesen werden soll
-        //! \param pos Der Index des Bytes
-        //! \param ende 1, wenn der Index vom ende der Resource zählt. 0, wenn der Index vom Beginn der Resource zählt
-        virtual void setLPosition( __int64 pos, bool ende ) = 0;
         //! Ließt aus der Datei
         //! \param bytes Ein Array, der mit Bytes aus der Resource gefüllt werden soll
         //! \param len Wie viele Bytes aus der Resource gelesen werden sollen
@@ -23,8 +18,19 @@ namespace Framework
         //! Prüft, ob die Resource vollständig gelesen wurde
         //!  return 1, wenn die Resource vollständig gelesen wurde. 0, sonst
         virtual bool istEnde() const = 0;
+    };
+
+    class Reader : public StreamReader
+    {
+    public:
+        //! Setzt die Position des Bytes, das als nächstes gelesen werden soll
+        //! \param pos Der Index des Bytes
+        //! \param ende 1, wenn der Index vom ende der Resource zählt. 0, wenn der Index vom Beginn der Resource zählt
+        virtual void setLPosition( __int64 pos, bool ende ) = 0;
         //! Gibt den Index des Bytes aus der Resource zurück, welches als nächstes gelesen werden würde
         //! return -1, falls ein Fehler aufgetreten ist. Sonst die Position des Lesezeigers
         virtual __int64 getLPosition() const = 0;
+        //! Gibt die Anzahl der zu lesenden Bytes zurück
+        virtual __int64 getSize() const = 0;
     };
 }

+ 19 - 13
Text.cpp

@@ -139,7 +139,7 @@ void Text::setText( const char *t ) // ersetzt den Text
 {
     delete[]txt; // alter Text löschen
     int l = (int)textLength( t ); // Länge des neuen Textes ermitteln
-    txt = new char[ l + 1 ]; // neuen Text erstellen
+    txt = new char[ (__int64)l + 1 ]; // neuen Text erstellen
     for( int i = 0; i < l; ++i ) // Text befüllen
         txt[ i ] = t[ i ];
     txt[ l ] = '\0'; // Textende Festlegen
@@ -149,7 +149,7 @@ void Text::setText( const char *t ) // ersetzt den Text
 void Text::setText( const char *t, int l ) // ersetzt den Text
 {
     delete[]txt; // alter Text löschen
-    txt = new char[ l + 1 ]; // neuen Text erstellen
+    txt = new char[ (__int64)l + 1 ]; // neuen Text erstellen
     for( int i = 0; i < l; ++i ) // Text befüllen
         txt[ i ] = t[ i ];
     txt[ l ] = '\0'; // Textende Festlegen
@@ -170,7 +170,7 @@ void Text::append( const char *t ) // h
 {
     int tl = (int)textLength( t ); // länge der übergabe
     int txl = getLength(); // länge des Textes
-    char *res = new char[ tl + txl + 1 ]; // neuen Text erstellen
+    char *res = new char[ (__int64)tl + txl + 1 ]; // neuen Text erstellen
     for( int i = 0; i < txl; ++i ) // mit jetzigem Text füllen
         res[ i ] = txt[ i ];
     for( int i = 0; i < tl; ++i ) // Übergabe anhängen
@@ -183,7 +183,7 @@ void Text::append( const char *t ) // h
 void Text::appendHex( int num ) // hängt die zahl in hex anden Text an
 {
     int l = getLength();
-    char *res = new char[ l + 9 ];
+    char *res = new char[ (__int64)l + 9 ];
     for( int i = 0; i < l; ++i )
         res[ i ] = txt[ i ];
     std::stringstream stream;
@@ -199,7 +199,7 @@ void Text::appendHex( int num ) // h
 void Text::append( const char *t, int l ) // hängt an den Text an
 {
     int txl = getLength(); // länge des Textes
-    char *res = new char[ l + txl + 1 ]; // neuen Text erstellen
+    char *res = new char[ (__int64)l + txl + 1 ]; // neuen Text erstellen
     for( int i = 0; i < txl; ++i ) // mit jetzigem Text füllen
         res[ i ] = txt[ i ];
     for( int i = 0; i < l; ++i ) // Übergabe anhängen
@@ -260,7 +260,7 @@ void Text::insert( int p, char c ) // F
     if( p > getLength() || p < 0 ) // Auf unsinnige übergabe prüfen
         return;
     int txl = getLength(); // Länge des Textes
-    char *res = new char[ txl + 2 ]; // neuer Text erstellen
+    char *res = new char[ (__int64)txl + 2 ]; // neuer Text erstellen
     for( int i = 0; i < p; ++i ) // Text füllen
         res[ i ] = txt[ i ];
     res[ p ] = c;
@@ -277,7 +277,7 @@ void Text::insert( int p, const char *t ) // F
         return;
     int tl = (int)textLength( t ); // Länge der übergabe
     int txl = getLength(); // Länge des Textes
-    char *res = new char[ tl + txl + 1 ]; // neuer Text erstellen
+    char *res = new char[ (__int64)tl + txl + 1 ]; // neuer Text erstellen
     for( int i = 0; i < p; ++i ) // Text füllen
         res[ i ] = txt[ i ];
     for( int i = 0; i < tl; ++i ) // Text einfügen
@@ -463,7 +463,7 @@ void Text::ersetzen( int i, Text *t1, Text *t2 )
 
 void Text::fillText( char c, int len ) // setzt den Text zu so vielen c wie län groß ist
 {
-    char *res = new char[ len + 1 ];
+    char *res = new char[ (__int64)len + 1 ];
     for( int i = 0; i < len; ++i )
         res[ i ] = c;
     res[ len ] = '\0';
@@ -502,7 +502,7 @@ void Text::remove( int p1, int p2 ) // l
     if( p2 > l )
         p2 = l;
     int resl = l - ( p2 - p1 ); // Länge vom Ergebnis
-    char *res = new char[ resl + 1 ]; // Neuen Text erstellen
+    char *res = new char[ (__int64)resl + 1 ]; // Neuen Text erstellen
     for( int i = 0; i < p1; ++i ) // Text füllen
         res[ i ] = txt[ i ];
     for( int i = p2; i < l; ++i )
@@ -518,7 +518,7 @@ void Text::remove( char c ) // l
         return;
     int l = getLength(); // Länge des Textes
     int anz = anzahlVon( c ); // Anzahl von c
-    char *res = new char[ l - anz + 1 ]; // neuen Text erstellen
+    char *res = new char[ (__int64)l - anz + 1 ]; // neuen Text erstellen
     int anz2 = 0;
     int suchGCount = 0;
     for( int i = 0; i < l; ++i ) // Text befüllen
@@ -558,7 +558,7 @@ void Text::remove( const char *t ) // l
     for( int i = 0; i < anz; ++i ) // begin aller t-s finden
         begin[ i ] = positionVon( t, i );
     int resl = txl - ( anz * tl ); // Länge vom Ergebnes
-    char *res = new char[ resl + 1 ]; // neuen Text erzeugen
+    char *res = new char[ (__int64)resl + 1 ]; // neuen Text erzeugen
     int del = 0;
     for( int i = 0; i < txl; ++i ) // Text befüllen
     {
@@ -620,7 +620,7 @@ void Text::remove( int index, const char *t ) // l
     int l = getLength(); // Länge des Textes
     if( !l )
         return;
-    char *res = new char[ l - tl + 1 ]; // neuen Text erzeugen
+    char *res = new char[ (__int64)l - tl + 1 ]; // neuen Text erzeugen
     for( int i = 0; i < pos && i < l - tl + 1; ++i ) // Text befüllen
         res[ i ] = txt[ i ];
     for( int i = pos + tl; i < l; ++i )
@@ -1086,7 +1086,7 @@ Text *Text::getTeilText( int p1, int p2 ) const // gibt den Text von p1 bis p2 z
     int l = getLength(); // Text Länge
     if( p1 < 0 || p2 > l ) // Auf unsinnige übergabe prüfen
         return new Text( "" );
-    char *cp = new char[ p2 - p1 + 1 ]; // neuen Text erstellen
+    char *cp = new char[ (__int64)p2 - p1 + 1 ]; // neuen Text erstellen
     for( int i = p1; i < p2; ++i ) // Text befüllen
     {
         cp[ i - p1 ] = txt[ i ];
@@ -1360,6 +1360,12 @@ __int64 TextReader::getLPosition() const
     return lPos;
 }
 
+//! Gibt die Anzahl der zu lesenden Bytes zurück
+__int64 TextReader::getSize() const
+{
+    return txt->getLength();
+}
+
 // Erhöht den Reference Counting Zähler.
 //  return: this.
 TextReader *TextReader::getThis()

+ 3 - 1
Text.h

@@ -373,7 +373,9 @@ namespace Framework
         DLLEXPORT bool istEnde() const override;
         //! Gibt den Index des Bytes aus dem Text zurück, welches als nächstes gelesen werden würde
         //! return -1, falls ein Fehler aufgetreten ist. Sonst die Position des Lesezeigers
-        DLLEXPORT __int64 getLPosition() const;
+        DLLEXPORT __int64 getLPosition() const override;
+        //! Gibt die Anzahl der zu lesenden Bytes zurück
+        DLLEXPORT __int64 getSize() const override;
         //! Erhöht den Reference Counting Zähler.
         //! \return this.
         DLLEXPORT TextReader *getThis();

+ 2 - 1
TextFeld.h

@@ -133,7 +133,8 @@ namespace Framework
         DLLEXPORT void setText( const char *txt );
         //! setzt den Text mit styles
         //! \param txt der Text
-        //! \param format - \\x1: aktiviert unterschtrich
+        //! \param format 
+        //!               - \\x1: aktiviert unterschtrich
         //!               - \\x2\\xY: setzt die schriftgröße auf y für den folgenden text
         //!               - \\x3\\xA\\xR\\xG\\xB: setzt die schriftfarbe auf ARGB
         //!               - \\x4\\xA\\xR\\xG\\xB: setzt die farbe des ausgewählten textes

+ 17 - 17
UIPixelShader.h

@@ -284,10 +284,10 @@ ret
 
 const BYTE UIPixelShader[] =
 {
-     68,  88,  66,  67, 147, 134, 
-    141, 241, 148,  31,   6, 146, 
-    119, 102, 173, 243, 217,  21, 
-    104, 228,   1,   0,   0,   0, 
+     68,  88,  66,  67, 215, 226, 
+    237,  52, 249, 202,  37, 235, 
+     58, 134,  28,  21, 187,  98, 
+    181, 174,   1,   0,   0,   0, 
     132, 113,   0,   0,   6,   0, 
       0,   0,  56,   0,   0,   0, 
     124,   5,   0,   0,  12,   6, 
@@ -1544,10 +1544,10 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0, 148,  46,  49,   1, 
-    245, 109,  23,  94,   1,   0, 
-      0,   0, 128, 193, 179,  10, 
-    106, 233, 250,  67, 176,  92, 
-    133, 103,  15, 248, 147, 112, 
+     26,  37, 243,  94,   1,   0, 
+      0,   0, 222, 114,  62,  19, 
+     77, 227, 139,  78, 132, 252, 
+    204, 143, 100,  37, 157, 134, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   1,   0,   0,   0, 
       1,   0,   0,   0,   0,   0, 
@@ -1719,7 +1719,7 @@ const BYTE UIPixelShader[] =
     242,  56,   1,   0,  43, 236, 
       3,   0,  28,  19,   2,   0, 
      65,  36,   1,   0, 236, 179, 
-      1,   0, 223, 189,   3,   0, 
+      1,   0, 127, 166,   1,   0, 
     125,  10,   2,   0, 125, 181, 
       2,   0, 200,  81,   2,   0, 
     193,  33,   3,   0,  65, 185, 
@@ -2568,8 +2568,8 @@ const BYTE UIPixelShader[] =
      84, 101, 120, 116, 117, 114, 
     101,  50,  68,  32, 115, 104, 
      97, 100,  27, 226,  48,   1, 
-    128,   0,   0,   0, 187, 207, 
-     45, 229,  24, 199, 213,   1, 
+    128,   0,   0,   0,  53, 224, 
+    103, 206,  14,  74, 214,   1, 
       1,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -3641,7 +3641,7 @@ const BYTE UIPixelShader[] =
      23,   0,   1,   0,   5,  16, 
       0,   0,  14,   0,  23,  21, 
       0,  16,   0,   0,   3,   2, 
-     32,   3,   0,   0, 242, 241, 
+    240,   3,   0,   0, 242, 241, 
      10,   0,  24,  21,   8,  16, 
       0,   0,   1,   0,   1,   0, 
      10,   0,  24,  21,   9,  16, 
@@ -4805,7 +4805,7 @@ const BYTE UIPixelShader[] =
       2,   0,   9,   0, 164,   7, 
       0,   0,   0,   0,   0,   0, 
      68,  11,   0,   0,   1,   0, 
-      0,   0,  88, 122,  23,   3, 
+      0,   0,  88, 130, 187,   3, 
       0,   0,   0,   0,   0,   0, 
       0,   0,  84, 101, 120, 116, 
     117, 114, 101,  80, 105, 120, 
@@ -4872,10 +4872,10 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0, 148,  46,  49,   1, 
-    245, 109,  23,  94,   1,   0, 
-      0,   0, 128, 193, 179,  10, 
-    106, 233, 250,  67, 176,  92, 
-    133, 103,  15, 248, 147, 112, 
+     26,  37, 243,  94,   1,   0, 
+      0,   0, 222, 114,  62,  19, 
+     77, 227, 139,  78, 132, 252, 
+    204, 143, 100,  37, 157, 134, 
     128,   0,   0,   0,  47,  76, 
     105, 110, 107,  73, 110, 102, 
     111,   0,  47, 110,  97, 109, 

+ 19 - 19
UIVertexShader.h

@@ -119,10 +119,10 @@ ret
 
 const BYTE UIVertexShader[] =
 {
-     68,  88,  66,  67,  78,  48, 
-     99, 220, 235, 203, 220, 144, 
-    111,  54,   1,  97, 165,  43, 
-    125,  50,   1,   0,   0,   0, 
+     68,  88,  66,  67,  15, 147, 
+    220,   5, 244, 234,  25,  24, 
+     68,  15, 130, 247, 244, 145, 
+    108, 201,   1,   0,   0,   0, 
     168,  77,   0,   0,   6,   0, 
       0,   0,  56,   0,   0,   0, 
      20,   2,   0,   0, 168,   2, 
@@ -873,10 +873,10 @@ const BYTE UIVertexShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0, 148,  46,  49,   1, 
-    246, 109,  23,  94,   1,   0, 
-      0,   0, 172,  34, 121, 202, 
-      7,  89,  59,  66, 178, 152, 
-      9,  21, 150,  41, 104,  14, 
+     27,  37, 243,  94,   1,   0, 
+      0,   0,  22, 227, 229, 131, 
+    248,  69,  48,  66, 175,   3, 
+    128, 194, 186,  42, 213, 182, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   1,   0,   0,   0, 
       1,   0,   0,   0,   0,   0, 
@@ -1556,8 +1556,8 @@ const BYTE UIVertexShader[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      27, 226,  48,   1, 128,   0, 
-      0,   0,  47,  10, 130, 229, 
-     24, 199, 213,   1,   1,   0, 
+      0,   0, 148,  25, 179, 206, 
+     14,  74, 214,   1,   1,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -2934,13 +2934,13 @@ const BYTE UIVertexShader[] =
       0,   0,   0,   0,   1,   0, 
       0,   0,   0,   0,   0,   0, 
     196,   3,   0,   0,  32,   0, 
-      0,  96,   0,   0, 104,  14, 
+      0,  96,   0,   0, 213, 182, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   2,   0,   9,   0, 
      80,   5,   0,   0,   0,   0, 
       0,   0, 236,   2,   0,   0, 
-      1,   0,   0,   0, 232, 124, 
-    146,   3,   0,   0,   0,   0, 
+      1,   0,   0,   0, 152, 128, 
+    161,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,  84, 101, 
     120, 116, 117, 114, 101,  86, 
     101, 114, 116, 101, 120,  83, 
@@ -2950,7 +2950,7 @@ const BYTE UIVertexShader[] =
       1,   0,   0,   0,   0,   0, 
       0,   0, 196,   3,   0,   0, 
      32,   0,   0,  96,   0,   0, 
-    104,  14,   0,   0,   0,   0, 
+    213, 182,   0,   0,   0,   0, 
       0,   0,   0,   0,   2,   0, 
       2,   0,   7,   0,   0,   0, 
       0,   0,   1,   0, 255, 255, 
@@ -3006,11 +3006,11 @@ const BYTE UIVertexShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0, 148,  46, 
-     49,   1, 246, 109,  23,  94, 
-      1,   0,   0,   0, 172,  34, 
-    121, 202,   7,  89,  59,  66, 
-    178, 152,   9,  21, 150,  41, 
-    104,  14, 129,   0,   0,   0, 
+     49,   1,  27,  37, 243,  94, 
+      1,   0,   0,   0,  22, 227, 
+    229, 131, 248,  69,  48,  66, 
+    175,   3, 128, 194, 186,  42, 
+    213, 182, 129,   0,   0,   0, 
      47,  76, 105, 110, 107,  73, 
     110, 102, 111,   0,  47, 110, 
      97, 109, 101, 115,   0,  47, 

+ 33 - 0
Writer.h

@@ -0,0 +1,33 @@
+#pragma once
+
+#include "Betriebssystem.h"
+
+namespace Framework
+{
+    class Text;
+
+    class StreamWriter
+    {
+        //! Schreibt in die Resource
+        //! \param bytes Ein Array, der die Bytes enthält, welche in die Resource geschrieben werden soll
+        //! \param len Wie viele Bytes in die Resource geschrieben werden sollen
+        virtual void schreibe( const char *bytes, int len ) = 0;
+        //! Prüft, ob die Resource vollständig geschrieben wurde
+        //!  return 1, wenn die Resource vollständig geschrieben wurde. 0, sonst
+        virtual bool istEnde() const = 0;
+    };
+
+    class Writer : public StreamWriter
+    {
+    public:
+        //! Setzt die Position des Bytes, das als nächstes geschrieben werden soll
+        //! \param pos Der Index des Bytes
+        //! \param ende 1, wenn der Index vom ende der Resource zählt. 0, wenn der Index vom Beginn der Resource zählt
+        virtual void setSPosition( __int64 pos, bool ende ) = 0;
+        //! Gibt den Index des Bytes aus der Resource zurück, welches als nächstes geschrieben werden würde
+        //! return -1, falls ein Fehler aufgetreten ist. Sonst die Position des Schreibzeigers
+        virtual __int64 getSPosition() const = 0;
+        //! Gibt die Anzahl der zu schreibenden Bytes zurück
+        virtual __int64 getSize() const = 0;
+    };
+}