robertsim007: Revamped projects to no longer rely on my directory structure. Also, more command line friendly filenames.

This commit is contained in:
robertsim007 2005-03-21 01:13:42 +00:00
parent 0b62c0ddba
commit 6454aa156a
8 changed files with 436 additions and 65 deletions

View File

@ -2,4 +2,5 @@ torque_ide.exe
Debug
Release
TorqueIDE.plg
TorqueIDE.ncb
TorqueIDE.ncb
TorqueIDE.opt

View File

@ -0,0 +1,189 @@
/////////////////////////////////////////////////////////////////////////////
// Name: TorqueIDE.cpp
// Purpose: TorqueIDE Application
// Author: Based on minimal.cpp by Julian Smart
// Modified by:
// Created: 03/20/05
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWindows headers)
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
// ----------------------------------------------------------------------------
// resources
// ----------------------------------------------------------------------------
// the application icon (under Windows and OS/2 it is in resources)
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__)
#include "mondrian.xpm"
#endif
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
// Define a new application type, each program should derive a class from wxApp
class TorqueIDE : public wxApp
{
public:
// override base class virtuals
// ----------------------------
// this one is called on application startup and is a good place for the app
// initialization (doing it here and not in the ctor allows to have an error
// return: if OnInit() returns false, the application terminates)
virtual bool OnInit();
};
// Define a new frame type: this is going to be our main frame
class TorqueIDEFrame : public wxFrame
{
public:
// ctor(s)
TorqueIDEFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
long style = wxDEFAULT_FRAME_STYLE);
// event handlers (these functions should _not_ be virtual)
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
private:
// any class wishing to process wxWindows events must use this macro
DECLARE_EVENT_TABLE()
};
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// IDs for the controls and the menu commands
enum
{
// menu items
TorqueIDE_Quit = 1,
// it is important for the id corresponding to the "About" command to have
// this standard value as otherwise it won't be handled properly under Mac
// (where it is special and put into the "Apple" menu)
TorqueIDE_About = wxID_ABOUT
};
// ----------------------------------------------------------------------------
// event tables and other macros for wxWindows
// ----------------------------------------------------------------------------
// the event tables connect the wxWindows events with the functions (event
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE(TorqueIDEFrame, wxFrame)
EVT_MENU(TorqueIDE_Quit, TorqueIDEFrame::OnQuit)
EVT_MENU(TorqueIDE_About, TorqueIDEFrame::OnAbout)
END_EVENT_TABLE()
// Create a new application object: this macro will allow wxWindows to create
// the application object during program execution (it's better than using a
// static object for many reasons) and also declares the accessor function
// wxGetApp() which will return the reference of the right type (i.e. TorqueIDE and
// not wxApp)
IMPLEMENT_APP(TorqueIDE)
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// the application class
// ----------------------------------------------------------------------------
// 'Main program' equivalent: the program execution "starts" here
bool TorqueIDE::OnInit()
{
// create the main application window
TorqueIDEFrame *frame = new TorqueIDEFrame(_T("TorqueIDE wxWindows App"),
wxPoint(50, 50), wxSize(450, 340));
// and show it (the frames, unlike simple controls, are not shown when
// created initially)
frame->Show(TRUE);
// success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned FALSE here, the
// application would exit immediately.
return TRUE;
}
// ----------------------------------------------------------------------------
// main frame
// ----------------------------------------------------------------------------
// frame constructor
TorqueIDEFrame::TorqueIDEFrame(const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxFrame(NULL, -1, title, pos, size, style)
{
// set the frame icon
SetIcon(wxICON(mondrian));
#if wxUSE_MENUS
// create a menu bar
wxMenu *menuFile = new wxMenu;
// the "About" item should be in the help menu
wxMenu *helpMenu = new wxMenu;
helpMenu->Append(TorqueIDE_About, _T("&About...\tF1"), _T("Show about dialog"));
menuFile->Append(TorqueIDE_Quit, _T("E&xit\tAlt-X"), _T("Quit this program"));
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar();
menuBar->Append(menuFile, _T("&File"));
menuBar->Append(helpMenu, _T("&Help"));
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR
// create a status bar just for fun (by default with 1 pane only)
CreateStatusBar(2);
SetStatusText(_T("Welcome to wxWindows!"));
#endif // wxUSE_STATUSBAR
}
// event handlers
void TorqueIDEFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
// TRUE is to force the frame to close
Close(TRUE);
}
void TorqueIDEFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxString msg;
msg.Printf( _T("This is the About dialog of the TorqueIDE application.\n")
_T("Welcome to %s"), wxVERSION_STRING);
wxMessageBox(msg, _T("About TorqueIDE"), wxOK | wxICON_INFORMATION, this);
}

View File

@ -0,0 +1,89 @@
# Microsoft Developer Studio Project File - Name="TorqueIDE" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=TorqueIDE - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "TorqueIDE.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "TorqueIDE.mak" CFG="TorqueIDE - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "TorqueIDE - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c
# ADD CPP /nologo /MD /W4 /O2 /I "$(WXWIN)/include" /I "$(WXWIN)/contrib/include" /I "$(WXWIN)/lib/vc_lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /i "$(WXWIN)/include" /d "NDEBUG"
# ADD RSC /l 0x409 /i "$(WXWIN)/include" /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib $(WXWIN)/lib/vc_lib/wxbase25.lib $(WXWIN)/lib/vc_lib/wxmsw25_core.lib $(WXWIN)/lib/vc_lib/wxmsw25_stc.lib $(WXWIN)/lib/vc_lib/wxzlib.lib $(WXWIN)/lib/vc_lib/wxregex.lib $(WXWIN)/lib/vc_lib/wxpng.lib $(WXWIN)/lib/vc_lib/wxjpeg.lib $(WXWIN)/lib/vc_lib/wxtiff.lib /nologo /subsystem:windows /machine:I386
# Begin Target
# Name "TorqueIDE - Win32 Release"
# Begin Source File
SOURCE=.\TorqueIDE.rc
# End Source File
# Begin Source File
SOURCE=.\torqueideabout.cpp
# End Source File
# Begin Source File
SOURCE=.\torqueideabout.h
# End Source File
# Begin Source File
SOURCE=.\torqueideapp.cpp
# End Source File
# Begin Source File
SOURCE=.\torqueideapp.h
# End Source File
# Begin Source File
SOURCE=.\torqueideframe.cpp
# End Source File
# Begin Source File
SOURCE=.\torqueideframe.h
# End Source File
# Begin Source File
SOURCE=.\torqueidescintilla.h
# End Source File
# End Target
# End Project

View File

@ -0,0 +1,28 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "TorqueIDE"=.\TorqueIDE.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@ -0,0 +1,16 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: TorqueIDE - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
TorqueIDE.exe - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -0,0 +1,4 @@
mondrian ICON "mondrian.ico"
#define TORQUEIDE_QUIT 1
#define TORQUEIDE_ABOUT 102

View File

@ -0,0 +1,44 @@
/* XPM */
static char *mondrian_xpm[] = {
/* columns rows colors chars-per-pixel */
"32 32 6 1",
" c Black",
". c Blue",
"X c #00bf00",
"o c Red",
"O c Yellow",
"+ c Gray100",
/* pixels */
" ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" "
};

View File

@ -75,72 +75,72 @@ TorqueIDEFrame::TorqueIDEFrame(const wxChar *title) : wxFrame((wxFrame *) NULL,
scintilla->SetProperty("fold.compact", "1");
// Line Numbers
scintilla->SetMarginWidth(0, 30); // turn on the linenumbers margin, set width to 30pixels
scintilla->SetMarginWidth(1, 0); // turn off the folding margin
scintilla->SetMarginType(0, 1); // set margin type to linenumbers
scintilla->SetMarginWidth(1, 0); // turn off the folding margin
scintilla->SetMarginType(0, 1); // set margin type to linenumbers
// Keywords
scintilla->SetKeyWords(0, wxT("break case continue datablock default else false function if for new or package return switch switch$ true and while"));
scintilla->SetKeyWords(1, wxT("OpenALInitDriver OpenALShutdownDriver OpenALRegisterExtensions"
" alGetString alxCreateSource alxSourcef alxSource3f alxSourcei"
" alxGetSourcef alxGetSource3f alxGetSourcei alxPlay alxStop"
" alxStopAll alxIsPlaying alxListener alListener3f alxGetListenerf"
" alxGetListener3f alxGetListeneri alxGetChannelVolume alxSetChannelVolume"
" dumpConsoleClasses expandFilename strcmp stricmp strlen strstr"
" strpos ltrim rtrim trim sripChars strlwr strupr strchr strreplace"
" getSubStr getWord getWords setWord removeWord getWordCount"
" getField getFields setField removeField getFieldCount getRecord"
" getRecords setRecord removeRecord getRecordCount firstWord restWords"
" detag getTag echo warn error expandEscape collapseEscape"
" quit call compile exec export deleteVariables trace debug"
" findFirstFile findNextFile getFileCount getFileCRC isFile"
" isWriteableFileName fileExt fileBase fileName filePath nextToken"
" setLogMode setEchoFileLoads backtrace isPackage activatePackage"
" deactivatePackage nameToID isObject cancel isEventPending schedule"
" deleteDataBlocks telnetSetParameters dbgSetParameters dnetSetLogging"
" setNPatch toggleNPatch increaseNPatch decreaseNPatch setFSAA"
" IncreaseFSAA decreaseFSAA setOpenGLMipReduction setOpenGLSkyMipReduction"
" setOpenGLInteriorMipReduction setOpenGLTextureCompressionHint"
" setOpenGLAnisotropy clearTextureHolds addMaterialMapping aiConnect"
" aiAddPlayer setPowerAudioProfiles calcExplosionCoverage"
" gotoWebPage deactivateDirectInput activateDirectInput strToPlayerName"
" stripTrailingSpaces setDefaultFov setZoomSpeed setFov screenShot"
" panoramaScreenShot purgeResources lightScene flushTextureCache"
" dumpTextureStats dumpResourceStats getControlObjectAltitude"
" getControlObjectSpeed containerFindFirst containerFindNext"
" snapToggle getVersionNumber getVersionString getCompileTimeString"
" getSimTime getRealTime setNetPort lockMouse rebuildModPaths"
" setModPaths getModPaths createCanvas saveJournal playJournal"
" addTaggedString removeTaggedString getTaggedString buildTaggedString"
" commandToServer commandToClient allowConnections connect localConnect"
" startRecord stopRecord playDemo isDemoRecording msg queryMasterServer"
" cancelServerQuery stopServerQuery startHeartbeat stopHeartbeat"
" getServerCount setServerInfo setShadowDetailLevel showShapeLoad showSequenceLoad"
" showTurnLeft showTurnRight showUpdateThreadControl showSelectSequence"
" showPlay showStop showSetScale showSetPos showNewThread showDeleteThread"
" showToggleRoot showToggleStick showSetCamera showSetKeyboard showSetLightDirection"
" showSetDetailSlider StripMLControlChars setInteriorRenderMode setInteriorFocusedDebug"
" isPointInside VectorAdd VectorSub VectorScale VectorNormalize VectorDot"
" VectorCross VectorDist VectorLen VectorOrthoBasis MatrixCreate"
" MatrixMultiply MatrixMulVector MatrixMulPoint getBoxCenter"
" setRandomSeed getRandomSeed getRandom MatrixCreateFromEuler mSolveQuadratic"
" mSolveCubic mSolveQuartic mFloor mCeil mFloatLength mAbs mSqrt"
" mPow mLog mSin mCos mTan mAsin mAcos mAtan mRadToDeg mDegToRad"
" ValidateMemory FreeMemoryDump dumpMemSnapshot redbookOpen redbookClose"
" redbookPlay redbookStop redbookGetTrackCount redbookGetVolume"
" redbookSetVolume redbookGetDeviceCount redbookGetDeviceName redbookGetLastError"
" videoSetGammaCorrection setDisplayDevice setScreenMode toggleFullScreen"
" isFullScreen switchBitDepth prevResolution nextResolution getResolution"
" setResolution setRes getDisplayDeviceList getResolutionList getVideoDriverInfo"
" isDeviceFullScreenOnly setVerticalSync profilerMarkerEnable profilerEnable"
" profilerDump profilerDumpToFile enableWinConsole isJoystickDetected"
" getJoystickAxes enableMouse disableMouse echoInputState toggleInputState"
" MathInit AddCardProfile addOSCardProfile getDesktopResolution activateKeyboard"
" deactivateKeyboard GLEnableLogging GLEnableOutline GLEnableMetrics"
" inputLog launchDedicatedServer isKoreanBuild debug_testx86unixmutex"
" debug_debugbreak resetLighting getMaxFrameAllocation dumpNetStringTable"
" InitContainerRadiusSearch ContainerSearchNext ContainerSearchCurrDist"
" ContainerSearchCurrRadiusDist ContainerRayCast ContainerBoxEmpty"
" pathOnMissionLoadDone makeTestTerrain getTerrainHeight")
); //end scintilla->SetKeyWords(1, <blah>)
scintilla->SetKeyWords(1, wxT("OpenALInitDriver OpenALShutdownDriver OpenALRegisterExtensions"
" alGetString alxCreateSource alxSourcef alxSource3f alxSourcei"
" alxGetSourcef alxGetSource3f alxGetSourcei alxPlay alxStop"
" alxStopAll alxIsPlaying alxListener alListener3f alxGetListenerf"
" alxGetListener3f alxGetListeneri alxGetChannelVolume alxSetChannelVolume"
" dumpConsoleClasses expandFilename strcmp stricmp strlen strstr"
" strpos ltrim rtrim trim sripChars strlwr strupr strchr strreplace"
" getSubStr getWord getWords setWord removeWord getWordCount"
" getField getFields setField removeField getFieldCount getRecord"
" getRecords setRecord removeRecord getRecordCount firstWord restWords"
" detag getTag echo warn error expandEscape collapseEscape"
" quit call compile exec export deleteVariables trace debug"
" findFirstFile findNextFile getFileCount getFileCRC isFile"
" isWriteableFileName fileExt fileBase fileName filePath nextToken"
" setLogMode setEchoFileLoads backtrace isPackage activatePackage"
" deactivatePackage nameToID isObject cancel isEventPending schedule"
" deleteDataBlocks telnetSetParameters dbgSetParameters dnetSetLogging"
" setNPatch toggleNPatch increaseNPatch decreaseNPatch setFSAA"
" IncreaseFSAA decreaseFSAA setOpenGLMipReduction setOpenGLSkyMipReduction"
" setOpenGLInteriorMipReduction setOpenGLTextureCompressionHint"
" setOpenGLAnisotropy clearTextureHolds addMaterialMapping aiConnect"
" aiAddPlayer setPowerAudioProfiles calcExplosionCoverage"
" gotoWebPage deactivateDirectInput activateDirectInput strToPlayerName"
" stripTrailingSpaces setDefaultFov setZoomSpeed setFov screenShot"
" panoramaScreenShot purgeResources lightScene flushTextureCache"
" dumpTextureStats dumpResourceStats getControlObjectAltitude"
" getControlObjectSpeed containerFindFirst containerFindNext"
" snapToggle getVersionNumber getVersionString getCompileTimeString"
" getSimTime getRealTime setNetPort lockMouse rebuildModPaths"
" setModPaths getModPaths createCanvas saveJournal playJournal"
" addTaggedString removeTaggedString getTaggedString buildTaggedString"
" commandToServer commandToClient allowConnections connect localConnect"
" startRecord stopRecord playDemo isDemoRecording msg queryMasterServer"
" cancelServerQuery stopServerQuery startHeartbeat stopHeartbeat"
" getServerCount setServerInfo setShadowDetailLevel showShapeLoad showSequenceLoad"
" showTurnLeft showTurnRight showUpdateThreadControl showSelectSequence"
" showPlay showStop showSetScale showSetPos showNewThread showDeleteThread"
" showToggleRoot showToggleStick showSetCamera showSetKeyboard showSetLightDirection"
" showSetDetailSlider StripMLControlChars setInteriorRenderMode setInteriorFocusedDebug"
" isPointInside VectorAdd VectorSub VectorScale VectorNormalize VectorDot"
" VectorCross VectorDist VectorLen VectorOrthoBasis MatrixCreate"
" MatrixMultiply MatrixMulVector MatrixMulPoint getBoxCenter"
" setRandomSeed getRandomSeed getRandom MatrixCreateFromEuler mSolveQuadratic"
" mSolveCubic mSolveQuartic mFloor mCeil mFloatLength mAbs mSqrt"
" mPow mLog mSin mCos mTan mAsin mAcos mAtan mRadToDeg mDegToRad"
" ValidateMemory FreeMemoryDump dumpMemSnapshot redbookOpen redbookClose"
" redbookPlay redbookStop redbookGetTrackCount redbookGetVolume"
" redbookSetVolume redbookGetDeviceCount redbookGetDeviceName redbookGetLastError"
" videoSetGammaCorrection setDisplayDevice setScreenMode toggleFullScreen"
" isFullScreen switchBitDepth prevResolution nextResolution getResolution"
" setResolution setRes getDisplayDeviceList getResolutionList getVideoDriverInfo"
" isDeviceFullScreenOnly setVerticalSync profilerMarkerEnable profilerEnable"
" profilerDump profilerDumpToFile enableWinConsole isJoystickDetected"
" getJoystickAxes enableMouse disableMouse echoInputState toggleInputState"
" MathInit AddCardProfile addOSCardProfile getDesktopResolution activateKeyboard"
" deactivateKeyboard GLEnableLogging GLEnableOutline GLEnableMetrics"
" inputLog launchDedicatedServer isKoreanBuild debug_testx86unixmutex"
" debug_debugbreak resetLighting getMaxFrameAllocation dumpNetStringTable"
" InitContainerRadiusSearch ContainerSearchNext ContainerSearchCurrDist"
" ContainerSearchCurrRadiusDist ContainerRayCast ContainerBoxEmpty"
" pathOnMissionLoadDone makeTestTerrain getTerrainHeight")
); //end scintilla->SetKeyWords()
}
TorqueIDEFrame::~TorqueIDEFrame()