Skip to content

Commit a761e38

Browse files
committed
Add GUIEditor source, assets and solution (followup to cortex-command-community/Cortex-Command-Community-Project-Source@addf2c3)
1 parent 87ea1df commit a761e38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+6495
-0
lines changed

Backup/editor.sln

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 9.00
3+
# Visual Studio 2005
4+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "editor", "editor.vcproj", "{DB486FC0-C6F8-4AD3-8D32-8AA0314C6B33}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|Win32 = Debug|Win32
9+
Release|Win32 = Release|Win32
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{DB486FC0-C6F8-4AD3-8D32-8AA0314C6B33}.Debug|Win32.ActiveCfg = Debug|Win32
13+
{DB486FC0-C6F8-4AD3-8D32-8AA0314C6B33}.Debug|Win32.Build.0 = Debug|Win32
14+
{DB486FC0-C6F8-4AD3-8D32-8AA0314C6B33}.Release|Win32.ActiveCfg = Release|Win32
15+
{DB486FC0-C6F8-4AD3-8D32-8AA0314C6B33}.Release|Win32.Build.0 = Release|Win32
16+
EndGlobalSection
17+
GlobalSection(SolutionProperties) = preSolution
18+
HideSolutionNode = FALSE
19+
EndGlobalSection
20+
EndGlobal

Editor.cpp

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
//////////////////////////////////////////////////////////////////////////////////////////
2+
// File: Editor.cpp
3+
//////////////////////////////////////////////////////////////////////////////////////////
4+
// Description: Entry point file for the GUI Library editor
5+
// Project: GUI Library
6+
// Author(s): Jason Boettcher
7+
8+
9+
10+
11+
//////////////////////////////////////////////////////////////////////////////////////////
12+
// Inclusions of header files
13+
14+
/*#include <windows.h>
15+
#include <windowsx.h>
16+
#include <stdio.h>*/
17+
18+
19+
#include "TimerMan.h"
20+
#include "GUIEditorApp.h"
21+
#include "GUIEditorLib.h"
22+
23+
#define RECT WINDOWS_RECT
24+
25+
#include "allegro.h"
26+
#include "winalleg.h"
27+
#undef RECT
28+
29+
30+
extern "C" { FILE __iob_func[3] = { *stdin, *stdout, *stderr }; }
31+
32+
using namespace RTE;
33+
34+
namespace RTE {
35+
36+
TimerMan g_TimerMan;
37+
};
38+
39+
GUIEditorApp g_GUIEditor;
40+
41+
extern HINSTANCE g_hInstance = 0;
42+
extern HWND g_hWnd = 0;
43+
44+
45+
//////////////////////////////////////////////////////////////////////////////////////////
46+
// Method: main
47+
//////////////////////////////////////////////////////////////////////////////////////////
48+
// Description: Entry point for the GUI Editor
49+
50+
int main(int argc, char *argv[])
51+
{
52+
if(!g_GUIEditor.Initialize())
53+
return -1;
54+
55+
// Get windows settings
56+
g_hWnd = win_get_window();
57+
g_hInstance = (HINSTANCE)GetWindowLong(g_hWnd, GWL_HINSTANCE);
58+
59+
60+
// Run editor loop
61+
while(1) {
62+
bool bContinue = g_GUIEditor.Update();
63+
if(!bContinue)
64+
break;
65+
}
66+
67+
68+
69+
return 0;
70+
}
71+
END_OF_MAIN();

0 commit comments

Comments
 (0)