Browse Source

Projektdateien hinzufügen.

Kolja Strohm 5 years ago
parent
commit
343a19a90c

BIN
Fertig/x32/Framework.dll


BIN
Fertig/x32/Schrift Editor.exe


+ 28 - 0
Schrift Editor.sln

@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.22823.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Schrift Editor", "Schrift Editor\Schrift Editor.vcxproj", "{4F035EAE-1BD7-42E6-AABF-423FE12580D7}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{4F035EAE-1BD7-42E6-AABF-423FE12580D7}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4F035EAE-1BD7-42E6-AABF-423FE12580D7}.Debug|Win32.Build.0 = Debug|Win32
+		{4F035EAE-1BD7-42E6-AABF-423FE12580D7}.Debug|x64.ActiveCfg = Debug|x64
+		{4F035EAE-1BD7-42E6-AABF-423FE12580D7}.Debug|x64.Build.0 = Debug|x64
+		{4F035EAE-1BD7-42E6-AABF-423FE12580D7}.Release|Win32.ActiveCfg = Release|Win32
+		{4F035EAE-1BD7-42E6-AABF-423FE12580D7}.Release|Win32.Build.0 = Release|Win32
+		{4F035EAE-1BD7-42E6-AABF-423FE12580D7}.Release|x64.ActiveCfg = Release|x64
+		{4F035EAE-1BD7-42E6-AABF-423FE12580D7}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

BIN
Schrift Editor/Framework.dll


+ 181 - 0
Schrift Editor/Schrift Editor.vcxproj

@@ -0,0 +1,181 @@
+<?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="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{4F035EAE-1BD7-42E6-AABF-423FE12580D7}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>SchriftEditor</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </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 Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <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 Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <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>
+    <IncludePath>..\..\Framework;$(IncludePath)</IncludePath>
+    <LibraryPath>..\..\Framework\Debug;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <IncludePath>..\..\Framework;$(IncludePath)</IncludePath>
+    <LibraryPath>..\..\Framework\x64\Debug;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+    <IncludePath>..\..\Framework;$(IncludePath)</IncludePath>
+    <LibraryPath>..\..\Framework\Release;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <IncludePath>..\..\Framework;$(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>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>Framework.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>Framework.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+    <CustomBuildStep>
+      <Command>copy "..\..\Framework\x64\Debug\Framework.dll" "Framework.dll"</Command>
+    </CustomBuildStep>
+    <CustomBuildStep>
+      <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>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>Framework.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+    <CustomBuildStep>
+      <Command>copy "..\..\Framework\Release\Framework.dll" "..\Fertig\x32\Framework.dll"
+copy "..\Release\Schrift Editor.exe" "..\Fertig\x32\Schrift Editor.exe" </Command>
+    </CustomBuildStep>
+    <CustomBuildStep>
+      <Outputs>kopieren...;%(Outputs)</Outputs>
+    </CustomBuildStep>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>Framework.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+    <CustomBuildStep>
+      <Command>copy "..\..\Framework\x64\Release\Framework.dll" "..\Fertig\x64\Framework.dll"
+copy "..\x64\Release\Schrift Editor.exe" "..\Fertig\x64\Schrift Editor.exe" </Command>
+    </CustomBuildStep>
+    <CustomBuildStep>
+      <Outputs>kopieren...;%(Outputs)</Outputs>
+    </CustomBuildStep>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="Start.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 22 - 0
Schrift Editor/Schrift Editor.vcxproj.filters

@@ -0,0 +1,22 @@
+<?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;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="Start.cpp">
+      <Filter>Quelldateien</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 461 - 0
Schrift Editor/Start.cpp

@@ -0,0 +1,461 @@
+#include <Fenster.h>
+#include <iostream>
+#include <Text.h>
+#include <Punkt.h>
+#include <DateiSystem.h>
+#include <Datei.h>
+#include <Schrift.h>
+#include <Bildschirm.h>
+#include <MausEreignis.h>
+#include <Bild.h>
+
+using namespace Framework;
+using namespace std;
+
+#define AE (unsigned char)142
+#define ae (unsigned char)132
+#define OE (unsigned char)153
+#define oe (unsigned char)148
+#define UE (unsigned char)154
+#define ue (unsigned char)129
+#define ss (unsigned char)225
+
+void UserInputThread();
+void PrintHelp( Text *txt );
+void loadschrift( Text *txt );
+void listgrößen();
+void delgröße( Text *txt );
+void listzeichen( Text *txt );
+void editzeichen( Text *txt );
+void endedit();
+void saveedit( Text *txt );
+void delzeichen( Text *txt );
+void setalpha( Text *txt );
+void setfg( Text *txt );
+void setbg( Text *txt );
+void endedit();
+void saveedit( Text *txt );
+void draw();
+
+bool editFMaus( void *p, void *fenster, MausEreignis me );
+DWORD WINAPI UserInputThread( LPVOID p );
+
+LTDSDatei *schrift;
+WFenster *editF;
+bool exitB = 0;
+bool MsgSleep = 1;
+Buchstabe *editZ;
+unsigned char alpha = 0;
+int bgF;
+int fgF;
+
+int main()
+{
+	bgF = 0;
+	fgF = 0xFFFFFFFF;
+	WNDCLASS wc = F_Normal( GetModuleHandle( NULL ) );
+	wc.lpszClassName = "LENCK - Tech Zeichen Edit Fenster";
+	editF = new WFenster();
+	editF->erstellen( WS_POPUP, wc );
+	editF->setMausAktion( editFMaus );
+	Bildschirm *screen = new Bildschirm3D( editF->getThis() );
+	screen->setRenderZeichnungen( 0 );
+	screen->setdeckFarbe( 0 );
+	screen->setFill( 0 );
+	screen->setTestRend( 0 );
+	editF->setBildschirm( screen );
+	std::locale::global( std::locale( "German_germany" ) );
+	schrift = new LTDSDatei();
+	HWND hWnd = GetConsoleWindow();
+	WFenster *console = new WFenster( hWnd );
+	console->setSize( 600, 400 );
+	console->setPosition( Bildschirmmitte( console->getThis() ) );
+	CreateThread( NULL, 0, UserInputThread, 0, 0, NULL );
+	MSG msg = {};
+	while( msg.message != WM_QUIT )
+	{
+		if( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
+		{
+			TranslateMessage( &msg );
+			DispatchMessage( &msg );
+		}
+		else if( exitB )
+			break;
+		if( MsgSleep )
+			Sleep( 1000 );
+	}
+	console->setFensterHandle( 0 );
+	console->release();
+	schrift->release();
+	editF->release();
+	screen->release();
+	return 0;
+}
+
+DWORD WINAPI UserInputThread( LPVOID p )
+{
+	cout << "Willkommen beim LENCK - Tech Schrift Editor! \nprogrammiert von Kolja Strohm\nSchreibe \\? für Hilfe.\n";
+	Text *UserMessage = new Text();
+	char c[ 255 ];
+	while( 1 )
+	{
+		cout << "LTDSEditor->";
+		cin.getline( c, 255, '\n' );
+		UserMessage->setText( c );
+		if( !UserMessage->positionVon( "\\?" ) )
+			PrintHelp( UserMessage->getTeilText( 3 ) );
+		else if( !UserMessage->positionVon( "loadschrift" ) )
+			loadschrift( UserMessage->getTeilText( 12 ) );
+		else if( UserMessage->istGleich( "listgr\x94áen" ) )
+			listgrößen();
+		else if( !UserMessage->positionVon( "delgr\x94áe" ) )
+			delgröße( UserMessage->getTeilText( 9 ) );
+		else if( !UserMessage->positionVon( "listzeichen" ) )
+			listzeichen( UserMessage->getTeilText( 12 ) );
+		else if( !UserMessage->positionVon( "editzeichen" ) )
+			editzeichen( UserMessage->getTeilText( 12 ) );
+		else if( UserMessage->istGleich( "endedit" ) )
+			endedit();
+		else if( !UserMessage->positionVon( "saveedit" ) )
+			saveedit( UserMessage->getTeilText( 9 ) );
+		else if( !UserMessage->positionVon( "delzeichen" ) )
+			delzeichen( UserMessage->getTeilText( 11 ) );
+		else if( !UserMessage->positionVon( "setalpha" ) )
+			setalpha( UserMessage->getTeilText( 9 ) );
+		else if( !UserMessage->positionVon( "setfg" ) )
+			setfg( UserMessage->getTeilText( 6 ) );
+		else if( !UserMessage->positionVon( "setbg" ) )
+			setbg( UserMessage->getTeilText( 6 ) );
+		else if( UserMessage->istGleich( "exit" ) )
+		{
+			exitB = true;
+			break;
+		}
+		else
+			cout << "Geben sie \\? ein, um eine Befehlsübersicht zu erhalten.\n";
+	}
+	UserMessage->release();
+	return 0;
+}
+
+void PrintHelp( Text *txt )
+{
+	if( txt->getLength() == 0 )
+	{
+		cout << "----++Befehle++----\n";
+		cout << " loadschrift <LTDS Datei Pfad>\n";
+		cout << " listgrößen\n";
+		cout << " delgröße <größe>\n";
+		cout << " listzeichen <größe>\n";
+		cout << " editzeichen <größe> <Zeichen Nummer>\n";
+		cout << " endedit\n";
+		cout << " saveedit <größe> <Zeichen Nummer>\n";
+		cout << " delzeichen <größe> <Zeichen Nummer>\n";
+		cout << " setalpha <alpha>\n";
+		cout << " setbg <r> <g> <b>\n";
+		cout << " setfg <r> <g> <b>\n";
+		cout << " exit\n";
+		cout << "----++Ende++----\n";
+	}
+	else if( txt->istGleich( "loadschrift" ) )
+	{
+		cout << " loadschrift <LTDS Datei Pfad>\n";
+		cout << "L" << ae << "d die Schrift aus dem angegebenen Pfad ein.\n";
+	}
+	else if( txt->istGleich( "listgr\x94áen" ) )
+	{
+		cout << " listgrößen\n";
+		cout << "Gibt eine Liste mit in der Schrift gespeicherten Schriftgrößen wieder.\n";
+	}
+	else if( txt->istGleich( "delgr\x94áen" ) )
+	{
+		cout << " delgröße <größe>\n";
+		cout << "L" << oe << "scht die angegebene Schriftgröße.\n";
+	}
+	else if( txt->istGleich( "listzZeichen" ) )
+	{
+		cout << " listzeichen <größe>\n";
+		cout << "Gibt eine Liste mit in einer Schriftgröße enthaltenen Zeichen wieder.\n";
+	}
+	else if( txt->istGleich( "editzeichen" ) )
+	{
+		cout << " editzeichen <größe> <Zeichen Nummer>\n";
+		cout << "Öffnet ein Editorfenster, in dem das angegebene Zeichen bearbeitet werden kann.\n";
+	}
+	else if( txt->istGleich( "saveedit" ) )
+	{
+		cout << " saveedit <größe> <Zeichen Nummer>\n";
+		cout << "Speichert den geöffneten Buchstaben unter der angegebenen Größe und Zeichennummer.\n";
+	}
+	else if( txt->istGleich( "endedit" ) )
+	{
+		cout << " endedit\n";
+		cout << "Beendet das Editorfenster.\n";
+	}
+	else if( txt->istGleich( "delzeichen" ) )
+	{
+		cout << " delzeichen <größe> <Zeichen Nummer>\n";
+		cout << "Löscht das angegebene Zeichen.\n";
+	}
+	else if( txt->istGleich( "setalpha" ) )
+	{
+		cout << " setalpha <alpha>\n";
+		cout << "Setzt den Editor - Alphawert.\n";
+	}
+	else if( txt->istGleich( "setbg" ) )
+	{
+		cout << " setbg <r> <g> <b>\n";
+		cout << "Setzt den Editor - Hintergrund.\n";
+	}
+	else if( txt->istGleich( "setfg" ) )
+	{
+		cout << " setfg <r> <g> <b>\n";
+		cout << "Setzt den Editor - Fordergrund.\n";
+	}
+	else if( txt->istGleich( "exit" ) )
+	{
+		cout << " exit\n";
+		cout << "Schließt das Programm.\n";
+	}
+	else
+		cout << "Geben sie \\? ein, um eine Befehlsübersicht zu erhalten.\n";
+	txt->release();
+}
+
+void loadschrift( Text *txt )
+{
+	schrift->setPfad( txt->getThis() );
+	if( !DateiExistiert( txt->getThis() ) )
+		schrift->erstelleDatei();
+	schrift->leseDaten();
+	cout << schrift->getAnzahlSchriftgrößen() << " Schriftgrößen wurden gefunden.\n";
+	txt->release();
+}
+
+void listgrößen()
+{
+	unsigned char *gr = schrift->getSchriftGrößen();
+	cout << "----++Schriftgrößen++----\n";
+	for( int i = 0; i < schrift->getAnzahlSchriftgrößen(); i++ )
+		cout << (int)gr[ i ] << endl;
+	cout << "Es wurden " << schrift->getAnzahlSchriftgrößen() << " Schriftgrößen gefunden.\n";
+	cout << "----++Ende++----\n";
+}
+
+void delgröße( Text *txt )
+{
+	schrift->löscheSchrifrGröße( TextZuInt( txt->getText(), 10 ) );
+	cout << "Die Schriftgröße " << txt->getText() << " wurde gelöscht.\n";
+	txt->release();
+}
+
+void listzeichen( Text *txt )
+{
+	cout << "----++Zeichen++----\n";
+	unsigned char anz = schrift->getAnzahlBuchstaben( TextZuInt( txt->getText(), 10 ) );
+	unsigned char *z = schrift->getBuchstaben( TextZuInt( txt->getText(), 10 ) );
+	if( z )
+	{
+		for( int i = 0; i < anz; i++ )
+		{
+			cout << (char)z[ i ] << "    " << (int)z[ i ] << endl;
+		}
+		cout << "Es wurden " << (int)anz << " Zeichen gefunden.\n";
+	}
+	else
+		cout << "Die angegebene Schriftgröße existiert nicht.\n";
+	cout << "----++Ende++----\n";
+	txt->release();
+}
+
+void editzeichen( Text *txt )
+{
+	if( MsgSleep )
+	{
+		MsgSleep = 0;
+		Text *größe = txt->getTeilText( 0, txt->positionVon( ' ' ) );
+		Text *zeich = txt->getTeilText( txt->positionVon( ' ' ) + 1 );
+		editZ = schrift->ladeBuchstabe( TextZuInt( größe->getText(), 10 ), TextZuInt( zeich->getText(), 10 ) );
+		if( !editZ )
+		{
+			int br = 0, hö = 0;
+			cout << "Das eingegebene Zeichen existiert noch nicht.\nBitte gebe die Breite ein:";
+			cin >> br;
+			cout << "\nBitte gebe die Höhe ein:";
+			cin >> hö;
+			if( br < 0 || hö < 0 || br > 255 || hö > 255 )
+			{
+				cout << "Error: Die breite oder die Höhe liegt nicht zwischen 0 und 255!\n";
+				größe->release();
+				zeich->release();
+				txt->release();
+				MsgSleep = 1;
+				return;
+			}
+			cout << "Erfolg.\n";
+			editZ = new Buchstabe();
+			editZ->NeuBuchstabe( Punkt( br, hö ) );
+		}
+		zeich->release();
+		größe->release();
+		unsigned char *Buffer = editZ->getBuff();
+		editF->setSize( editZ->getBreite() * 10 + 1, editZ->getHeight() * 10 + 1 );
+		Bildschirm *screen = editF->getBildschirm();
+		editF->setPosition( Bildschirmmitte( editF->getThis() ) );
+		editF->setAnzeigeModus( 1 );
+		screen->update();
+		Bild *rObj = screen->getRenderBild();
+		fgF = 0xFFFFFFFF;
+		int a2 = 255 - ( fgF >> 24 );
+		int fc = fgF & 0x00FFFFFF;
+		for( int i = 0; i < editZ->getBreite() * editZ->getHeight(); i++ )
+		{
+			for( int i1 = 0; i1 < 100; i1++ )
+				rObj->alphaPixel( ( ( i * 10 ) % ( editZ->getBreite() * 10 ) ) + ( i1 % 10 ), ( ( ( i * 10 ) / ( editZ->getBreite() * 10 ) ) * 10 ) + ( i1 / 10 ), fc | ( ( Buffer[ i ] - a2 ) << 24 ) );
+			screen->render();
+		}
+		screen->render();
+		rObj->release();
+		screen->release();
+	}
+	else
+		cout << "Error: Du musst das Editfenster zuvor mit 'endedit' beenden.\n";
+	txt->release();
+}
+
+void saveedit( Text *txt )
+{
+	if( !MsgSleep )
+	{
+		Text *größe = txt->getTeilText( 0, txt->positionVon( ' ' ) );
+		Text *zeich = txt->getTeilText( txt->positionVon( ' ' ) + 1 );
+		schrift->löscheBuchstabe( TextZuInt( größe->getText(), 10 ), TextZuInt( zeich->getText(), 10 ) );
+		schrift->addBuchstabe( TextZuInt( größe->getText(), 10 ), editZ->getThis(), TextZuInt( zeich->getText(), 10 ) );
+		zeich->release();
+		größe->release();
+	}
+	else
+		cout << "Error: Der Editor ist nicht geöffnet.\n";
+	txt->release();
+}
+
+void endedit()
+{
+	if( !MsgSleep )
+	{
+		editZ = editZ->release();
+		editF->setAnzeigeModus( 0 );
+		MsgSleep = 1;
+	}
+	else
+		cout << "Error: Der Editor ist nicht geöffnet.\n";
+}
+
+void delzeichen( Text *txt )
+{
+	Text *gr = txt->getTeilText( 0, txt->positionVon( ' ' ) );
+	Text *z = txt->getTeilText( txt->positionVon( ' ' ) + 1 );
+	schrift->löscheBuchstabe( TextZuInt( gr->getText(), 10 ), TextZuInt( z->getText(), 10 ) );
+	cout << "Das Zeichen " << z->getText() << " wurde aus der Schriftgröße " << gr->getText() << " gelöscht.\n";
+	gr->release();
+	z->release();
+	txt->release();
+}
+
+void setalpha( Text *txt )
+{
+	alpha = (unsigned char)TextZuInt( txt->getText(), 10 );
+	txt->release();
+}
+
+void setfg( Text *txt )
+{
+	if( !MsgSleep )
+	{
+		Text *r = txt->getTeilText( 0, txt->positionVon( ' ' ) );
+		Text *g = txt->getTeilText( txt->positionVon( ' ' ) + 1, txt->positionVon( ' ', 1 ) );
+		Text *b = txt->getTeilText( txt->positionVon( ' ', 1 ) + 1 );
+		fgF = ( ( (int)*r & 0xFF ) << 16 ) | ( ( (int)*g & 0xFF ) << 8 ) | ( (int)*b & 0xFF );
+		r->release();
+		g->release();
+		b->release();
+		draw();
+	}
+	else
+		cout << "Error: Der Editor ist nicht geöffnet.\n";
+	txt->release();
+}
+
+void setbg( Text *txt )
+{
+	if( !MsgSleep )
+	{
+		Text *r = txt->getTeilText( 0, txt->positionVon( ' ' ) );
+		Text *g = txt->getTeilText( txt->positionVon( ' ' ) + 1, txt->positionVon( ' ', 1 ) );
+		Text *b = txt->getTeilText( txt->positionVon( ' ', 1 ) + 1 );
+		bgF = 0xFF000000 | ( ( (int)*r & 0xFF ) << 16 ) | ( ( (int)*g & 0xFF ) << 8 ) | ( (int)*b & 0xFF );
+		r->release();
+		g->release();
+		b->release();
+		draw();
+	}
+	else
+		cout << "Error: Der Editor ist nicht geöffnet.\n";
+	txt->release();
+}
+
+bool editFMaus( void *p, void *fenster, MausEreignis me )
+{
+	switch( me.id )
+	{
+	case ME_PLinks:
+		if( 1 )
+		{
+			if( !MsgSleep )
+			{
+				Bildschirm *screen = ((WFenster*)fenster)->getBildschirm();
+				Bild *rObj = screen->getRenderBild();
+				int x = me.mx / 10;
+				int y = me.my / 10;
+				int fc = fgF & 0x00FFFFFF;
+				unsigned char *Buffer = editZ->getBuff();
+				int i = x + y * editZ->getBreite();
+				Buffer[ i ] = alpha;
+				rObj->fillRegion( x * 10, y * 10, 10, 10, bgF );
+				screen->render();
+				for( int i1 = 0; i1 < 100; i1++ )
+					rObj->alphaPixel( ( x * 10 ) + ( i1 % 10 ), ( y * 10 ) + ( i1 / 10 ), fc | ( alpha << 24 ) );
+				rObj->release();
+				screen->render();
+				screen->release();
+			}
+		}
+		break;
+	}
+	return 1;
+}
+
+void draw()
+{
+	if( !MsgSleep )
+	{
+		Bildschirm *screen = editF->getBildschirm();
+		Bild *rObj = screen->getRenderBild();
+		int *ObjBuff = rObj->getBuffer();
+		int bh = rObj->getBreite() * rObj->getHeight();
+		for( int i = 0; i < bh; i++ )
+			ObjBuff[ i ] = bgF;
+		screen->render();
+		unsigned char *Buffer = editZ->getBuff();
+		int b = editZ->getBreite() * 10;
+		int fc = fgF & 0x00FFFFFF;
+		for( int i = 0; i < editZ->getBreite() * editZ->getHeight(); i++ )
+		{
+			for( int i1 = 0; i1 < 100; i1++ )
+				rObj->alphaPixel( ( ( i * 10 ) % b ) + ( i1 % 10 ), ( ( ( i * 10 ) / b ) * 10 ) + ( i1 / 10 ), fc | ( Buffer[ i ] << 24 ) );
+		}
+		rObj->release();
+		screen->render();
+		screen->release();
+	}
+}

BIN
Schrift Editor/normal - Kopie.ltds


BIN
Schrift Editor/normal.ltds


BIN
Schrift Editor/schrift.ltds