Alterations to ScEd, so that it almost works (except for saving/loading maps). Change the bottom of premake.lua if you want to build it.
This was SVN commit r1580.
BIN
binaries/data/mods/official/temp/terrain.png
(Stored with Git LFS)
Normal file
@ -1,7 +1,14 @@
|
|||||||
function sourcesfromdirs(root, ...)
|
function sourcesfromdirs(root, dirs)
|
||||||
local res = {}
|
local res = {}
|
||||||
for i=1, getn(arg) do
|
for i=1, getn(dirs) do
|
||||||
res[i]=matchfiles(root..arg[i].."/*.cpp", root..arg[i].."/*.h")
|
local files = matchfiles(root..dirs[i].."/*.cpp", root..dirs[i].."/*.h")
|
||||||
|
tconcat(res, files)
|
||||||
end
|
end
|
||||||
return res
|
return res
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function tconcat(table, values)
|
||||||
|
for i=1, getn(values) do
|
||||||
|
tinsert(table, values[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
@ -7,26 +7,44 @@ project.libdir = "../../../binaries/system"
|
|||||||
project.debugdir = "../../../binaries/data"
|
project.debugdir = "../../../binaries/data"
|
||||||
project.configs = { "Debug", "Release", "Testing" }
|
project.configs = { "Debug", "Release", "Testing" }
|
||||||
|
|
||||||
-- Start the package part
|
function setuppackage (projectname)
|
||||||
package = newpackage()
|
|
||||||
package.name = "pyrogenesis"
|
|
||||||
-- Windowed executable on windows, "exe" on all other platforms
|
|
||||||
package.kind = "winexe"
|
|
||||||
package.language = "c++"
|
|
||||||
|
|
||||||
-- Package target for debug and release build
|
-- Start the package part
|
||||||
-- On Windows, ".exe" is added on the end, on unices the name is used directly
|
package = newpackage()
|
||||||
package.config["Debug"].target = "ps_dbg"
|
|
||||||
package.config["Release"].target = "ps"
|
|
||||||
package.config["Testing"].target = "ps_test"
|
|
||||||
|
|
||||||
sourceroot = "../../../source/"
|
if (projectname == "sced") then
|
||||||
librariesroot = "../../../libraries/"
|
package.name = "sced"
|
||||||
|
exename = "sced"
|
||||||
|
objdirprefix = "ScEd_"
|
||||||
|
else
|
||||||
|
package.name = "pyrogenesis"
|
||||||
|
exename = "ps"
|
||||||
|
objdirprefix = ""
|
||||||
|
end
|
||||||
|
|
||||||
-- Files
|
-- Windowed executable on windows, "exe" on all other platforms
|
||||||
package.files = {
|
package.kind = "winexe"
|
||||||
sourcesfromdirs(sourceroot,
|
package.language = "c++"
|
||||||
|
|
||||||
|
-- Package target for debug and release build
|
||||||
|
-- On Windows, ".exe" is added on the end, on unices the name is used directly
|
||||||
|
package.config["Debug"].target = exename.."_dbg"
|
||||||
|
package.config["Release"].target = exename
|
||||||
|
package.config["Testing"].target = exename.."_test"
|
||||||
|
|
||||||
|
-- TODO: Implement objdir in Premake
|
||||||
|
package.config["Debug"].objdir = objdirprefix.."Debug"
|
||||||
|
package.config["Release"].objdir = objdirprefix.."Release"
|
||||||
|
package.config["Testing"].objdir = objdirprefix.."Testing"
|
||||||
|
|
||||||
|
|
||||||
|
sourceroot = "../../../source/"
|
||||||
|
librariesroot = "../../../libraries/"
|
||||||
|
|
||||||
|
|
||||||
|
source_dirs = {}
|
||||||
|
|
||||||
|
tconcat(source_dirs, {
|
||||||
"ps",
|
"ps",
|
||||||
"ps/scripting",
|
"ps/scripting",
|
||||||
"ps/Network",
|
"ps/Network",
|
||||||
@ -44,11 +62,15 @@ package.files = {
|
|||||||
"maths",
|
"maths",
|
||||||
"maths/scripting",
|
"maths/scripting",
|
||||||
|
|
||||||
"renderer",
|
"renderer"
|
||||||
|
})
|
||||||
|
|
||||||
|
if (projectname ~= "sced") then tconcat(source_dirs, {
|
||||||
"gui",
|
"gui",
|
||||||
"gui/scripting",
|
"gui/scripting"
|
||||||
|
}) end
|
||||||
|
|
||||||
|
tconcat(source_dirs, {
|
||||||
"terrain",
|
"terrain",
|
||||||
|
|
||||||
"sound",
|
"sound",
|
||||||
@ -58,122 +80,149 @@ package.files = {
|
|||||||
"i18n",
|
"i18n",
|
||||||
|
|
||||||
"tests"
|
"tests"
|
||||||
),
|
})
|
||||||
|
|
||||||
|
if (projectname == "sced") then tconcat(source_dirs, {
|
||||||
|
"tools/sced",
|
||||||
|
"tools/sced/ui"
|
||||||
|
}) end
|
||||||
|
|
||||||
sourceroot.."main.cpp"
|
package.files = sourcesfromdirs(sourceroot, source_dirs)
|
||||||
}
|
|
||||||
|
if (projectname ~= "sced") then
|
||||||
|
tinsert(package.files, sourceroot.."main.cpp")
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
include_dirs = {
|
include_dirs = {
|
||||||
"ps",
|
"ps",
|
||||||
"simulation",
|
"simulation",
|
||||||
"lib",
|
"lib",
|
||||||
"graphics",
|
"graphics",
|
||||||
"maths",
|
"maths",
|
||||||
"renderer",
|
"renderer",
|
||||||
"terrain",
|
"terrain",
|
||||||
""
|
""
|
||||||
}
|
|
||||||
|
|
||||||
package.includepaths = {}
|
|
||||||
|
|
||||||
foreach(include_dirs, function (i,v)
|
|
||||||
tinsert(package.includepaths, sourceroot .. v)
|
|
||||||
end)
|
|
||||||
|
|
||||||
|
|
||||||
package.libpaths = {}
|
|
||||||
|
|
||||||
|
|
||||||
package.buildflags = { "no-rtti" }
|
|
||||||
|
|
||||||
package.config["Testing"].buildflags = { "with-symbols", "no-runtime-checks", "no-edit-and-continue" }
|
|
||||||
package.config["Testing"].defines = { "TESTING" }
|
|
||||||
|
|
||||||
package.config["Release"].defines = { "NDEBUG" }
|
|
||||||
|
|
||||||
-- Docs says that premake does this automatically - it doesn't (at least not for GCC/Linux)
|
|
||||||
package.config["Debug"].buildflags = { "with-symbols", "no-edit-and-continue" }
|
|
||||||
|
|
||||||
-- Platform Specifics
|
|
||||||
if (OS == "windows") then
|
|
||||||
|
|
||||||
-- Directories under 'libraries', each containing 'lib' and 'include':
|
|
||||||
external_libraries = {
|
|
||||||
"misc",
|
|
||||||
"libpng",
|
|
||||||
"zlib",
|
|
||||||
"openal",
|
|
||||||
"spidermonkey",
|
|
||||||
"xerces",
|
|
||||||
"vorbis",
|
|
||||||
"boost"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Add '<libraries root>/<libraryname>/lib' and '/include' to the includepaths and libpaths
|
if (projectname == "sced") then
|
||||||
foreach(external_libraries, function (i,v)
|
tinsert(include_dirs, "tools/sced")
|
||||||
tinsert(package.includepaths, librariesroot..v.."/include")
|
end
|
||||||
tinsert(package.libpaths, librariesroot..v.."/lib")
|
|
||||||
|
package.includepaths = {}
|
||||||
|
|
||||||
|
foreach(include_dirs, function (i,v)
|
||||||
|
tinsert(package.includepaths, sourceroot .. v)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Libraries
|
|
||||||
package.links = { "opengl32" }
|
|
||||||
tinsert(package.files, sourcesfromdirs(sourceroot, "lib/sysdep/win"))
|
|
||||||
tinsert(package.files, {sourceroot.."lib/sysdep/win/assert_dlg.rc"})
|
|
||||||
|
|
||||||
package.linkoptions = { "/ENTRY:entry",
|
|
||||||
"/DELAYLOAD:opengl32.dll",
|
|
||||||
"/DELAYLOAD:advapi32.dll",
|
|
||||||
"/DELAYLOAD:gdi32.dll",
|
|
||||||
"/DELAYLOAD:user32.dll",
|
|
||||||
"/DELAYLOAD:ws2_32.dll",
|
|
||||||
"/DELAYLOAD:version.dll",
|
|
||||||
"/DELAYLOAD:ddraw.dll",
|
|
||||||
"/DELAYLOAD:dsound.dll",
|
|
||||||
"/DELAYLOAD:glu32.dll",
|
|
||||||
"/DELAYLOAD:openal32.dll",
|
|
||||||
"/DELAY:UNLOAD" -- allow manual unload of delay-loaded DLLs
|
|
||||||
}
|
|
||||||
|
|
||||||
package.config["Debug"].linkoptions = {
|
|
||||||
"/DELAYLOAD:js32d.dll",
|
|
||||||
"/DELAYLOAD:zlib1d.dll",
|
|
||||||
"/DELAYLOAD:libpng13d.dll",
|
|
||||||
}
|
|
||||||
|
|
||||||
-- 'Testing' uses 'Debug' DLL's
|
|
||||||
package.config["Testing"].linkoptions = package.config["Debug"].linkoptions
|
|
||||||
|
|
||||||
package.config["Release"].linkoptions = {
|
package.libpaths = {}
|
||||||
"/DELAYLOAD:js32.dll",
|
|
||||||
"/DELAYLOAD:zlib1.dll",
|
|
||||||
"/DELAYLOAD:libpng13.dll",
|
|
||||||
}
|
|
||||||
|
|
||||||
tinsert(package.buildflags, { "no-main" })
|
|
||||||
|
|
||||||
package.pchHeader = "precompiled.h"
|
package.buildflags = { "no-rtti" }
|
||||||
package.pchSource = "precompiled.cpp"
|
|
||||||
|
package.config["Testing"].buildflags = { "with-symbols", "no-runtime-checks", "no-edit-and-continue" }
|
||||||
else -- Non-Windows, = Unix
|
package.config["Testing"].defines = { "TESTING" }
|
||||||
|
|
||||||
tinsert(package.files, sourcesfromdirs(sourceroot, "lib/sysdep/unix"))
|
package.config["Release"].defines = { "NDEBUG" }
|
||||||
|
|
||||||
-- Libraries
|
-- Docs says that premake does this automatically - it doesn't (at least not for GCC/Linux)
|
||||||
package.links = {
|
package.config["Debug"].buildflags = { "with-symbols", "no-edit-and-continue" }
|
||||||
-- OpenGL and X-Windows
|
|
||||||
"GL", "GLU", "X11",
|
|
||||||
"SDL", "png",
|
if (projectname == "sced") then
|
||||||
"fam",
|
tinsert(package.defines, "SCED")
|
||||||
-- Audio
|
tinsert(package.defines, "_AFXDLL")
|
||||||
"openal", "vorbisfile",
|
tinsert(package.defines, "NO_GUI")
|
||||||
-- Utilities
|
end
|
||||||
"xerces-c", "z", "rt", "js"
|
|
||||||
}
|
-- Platform Specifics
|
||||||
tinsert(package.libpaths, { "/usr/X11R6/lib" } )
|
if (OS == "windows") then
|
||||||
-- Defines
|
|
||||||
package.defines = {
|
-- Directories under 'libraries', each containing 'lib' and 'include':
|
||||||
"__STDC_VERSION__=199901L" }
|
external_libraries = {
|
||||||
-- Includes
|
"misc",
|
||||||
tinsert(package.includepaths, { "/usr/X11R6/include/X11" } )
|
"libpng",
|
||||||
|
"zlib",
|
||||||
|
"openal",
|
||||||
|
"spidermonkey",
|
||||||
|
"xerces",
|
||||||
|
"vorbis",
|
||||||
|
"boost"
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Add '<libraries root>/<libraryname>/lib' and '/include' to the includepaths and libpaths
|
||||||
|
foreach(external_libraries, function (i,v)
|
||||||
|
tinsert(package.includepaths, librariesroot..v.."/include")
|
||||||
|
tinsert(package.libpaths, librariesroot..v.."/lib")
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Libraries
|
||||||
|
package.links = { "opengl32" }
|
||||||
|
tinsert(package.files, sourcesfromdirs(sourceroot, {"lib/sysdep/win"}))
|
||||||
|
tinsert(package.files, {sourceroot.."lib/sysdep/win/assert_dlg.rc"})
|
||||||
|
|
||||||
|
if (projectname == "sced") then
|
||||||
|
tinsert(package.files, {sourceroot.."tools/sced/ui/ScEd.rc"})
|
||||||
|
end
|
||||||
|
|
||||||
|
package.linkoptions = { "/ENTRY:entry",
|
||||||
|
"/DELAYLOAD:opengl32.dll",
|
||||||
|
"/DELAYLOAD:advapi32.dll",
|
||||||
|
"/DELAYLOAD:gdi32.dll",
|
||||||
|
"/DELAYLOAD:user32.dll",
|
||||||
|
"/DELAYLOAD:ws2_32.dll",
|
||||||
|
"/DELAYLOAD:version.dll",
|
||||||
|
"/DELAYLOAD:ddraw.dll",
|
||||||
|
"/DELAYLOAD:dsound.dll",
|
||||||
|
"/DELAYLOAD:glu32.dll",
|
||||||
|
"/DELAYLOAD:openal32.dll",
|
||||||
|
"/DELAY:UNLOAD" -- allow manual unload of delay-loaded DLLs
|
||||||
|
}
|
||||||
|
|
||||||
|
package.config["Debug"].linkoptions = {
|
||||||
|
"/DELAYLOAD:js32d.dll",
|
||||||
|
"/DELAYLOAD:zlib1d.dll",
|
||||||
|
"/DELAYLOAD:libpng13d.dll",
|
||||||
|
}
|
||||||
|
|
||||||
|
-- 'Testing' uses 'Debug' DLL's
|
||||||
|
package.config["Testing"].linkoptions = package.config["Debug"].linkoptions
|
||||||
|
|
||||||
|
package.config["Release"].linkoptions = {
|
||||||
|
"/DELAYLOAD:js32.dll",
|
||||||
|
"/DELAYLOAD:zlib1.dll",
|
||||||
|
"/DELAYLOAD:libpng13.dll",
|
||||||
|
}
|
||||||
|
|
||||||
|
tinsert(package.buildflags, { "no-main" })
|
||||||
|
|
||||||
|
package.pchHeader = "precompiled.h"
|
||||||
|
package.pchSource = "precompiled.cpp"
|
||||||
|
|
||||||
|
else -- Non-Windows, = Unix
|
||||||
|
|
||||||
|
tinsert(package.files, sourcesfromdirs(sourceroot, {"lib/sysdep/unix"}))
|
||||||
|
|
||||||
|
-- Libraries
|
||||||
|
package.links = {
|
||||||
|
-- OpenGL and X-Windows
|
||||||
|
"GL", "GLU", "X11",
|
||||||
|
"SDL", "png",
|
||||||
|
"fam",
|
||||||
|
-- Audio
|
||||||
|
"openal", "vorbisfile",
|
||||||
|
-- Utilities
|
||||||
|
"xerces-c", "z", "rt", "js"
|
||||||
|
}
|
||||||
|
tinsert(package.libpaths, { "/usr/X11R6/lib" } )
|
||||||
|
-- Defines
|
||||||
|
package.defines = {
|
||||||
|
"__STDC_VERSION__=199901L" }
|
||||||
|
-- Includes
|
||||||
|
tinsert(package.includepaths, { "/usr/X11R6/include/X11" } )
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
setuppackage("pyrogenesis")
|
||||||
|
-- setuppackage("sced")
|
@ -3,7 +3,7 @@ REM Create Visual Studio Workspaces on Windows
|
|||||||
|
|
||||||
mkdir vc6
|
mkdir vc6
|
||||||
mkdir vc7
|
mkdir vc7
|
||||||
mkdir vc2003
|
mkdir vc2003b
|
||||||
|
|
||||||
REM Change to the lua project name, this must correspond to the base file name
|
REM Change to the lua project name, this must correspond to the base file name
|
||||||
REM of the created project files
|
REM of the created project files
|
||||||
@ -16,16 +16,18 @@ mkdir tmp
|
|||||||
copy premake.lua tmp
|
copy premake.lua tmp
|
||||||
cd tmp
|
cd tmp
|
||||||
|
|
||||||
|
REM Just copy *.sln/etc indiscriminately, because it might include both pyrogenesis.sln and sced.sln (or might not)
|
||||||
|
|
||||||
..\premake --target vs6
|
..\premake --target vs6
|
||||||
move %PROJECT%.dsw ..\..\workspaces\vc6
|
move *.dsw ..\..\workspaces\vc6
|
||||||
move %PROJECT%.dsp ..\..\workspaces\vc6
|
move *.dsp ..\..\workspaces\vc6
|
||||||
|
|
||||||
..\premake --target vs7
|
..\premake --target vs7
|
||||||
move %PROJECT%.sln ..\..\workspaces\vc7
|
move *.sln ..\..\workspaces\vc7
|
||||||
move %PROJECT%.vcproj ..\..\workspaces\vc7
|
move *.vcproj ..\..\workspaces\vc7
|
||||||
|
|
||||||
..\premake --target vs2003
|
..\premake --target vs2003
|
||||||
move %PROJECT%.sln ..\..\workspaces\vc2003
|
move *.sln ..\..\workspaces\vc2003b
|
||||||
move %PROJECT%.vcproj ..\..\workspaces\vc2003
|
move *.vcproj ..\..\workspaces\vc2003b
|
||||||
|
|
||||||
cd ..\..\workspaces
|
cd ..\..\workspaces
|
||||||
|
@ -20,6 +20,9 @@
|
|||||||
|
|
||||||
class CMapWriter;
|
class CMapWriter;
|
||||||
class CMapReader;
|
class CMapReader;
|
||||||
|
class CEditorData;
|
||||||
|
class CMainFrame;
|
||||||
|
class CLightSettingsDlg;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// CLightEnv: description of a lighting environment - contains all the
|
// CLightEnv: description of a lighting environment - contains all the
|
||||||
@ -28,7 +31,10 @@ class CLightEnv
|
|||||||
{
|
{
|
||||||
friend class CMapWriter;
|
friend class CMapWriter;
|
||||||
friend class CMapReader;
|
friend class CMapReader;
|
||||||
// wierd accessor order to preserve memory layout of the class
|
friend class CEditorData;
|
||||||
|
friend class CMainFrame;
|
||||||
|
friend class CLightSettingsDlg;
|
||||||
|
// weird accessor order to preserve memory layout of the class
|
||||||
public:
|
public:
|
||||||
RGBColor m_SunColor;
|
RGBColor m_SunColor;
|
||||||
private:
|
private:
|
||||||
|
@ -419,8 +419,9 @@ void GUIRenderer::UpdateDrawCallCache(DrawCalls &Calls, CStr &SpriteName, CRect
|
|||||||
|
|
||||||
// "real-texture-placement" overrides everything
|
// "real-texture-placement" overrides everything
|
||||||
if (cit->m_TexturePlacementInFile != CRect())
|
if (cit->m_TexturePlacementInFile != CRect())
|
||||||
|
{
|
||||||
BlockTex = cit->m_TexturePlacementInFile;
|
BlockTex = cit->m_TexturePlacementInFile;
|
||||||
|
}
|
||||||
// Check whether this sprite has "cell-size" set
|
// Check whether this sprite has "cell-size" set
|
||||||
else if (cit->m_CellSize != CSize())
|
else if (cit->m_CellSize != CSize())
|
||||||
{
|
{
|
||||||
@ -430,7 +431,6 @@ void GUIRenderer::UpdateDrawCallCache(DrawCalls &Calls, CStr &SpriteName, CRect
|
|||||||
BlockTex = CRect(cit->m_CellSize.cx*col, cit->m_CellSize.cy*row,
|
BlockTex = CRect(cit->m_CellSize.cx*col, cit->m_CellSize.cy*row,
|
||||||
cit->m_CellSize.cx*(col+1), cit->m_CellSize.cy*(row+1));
|
cit->m_CellSize.cx*(col+1), cit->m_CellSize.cy*(row+1));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use the whole texture
|
// Use the whole texture
|
||||||
else
|
else
|
||||||
BlockTex = CRect(0, 0, TexWidth, TexHeight);
|
BlockTex = CRect(0, 0, TexWidth, TexHeight);
|
||||||
|
@ -276,7 +276,6 @@ static inline void pre_libc_init()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline void pre_main_init()
|
static inline void pre_main_init()
|
||||||
{
|
{
|
||||||
#ifdef HAVE_DEBUGALLOC
|
#ifdef HAVE_DEBUGALLOC
|
||||||
@ -333,8 +332,17 @@ PREVTSC=TSC;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef SCED
|
||||||
|
void sced_init()
|
||||||
|
{
|
||||||
|
pre_main_init();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SCED
|
||||||
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||||
{
|
{
|
||||||
pre_main_init();
|
pre_main_init();
|
||||||
return main(__argc, __argv);
|
return main(__argc, __argv);
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -19,6 +19,9 @@ glwprintf(L"Hello world");
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// MFC has nicked all the good names :-(
|
||||||
|
#define CFont PS_CFont
|
||||||
|
|
||||||
class CFont
|
class CFont
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -262,8 +262,10 @@ const RGBAColor& CRenderer::GetOptionColor(enum Option opt) const
|
|||||||
// BeginFrame: signal frame start
|
// BeginFrame: signal frame start
|
||||||
void CRenderer::BeginFrame()
|
void CRenderer::BeginFrame()
|
||||||
{
|
{
|
||||||
|
#ifndef SCED
|
||||||
if(!g_Game || !g_Game->IsGameStarted())
|
if(!g_Game || !g_Game->IsGameStarted())
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
// bump frame counter
|
// bump frame counter
|
||||||
m_FrameCounter++;
|
m_FrameCounter++;
|
||||||
@ -875,9 +877,10 @@ struct SortModelsByTexture {
|
|||||||
// FlushFrame: force rendering of any batched objects
|
// FlushFrame: force rendering of any batched objects
|
||||||
void CRenderer::FlushFrame()
|
void CRenderer::FlushFrame()
|
||||||
{
|
{
|
||||||
|
#ifndef SCED
|
||||||
if(!g_Game || !g_Game->IsGameStarted())
|
if(!g_Game || !g_Game->IsGameStarted())
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
oglCheck();
|
oglCheck();
|
||||||
|
|
||||||
@ -929,8 +932,10 @@ void CRenderer::FlushFrame()
|
|||||||
// EndFrame: signal frame end; implicitly flushes batched objects
|
// EndFrame: signal frame end; implicitly flushes batched objects
|
||||||
void CRenderer::EndFrame()
|
void CRenderer::EndFrame()
|
||||||
{
|
{
|
||||||
|
#ifndef SCED
|
||||||
if(!g_Game || !g_Game->IsGameStarted())
|
if(!g_Game || !g_Game->IsGameStarted())
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
FlushFrame();
|
FlushFrame();
|
||||||
g_Renderer.SetTexture(0,0);
|
g_Renderer.SetTexture(0,0);
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "AlterElevationCommand.h"
|
#include "AlterElevationCommand.h"
|
||||||
#include "UIGlobals.h"
|
#include "ui/UIGlobals.h"
|
||||||
#include "MiniMap.h"
|
#include "MiniMap.h"
|
||||||
#include "Terrain.h"
|
#include "Terrain.h"
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "AlterLightEnvCommand.h"
|
#include "AlterLightEnvCommand.h"
|
||||||
#include "UnitManager.h"
|
#include "UnitManager.h"
|
||||||
#include "ObjectManager.h"
|
#include "ObjectManager.h"
|
||||||
#include "Model.h"
|
#include "Model.h"
|
||||||
|
#include "Unit.h"
|
||||||
#include "Terrain.h"
|
#include "Terrain.h"
|
||||||
|
|
||||||
extern CTerrain g_Terrain;
|
extern CTerrain g_Terrain;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "ogl.h"
|
#include "ogl.h"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "BrushTool.h"
|
#include "BrushTool.h"
|
||||||
#include "UIGlobals.h"
|
#include "ui/UIGlobals.h"
|
||||||
#include "HFTracer.h"
|
#include "HFTracer.h"
|
||||||
#include "NaviCam.h"
|
#include "NaviCam.h"
|
||||||
#include "TextureManager.h"
|
#include "TextureManager.h"
|
||||||
@ -133,7 +135,7 @@ void CBrushTool::OnMouseMove(unsigned int flags,int px,int py)
|
|||||||
|
|
||||||
// intersect with terrain
|
// intersect with terrain
|
||||||
CVector3D ipt;
|
CVector3D ipt;
|
||||||
CHFTracer hftracer(g_Terrain.GetHeightMap(),g_Terrain.GetVerticesPerSide(),float(CELL_SIZE),HEIGHT_SCALE);
|
CHFTracer hftracer(&g_Terrain);
|
||||||
if (hftracer.RayIntersect(rayorigin,raydir,m_SelectionCentre[0],m_SelectionCentre[1],m_SelectionPoint)) {
|
if (hftracer.RayIntersect(rayorigin,raydir,m_SelectionCentre[0],m_SelectionCentre[1],m_SelectionPoint)) {
|
||||||
// drag trigger supported?
|
// drag trigger supported?
|
||||||
if (SupportDragTrigger()) {
|
if (SupportDragTrigger()) {
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "Command.h"
|
#include "Command.h"
|
||||||
#include "CommandManager.h"
|
#include "CommandManager.h"
|
||||||
|
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "EditorData.h"
|
#include "EditorData.h"
|
||||||
#include "UIGlobals.h"
|
#include "ui/UIGlobals.h"
|
||||||
#include "ToolManager.h"
|
#include "ToolManager.h"
|
||||||
#include "ObjectManager.h"
|
#include "ObjectManager.h"
|
||||||
#include "UnitManager.h"
|
#include "UnitManager.h"
|
||||||
#include "TextureManager.h"
|
#include "TextureManager.h"
|
||||||
#include "Model.h"
|
#include "Model.h"
|
||||||
#include "SkeletonAnimManager.h"
|
#include "SkeletonAnimManager.h"
|
||||||
|
#include "Unit.h"
|
||||||
|
|
||||||
#include "ogl.h"
|
#include "ogl.h"
|
||||||
#include "res/tex.h"
|
#include "res/tex.h"
|
||||||
@ -15,6 +18,8 @@
|
|||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
#include "EntityHandles.h"
|
#include "EntityHandles.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
|
#include "ConfigDB.h"
|
||||||
|
#include "Scheduler.h"
|
||||||
|
|
||||||
#include "XML.h"
|
#include "XML.h"
|
||||||
|
|
||||||
@ -22,7 +27,7 @@ const int NUM_ALPHA_MAPS = 14;
|
|||||||
Handle AlphaMaps[NUM_ALPHA_MAPS];
|
Handle AlphaMaps[NUM_ALPHA_MAPS];
|
||||||
|
|
||||||
CTerrain g_Terrain;
|
CTerrain g_Terrain;
|
||||||
CLightEnv g_LightEnv;
|
extern CLightEnv g_LightEnv;
|
||||||
CMiniMap g_MiniMap;
|
CMiniMap g_MiniMap;
|
||||||
CEditorData g_EditorData;
|
CEditorData g_EditorData;
|
||||||
|
|
||||||
@ -50,7 +55,7 @@ bool CEditorData::InitScene()
|
|||||||
g_Renderer.SetLightEnv(&g_LightEnv);
|
g_Renderer.SetLightEnv(&g_LightEnv);
|
||||||
|
|
||||||
// load the default
|
// load the default
|
||||||
if (!LoadTerrain("terrain.raw")) return false;
|
if (!LoadTerrain("temp/terrain.png")) return false;
|
||||||
|
|
||||||
// get default texture to apply to terrain
|
// get default texture to apply to terrain
|
||||||
CTextureEntry* texture=0;
|
CTextureEntry* texture=0;
|
||||||
@ -182,29 +187,29 @@ void CEditorData::InitResources()
|
|||||||
// InitSingletons: create and initialise required singletons
|
// InitSingletons: create and initialise required singletons
|
||||||
void CEditorData::InitSingletons()
|
void CEditorData::InitSingletons()
|
||||||
{
|
{
|
||||||
// create terrain related stuff
|
// // create terrain related stuff
|
||||||
new CTextureManager;
|
// new CTextureManager;
|
||||||
|
//
|
||||||
// create actor related stuff
|
// // create actor related stuff
|
||||||
new CSkeletonAnimManager;
|
// new CSkeletonAnimManager;
|
||||||
new CObjectManager;
|
// new CObjectManager;
|
||||||
new CUnitManager;
|
// new CUnitManager;
|
||||||
|
//
|
||||||
// create entity related stuff
|
// // create entity related stuff
|
||||||
new CBaseEntityCollection;
|
// new CBaseEntityCollection;
|
||||||
new CEntityManager;
|
// new CEntityManager;
|
||||||
g_EntityTemplateCollection.loadTemplates();
|
// g_EntityTemplateCollection.loadTemplates();
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Init: perform one time initialisation of the editor
|
// Init: perform one time initialisation of the editor
|
||||||
bool CEditorData::Init()
|
bool CEditorData::Init()
|
||||||
{
|
{
|
||||||
// start up Xerces
|
// // start up Xerces
|
||||||
XMLPlatformUtils::Initialize();
|
// XMLPlatformUtils::Initialize();
|
||||||
|
//
|
||||||
// create and initialise singletons
|
// // create and initialise singletons
|
||||||
InitSingletons();
|
// InitSingletons();
|
||||||
|
|
||||||
// load default textures
|
// load default textures
|
||||||
InitResources();
|
InitResources();
|
||||||
@ -225,20 +230,20 @@ bool CEditorData::Init()
|
|||||||
// Terminate: close down the editor (destroy singletons in reverse order to construction)
|
// Terminate: close down the editor (destroy singletons in reverse order to construction)
|
||||||
void CEditorData::Terminate()
|
void CEditorData::Terminate()
|
||||||
{
|
{
|
||||||
// destroy entity related stuff
|
// // destroy entity related stuff
|
||||||
delete CEntityManager::GetSingletonPtr();
|
// delete CEntityManager::GetSingletonPtr();
|
||||||
delete CBaseEntityCollection::GetSingletonPtr();
|
// delete CBaseEntityCollection::GetSingletonPtr();
|
||||||
|
//
|
||||||
// destroy actor related stuff
|
// // destroy actor related stuff
|
||||||
delete CUnitManager::GetSingletonPtr();
|
// delete CUnitManager::GetSingletonPtr();
|
||||||
delete CObjectManager::GetSingletonPtr();
|
// delete CObjectManager::GetSingletonPtr();
|
||||||
delete CSkeletonAnimManager::GetSingletonPtr();
|
// delete CSkeletonAnimManager::GetSingletonPtr();
|
||||||
|
//
|
||||||
// destroy terrain related stuff
|
// // destroy terrain related stuff
|
||||||
delete CTextureManager::GetSingletonPtr();
|
// delete CTextureManager::GetSingletonPtr();
|
||||||
|
|
||||||
// close down Xerces
|
// close down Xerces
|
||||||
XMLPlatformUtils::Terminate();
|
// XMLPlatformUtils::Terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEditorData::InitCamera()
|
void CEditorData::InitCamera()
|
||||||
@ -332,7 +337,7 @@ void CEditorData::OnCameraChanged()
|
|||||||
|
|
||||||
void CEditorData::RenderTerrain()
|
void CEditorData::RenderTerrain()
|
||||||
{
|
{
|
||||||
CFrustum frustum=g_NaviCam.GetCamera().GetFustum();
|
CFrustum frustum=g_NaviCam.GetCamera().GetFrustum();
|
||||||
u32 patchesPerSide=g_Terrain.GetPatchesPerSide();
|
u32 patchesPerSide=g_Terrain.GetPatchesPerSide();
|
||||||
for (uint j=0; j<patchesPerSide; j++) {
|
for (uint j=0; j<patchesPerSide; j++) {
|
||||||
for (uint i=0; i<patchesPerSide; i++) {
|
for (uint i=0; i<patchesPerSide; i++) {
|
||||||
@ -408,7 +413,7 @@ void CEditorData::RenderNoCull()
|
|||||||
|
|
||||||
void CEditorData::RenderModels()
|
void CEditorData::RenderModels()
|
||||||
{
|
{
|
||||||
CFrustum frustum=g_NaviCam.GetCamera().GetFustum();
|
CFrustum frustum=g_NaviCam.GetCamera().GetFrustum();
|
||||||
|
|
||||||
const std::vector<CUnit*>& units=g_UnitMan.GetUnits();
|
const std::vector<CUnit*>& units=g_UnitMan.GetUnits();
|
||||||
uint i;
|
uint i;
|
||||||
@ -495,7 +500,7 @@ void CEditorData::RenderObEdGrid()
|
|||||||
void CEditorData::OnDraw()
|
void CEditorData::OnDraw()
|
||||||
{
|
{
|
||||||
if (m_Mode==SCENARIO_EDIT || m_Mode==TEST_MODE) {
|
if (m_Mode==SCENARIO_EDIT || m_Mode==TEST_MODE) {
|
||||||
g_Renderer.SetClearColor(0);
|
g_Renderer.SetClearColor(0x00000000);
|
||||||
g_Renderer.BeginFrame();
|
g_Renderer.BeginFrame();
|
||||||
|
|
||||||
// setup camera
|
// setup camera
|
||||||
@ -649,7 +654,7 @@ void CEditorData::UpdateWorld(float time)
|
|||||||
void CEditorData::StartTestMode()
|
void CEditorData::StartTestMode()
|
||||||
{
|
{
|
||||||
// initialise entities
|
// initialise entities
|
||||||
g_EntityManager.dispatchAll( &CMessage( CMessage::EMSG_INIT ) );
|
g_EntityManager.InitializeAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEditorData::StopTestMode()
|
void CEditorData::StopTestMode()
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "InfoBox.h"
|
#include "InfoBox.h"
|
||||||
#include "UIGlobals.h"
|
#include "ui/UIGlobals.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "ogl.h"
|
#include "ogl.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
@ -13,7 +15,7 @@ static const char* DefaultFontName="mods/official/fonts/verdana18.fnt";
|
|||||||
|
|
||||||
CInfoBox::CInfoBox() : m_Font(0), m_Visible(false)
|
CInfoBox::CInfoBox() : m_Font(0), m_Visible(false)
|
||||||
{
|
{
|
||||||
m_LastFPSTime=get_time();
|
m_LastFPSTime=0;
|
||||||
m_Stats.Reset();
|
m_Stats.Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
#include "MiniMap.h"
|
#include "MiniMap.h"
|
||||||
#include "UIGlobals.h"
|
#include "ui/UIGlobals.h"
|
||||||
#include "TextureManager.h"
|
#include "TextureManager.h"
|
||||||
#include "Terrain.h"
|
#include "Terrain.h"
|
||||||
#include "Renderer.h"
|
#include "Renderer.h"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "NaviCam.h"
|
#include "NaviCam.h"
|
||||||
#include "EditorData.h"
|
#include "EditorData.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "PaintObjectCommand.h"
|
#include "PaintObjectCommand.h"
|
||||||
#include "UnitManager.h"
|
#include "UnitManager.h"
|
||||||
#include "ObjectEntry.h"
|
#include "ObjectEntry.h"
|
||||||
#include "Model.h"
|
#include "Model.h"
|
||||||
|
#include "Unit.h"
|
||||||
|
|
||||||
#include "BaseEntity.h"
|
#include "BaseEntity.h"
|
||||||
#include "BaseEntityCollection.h"
|
#include "BaseEntityCollection.h"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "CommandManager.h"
|
#include "CommandManager.h"
|
||||||
#include "ObjectEntry.h"
|
#include "ObjectEntry.h"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "PaintTextureCommand.h"
|
#include "PaintTextureCommand.h"
|
||||||
#include "UIGlobals.h"
|
#include "ui/UIGlobals.h"
|
||||||
#include "MiniMap.h"
|
#include "MiniMap.h"
|
||||||
#include "textureEntry.h"
|
#include "textureEntry.h"
|
||||||
#include "Terrain.h"
|
#include "Terrain.h"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "CommandManager.h"
|
#include "CommandManager.h"
|
||||||
#include "TextureEntry.h"
|
#include "TextureEntry.h"
|
||||||
#include "PaintTextureTool.h"
|
#include "PaintTextureTool.h"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "RaiseElevationCommand.h"
|
#include "RaiseElevationCommand.h"
|
||||||
#include "Terrain.h"
|
#include "Terrain.h"
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "CommandManager.h"
|
#include "CommandManager.h"
|
||||||
#include "RaiseElevationTool.h"
|
#include "RaiseElevationTool.h"
|
||||||
#include "RaiseElevationCommand.h"
|
#include "RaiseElevationCommand.h"
|
||||||
|
@ -35,11 +35,11 @@ OutDir=.\Release
|
|||||||
|
|
||||||
!IF "$(RECURSE)" == "0"
|
!IF "$(RECURSE)" == "0"
|
||||||
|
|
||||||
ALL : "..\..\binaries\ScEd.exe" "$(OUTDIR)\ScEd.pch"
|
ALL : "..\..\..\binaries\ScEd.exe" "$(OUTDIR)\ScEd.pch"
|
||||||
|
|
||||||
!ELSE
|
!ELSE
|
||||||
|
|
||||||
ALL : "pslib - Win32 Release" "..\..\binaries\ScEd.exe" "$(OUTDIR)\ScEd.pch"
|
ALL : "pslib - Win32 Release" "..\..\..\binaries\ScEd.exe" "$(OUTDIR)\ScEd.pch"
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
@ -93,13 +93,13 @@ CLEAN :
|
|||||||
-@erase "$(INTDIR)\vc60.pdb"
|
-@erase "$(INTDIR)\vc60.pdb"
|
||||||
-@erase "$(INTDIR)\WebLinkButton.obj"
|
-@erase "$(INTDIR)\WebLinkButton.obj"
|
||||||
-@erase "$(OUTDIR)\ScEd.pdb"
|
-@erase "$(OUTDIR)\ScEd.pdb"
|
||||||
-@erase "..\..\binaries\ScEd.exe"
|
-@erase "..\..\..\binaries\ScEd.exe"
|
||||||
|
|
||||||
"$(OUTDIR)" :
|
"$(OUTDIR)" :
|
||||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||||
|
|
||||||
CPP=cl.exe
|
CPP=cl.exe
|
||||||
CPP_PROJ=/nologo /G5 /MT /W3 /GX /Zi /O2 /Ob0 /I "..\\" /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
CPP_PROJ=/nologo /G5 /MT /W3 /GX /Zi /O2 /Ob0 /I "..\..\\" /I "..\..\lib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||||
|
|
||||||
.c{$(INTDIR)}.obj::
|
.c{$(INTDIR)}.obj::
|
||||||
$(CPP) @<<
|
$(CPP) @<<
|
||||||
@ -140,7 +140,7 @@ BSC32_FLAGS=/nologo /o"$(OUTDIR)\ScEd.bsc"
|
|||||||
BSC32_SBRS= \
|
BSC32_SBRS= \
|
||||||
|
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
LINK32_FLAGS=nafxcw.lib pslib.lib opengl32.lib glu32.lib ws2_32.lib version.lib xerces-c_2.lib /nologo /entry:"entry" /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\ScEd.pdb" /debug /machine:I386 /out:"D:\0ad\binaries\ScEd.exe" /libpath:"..\libs" /fixed:no
|
LINK32_FLAGS=nafxcw.lib pslib.lib opengl32.lib glu32.lib ws2_32.lib version.lib xerces-c_2.lib /nologo /entry:"entry" /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\ScEd.pdb" /debug /machine:I386 /out:"D:\0ad\binaries\ScEd.exe" /libpath:"..\..\libs" /fixed:no
|
||||||
LINK32_OBJS= \
|
LINK32_OBJS= \
|
||||||
"$(INTDIR)\ColorButton.obj" \
|
"$(INTDIR)\ColorButton.obj" \
|
||||||
"$(INTDIR)\DirectionButton.obj" \
|
"$(INTDIR)\DirectionButton.obj" \
|
||||||
@ -184,7 +184,7 @@ LINK32_OBJS= \
|
|||||||
"$(INTDIR)\StdAfx.obj" \
|
"$(INTDIR)\StdAfx.obj" \
|
||||||
"$(INTDIR)\ScEd.res"
|
"$(INTDIR)\ScEd.res"
|
||||||
|
|
||||||
"..\..\binaries\ScEd.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
"..\..\..\binaries\ScEd.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||||
$(LINK32) @<<
|
$(LINK32) @<<
|
||||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||||
<<
|
<<
|
||||||
@ -199,11 +199,11 @@ OutDir=.\Debug
|
|||||||
|
|
||||||
!IF "$(RECURSE)" == "0"
|
!IF "$(RECURSE)" == "0"
|
||||||
|
|
||||||
ALL : "..\..\binaries\ScEd_d.exe" "$(OUTDIR)\ScEd.pch"
|
ALL : "..\..\..\binaries\ScEd_d.exe" "$(OUTDIR)\ScEd.pch"
|
||||||
|
|
||||||
!ELSE
|
!ELSE
|
||||||
|
|
||||||
ALL : "pslib - Win32 Debug" "..\..\binaries\ScEd_d.exe" "$(OUTDIR)\ScEd.pch"
|
ALL : "pslib - Win32 Debug" "..\..\..\binaries\ScEd_d.exe" "$(OUTDIR)\ScEd.pch"
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
@ -257,14 +257,14 @@ CLEAN :
|
|||||||
-@erase "$(INTDIR)\vc60.pdb"
|
-@erase "$(INTDIR)\vc60.pdb"
|
||||||
-@erase "$(INTDIR)\WebLinkButton.obj"
|
-@erase "$(INTDIR)\WebLinkButton.obj"
|
||||||
-@erase "$(OUTDIR)\ScEd_d.pdb"
|
-@erase "$(OUTDIR)\ScEd_d.pdb"
|
||||||
-@erase "..\..\binaries\ScEd_d.exe"
|
-@erase "..\..\..\binaries\ScEd_d.exe"
|
||||||
-@erase "..\..\binaries\ScEd_d.ilk"
|
-@erase "..\..\..\binaries\ScEd_d.ilk"
|
||||||
|
|
||||||
"$(OUTDIR)" :
|
"$(OUTDIR)" :
|
||||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||||
|
|
||||||
CPP=cl.exe
|
CPP=cl.exe
|
||||||
CPP_PROJ=/nologo /G6 /MTd /W3 /Gm /Gi /GX /ZI /Od /I "..\\" /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
|
CPP_PROJ=/nologo /G6 /MTd /W3 /Gm /Gi /GX /ZI /Od /I "..\..\\" /I "..\..\lib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
|
||||||
|
|
||||||
.c{$(INTDIR)}.obj::
|
.c{$(INTDIR)}.obj::
|
||||||
$(CPP) @<<
|
$(CPP) @<<
|
||||||
@ -305,7 +305,7 @@ BSC32_FLAGS=/nologo /o"$(OUTDIR)\ScEd.bsc"
|
|||||||
BSC32_SBRS= \
|
BSC32_SBRS= \
|
||||||
|
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
LINK32_FLAGS=nafxcwd.lib pslib_d.lib opengl32.lib glu32.lib ws2_32.lib version.lib xerces-c_2D.lib /nologo /entry:"entry" /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\ScEd_d.pdb" /debug /machine:I386 /out:"D:\0ad\binaries\ScEd_d.exe" /pdbtype:sept /libpath:"..\libs"
|
LINK32_FLAGS=nafxcwd.lib pslib_d.lib opengl32.lib glu32.lib ws2_32.lib version.lib xerces-c_2D.lib /nologo /entry:"entry" /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\ScEd_d.pdb" /debug /machine:I386 /out:"D:\0ad\binaries\ScEd_d.exe" /pdbtype:sept /libpath:"..\..\libs"
|
||||||
LINK32_OBJS= \
|
LINK32_OBJS= \
|
||||||
"$(INTDIR)\ColorButton.obj" \
|
"$(INTDIR)\ColorButton.obj" \
|
||||||
"$(INTDIR)\DirectionButton.obj" \
|
"$(INTDIR)\DirectionButton.obj" \
|
||||||
@ -349,7 +349,7 @@ LINK32_OBJS= \
|
|||||||
"$(INTDIR)\StdAfx.obj" \
|
"$(INTDIR)\StdAfx.obj" \
|
||||||
"$(INTDIR)\ScEd.res"
|
"$(INTDIR)\ScEd.res"
|
||||||
|
|
||||||
"..\..\binaries\ScEd_d.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
"..\..\..\binaries\ScEd_d.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||||
$(LINK32) @<<
|
$(LINK32) @<<
|
||||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||||
<<
|
<<
|
||||||
@ -573,22 +573,22 @@ SOURCE=.\HFTracer.cpp
|
|||||||
"pslib - Win32 Release" :
|
"pslib - Win32 Release" :
|
||||||
cd "\0ad\fw\pslib"
|
cd "\0ad\fw\pslib"
|
||||||
NMAKE /f pslib.mak
|
NMAKE /f pslib.mak
|
||||||
cd "..\ScEd"
|
cd "..\..\ScEd"
|
||||||
|
|
||||||
"pslib - Win32 ReleaseCLEAN" :
|
"pslib - Win32 ReleaseCLEAN" :
|
||||||
cd "\0ad\fw\pslib"
|
cd "\0ad\fw\pslib"
|
||||||
cd "..\ScEd"
|
cd "..\..\ScEd"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ScEd - Win32 Debug"
|
!ELSEIF "$(CFG)" == "ScEd - Win32 Debug"
|
||||||
|
|
||||||
"pslib - Win32 Debug" :
|
"pslib - Win32 Debug" :
|
||||||
cd "\0ad\fw\pslib"
|
cd "\0ad\fw\pslib"
|
||||||
NMAKE /f pslib.mak
|
NMAKE /f pslib.mak
|
||||||
cd "..\ScEd"
|
cd "..\..\ScEd"
|
||||||
|
|
||||||
"pslib - Win32 DebugCLEAN" :
|
"pslib - Win32 DebugCLEAN" :
|
||||||
cd "\0ad\fw\pslib"
|
cd "\0ad\fw\pslib"
|
||||||
cd "..\ScEd"
|
cd "..\..\ScEd"
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
@ -596,7 +596,7 @@ SOURCE=.\StdAfx.cpp
|
|||||||
|
|
||||||
!IF "$(CFG)" == "ScEd - Win32 Release"
|
!IF "$(CFG)" == "ScEd - Win32 Release"
|
||||||
|
|
||||||
CPP_SWITCHES=/nologo /G5 /MT /W3 /GX /Zi /O2 /Ob0 /I "..\\" /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\ScEd.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
CPP_SWITCHES=/nologo /G5 /MT /W3 /GX /Zi /O2 /Ob0 /I "..\..\\" /I "..\..\lib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\ScEd.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||||
|
|
||||||
"$(INTDIR)\StdAfx.obj" "$(INTDIR)\ScEd.pch" : $(SOURCE) "$(INTDIR)"
|
"$(INTDIR)\StdAfx.obj" "$(INTDIR)\ScEd.pch" : $(SOURCE) "$(INTDIR)"
|
||||||
$(CPP) @<<
|
$(CPP) @<<
|
||||||
@ -606,7 +606,7 @@ CPP_SWITCHES=/nologo /G5 /MT /W3 /GX /Zi /O2 /Ob0 /I "..\\" /I "..\lib" /D "WIN3
|
|||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ScEd - Win32 Debug"
|
!ELSEIF "$(CFG)" == "ScEd - Win32 Debug"
|
||||||
|
|
||||||
CPP_SWITCHES=/nologo /G6 /MTd /W3 /Gm /Gi /GX /ZI /Od /I "..\\" /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\ScEd.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
|
CPP_SWITCHES=/nologo /G6 /MTd /W3 /Gm /Gi /GX /ZI /Od /I "..\..\\" /I "..\..\lib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\ScEd.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
|
||||||
|
|
||||||
"$(INTDIR)\StdAfx.obj" "$(INTDIR)\ScEd.pch" : $(SOURCE) "$(INTDIR)"
|
"$(INTDIR)\StdAfx.obj" "$(INTDIR)\ScEd.pch" : $(SOURCE) "$(INTDIR)"
|
||||||
$(CPP) @<<
|
$(CPP) @<<
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "CommandManager.h"
|
#include "CommandManager.h"
|
||||||
#include "Unit.h"
|
#include "Unit.h"
|
||||||
#include "Model.h"
|
#include "Model.h"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "SmoothElevationCommand.h"
|
#include "SmoothElevationCommand.h"
|
||||||
#include "Terrain.h"
|
#include "Terrain.h"
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "CommandManager.h"
|
#include "CommandManager.h"
|
||||||
#include "SmoothElevationTool.h"
|
#include "SmoothElevationTool.h"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "ToolManager.h"
|
#include "ToolManager.h"
|
||||||
|
|
||||||
CToolManager g_ToolMan;
|
CToolManager g_ToolMan;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "UserConfig.h"
|
#include "UserConfig.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
1311
source/tools/sced/main.cpp
Normal file
@ -1,3 +1,4 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#define _IGNORE_WGL_H_
|
#define _IGNORE_WGL_H_
|
||||||
#include "MainFrm.h"
|
#include "MainFrm.h"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// ColorButton.cpp : implementation file
|
// ColorButton.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
#include "ColorButton.h"
|
#include "ColorButton.h"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// DirectionButton.cpp : implementation file
|
// DirectionButton.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ToolManager.h"
|
#include "ToolManager.h"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// ElevationButton.cpp : implementation file
|
// ElevationButton.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// ImageListCtrl.cpp : implementation file
|
// ImageListCtrl.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
#include "ImageListCtrl.h"
|
#include "ImageListCtrl.h"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// LightSettingsDlg.cpp : implementation file
|
// LightSettingsDlg.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
#include "LightSettingsDlg.h"
|
#include "LightSettingsDlg.h"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// MainFrameDlgBar.cpp : implementation file
|
// MainFrameDlgBar.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
#include "MainFrm.h"
|
#include "MainFrm.h"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// MainFrm.cpp : implementation of the CMainFrame class
|
// MainFrm.cpp : implementation of the CMainFrame class
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
#define _IGNORE_WGL_H_
|
#define _IGNORE_WGL_H_
|
||||||
@ -22,6 +23,7 @@
|
|||||||
#include "UnitManager.h"
|
#include "UnitManager.h"
|
||||||
#include "ObjectManager.h"
|
#include "ObjectManager.h"
|
||||||
#include "TextureManager.h"
|
#include "TextureManager.h"
|
||||||
|
#include "ModelDef.h"
|
||||||
#include "UIGlobals.h"
|
#include "UIGlobals.h"
|
||||||
#include "MainFrm.h"
|
#include "MainFrm.h"
|
||||||
#include "OptionsPropSheet.h"
|
#include "OptionsPropSheet.h"
|
||||||
@ -563,7 +565,7 @@ void CMainFrame::OnFileSaveMap()
|
|||||||
|
|
||||||
CMapWriter writer;
|
CMapWriter writer;
|
||||||
try {
|
try {
|
||||||
writer.SaveMap(savename);
|
writer.SaveMap(savename, &g_Terrain, &g_LightEnv, &g_UnitMan);
|
||||||
|
|
||||||
CStr filetitle=savedlg.m_ofn.lpstrFileTitle;
|
CStr filetitle=savedlg.m_ofn.lpstrFileTitle;
|
||||||
int index=filetitle.ReverseFind(CStr("."));
|
int index=filetitle.ReverseFind(CStr("."));
|
||||||
@ -603,7 +605,7 @@ void CMainFrame::OnFileLoadMap()
|
|||||||
|
|
||||||
CMapReader reader;
|
CMapReader reader;
|
||||||
try {
|
try {
|
||||||
reader.LoadMap(loadname);
|
reader.LoadMap(loadname, &g_Terrain, &g_UnitMan, &g_LightEnv);
|
||||||
|
|
||||||
CStr filetitle=loaddlg.m_ofn.lpstrFileTitle;
|
CStr filetitle=loaddlg.m_ofn.lpstrFileTitle;
|
||||||
int index=filetitle.ReverseFind(CStr("."));
|
int index=filetitle.ReverseFind(CStr("."));
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// MapSizeDlg.cpp : implementation file
|
// MapSizeDlg.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
#include "MapSizeDlg.h"
|
#include "MapSizeDlg.h"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// NavigatePropPage.cpp : implementation file
|
// NavigatePropPage.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
#include "NavigatePropPage.h"
|
#include "NavigatePropPage.h"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// OptionsDlg.cpp : implementation file
|
// OptionsDlg.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
#include "OptionsDlg.h"
|
#include "OptionsDlg.h"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// OptionsPropSheet.cpp : implementation file
|
// OptionsPropSheet.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
#include "OptionsPropSheet.h"
|
#include "OptionsPropSheet.h"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// ScEd.cpp : Defines the class behaviors for the application.
|
// ScEd.cpp : Defines the class behaviors for the application.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
|
|
||||||
@ -47,8 +48,8 @@ CScEdApp theApp;
|
|||||||
|
|
||||||
BOOL CScEdApp::InitInstance()
|
BOOL CScEdApp::InitInstance()
|
||||||
{
|
{
|
||||||
extern void pre_main_init();
|
extern void sced_init();
|
||||||
pre_main_init();
|
sced_init();
|
||||||
|
|
||||||
AfxEnableControlContainer();
|
AfxEnableControlContainer();
|
||||||
|
|
||||||
@ -174,10 +175,11 @@ BOOL CAboutDlg::OnInitDialog()
|
|||||||
|
|
||||||
int CScEdApp::Run()
|
int CScEdApp::Run()
|
||||||
{
|
{
|
||||||
|
MSG msg;
|
||||||
// acquire and dispatch messages until a WM_QUIT message is received
|
// acquire and dispatch messages until a WM_QUIT message is received
|
||||||
while (1) {
|
while (1) {
|
||||||
// process windows messages
|
// process windows messages
|
||||||
while (::PeekMessage(&m_msgCur, NULL, NULL, NULL, PM_NOREMOVE)) {
|
while (::PeekMessage(&msg, NULL, NULL, NULL, PM_NOREMOVE)) {
|
||||||
// pump message, but quit on WM_QUIT
|
// pump message, but quit on WM_QUIT
|
||||||
if (!PumpMessage())
|
if (!PumpMessage())
|
||||||
return ExitInstance();
|
return ExitInstance();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// ScEdDoc.cpp : implementation of the CScEdDoc class
|
// ScEdDoc.cpp : implementation of the CScEdDoc class
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// ScEdView.cpp : implementation of the CScEdView class
|
// ScEdView.cpp : implementation of the CScEdView class
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#define _IGNORE_WGL_H_
|
#define _IGNORE_WGL_H_
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
@ -118,6 +119,10 @@ BOOL CScEdView::OnEraseBkgnd(CDC* pDC)
|
|||||||
|
|
||||||
int CScEdView::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
int CScEdView::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
||||||
{
|
{
|
||||||
|
// make sure the delay-loaded OpenGL has been loaded before calling
|
||||||
|
// any graphical functions
|
||||||
|
glGetError();
|
||||||
|
|
||||||
// base initialisation first
|
// base initialisation first
|
||||||
if (CView::OnCreate(lpCreateStruct) == -1)
|
if (CView::OnCreate(lpCreateStruct) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
@ -145,17 +150,8 @@ int CScEdView::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// initialise VFS paths
|
extern void ScEd_Init();
|
||||||
char path[256];
|
ScEd_Init();
|
||||||
::GetModuleFileName(0,path,256);
|
|
||||||
file_rel_chdir(path, "../data");
|
|
||||||
vfs_mount("", "mods/official", 0);
|
|
||||||
|
|
||||||
// create renderer related stuff
|
|
||||||
new CRenderer;
|
|
||||||
|
|
||||||
// start up the renderer
|
|
||||||
g_Renderer.Open(0,0,::GetDeviceCaps(dc,BITSPIXEL));
|
|
||||||
|
|
||||||
// initialise document data
|
// initialise document data
|
||||||
if (!g_EditorData.Init()) return -1;
|
if (!g_EditorData.Init()) return -1;
|
||||||
@ -170,16 +166,16 @@ void CScEdView::OnDestroy()
|
|||||||
{
|
{
|
||||||
// close down editor resources
|
// close down editor resources
|
||||||
g_EditorData.Terminate();
|
g_EditorData.Terminate();
|
||||||
|
|
||||||
// destroy renderer related stuff
|
|
||||||
delete CRenderer::GetSingletonPtr();
|
|
||||||
|
|
||||||
|
extern void ScEd_Shutdown();
|
||||||
|
ScEd_Shutdown();
|
||||||
|
|
||||||
// release rendering context
|
// release rendering context
|
||||||
if (m_hGLRC) {
|
if (m_hGLRC) {
|
||||||
wglMakeCurrent(0,0);
|
wglMakeCurrent(0,0);
|
||||||
wglDeleteContext(m_hGLRC);
|
wglDeleteContext(m_hGLRC);
|
||||||
m_hGLRC=0;
|
m_hGLRC=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// base destruction
|
// base destruction
|
||||||
CView::OnDestroy();
|
CView::OnDestroy();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// ShadowsPropPage.cpp : implementation file
|
// ShadowsPropPage.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
#include "ShadowsPropPage.h"
|
#include "ShadowsPropPage.h"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// SimpleEdit.cpp : implementation file
|
// SimpleEdit.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
#include "SimpleEdit.h"
|
#include "SimpleEdit.h"
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
#if !defined(AFX_STDAFX_H__806A78B8_0008_491A_9FB6_5FF892838693__INCLUDED_)
|
#if !defined(AFX_STDAFX_H__806A78B8_0008_491A_9FB6_5FF892838693__INCLUDED_)
|
||||||
#define AFX_STDAFX_H__806A78B8_0008_491A_9FB6_5FF892838693__INCLUDED_
|
#define AFX_STDAFX_H__806A78B8_0008_491A_9FB6_5FF892838693__INCLUDED_
|
||||||
|
|
||||||
|
#undef new // as defined by precompiled.h
|
||||||
|
|
||||||
#if _MSC_VER > 1000
|
#if _MSC_VER > 1000
|
||||||
#pragma once
|
#pragma once
|
||||||
#endif // _MSC_VER > 1000
|
#endif // _MSC_VER > 1000
|
||||||
@ -14,7 +16,7 @@
|
|||||||
|
|
||||||
#define _SIZE_T_DEFINED
|
#define _SIZE_T_DEFINED
|
||||||
#include "posix.h"
|
#include "posix.h"
|
||||||
#include "CStr.h"
|
//#include "CStr.h"
|
||||||
|
|
||||||
#undef _WINDOWS_
|
#undef _WINDOWS_
|
||||||
#undef UNUSED
|
#undef UNUSED
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#define _IGNORE_WGL_H_
|
#define _IGNORE_WGL_H_
|
||||||
#include "TexToolsDlgBar.h"
|
#include "TexToolsDlgBar.h"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "UIGlobals.h"
|
#include "UIGlobals.h"
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// UnitPropertiesAnimationsTab.cpp : implementation file
|
// UnitPropertiesAnimationsTab.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
#include "UnitPropertiesAnimationsTab.h"
|
#include "UnitPropertiesAnimationsTab.h"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#define _IGNORE_WGL_H_
|
#define _IGNORE_WGL_H_
|
||||||
#include "UserConfig.h"
|
#include "UserConfig.h"
|
||||||
@ -193,15 +194,15 @@ void CUnitPropertiesDlgBar::UpdateEditorData()
|
|||||||
|
|
||||||
CWnd* name=GetDlgItem(IDC_EDIT_NAME);
|
CWnd* name=GetDlgItem(IDC_EDIT_NAME);
|
||||||
name->GetWindowText(str);
|
name->GetWindowText(str);
|
||||||
m_Object->m_Name=str;
|
m_Object->m_Name=(const char*)str;
|
||||||
|
|
||||||
CWnd* model=GetDlgItem(IDC_EDIT_MODEL);
|
CWnd* model=GetDlgItem(IDC_EDIT_MODEL);
|
||||||
model->GetWindowText(str);
|
model->GetWindowText(str);
|
||||||
m_Object->m_ModelName=str;
|
m_Object->m_ModelName=(const char*)str;
|
||||||
|
|
||||||
CWnd* texture=GetDlgItem(IDC_EDIT_TEXTURE);
|
CWnd* texture=GetDlgItem(IDC_EDIT_TEXTURE);
|
||||||
texture->GetWindowText(str);
|
texture->GetWindowText(str);
|
||||||
m_Object->m_TextureName=str;
|
m_Object->m_TextureName=(const char*)str;
|
||||||
|
|
||||||
CWnd* animation=GetDlgItem(IDC_EDIT_ANIMATION);
|
CWnd* animation=GetDlgItem(IDC_EDIT_ANIMATION);
|
||||||
animation->GetWindowText(str);
|
animation->GetWindowText(str);
|
||||||
@ -209,7 +210,7 @@ void CUnitPropertiesDlgBar::UpdateEditorData()
|
|||||||
m_Object->m_Animations.resize(1);
|
m_Object->m_Animations.resize(1);
|
||||||
m_Object->m_Animations[0].m_AnimName="Idle";
|
m_Object->m_Animations[0].m_AnimName="Idle";
|
||||||
}
|
}
|
||||||
m_Object->m_Animations[0].m_FileName=str;
|
m_Object->m_Animations[0].m_FileName=(const char*)str;
|
||||||
|
|
||||||
std::vector<CUnit*> animupdatelist;
|
std::vector<CUnit*> animupdatelist;
|
||||||
const std::vector<CUnit*>& units=g_UnitMan.GetUnits();
|
const std::vector<CUnit*>& units=g_UnitMan.GetUnits();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// UnitPropertiesTabCtrl.cpp : implementation file
|
// UnitPropertiesTabCtrl.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
#include "UnitPropertiesTabCtrl.h"
|
#include "UnitPropertiesTabCtrl.h"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// UnitPropertiesTexturesTab.cpp : implementation file
|
// UnitPropertiesTexturesTab.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
#include "UnitPropertiesTexturesTab.h"
|
#include "UnitPropertiesTexturesTab.h"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "MainFrm.h"
|
#include "MainFrm.h"
|
||||||
#include "SimpleEdit.h"
|
#include "SimpleEdit.h"
|
||||||
@ -132,7 +133,7 @@ void CUnitToolsDlgBar::OnButtonAdd()
|
|||||||
|
|
||||||
// now enter edit mode
|
// now enter edit mode
|
||||||
CObjectEntry* obj=new CObjectEntry(GetCurrentObjectType());
|
CObjectEntry* obj=new CObjectEntry(GetCurrentObjectType());
|
||||||
obj->m_Name=name;
|
obj->m_Name=(const char*)name;
|
||||||
g_ObjMan.AddObject(obj,GetCurrentObjectType());
|
g_ObjMan.AddObject(obj,GetCurrentObjectType());
|
||||||
|
|
||||||
CMainFrame* mainfrm=(CMainFrame*) AfxGetMainWnd();
|
CMainFrame* mainfrm=(CMainFrame*) AfxGetMainWnd();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// WebLinkButton.cpp : implementation file
|
// WebLinkButton.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "precompiled.h"
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScEd.h"
|
#include "ScEd.h"
|
||||||
#include "WebLinkButton.h"
|
#include "WebLinkButton.h"
|
||||||
|
BIN
source/tools/sced/ui/res/0ad_logo.bmp
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
source/tools/sced/ui/res/0ad_logo.bmp.ico
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
source/tools/sced/ui/res/0ad_logo.ico
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
source/tools/sced/ui/res/ScEd.ico
Normal file
After Width: | Height: | Size: 3.2 KiB |
13
source/tools/sced/ui/res/ScEd.rc2
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
//
|
||||||
|
// SCED.RC2 - resources Microsoft Visual C++ does not edit directly
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#error this file is not editable by Microsoft Visual C++
|
||||||
|
#endif //APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Add manually edited resources here...
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
BIN
source/tools/sced/ui/res/ScEdDoc.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
source/tools/sced/ui/res/Toolbar.bmp
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
source/tools/sced/ui/res/addunit.bmp
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
source/tools/sced/ui/res/elevationtools.bmp
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
source/tools/sced/ui/res/ico00001.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
source/tools/sced/ui/res/ico00002.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
source/tools/sced/ui/res/icon1.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
source/tools/sced/ui/res/modeltools.bmp
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
source/tools/sced/ui/res/select.bmp
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
source/tools/sced/ui/res/selectunit.bmp
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
source/tools/sced/ui/res/terraintools.bmp
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
source/tools/sced/ui/res/texturetools.bmp
Normal file
After Width: | Height: | Size: 2.1 KiB |