summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dalos/Dalos.cc115
-rw-r--r--MSVC/Dalos/Dalos.vcproj116
-rw-r--r--MSVC/PSX-Bundle.sln10
-rw-r--r--MSVC/mogltk/mogltk.vcproj80
4 files changed, 282 insertions, 39 deletions
diff --git a/Dalos/Dalos.cc b/Dalos/Dalos.cc
new file mode 100644
index 0000000..c9d8763
--- /dev/null
+++ b/Dalos/Dalos.cc
@@ -0,0 +1,115 @@
+#include <SDL.h>
+#include <Main.h>
+
+#include <engine.h>
+#include <glbase.h>
+#include <glshape.h>
+
+mogltk::widgets::Root * Root;
+mogltk::widgets::Frame * Frame;
+mogltk::widgets::Menu * MainMenu;
+
+CODE_BEGINS
+
+class frame : public mogltk::widget {
+ public:
+ frame(mogltk::shape * sh, mogltk::widget * father) :
+ widget(father, 2, 2, father->GetW() - 4, father->GetH() - 4, 0, "MyFrame", sh) { }
+ protected:
+ virtual void draw() {
+ }
+ virtual bool process_event(int mx, int my, mogltk::event_t event) {
+ return false;
+ }
+};
+
+class timer : public mogltk::widget {
+ public:
+ timer() :
+ widget(Root, 0, 0, 0, 0, 0, "Timer", 0), tick(0)
+ { set_timed_event(100); }
+ protected:
+ virtual bool process_event(int, int, mogltk::event_t event) {
+ if (event == mogltk::E_TIMER) {
+ set_timed_event(100);
+ tick = (tick + 1) % 4;
+ switch (tick) {
+ case 0:
+ MainMenu->SetCaption(0, "/");
+ break;
+ case 1:
+ MainMenu->SetCaption(0, "-");
+ break;
+ case 2:
+ MainMenu->SetCaption(0, "\\");
+ break;
+ case 3:
+ MainMenu->SetCaption(0, "I");
+ break;
+ }
+ return true;
+ }
+ return false;
+ }
+ private:
+ int tick;
+};
+
+class quit : public mogltk::widgets::action {
+ public:
+ virtual void do_action(mogltk::widget * w) {
+ mogltk::engine::quit();
+ }
+} action_quit;
+
+class about : public mogltk::widgets::action {
+ public:
+ virtual void do_action(mogltk::widget * w) {
+ new mogltk::widgets::MsgBox(w->Shaper(), w->Father(), "About...",
+ "Dalos version 0.1 - OpenGL version\n"
+ "Copyright (C) 2004 Nicolas \"Pixel\" Noble\n"
+ "\n"
+ "Thanks and greetings fly to (no particular order)\n"
+ "GreatSkaori, Orphis, Ti Dragon, Yaz0r, S-O-R,\n"
+ "Meradrin, SkeuD, Moogle, InVerse, LavosSpawn\n"
+ "\n"
+ "And to all I forgot!\n"
+ );
+ }
+} about_dialog;
+
+virtual int startup() throw (GeneralException) {
+ mogltk::widgets::ContextMenu * c;
+ mogltk::base * gl = new mogltk::glbase();
+ mogltk::shape * sh = new mogltk::glshape();
+
+ mogltk::engine::setcursorvisible(true);
+ mogltk::engine::setappactive(true);
+
+ Root = new mogltk::widgets::Root(sh);
+ MainMenu = new mogltk::widgets::Menu(sh, Root);
+ Frame = new mogltk::widgets::Frame(sh, Root, 0, MainMenu->GetH(), Root->GetW() - 1, Root->GetH() - MainMenu->GetH() - 1);
+ new frame(sh, Frame);
+
+ MainMenu->addnode("/", 0);
+
+ c = MainMenu->createsub("File");
+ c->addnode("Load", 0);
+ c->addnode("Save", 0);
+ c->addline();
+ c->addnode("Quit", &action_quit);
+
+ c = MainMenu->createsub("Execution");
+ c->addnode("Run", 0);
+
+ c = MainMenu->createsub("Help");
+ c->addnode("About", &about_dialog);
+
+ new timer();
+
+ Root->mainloop();
+
+ return 0;
+}
+
+CODE_ENDS
diff --git a/MSVC/Dalos/Dalos.vcproj b/MSVC/Dalos/Dalos.vcproj
new file mode 100644
index 0000000..fc004fb
--- /dev/null
+++ b/MSVC/Dalos/Dalos.vcproj
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="Dalos"
+ ProjectGUID="{22F8F8CD-B256-446D-9B42-09CE83F74885}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\generic\include;..\..\generic\lib\zlib\include;..\..\generic\lib\lua\include;..\..\mogltk\include;&quot;..\..\..\SDL-1.2.7\include&quot;"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FORCE:MULTIPLE"
+ AdditionalDependencies="SDLmain.lib SDL.lib opengl32.lib glu32.lib"
+ OutputFile="$(OutDir)/Dalos.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="&quot;..\..\..\SDL-1.2.7\lib&quot;"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/Dalos.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ OmitFramePointers="TRUE"
+ AdditionalIncludeDirectories="..\..\generic\include;..\..\generic\lib\zlib\include;..\..\generic\lib\lua\include;..\..\mogltk\include;&quot;..\..\..\SDL-1.2.7\include&quot;"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/FORCE:MULTIPLE"
+ AdditionalDependencies="SDLmain.lib SDL.lib opengl32.lib glu32.lib"
+ OutputFile="$(OutDir)/Dalos.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="&quot;..\..\..\SDL-1.2.7\lib&quot;"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ </Configurations>
+ <Files>
+ <File
+ RelativePath="..\..\Dalos\Dalos.cc">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/MSVC/PSX-Bundle.sln b/MSVC/PSX-Bundle.sln
index 8fbcd8d..df4c83f 100644
--- a/MSVC/PSX-Bundle.sln
+++ b/MSVC/PSX-Bundle.sln
@@ -7,6 +7,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tools", "Tools\Tools.vcproj
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mogltk", "mogltk\mogltk.vcproj", "{34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dalos", "Dalos\Dalos.vcproj", "{22F8F8CD-B256-446D-9B42-09CE83F74885}"
+EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
ConfigName.0 = Debug
@@ -16,6 +18,10 @@ Global
{0A2CD193-F270-4F2B-943C-F8BDF792D25C}.0 = {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927}
{6CAE7F4D-C27B-43F3-B30A-84C5F32EFA29}.0 = {0A2CD193-F270-4F2B-943C-F8BDF792D25C}
{6CAE7F4D-C27B-43F3-B30A-84C5F32EFA29}.1 = {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927}
+ {34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}.0 = {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927}
+ {22F8F8CD-B256-446D-9B42-09CE83F74885}.0 = {879D8D90-9A7E-4F3C-9B4E-F1648C8AE927}
+ {22F8F8CD-B256-446D-9B42-09CE83F74885}.1 = {34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}
+ {22F8F8CD-B256-446D-9B42-09CE83F74885}.2 = {0A2CD193-F270-4F2B-943C-F8BDF792D25C}
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{879D8D90-9A7E-4F3C-9B4E-F1648C8AE927}.Debug.ActiveCfg = Debug|Win32
@@ -34,6 +40,10 @@ Global
{34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}.Debug.Build.0 = Debug|Win32
{34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}.Release.ActiveCfg = Release|Win32
{34BCDA3E-D3E2-4A8D-BF73-7D770EE6966A}.Release.Build.0 = Release|Win32
+ {22F8F8CD-B256-446D-9B42-09CE83F74885}.Debug.ActiveCfg = Debug|Win32
+ {22F8F8CD-B256-446D-9B42-09CE83F74885}.Debug.Build.0 = Debug|Win32
+ {22F8F8CD-B256-446D-9B42-09CE83F74885}.Release.ActiveCfg = Release|Win32
+ {22F8F8CD-B256-446D-9B42-09CE83F74885}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
diff --git a/MSVC/mogltk/mogltk.vcproj b/MSVC/mogltk/mogltk.vcproj
index 05f2719..c4ea69b 100644
--- a/MSVC/mogltk/mogltk.vcproj
+++ b/MSVC/mogltk/mogltk.vcproj
@@ -19,6 +19,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
+ AdditionalIncludeDirectories="..\..\mogltk\include;..\..\generic\include;&quot;..\..\..\SDL-1.2.7\include&quot;;..\..\generic\lib\zlib\include;..\..\generic\lib\lua\include"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
@@ -56,6 +57,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OmitFramePointers="TRUE"
+ AdditionalIncludeDirectories="..\..\mogltk\include;..\..\generic\include;&quot;..\..\..\SDL-1.2.7\include&quot;;..\..\generic\lib\zlib\include;..\..\generic\lib\lua\include"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
StringPooling="TRUE"
RuntimeLibrary="4"
@@ -85,45 +87,55 @@
</Configurations>
<Files>
<Filter
- Name="widgets"
+ Name="base"
Filter="">
<File
- RelativePath="..\..\mogltk\lib\glwidgets.cc">
+ RelativePath="..\..\mogltk\lib\base.cc">
</File>
<File
- RelativePath="..\..\mogltk\include\glwidgets.h">
+ RelativePath="..\..\mogltk\include\base.h">
</File>
<File
- RelativePath="..\..\mogltk\lib\widgets.cc">
+ RelativePath="..\..\mogltk\lib\glbase.cc">
</File>
<File
- RelativePath="..\..\mogltk\include\widgets.h">
+ RelativePath="..\..\mogltk\include\glbase.h">
</File>
</Filter>
<Filter
- Name="texture"
+ Name="engine"
Filter="">
<File
- RelativePath="..\..\mogltk\lib\texture.cc">
+ RelativePath="..\..\mogltk\lib\engine.cc">
</File>
<File
- RelativePath="..\..\mogltk\include\texture.h">
+ RelativePath="..\..\mogltk\include\engine.h">
</File>
</Filter>
<Filter
- Name="sprite"
+ Name="font"
Filter="">
<File
- RelativePath="..\..\mogltk\lib\glsprite.cc">
+ RelativePath="..\..\mogltk\lib\font.cc">
</File>
<File
- RelativePath="..\..\mogltk\include\glsprite.h">
+ RelativePath="..\..\mogltk\include\font.h">
</File>
<File
- RelativePath="..\..\mogltk\lib\sprite.cc">
+ RelativePath="..\..\mogltk\lib\glfont.cc">
</File>
<File
- RelativePath="..\..\mogltk\include\sprite.h">
+ RelativePath="..\..\mogltk\include\glfont.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="mcolor"
+ Filter="">
+ <File
+ RelativePath="..\..\mogltk\lib\mcolor.cc">
+ </File>
+ <File
+ RelativePath="..\..\mogltk\include\mcolor.h">
</File>
</Filter>
<Filter
@@ -143,55 +155,45 @@
</File>
</Filter>
<Filter
- Name="mcolor"
- Filter="">
- <File
- RelativePath="..\..\mogltk\lib\mcolor.cc">
- </File>
- <File
- RelativePath="..\..\mogltk\include\mcolor.h">
- </File>
- </Filter>
- <Filter
- Name="font"
+ Name="sprite"
Filter="">
<File
- RelativePath="..\..\mogltk\lib\font.cc">
+ RelativePath="..\..\mogltk\lib\glsprite.cc">
</File>
<File
- RelativePath="..\..\mogltk\include\font.h">
+ RelativePath="..\..\mogltk\include\glsprite.h">
</File>
<File
- RelativePath="..\..\mogltk\lib\glfont.cc">
+ RelativePath="..\..\mogltk\lib\sprite.cc">
</File>
<File
- RelativePath="..\..\mogltk\include\glfont.h">
+ RelativePath="..\..\mogltk\include\sprite.h">
</File>
</Filter>
<Filter
- Name="base"
+ Name="texture"
Filter="">
<File
- RelativePath="..\..\mogltk\lib\base.cc">
+ RelativePath="..\..\mogltk\lib\texture.cc">
</File>
<File
- RelativePath="..\..\mogltk\include\base.h">
+ RelativePath="..\..\mogltk\include\texture.h">
</File>
+ </Filter>
+ <Filter
+ Name="widgets"
+ Filter="">
<File
- RelativePath="..\..\mogltk\lib\glbase.cc">
+ RelativePath="..\..\mogltk\lib\glwidgets.cc">
</File>
<File
- RelativePath="..\..\mogltk\include\glbase.h">
+ RelativePath="..\..\mogltk\include\glwidgets.h">
</File>
- </Filter>
- <Filter
- Name="engine"
- Filter="">
<File
- RelativePath="..\..\mogltk\lib\engine.cc">
+ RelativePath="..\..\mogltk\lib\widgets.cc">
</File>
<File
- RelativePath="..\..\mogltk\include\engine.h">
+ RelativePath="..\..\mogltk\include\widgets.h">
</File>
</Filter>
</Files>