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 = {}
|
||||
for i=1, getn(arg) do
|
||||
res[i]=matchfiles(root..arg[i].."/*.cpp", root..arg[i].."/*.h")
|
||||
for i=1, getn(dirs) do
|
||||
local files = matchfiles(root..dirs[i].."/*.cpp", root..dirs[i].."/*.h")
|
||||
tconcat(res, files)
|
||||
end
|
||||
return res
|
||||
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.configs = { "Debug", "Release", "Testing" }
|
||||
|
||||
function setuppackage (projectname)
|
||||
|
||||
-- Start the package part
|
||||
package = newpackage()
|
||||
|
||||
if (projectname == "sced") then
|
||||
package.name = "sced"
|
||||
exename = "sced"
|
||||
objdirprefix = "ScEd_"
|
||||
else
|
||||
package.name = "pyrogenesis"
|
||||
exename = "ps"
|
||||
objdirprefix = ""
|
||||
end
|
||||
|
||||
-- Windowed executable on windows, "exe" on all other platforms
|
||||
package.kind = "winexe"
|
||||
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 = "ps_dbg"
|
||||
package.config["Release"].target = "ps"
|
||||
package.config["Testing"].target = "ps_test"
|
||||
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/"
|
||||
|
||||
-- Files
|
||||
package.files = {
|
||||
sourcesfromdirs(sourceroot,
|
||||
|
||||
source_dirs = {}
|
||||
|
||||
tconcat(source_dirs, {
|
||||
"ps",
|
||||
"ps/scripting",
|
||||
"ps/Network",
|
||||
@ -44,11 +62,15 @@ package.files = {
|
||||
"maths",
|
||||
"maths/scripting",
|
||||
|
||||
"renderer",
|
||||
"renderer"
|
||||
})
|
||||
|
||||
if (projectname ~= "sced") then tconcat(source_dirs, {
|
||||
"gui",
|
||||
"gui/scripting",
|
||||
"gui/scripting"
|
||||
}) end
|
||||
|
||||
tconcat(source_dirs, {
|
||||
"terrain",
|
||||
|
||||
"sound",
|
||||
@ -58,10 +80,18 @@ package.files = {
|
||||
"i18n",
|
||||
|
||||
"tests"
|
||||
),
|
||||
})
|
||||
|
||||
sourceroot.."main.cpp"
|
||||
}
|
||||
if (projectname == "sced") then tconcat(source_dirs, {
|
||||
"tools/sced",
|
||||
"tools/sced/ui"
|
||||
}) end
|
||||
|
||||
package.files = sourcesfromdirs(sourceroot, source_dirs)
|
||||
|
||||
if (projectname ~= "sced") then
|
||||
tinsert(package.files, sourceroot.."main.cpp")
|
||||
end
|
||||
|
||||
|
||||
include_dirs = {
|
||||
@ -75,6 +105,10 @@ include_dirs = {
|
||||
""
|
||||
}
|
||||
|
||||
if (projectname == "sced") then
|
||||
tinsert(include_dirs, "tools/sced")
|
||||
end
|
||||
|
||||
package.includepaths = {}
|
||||
|
||||
foreach(include_dirs, function (i,v)
|
||||
@ -95,6 +129,13 @@ 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" }
|
||||
|
||||
|
||||
if (projectname == "sced") then
|
||||
tinsert(package.defines, "SCED")
|
||||
tinsert(package.defines, "_AFXDLL")
|
||||
tinsert(package.defines, "NO_GUI")
|
||||
end
|
||||
|
||||
-- Platform Specifics
|
||||
if (OS == "windows") then
|
||||
|
||||
@ -118,9 +159,13 @@ if (OS == "windows") then
|
||||
|
||||
-- Libraries
|
||||
package.links = { "opengl32" }
|
||||
tinsert(package.files, sourcesfromdirs(sourceroot, "lib/sysdep/win"))
|
||||
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",
|
||||
@ -157,7 +202,7 @@ if (OS == "windows") then
|
||||
|
||||
else -- Non-Windows, = Unix
|
||||
|
||||
tinsert(package.files, sourcesfromdirs(sourceroot, "lib/sysdep/unix"))
|
||||
tinsert(package.files, sourcesfromdirs(sourceroot, {"lib/sysdep/unix"}))
|
||||
|
||||
-- Libraries
|
||||
package.links = {
|
||||
@ -177,3 +222,7 @@ else -- Non-Windows, = Unix
|
||||
-- Includes
|
||||
tinsert(package.includepaths, { "/usr/X11R6/include/X11" } )
|
||||
end
|
||||
end
|
||||
|
||||
setuppackage("pyrogenesis")
|
||||
-- setuppackage("sced")
|
@ -3,7 +3,7 @@ REM Create Visual Studio Workspaces on Windows
|
||||
|
||||
mkdir vc6
|
||||
mkdir vc7
|
||||
mkdir vc2003
|
||||
mkdir vc2003b
|
||||
|
||||
REM Change to the lua project name, this must correspond to the base file name
|
||||
REM of the created project files
|
||||
@ -16,16 +16,18 @@ mkdir tmp
|
||||
copy premake.lua 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
|
||||
move %PROJECT%.dsw ..\..\workspaces\vc6
|
||||
move %PROJECT%.dsp ..\..\workspaces\vc6
|
||||
move *.dsw ..\..\workspaces\vc6
|
||||
move *.dsp ..\..\workspaces\vc6
|
||||
|
||||
..\premake --target vs7
|
||||
move %PROJECT%.sln ..\..\workspaces\vc7
|
||||
move %PROJECT%.vcproj ..\..\workspaces\vc7
|
||||
move *.sln ..\..\workspaces\vc7
|
||||
move *.vcproj ..\..\workspaces\vc7
|
||||
|
||||
..\premake --target vs2003
|
||||
move %PROJECT%.sln ..\..\workspaces\vc2003
|
||||
move %PROJECT%.vcproj ..\..\workspaces\vc2003
|
||||
move *.sln ..\..\workspaces\vc2003b
|
||||
move *.vcproj ..\..\workspaces\vc2003b
|
||||
|
||||
cd ..\..\workspaces
|
||||
|
@ -20,6 +20,9 @@
|
||||
|
||||
class CMapWriter;
|
||||
class CMapReader;
|
||||
class CEditorData;
|
||||
class CMainFrame;
|
||||
class CLightSettingsDlg;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// CLightEnv: description of a lighting environment - contains all the
|
||||
@ -28,7 +31,10 @@ class CLightEnv
|
||||
{
|
||||
friend class CMapWriter;
|
||||
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:
|
||||
RGBColor m_SunColor;
|
||||
private:
|
||||
|
@ -419,8 +419,9 @@ void GUIRenderer::UpdateDrawCallCache(DrawCalls &Calls, CStr &SpriteName, CRect
|
||||
|
||||
// "real-texture-placement" overrides everything
|
||||
if (cit->m_TexturePlacementInFile != CRect())
|
||||
{
|
||||
BlockTex = cit->m_TexturePlacementInFile;
|
||||
|
||||
}
|
||||
// Check whether this sprite has "cell-size" set
|
||||
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,
|
||||
cit->m_CellSize.cx*(col+1), cit->m_CellSize.cy*(row+1));
|
||||
}
|
||||
|
||||
// Use the whole texture
|
||||
else
|
||||
BlockTex = CRect(0, 0, TexWidth, TexHeight);
|
||||
|
@ -276,7 +276,6 @@ static inline void pre_libc_init()
|
||||
|
||||
}
|
||||
|
||||
|
||||
static inline void pre_main_init()
|
||||
{
|
||||
#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)
|
||||
{
|
||||
pre_main_init();
|
||||
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
|
||||
{
|
||||
public:
|
||||
|
@ -262,8 +262,10 @@ const RGBAColor& CRenderer::GetOptionColor(enum Option opt) const
|
||||
// BeginFrame: signal frame start
|
||||
void CRenderer::BeginFrame()
|
||||
{
|
||||
#ifndef SCED
|
||||
if(!g_Game || !g_Game->IsGameStarted())
|
||||
return;
|
||||
#endif
|
||||
|
||||
// bump frame counter
|
||||
m_FrameCounter++;
|
||||
@ -875,9 +877,10 @@ struct SortModelsByTexture {
|
||||
// FlushFrame: force rendering of any batched objects
|
||||
void CRenderer::FlushFrame()
|
||||
{
|
||||
|
||||
#ifndef SCED
|
||||
if(!g_Game || !g_Game->IsGameStarted())
|
||||
return;
|
||||
#endif
|
||||
|
||||
oglCheck();
|
||||
|
||||
@ -929,8 +932,10 @@ void CRenderer::FlushFrame()
|
||||
// EndFrame: signal frame end; implicitly flushes batched objects
|
||||
void CRenderer::EndFrame()
|
||||
{
|
||||
#ifndef SCED
|
||||
if(!g_Game || !g_Game->IsGameStarted())
|
||||
return;
|
||||
#endif
|
||||
|
||||
FlushFrame();
|
||||
g_Renderer.SetTexture(0,0);
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "AlterElevationCommand.h"
|
||||
#include "UIGlobals.h"
|
||||
#include "ui/UIGlobals.h"
|
||||
#include "MiniMap.h"
|
||||
#include "Terrain.h"
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "AlterLightEnvCommand.h"
|
||||
#include "UnitManager.h"
|
||||
#include "ObjectManager.h"
|
||||
#include "Model.h"
|
||||
#include "Unit.h"
|
||||
#include "Terrain.h"
|
||||
|
||||
extern CTerrain g_Terrain;
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "ogl.h"
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "BrushTool.h"
|
||||
#include "UIGlobals.h"
|
||||
#include "ui/UIGlobals.h"
|
||||
#include "HFTracer.h"
|
||||
#include "NaviCam.h"
|
||||
#include "TextureManager.h"
|
||||
@ -133,7 +135,7 @@ void CBrushTool::OnMouseMove(unsigned int flags,int px,int py)
|
||||
|
||||
// intersect with terrain
|
||||
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)) {
|
||||
// drag trigger supported?
|
||||
if (SupportDragTrigger()) {
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "Command.h"
|
||||
#include "CommandManager.h"
|
||||
|
||||
|
@ -1,11 +1,14 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "EditorData.h"
|
||||
#include "UIGlobals.h"
|
||||
#include "ui/UIGlobals.h"
|
||||
#include "ToolManager.h"
|
||||
#include "ObjectManager.h"
|
||||
#include "UnitManager.h"
|
||||
#include "TextureManager.h"
|
||||
#include "Model.h"
|
||||
#include "SkeletonAnimManager.h"
|
||||
#include "Unit.h"
|
||||
|
||||
#include "ogl.h"
|
||||
#include "res/tex.h"
|
||||
@ -15,6 +18,8 @@
|
||||
#include "Entity.h"
|
||||
#include "EntityHandles.h"
|
||||
#include "EntityManager.h"
|
||||
#include "ConfigDB.h"
|
||||
#include "Scheduler.h"
|
||||
|
||||
#include "XML.h"
|
||||
|
||||
@ -22,7 +27,7 @@ const int NUM_ALPHA_MAPS = 14;
|
||||
Handle AlphaMaps[NUM_ALPHA_MAPS];
|
||||
|
||||
CTerrain g_Terrain;
|
||||
CLightEnv g_LightEnv;
|
||||
extern CLightEnv g_LightEnv;
|
||||
CMiniMap g_MiniMap;
|
||||
CEditorData g_EditorData;
|
||||
|
||||
@ -50,7 +55,7 @@ bool CEditorData::InitScene()
|
||||
g_Renderer.SetLightEnv(&g_LightEnv);
|
||||
|
||||
// load the default
|
||||
if (!LoadTerrain("terrain.raw")) return false;
|
||||
if (!LoadTerrain("temp/terrain.png")) return false;
|
||||
|
||||
// get default texture to apply to terrain
|
||||
CTextureEntry* texture=0;
|
||||
@ -182,29 +187,29 @@ void CEditorData::InitResources()
|
||||
// InitSingletons: create and initialise required singletons
|
||||
void CEditorData::InitSingletons()
|
||||
{
|
||||
// create terrain related stuff
|
||||
new CTextureManager;
|
||||
|
||||
// create actor related stuff
|
||||
new CSkeletonAnimManager;
|
||||
new CObjectManager;
|
||||
new CUnitManager;
|
||||
|
||||
// create entity related stuff
|
||||
new CBaseEntityCollection;
|
||||
new CEntityManager;
|
||||
g_EntityTemplateCollection.loadTemplates();
|
||||
// // create terrain related stuff
|
||||
// new CTextureManager;
|
||||
//
|
||||
// // create actor related stuff
|
||||
// new CSkeletonAnimManager;
|
||||
// new CObjectManager;
|
||||
// new CUnitManager;
|
||||
//
|
||||
// // create entity related stuff
|
||||
// new CBaseEntityCollection;
|
||||
// new CEntityManager;
|
||||
// g_EntityTemplateCollection.loadTemplates();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Init: perform one time initialisation of the editor
|
||||
bool CEditorData::Init()
|
||||
{
|
||||
// start up Xerces
|
||||
XMLPlatformUtils::Initialize();
|
||||
|
||||
// create and initialise singletons
|
||||
InitSingletons();
|
||||
// // start up Xerces
|
||||
// XMLPlatformUtils::Initialize();
|
||||
//
|
||||
// // create and initialise singletons
|
||||
// InitSingletons();
|
||||
|
||||
// load default textures
|
||||
InitResources();
|
||||
@ -225,20 +230,20 @@ bool CEditorData::Init()
|
||||
// Terminate: close down the editor (destroy singletons in reverse order to construction)
|
||||
void CEditorData::Terminate()
|
||||
{
|
||||
// destroy entity related stuff
|
||||
delete CEntityManager::GetSingletonPtr();
|
||||
delete CBaseEntityCollection::GetSingletonPtr();
|
||||
|
||||
// destroy actor related stuff
|
||||
delete CUnitManager::GetSingletonPtr();
|
||||
delete CObjectManager::GetSingletonPtr();
|
||||
delete CSkeletonAnimManager::GetSingletonPtr();
|
||||
|
||||
// destroy terrain related stuff
|
||||
delete CTextureManager::GetSingletonPtr();
|
||||
// // destroy entity related stuff
|
||||
// delete CEntityManager::GetSingletonPtr();
|
||||
// delete CBaseEntityCollection::GetSingletonPtr();
|
||||
//
|
||||
// // destroy actor related stuff
|
||||
// delete CUnitManager::GetSingletonPtr();
|
||||
// delete CObjectManager::GetSingletonPtr();
|
||||
// delete CSkeletonAnimManager::GetSingletonPtr();
|
||||
//
|
||||
// // destroy terrain related stuff
|
||||
// delete CTextureManager::GetSingletonPtr();
|
||||
|
||||
// close down Xerces
|
||||
XMLPlatformUtils::Terminate();
|
||||
// XMLPlatformUtils::Terminate();
|
||||
}
|
||||
|
||||
void CEditorData::InitCamera()
|
||||
@ -332,7 +337,7 @@ void CEditorData::OnCameraChanged()
|
||||
|
||||
void CEditorData::RenderTerrain()
|
||||
{
|
||||
CFrustum frustum=g_NaviCam.GetCamera().GetFustum();
|
||||
CFrustum frustum=g_NaviCam.GetCamera().GetFrustum();
|
||||
u32 patchesPerSide=g_Terrain.GetPatchesPerSide();
|
||||
for (uint j=0; j<patchesPerSide; j++) {
|
||||
for (uint i=0; i<patchesPerSide; i++) {
|
||||
@ -408,7 +413,7 @@ void CEditorData::RenderNoCull()
|
||||
|
||||
void CEditorData::RenderModels()
|
||||
{
|
||||
CFrustum frustum=g_NaviCam.GetCamera().GetFustum();
|
||||
CFrustum frustum=g_NaviCam.GetCamera().GetFrustum();
|
||||
|
||||
const std::vector<CUnit*>& units=g_UnitMan.GetUnits();
|
||||
uint i;
|
||||
@ -495,7 +500,7 @@ void CEditorData::RenderObEdGrid()
|
||||
void CEditorData::OnDraw()
|
||||
{
|
||||
if (m_Mode==SCENARIO_EDIT || m_Mode==TEST_MODE) {
|
||||
g_Renderer.SetClearColor(0);
|
||||
g_Renderer.SetClearColor(0x00000000);
|
||||
g_Renderer.BeginFrame();
|
||||
|
||||
// setup camera
|
||||
@ -649,7 +654,7 @@ void CEditorData::UpdateWorld(float time)
|
||||
void CEditorData::StartTestMode()
|
||||
{
|
||||
// initialise entities
|
||||
g_EntityManager.dispatchAll( &CMessage( CMessage::EMSG_INIT ) );
|
||||
g_EntityManager.InitializeAll();
|
||||
}
|
||||
|
||||
void CEditorData::StopTestMode()
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "InfoBox.h"
|
||||
#include "UIGlobals.h"
|
||||
#include "ui/UIGlobals.h"
|
||||
#include "types.h"
|
||||
#include "ogl.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)
|
||||
{
|
||||
m_LastFPSTime=get_time();
|
||||
m_LastFPSTime=0;
|
||||
m_Stats.Reset();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "precompiled.h"
|
||||
#include "MiniMap.h"
|
||||
#include "UIGlobals.h"
|
||||
#include "ui/UIGlobals.h"
|
||||
#include "TextureManager.h"
|
||||
#include "Terrain.h"
|
||||
#include "Renderer.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "NaviCam.h"
|
||||
#include "EditorData.h"
|
||||
#include <stdarg.h>
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "PaintObjectCommand.h"
|
||||
#include "UnitManager.h"
|
||||
#include "ObjectEntry.h"
|
||||
#include "Model.h"
|
||||
#include "Unit.h"
|
||||
|
||||
#include "BaseEntity.h"
|
||||
#include "BaseEntityCollection.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "timer.h"
|
||||
#include "CommandManager.h"
|
||||
#include "ObjectEntry.h"
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "PaintTextureCommand.h"
|
||||
#include "UIGlobals.h"
|
||||
#include "ui/UIGlobals.h"
|
||||
#include "MiniMap.h"
|
||||
#include "textureEntry.h"
|
||||
#include "Terrain.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "CommandManager.h"
|
||||
#include "TextureEntry.h"
|
||||
#include "PaintTextureTool.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "RaiseElevationCommand.h"
|
||||
#include "Terrain.h"
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "CommandManager.h"
|
||||
#include "RaiseElevationTool.h"
|
||||
#include "RaiseElevationCommand.h"
|
||||
|
@ -35,11 +35,11 @@ OutDir=.\Release
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "..\..\binaries\ScEd.exe" "$(OUTDIR)\ScEd.pch"
|
||||
ALL : "..\..\..\binaries\ScEd.exe" "$(OUTDIR)\ScEd.pch"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "pslib - Win32 Release" "..\..\binaries\ScEd.exe" "$(OUTDIR)\ScEd.pch"
|
||||
ALL : "pslib - Win32 Release" "..\..\..\binaries\ScEd.exe" "$(OUTDIR)\ScEd.pch"
|
||||
|
||||
!ENDIF
|
||||
|
||||
@ -93,13 +93,13 @@ CLEAN :
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(INTDIR)\WebLinkButton.obj"
|
||||
-@erase "$(OUTDIR)\ScEd.pdb"
|
||||
-@erase "..\..\binaries\ScEd.exe"
|
||||
-@erase "..\..\..\binaries\ScEd.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
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::
|
||||
$(CPP) @<<
|
||||
@ -140,7 +140,7 @@ BSC32_FLAGS=/nologo /o"$(OUTDIR)\ScEd.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
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= \
|
||||
"$(INTDIR)\ColorButton.obj" \
|
||||
"$(INTDIR)\DirectionButton.obj" \
|
||||
@ -184,7 +184,7 @@ LINK32_OBJS= \
|
||||
"$(INTDIR)\StdAfx.obj" \
|
||||
"$(INTDIR)\ScEd.res"
|
||||
|
||||
"..\..\binaries\ScEd.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
"..\..\..\binaries\ScEd.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
@ -199,11 +199,11 @@ OutDir=.\Debug
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "..\..\binaries\ScEd_d.exe" "$(OUTDIR)\ScEd.pch"
|
||||
ALL : "..\..\..\binaries\ScEd_d.exe" "$(OUTDIR)\ScEd.pch"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "pslib - Win32 Debug" "..\..\binaries\ScEd_d.exe" "$(OUTDIR)\ScEd.pch"
|
||||
ALL : "pslib - Win32 Debug" "..\..\..\binaries\ScEd_d.exe" "$(OUTDIR)\ScEd.pch"
|
||||
|
||||
!ENDIF
|
||||
|
||||
@ -257,14 +257,14 @@ CLEAN :
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(INTDIR)\WebLinkButton.obj"
|
||||
-@erase "$(OUTDIR)\ScEd_d.pdb"
|
||||
-@erase "..\..\binaries\ScEd_d.exe"
|
||||
-@erase "..\..\binaries\ScEd_d.ilk"
|
||||
-@erase "..\..\..\binaries\ScEd_d.exe"
|
||||
-@erase "..\..\..\binaries\ScEd_d.ilk"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
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::
|
||||
$(CPP) @<<
|
||||
@ -305,7 +305,7 @@ BSC32_FLAGS=/nologo /o"$(OUTDIR)\ScEd.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
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= \
|
||||
"$(INTDIR)\ColorButton.obj" \
|
||||
"$(INTDIR)\DirectionButton.obj" \
|
||||
@ -349,7 +349,7 @@ LINK32_OBJS= \
|
||||
"$(INTDIR)\StdAfx.obj" \
|
||||
"$(INTDIR)\ScEd.res"
|
||||
|
||||
"..\..\binaries\ScEd_d.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
"..\..\..\binaries\ScEd_d.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
@ -573,22 +573,22 @@ SOURCE=.\HFTracer.cpp
|
||||
"pslib - Win32 Release" :
|
||||
cd "\0ad\fw\pslib"
|
||||
NMAKE /f pslib.mak
|
||||
cd "..\ScEd"
|
||||
cd "..\..\ScEd"
|
||||
|
||||
"pslib - Win32 ReleaseCLEAN" :
|
||||
cd "\0ad\fw\pslib"
|
||||
cd "..\ScEd"
|
||||
cd "..\..\ScEd"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ScEd - Win32 Debug"
|
||||
|
||||
"pslib - Win32 Debug" :
|
||||
cd "\0ad\fw\pslib"
|
||||
NMAKE /f pslib.mak
|
||||
cd "..\ScEd"
|
||||
cd "..\..\ScEd"
|
||||
|
||||
"pslib - Win32 DebugCLEAN" :
|
||||
cd "\0ad\fw\pslib"
|
||||
cd "..\ScEd"
|
||||
cd "..\..\ScEd"
|
||||
|
||||
!ENDIF
|
||||
|
||||
@ -596,7 +596,7 @@ SOURCE=.\StdAfx.cpp
|
||||
|
||||
!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)"
|
||||
$(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"
|
||||
|
||||
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)"
|
||||
$(CPP) @<<
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "CommandManager.h"
|
||||
#include "Unit.h"
|
||||
#include "Model.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "SmoothElevationCommand.h"
|
||||
#include "Terrain.h"
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "timer.h"
|
||||
#include "CommandManager.h"
|
||||
#include "SmoothElevationTool.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "ToolManager.h"
|
||||
|
||||
CToolManager g_ToolMan;
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "UserConfig.h"
|
||||
#include <assert.h>
|
||||
|
||||
|
1311
source/tools/sced/main.cpp
Normal file
@ -1,3 +1,4 @@
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#define _IGNORE_WGL_H_
|
||||
#include "MainFrm.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
// ColorButton.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
#include "ColorButton.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
// DirectionButton.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include <math.h>
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "precompiled.h"
|
||||
#include <assert.h>
|
||||
#include "stdafx.h"
|
||||
#include "ToolManager.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
// ElevationButton.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include <math.h>
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
// ImageListCtrl.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
#include "ImageListCtrl.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
// LightSettingsDlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
#include "LightSettingsDlg.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
// MainFrameDlgBar.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
#include "MainFrm.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
// MainFrm.cpp : implementation of the CMainFrame class
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#define _IGNORE_WGL_H_
|
||||
@ -22,6 +23,7 @@
|
||||
#include "UnitManager.h"
|
||||
#include "ObjectManager.h"
|
||||
#include "TextureManager.h"
|
||||
#include "ModelDef.h"
|
||||
#include "UIGlobals.h"
|
||||
#include "MainFrm.h"
|
||||
#include "OptionsPropSheet.h"
|
||||
@ -563,7 +565,7 @@ void CMainFrame::OnFileSaveMap()
|
||||
|
||||
CMapWriter writer;
|
||||
try {
|
||||
writer.SaveMap(savename);
|
||||
writer.SaveMap(savename, &g_Terrain, &g_LightEnv, &g_UnitMan);
|
||||
|
||||
CStr filetitle=savedlg.m_ofn.lpstrFileTitle;
|
||||
int index=filetitle.ReverseFind(CStr("."));
|
||||
@ -603,7 +605,7 @@ void CMainFrame::OnFileLoadMap()
|
||||
|
||||
CMapReader reader;
|
||||
try {
|
||||
reader.LoadMap(loadname);
|
||||
reader.LoadMap(loadname, &g_Terrain, &g_UnitMan, &g_LightEnv);
|
||||
|
||||
CStr filetitle=loaddlg.m_ofn.lpstrFileTitle;
|
||||
int index=filetitle.ReverseFind(CStr("."));
|
||||
|
@ -1,6 +1,7 @@
|
||||
// MapSizeDlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
#include "MapSizeDlg.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
// NavigatePropPage.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
#include "NavigatePropPage.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
// OptionsDlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
#include "OptionsDlg.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
// OptionsPropSheet.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
#include "OptionsPropSheet.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
// ScEd.cpp : Defines the class behaviors for the application.
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
|
||||
@ -47,8 +48,8 @@ CScEdApp theApp;
|
||||
|
||||
BOOL CScEdApp::InitInstance()
|
||||
{
|
||||
extern void pre_main_init();
|
||||
pre_main_init();
|
||||
extern void sced_init();
|
||||
sced_init();
|
||||
|
||||
AfxEnableControlContainer();
|
||||
|
||||
@ -174,10 +175,11 @@ BOOL CAboutDlg::OnInitDialog()
|
||||
|
||||
int CScEdApp::Run()
|
||||
{
|
||||
MSG msg;
|
||||
// acquire and dispatch messages until a WM_QUIT message is received
|
||||
while (1) {
|
||||
// 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
|
||||
if (!PumpMessage())
|
||||
return ExitInstance();
|
||||
|
@ -1,6 +1,7 @@
|
||||
// ScEdDoc.cpp : implementation of the CScEdDoc class
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
// ScEdView.cpp : implementation of the CScEdView class
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#define _IGNORE_WGL_H_
|
||||
#include "ScEd.h"
|
||||
@ -118,6 +119,10 @@ BOOL CScEdView::OnEraseBkgnd(CDC* pDC)
|
||||
|
||||
int CScEdView::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
||||
{
|
||||
// make sure the delay-loaded OpenGL has been loaded before calling
|
||||
// any graphical functions
|
||||
glGetError();
|
||||
|
||||
// base initialisation first
|
||||
if (CView::OnCreate(lpCreateStruct) == -1)
|
||||
return -1;
|
||||
@ -145,17 +150,8 @@ int CScEdView::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
||||
}
|
||||
|
||||
|
||||
// initialise VFS paths
|
||||
char path[256];
|
||||
::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));
|
||||
extern void ScEd_Init();
|
||||
ScEd_Init();
|
||||
|
||||
// initialise document data
|
||||
if (!g_EditorData.Init()) return -1;
|
||||
@ -171,8 +167,8 @@ void CScEdView::OnDestroy()
|
||||
// close down editor resources
|
||||
g_EditorData.Terminate();
|
||||
|
||||
// destroy renderer related stuff
|
||||
delete CRenderer::GetSingletonPtr();
|
||||
extern void ScEd_Shutdown();
|
||||
ScEd_Shutdown();
|
||||
|
||||
// release rendering context
|
||||
if (m_hGLRC) {
|
||||
|
@ -1,6 +1,7 @@
|
||||
// ShadowsPropPage.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
#include "ShadowsPropPage.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
// SimpleEdit.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
#include "SimpleEdit.h"
|
||||
|
@ -6,6 +6,8 @@
|
||||
#if !defined(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
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
@ -14,7 +16,7 @@
|
||||
|
||||
#define _SIZE_T_DEFINED
|
||||
#include "posix.h"
|
||||
#include "CStr.h"
|
||||
//#include "CStr.h"
|
||||
|
||||
#undef _WINDOWS_
|
||||
#undef UNUSED
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#define _IGNORE_WGL_H_
|
||||
#include "TexToolsDlgBar.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "UIGlobals.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
// UnitPropertiesAnimationsTab.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
#include "UnitPropertiesAnimationsTab.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#define _IGNORE_WGL_H_
|
||||
#include "UserConfig.h"
|
||||
@ -193,15 +194,15 @@ void CUnitPropertiesDlgBar::UpdateEditorData()
|
||||
|
||||
CWnd* name=GetDlgItem(IDC_EDIT_NAME);
|
||||
name->GetWindowText(str);
|
||||
m_Object->m_Name=str;
|
||||
m_Object->m_Name=(const char*)str;
|
||||
|
||||
CWnd* model=GetDlgItem(IDC_EDIT_MODEL);
|
||||
model->GetWindowText(str);
|
||||
m_Object->m_ModelName=str;
|
||||
m_Object->m_ModelName=(const char*)str;
|
||||
|
||||
CWnd* texture=GetDlgItem(IDC_EDIT_TEXTURE);
|
||||
texture->GetWindowText(str);
|
||||
m_Object->m_TextureName=str;
|
||||
m_Object->m_TextureName=(const char*)str;
|
||||
|
||||
CWnd* animation=GetDlgItem(IDC_EDIT_ANIMATION);
|
||||
animation->GetWindowText(str);
|
||||
@ -209,7 +210,7 @@ void CUnitPropertiesDlgBar::UpdateEditorData()
|
||||
m_Object->m_Animations.resize(1);
|
||||
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;
|
||||
const std::vector<CUnit*>& units=g_UnitMan.GetUnits();
|
||||
|
@ -1,6 +1,7 @@
|
||||
// UnitPropertiesTabCtrl.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
#include "UnitPropertiesTabCtrl.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
// UnitPropertiesTexturesTab.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.h"
|
||||
#include "UnitPropertiesTexturesTab.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "MainFrm.h"
|
||||
#include "SimpleEdit.h"
|
||||
@ -132,7 +133,7 @@ void CUnitToolsDlgBar::OnButtonAdd()
|
||||
|
||||
// now enter edit mode
|
||||
CObjectEntry* obj=new CObjectEntry(GetCurrentObjectType());
|
||||
obj->m_Name=name;
|
||||
obj->m_Name=(const char*)name;
|
||||
g_ObjMan.AddObject(obj,GetCurrentObjectType());
|
||||
|
||||
CMainFrame* mainfrm=(CMainFrame*) AfxGetMainWnd();
|
||||
|
@ -1,6 +1,7 @@
|
||||
// WebLinkButton.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "stdafx.h"
|
||||
#include "ScEd.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 |