Initial commit of Command & Conquer Generals and Command & Conquer Generals Zero Hour source code.
This commit is contained in:
parent
2e338c00cb
commit
3d0ee53a05
6072 changed files with 2283311 additions and 0 deletions
62
GeneralsMD/Code/Tools/MapCacheBuilder/Include/WinMain.h
Normal file
62
GeneralsMD/Code/Tools/MapCacheBuilder/Include/WinMain.h
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
** Command & Conquer Generals Zero Hour(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// FILE: WinMain.h ////////////////////////////////////////////////////////////
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Westwood Studios Pacific.
|
||||
//
|
||||
// Confidential Information
|
||||
// Copyright (C) 2001 - All Rights Reserved
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Project: ImagePacker
|
||||
//
|
||||
// File name: WinMain.h
|
||||
//
|
||||
// Created: Colin Day, August 2001
|
||||
//
|
||||
// Desc: Header for main app
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __WINMAIN_H_
|
||||
#define __WINMAIN_H_
|
||||
|
||||
// SYSTEM INCLUDES ////////////////////////////////////////////////////////////
|
||||
#include <windows.h>
|
||||
|
||||
// USER INCLUDES //////////////////////////////////////////////////////////////
|
||||
|
||||
// FORWARD REFERENCES /////////////////////////////////////////////////////////
|
||||
|
||||
// TYPE DEFINES ///////////////////////////////////////////////////////////////
|
||||
|
||||
// INLINING ///////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// EXTERNALS //////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
extern HINSTANCE ApplicationHInstance;
|
||||
|
||||
#endif // __WINMAIN_H_
|
||||
|
146
GeneralsMD/Code/Tools/MapCacheBuilder/MapCacheBuilder.dsp
Normal file
146
GeneralsMD/Code/Tools/MapCacheBuilder/MapCacheBuilder.dsp
Normal file
|
@ -0,0 +1,146 @@
|
|||
# Microsoft Developer Studio Project File - Name="MapCacheBuilder" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=MapCacheBuilder - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "MapCacheBuilder.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "MapCacheBuilder.mak" CFG="MapCacheBuilder - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "MapCacheBuilder - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "MapCacheBuilder - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "MapCacheBuilder - Win32 Internal" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName "MapCacheBuilder"
|
||||
# PROP Scc_LocalPath "."
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "MapCacheBuilder - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /G6 /MD /W3 /WX /GX /O2 /Ob2 /I ".\Include" /I ".\Resource" /I "..\..\Libraries\Include" /I "..\..\GameEngine\Include" /I "..\..\GameEngineDevice\Include" /I "..\..\Libraries\Source\WWVegas" /I "..\..\Libraries\Source\WWVegas\WWLib" /I "..\..\Libraries\Source\WWVegas\WWMath" /I "..\..\Libraries\Source\WWVegas\WWDebug" /I "..\..\Libraries\Source\WWVegas\WWSaveLoad" /I "..\..\Libraries\Source\WWVegas\WW3D2" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 WW3D2.lib WWDebug.lib WWLib.lib WWUtil.lib WWMath.lib GameEngine.lib GameEngineDevice.lib wsock32.lib wininet.lib dxguid.lib dinput8.lib d3dx8.lib d3d8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib vfw32.lib winmm.lib dsound.lib comctl32.lib imm32.lib mss32.lib /nologo /subsystem:windows /pdb:"..\..\..\Run\MapCacheBuilder.pdb" /map:"..\..\..\Run\MapCacheBuilder.map" /debug /machine:I386 /nodefaultlib:"libc.lib" /out:"..\..\..\Run\MapCacheBuilder.exe" /libpath:"..\..\GameEngine\Lib" /libpath:"..\..\GameEngineDevice\Lib" /libpath:"..\..\Libraries\Lib" /libpath:"..\..\GameEngine"
|
||||
|
||||
!ELSEIF "$(CFG)" == "MapCacheBuilder - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD CPP /nologo /G6 /MDd /W3 /WX /Gm /GX /ZI /Od /I ".\Include" /I ".\Resource" /I "..\..\Libraries\Include" /I "..\..\GameEngine\Include" /I "..\..\GameEngineDevice\Include" /I "..\..\Libraries\Source\WWVegas" /I "..\..\Libraries\Source\WWVegas\WWLib" /I "..\..\Libraries\Source\WWVegas\WWMath" /I "..\..\Libraries\Source\WWVegas\WWDebug" /I "..\..\Libraries\Source\WWVegas\WWSaveLoad" /I "..\..\Libraries\Source\WWVegas\WW3D2" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
|
||||
# ADD LINK32 WW3D2Debug.lib WWDebugDebug.lib WWUtilDebug.lib WWLibDebug.lib WWMathDebug.lib GameEngineDebug.lib GameEngineDeviceDebug.lib mss32.lib wsock32.lib wininet.lib dxguid.lib dinput8.lib d3dx8.lib d3d8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib vfw32.lib winmm.lib dsound.lib comctl32.lib imm32.lib /nologo /subsystem:windows /pdb:"..\..\..\Run\MapCacheBuilderD.pdb" /map:"..\..\..\Run\MapCacheBuilderD.map" /debug /machine:I386 /nodefaultlib:"libcd.lib" /out:"..\..\..\Run\MapCacheBuilderD.exe" /libpath:"..\..\GameEngine\Lib" /libpath:"..\..\GameEngineDevice\Lib" /libpath:"..\..\Libraries\Lib" /libpath:"..\..\GameEngine"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "MapCacheBuilder - Win32 Internal"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Internal"
|
||||
# PROP BASE Intermediate_Dir "Internal"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Internal"
|
||||
# PROP Intermediate_Dir "Internal"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /WX /GX /O2 /I ".\Include" /I ".\Resource" /I "..\..\Libraries\Include" /I "..\..\GameEngine\Include" /I "..\..\GameEngineDevice\Include" /I "..\..\Libraries\Source\WWVegas" /I "..\..\Libraries\Source\WWVegas\WWLib" /I "..\..\Libraries\Source\WWVegas\WWMath" /I "..\..\Libraries\Source\WWVegas\WWDebug" /I "..\..\Libraries\Source\WWVegas\WWSaveLoad" /I "..\..\Libraries\Source\WWVegas\WW3D2" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /G6 /MD /W3 /WX /GX /O2 /I ".\Include" /I ".\Resource" /I "..\..\Libraries\Include" /I "..\..\GameEngine\Include" /I "..\..\GameEngineDevice\Include" /I "..\..\Libraries\Source\WWVegas" /I "..\..\Libraries\Source\WWVegas\WWLib" /I "..\..\Libraries\Source\WWVegas\WWMath" /I "..\..\Libraries\Source\WWVegas\WWDebug" /I "..\..\Libraries\Source\WWVegas\WWSaveLoad" /I "..\..\Libraries\Source\WWVegas\WW3D2" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 WW3D2.lib WWDebug.lib WWLib.lib WWUtil.lib WWMath.lib GameEngine.lib GameEngineDevice.lib dxguid.lib dinput8.lib d3dx8.lib d3d8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib vfw32.lib winmm.lib dsound.lib comctl32.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /out:"..\..\..\Run\ImagePacker.exe" /libpath:"..\..\GameEngine\Lib" /libpath:"..\..\GameEngineDevice\Lib" /libpath:"..\..\Libraries\Lib" /libpath:"..\..\GameEngine"
|
||||
# ADD LINK32 WW3D2Internal.lib WWDebugInternal.lib WWLibInternal.lib WWUtilInternal.lib WWMathInternal.lib GameEngineInternal.lib GameEngineDeviceInternal.lib wsock32.lib wininet.lib dxguid.lib dinput8.lib d3dx8.lib d3d8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib vfw32.lib winmm.lib dsound.lib comctl32.lib imm32.lib mss32.lib /nologo /subsystem:windows /incremental:yes /pdb:"..\..\..\Run\MapCacheBuilderI.pdb" /map:"..\..\..\Run\MapCacheBuilderI.map" /debug /machine:I386 /nodefaultlib:"libc.lib" /out:"..\..\..\Run\MapCacheBuilderI.exe" /libpath:"..\..\GameEngine\Lib" /libpath:"..\..\GameEngineDevice\Lib" /libpath:"..\..\Libraries\Lib" /libpath:"..\..\GameEngine"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "MapCacheBuilder - Win32 Release"
|
||||
# Name "MapCacheBuilder - Win32 Debug"
|
||||
# Name "MapCacheBuilder - Win32 Internal"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Source\WinMain.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Resource\MapCacheBuilder.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Resource\Resource.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
|
@ -0,0 +1,214 @@
|
|||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IMAGE_PACKER_DIALOG DIALOG DISCARDABLE 0, 0, 408, 313
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Image Packer"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",BUTTON_START,20,224,50,32
|
||||
PUSHBUTTON "Exit",BUTTON_EXIT,80,224,50,32
|
||||
LISTBOX LIST_FOLDERS,154,136,232,84,LBS_SORT | LBS_MULTIPLESEL |
|
||||
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL |
|
||||
WS_TABSTOP
|
||||
GROUPBOX "Folders Containing Source Images",IDC_STATIC,148,84,244,
|
||||
144
|
||||
GROUPBOX "",IDC_STATIC,4,4,396,304
|
||||
GROUPBOX "Output Image Size",IDC_STATIC,12,84,128,108
|
||||
CONTROL "128 x 128",RADIO_128X128,"Button",BS_AUTORADIOBUTTON,20,
|
||||
99,47,10
|
||||
CONTROL "256 x 256",RADIO_256X256,"Button",BS_AUTORADIOBUTTON,20,
|
||||
111,47,10
|
||||
CONTROL "512 x 512",RADIO_512X512,"Button",BS_AUTORADIOBUTTON,20,
|
||||
123,47,10
|
||||
CONTROL "Other",RADIO_TARGET_OTHER,"Button",BS_AUTORADIOBUTTON,
|
||||
20,135,33,10
|
||||
EDITTEXT EDIT_WIDTH,36,148,24,14,ES_CENTER | ES_AUTOHSCROLL |
|
||||
ES_NUMBER | WS_DISABLED
|
||||
EDITTEXT EDIT_HEIGHT,72,148,24,14,ES_CENTER | ES_AUTOHSCROLL |
|
||||
ES_NUMBER | WS_DISABLED
|
||||
CTEXT "x",STATIC_X,60,148,12,12,SS_CENTERIMAGE | WS_DISABLED
|
||||
PUSHBUTTON "Add Folder(s)",BUTTON_ADD_FOLDER,196,100,70,14
|
||||
PUSHBUTTON "Remove Folder(s)",BUTTON_REMOVE_FOLDER,276,100,72,14
|
||||
EDITTEXT EDIT_FILENAME,12,30,128,14,ES_AUTOHSCROLL
|
||||
LTEXT "Output File Base Name:",IDC_STATIC,12,20,124,8,
|
||||
SS_CENTERIMAGE
|
||||
CONTROL "Use Sub-folders",CHECK_USE_SUB_FOLDERS,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,156,120,66,10
|
||||
LTEXT "Status",STATIC_STATUS,12,288,380,12,SS_CENTERIMAGE |
|
||||
SS_SUNKEN
|
||||
PUSHBUTTON "Open Preview",BUTTON_PREVIEW,176,244,68,14
|
||||
GROUPBOX "Preview",IDC_STATIC,148,232,244,52
|
||||
PUSHBUTTON "<- Prev",BUTTON_PREVIOUS,264,244,50,14
|
||||
PUSHBUTTON "Next ->",BUTTON_NEXT,316,244,50,14
|
||||
EDITTEXT EDIT_GUTTER,176,57,40,14,ES_CENTER | ES_AUTOHSCROLL |
|
||||
ES_NUMBER | WS_DISABLED
|
||||
LTEXT "Pixels Between Packed Images",STATIC_GAP_INFO,220,57,
|
||||
128,12,SS_CENTERIMAGE | WS_DISABLED
|
||||
CONTROL "Output Alpha Channel",CHECK_ALPHA,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,12,68,128,10
|
||||
CONTROL "Show Texture In Preview",CHECK_BITMAP_PREVIEW,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,176,264,112,10
|
||||
CONTROL "Create INI Mapped Image File",CHECK_INI,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,12,52,128,10
|
||||
CONTROL "Compress Final Texture Pages",CHECK_COMPRESS,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,20,172,116,10
|
||||
GROUPBOX "Gap Method",IDC_STATIC,148,12,244,68
|
||||
CONTROL "Extend RGB at Image Edges (All Sides, NO Alpha)",
|
||||
CHECK_GAP_EXTEND_RGB,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,156,28,174,10
|
||||
CONTROL "Transparent Gap (Right and Bottom Only)",
|
||||
CHECK_GAP_GUTTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
|
||||
156,44,146,10
|
||||
END
|
||||
|
||||
IMAGE_ERRORS DIALOG DISCARDABLE 0, 0, 252, 257
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Processing Errors"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Proceed Anyway",BUTTON_PROCEED,44,232,72,14
|
||||
LISTBOX LIST_IMAGES,4,20,244,200,LBS_SORT | LBS_NOINTEGRALHEIGHT |
|
||||
LBS_NOSEL | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
LTEXT "The following images cannot be processed. Proceed anyway?",
|
||||
IDC_STATIC,4,4,236,12
|
||||
DEFPUSHBUTTON "Cancel Build",BUTTON_CANCEL,136,232,72,14
|
||||
END
|
||||
|
||||
PAGE_ERRORS DIALOG DISCARDABLE 0, 0, 256, 257
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Texture Page Errors"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
LISTBOX LIST_PAGES,4,20,244,200,LBS_SORT | LBS_NOINTEGRALHEIGHT |
|
||||
LBS_NOSEL | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
LTEXT "The following texture pages could not be generated and were ignored",
|
||||
IDC_STATIC,4,4,236,12
|
||||
PUSHBUTTON "OK",IDOK,104,232,50,14
|
||||
END
|
||||
|
||||
DIRECTORY_SELECT_DIALOG DIALOG DISCARDABLE 0, 0, 192, 261
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Select Directory"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Add Directory",BUTTON_ADD,28,8,63,14,WS_DISABLED
|
||||
PUSHBUTTON "Cancel",BUTTON_CANCEL,100,8,63,14
|
||||
LISTBOX LIST_DIR,4,80,184,176,LBS_SORT | LBS_MULTIPLESEL |
|
||||
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL |
|
||||
WS_TABSTOP
|
||||
LTEXT "Current Dir",STATIC_CURRENT_DIR,4,36,184,24,SS_SUNKEN
|
||||
COMBOBOX COMBO_DRIVE,28,64,48,180,CBS_DROPDOWNLIST | CBS_SORT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Drive",IDC_STATIC,4,64,20,12,SS_CENTERIMAGE
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IMAGE_PACKER_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 401
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 306
|
||||
END
|
||||
|
||||
IMAGE_ERRORS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 245
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 250
|
||||
END
|
||||
|
||||
PAGE_ERRORS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 249
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 250
|
||||
END
|
||||
|
||||
DIRECTORY_SELECT_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 185
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 254
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
73
GeneralsMD/Code/Tools/MapCacheBuilder/Resource/Resource.h
Normal file
73
GeneralsMD/Code/Tools/MapCacheBuilder/Resource/Resource.h
Normal file
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
** Command & Conquer Generals Zero Hour(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by MapPackBuilder.rc
|
||||
//
|
||||
#define IDD_DIALOG1 101
|
||||
#define IMAGE_PACKER_DIALOG 101
|
||||
#define IMAGE_ERRORS 102
|
||||
#define PAGE_ERRORS 103
|
||||
#define DIRECTORY_SELECT_DIALOG 104
|
||||
#define BUTTON_START 1000
|
||||
#define BUTTON_EXIT 1001
|
||||
#define LIST_FOLDERS 1002
|
||||
#define RADIO_128X128 1003
|
||||
#define RADIO_256X256 1004
|
||||
#define RADIO_512X512 1005
|
||||
#define RADIO_TARGET_OTHER 1006
|
||||
#define EDIT_WIDTH 1007
|
||||
#define EDIT_HEIGHT 1008
|
||||
#define BUTTON_ADD_FOLDER 1009
|
||||
#define BUTTON_REMOVE_FOLDER 1010
|
||||
#define EDIT_FILENAME 1011
|
||||
#define CHECK_USE_SUB_FOLDERS 1012
|
||||
#define STATIC_X 1013
|
||||
#define STATIC_STATUS 1014
|
||||
#define BUTTON_PREVIEW 1016
|
||||
#define BUTTON_PREVIOUS 1017
|
||||
#define BUTTON_NEXT 1018
|
||||
#define LIST_IMAGES 1018
|
||||
#define EDIT_GUTTER 1019
|
||||
#define CHECK_ALPHA 1020
|
||||
#define CHECK_BITMAP_PREVIEW 1021
|
||||
#define CHECK_GDF 1022
|
||||
#define CHECK_INI 1022
|
||||
#define BUTTON_PROCEED 1023
|
||||
#define BUTTON_CANCEL 1024
|
||||
#define LIST_PAGES 1025
|
||||
#define BUTTON_ADD 1027
|
||||
#define LIST_DIR 1028
|
||||
#define STATIC_CURRENT_DIR 1031
|
||||
#define COMBO_DRIVE 1032
|
||||
#define CHECK_COMPRESS 1033
|
||||
#define CHECK_GAP_EXTEND_RGB 1037
|
||||
#define CHECK_GAP_GUTTER 1038
|
||||
#define STATIC_GAP_INFO 1039
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 105
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1040
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
374
GeneralsMD/Code/Tools/MapCacheBuilder/Source/WinMain.cpp
Normal file
374
GeneralsMD/Code/Tools/MapCacheBuilder/Source/WinMain.cpp
Normal file
|
@ -0,0 +1,374 @@
|
|||
/*
|
||||
** Command & Conquer Generals Zero Hour(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// FILE: WinMain.cpp //////////////////////////////////////////////////////////
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Westwood Studios Pacific.
|
||||
//
|
||||
// Confidential Information
|
||||
// Copyright (C) 2001 - All Rights Reserved
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Project: MapCacheBuilder
|
||||
//
|
||||
// File name: WinMain.cpp
|
||||
//
|
||||
// Created: Matthew D. Campbell, October 2002
|
||||
//
|
||||
// Desc: Application entry point for the standalone MapCache Builder
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// SYSTEM INCLUDES ////////////////////////////////////////////////////////////
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// USER INCLUDES //////////////////////////////////////////////////////////////
|
||||
#include "Lib/BaseType.h"
|
||||
#include "Common/Debug.h"
|
||||
#include "Common/GameMemory.h"
|
||||
#include "Common/GlobalData.h"
|
||||
#include "Common/NameKeyGenerator.h"
|
||||
#include "Resource.h"
|
||||
|
||||
#include "Common/ThingFactory.h"
|
||||
#include "Common/FileSystem.h"
|
||||
#include "Win32Device/Common/Win32LocalFileSystem.h"
|
||||
#include "Win32Device/Common/Win32BIGFileSystem.h"
|
||||
#include "Common/SubSystemInterface.h"
|
||||
#include "GameClient/MapUtil.h"
|
||||
#include "W3DDevice/Common/W3DModuleFactory.h"
|
||||
|
||||
|
||||
#include "Common/FileSystem.h"
|
||||
#include "Common/ArchiveFileSystem.h"
|
||||
#include "Common/LocalFileSystem.h"
|
||||
#include "Common/Debug.h"
|
||||
#include "Common/StackDump.h"
|
||||
#include "Common/GameMemory.h"
|
||||
#include "Common/Science.h"
|
||||
#include "Common/ThingFactory.h"
|
||||
#include "Common/INI.h"
|
||||
#include "Common/GameAudio.h"
|
||||
#include "Common/SpecialPower.h"
|
||||
#include "Common/TerrainTypes.h"
|
||||
#include "Common/DamageFX.h"
|
||||
#include "Common/Upgrade.h"
|
||||
#include "Common/ModuleFactory.h"
|
||||
#include "Common/PlayerTemplate.h"
|
||||
#include "Common/MultiplayerSettings.h"
|
||||
|
||||
#include "GameLogic/Armor.h"
|
||||
#include "GameLogic/CaveSystem.h"
|
||||
#include "GameLogic/CrateSystem.h"
|
||||
#include "GameLogic/ObjectCreationList.h"
|
||||
#include "GameLogic/Weapon.h"
|
||||
#include "GameLogic/RankInfo.h"
|
||||
#include "GameLogic/SidesList.h"
|
||||
#include "GameLogic/ScriptEngine.h"
|
||||
#include "GameLogic/ScriptActions.h"
|
||||
#include "GameClient/Anim2D.h"
|
||||
#include "GameClient/GameText.h"
|
||||
#include "GameClient/ParticleSys.h"
|
||||
#include "GameClient/Water.h"
|
||||
#include "GameClient/TerrainRoads.h"
|
||||
#include "GameClient/FXList.h"
|
||||
#include "GameClient/VideoPlayer.h"
|
||||
#include "GameLogic/Locomotor.h"
|
||||
|
||||
#include "W3DDevice/Common/W3DModuleFactory.h"
|
||||
#include "W3DDevice/GameClient/W3DParticleSys.h"
|
||||
#include "MilesAudioDevice/MilesAudioManager.h"
|
||||
|
||||
#include <io.h>
|
||||
#include "win32device/GameClient/Win32Mouse.h"
|
||||
#include "Win32Device/Common/Win32LocalFileSystem.h"
|
||||
#include "Win32Device/Common/Win32BIGFileSystem.h"
|
||||
|
||||
|
||||
// DEFINES ////////////////////////////////////////////////////////////////////
|
||||
|
||||
// PRIVATE TYPES //////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef _INTERNAL
|
||||
// for occasional debugging...
|
||||
//#pragma optimize("", off)
|
||||
//#pragma message("************************************** WARNING, optimization disabled for debugging purposes")
|
||||
#endif
|
||||
|
||||
// PRIVATE DATA ///////////////////////////////////////////////////////////////
|
||||
|
||||
static SubsystemInterfaceList _TheSubsystemList;
|
||||
|
||||
template<class SUBSYSTEM>
|
||||
void initSubsystem(SUBSYSTEM*& sysref, SUBSYSTEM* sys, const char* path1 = NULL, const char* path2 = NULL, const char* dirpath = NULL)
|
||||
{
|
||||
sysref = sys;
|
||||
_TheSubsystemList.initSubsystem(sys, path1, path2, dirpath, NULL);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// PUBLIC DATA ////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
HINSTANCE ApplicationHInstance = NULL; ///< our application instance
|
||||
|
||||
/// just to satisfy the game libraries we link to
|
||||
HWND ApplicationHWnd = NULL;
|
||||
|
||||
char *gAppPrefix = "MC_";
|
||||
|
||||
// Where are the default string files?
|
||||
const Char *g_strFile = "data\\Generals.str";
|
||||
const Char *g_csfFile = "data\\%s\\Generals.csf";
|
||||
|
||||
// PRIVATE PROTOTYPES /////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// PRIVATE FUNCTIONS //////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// strtrim ====================================================================
|
||||
/** Trim leading and trailing whitespace from a character string (in place). */
|
||||
//=============================================================================
|
||||
static char* strtrim(char* buffer)
|
||||
{
|
||||
if (buffer != NULL) {
|
||||
// Strip leading white space from the string.
|
||||
char * source = buffer;
|
||||
while ((*source != 0) && ((unsigned char)*source <= 32))
|
||||
{
|
||||
source++;
|
||||
}
|
||||
|
||||
if (source != buffer)
|
||||
{
|
||||
strcpy(buffer, source);
|
||||
}
|
||||
|
||||
// Clip trailing white space from the string.
|
||||
for (int index = strlen(buffer)-1; index >= 0; index--)
|
||||
{
|
||||
if ((*source != 0) && ((unsigned char)buffer[index] <= 32))
|
||||
{
|
||||
buffer[index] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static char *nextParam(char *newSource, char *seps)
|
||||
{
|
||||
static char *source = NULL;
|
||||
if (newSource)
|
||||
{
|
||||
source = newSource;
|
||||
}
|
||||
if (!source)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// find first separator
|
||||
char *first = source;//strpbrk(source, seps);
|
||||
if (first)
|
||||
{
|
||||
// go past initial spaces
|
||||
char *firstNonSpace = first;
|
||||
while (*firstNonSpace == ' ')
|
||||
++firstNonSpace;
|
||||
first = firstNonSpace;
|
||||
|
||||
// go past separator
|
||||
char *firstSep = strpbrk(first, seps);
|
||||
char firstChar[2] = {0,0};
|
||||
if (firstSep == first)
|
||||
{
|
||||
firstChar[0] = *first;
|
||||
while (*first == firstChar[0]) first++;
|
||||
}
|
||||
|
||||
// find end
|
||||
char *end;
|
||||
if (firstChar[0])
|
||||
end = strpbrk(first, firstChar);
|
||||
else
|
||||
end = strpbrk(first, seps);
|
||||
|
||||
// trim string & save next start pos
|
||||
if (end)
|
||||
{
|
||||
source = end+1;
|
||||
*end = 0;
|
||||
|
||||
if (!*source)
|
||||
source = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
source = NULL;
|
||||
}
|
||||
|
||||
if (first && !*first)
|
||||
first = NULL;
|
||||
}
|
||||
|
||||
return first;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// PUBLIC FUNCTIONS ///////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// WinMain ====================================================================
|
||||
/** Application entry point */
|
||||
//=============================================================================
|
||||
Int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
||||
LPSTR lpCmdLine, Int nCmdShow )
|
||||
{
|
||||
|
||||
// start the log
|
||||
DEBUG_INIT(DEBUG_FLAGS_DEFAULT);
|
||||
initMemoryManager();
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// save application instance
|
||||
ApplicationHInstance = hInstance;
|
||||
|
||||
|
||||
// Set the current directory to the app directory.
|
||||
char buf[_MAX_PATH];
|
||||
GetModuleFileName(NULL, buf, sizeof(buf));
|
||||
char *pEnd = buf + strlen(buf);
|
||||
while (pEnd != buf) {
|
||||
if (*pEnd == '\\') {
|
||||
*pEnd = 0;
|
||||
break;
|
||||
}
|
||||
pEnd--;
|
||||
}
|
||||
::SetCurrentDirectory(buf);
|
||||
|
||||
/*
|
||||
** Convert WinMain arguments to simple main argc and argv
|
||||
*/
|
||||
std::list<std::string> argvSet;
|
||||
char *token;
|
||||
token = nextParam(lpCmdLine, "\" ");
|
||||
while (token != NULL) {
|
||||
char * str = strtrim(token);
|
||||
argvSet.push_back(str);
|
||||
DEBUG_LOG(("Adding '%s'\n", str));
|
||||
token = nextParam(NULL, "\" ");
|
||||
}
|
||||
|
||||
// not part of the subsystem list, because it should normally never be reset!
|
||||
TheNameKeyGenerator = new NameKeyGenerator;
|
||||
TheNameKeyGenerator->init();
|
||||
|
||||
TheFileSystem = new FileSystem;
|
||||
|
||||
initSubsystem(TheLocalFileSystem, (LocalFileSystem*)new Win32LocalFileSystem);
|
||||
initSubsystem(TheArchiveFileSystem, (ArchiveFileSystem*)new Win32BIGFileSystem);
|
||||
INI ini;
|
||||
initSubsystem(TheWritableGlobalData, new GlobalData(), "Data\\INI\\Default\\GameData.ini", "Data\\INI\\GameData.ini");
|
||||
initSubsystem(TheGameText, CreateGameTextInterface());
|
||||
initSubsystem(TheScienceStore, new ScienceStore(), "Data\\INI\\Default\\Science.ini", "Data\\INI\\Science.ini");
|
||||
initSubsystem(TheMultiplayerSettings, new MultiplayerSettings(), "Data\\INI\\Default\\Multiplayer.ini", "Data\\INI\\Multiplayer.ini");
|
||||
initSubsystem(TheTerrainTypes, new TerrainTypeCollection(), "Data\\INI\\Default\\Terrain.ini", "Data\\INI\\Terrain.ini");
|
||||
initSubsystem(TheTerrainRoads, new TerrainRoadCollection(), "Data\\INI\\Default\\Roads.ini", "Data\\INI\\Roads.ini");
|
||||
initSubsystem(TheScriptEngine, (ScriptEngine*)(new ScriptEngine()));
|
||||
initSubsystem(TheAudio, (AudioManager*)new MilesAudioManager());
|
||||
initSubsystem(TheVideoPlayer, (VideoPlayerInterface*)(new VideoPlayer()));
|
||||
initSubsystem(TheModuleFactory, (ModuleFactory*)(new W3DModuleFactory()));
|
||||
initSubsystem(TheSidesList, new SidesList());
|
||||
initSubsystem(TheCaveSystem, new CaveSystem());
|
||||
initSubsystem(TheRankInfoStore, new RankInfoStore(), NULL, "Data\\INI\\Rank.ini");
|
||||
initSubsystem(ThePlayerTemplateStore, new PlayerTemplateStore(), "Data\\INI\\Default\\PlayerTemplate.ini", "Data\\INI\\PlayerTemplate.ini");
|
||||
initSubsystem(TheSpecialPowerStore, new SpecialPowerStore(), "Data\\INI\\Default\\SpecialPower.ini", "Data\\INI\\SpecialPower.ini" );
|
||||
initSubsystem(TheParticleSystemManager, (ParticleSystemManager*)(new W3DParticleSystemManager()));
|
||||
initSubsystem(TheFXListStore, new FXListStore(), "Data\\INI\\Default\\FXList.ini", "Data\\INI\\FXList.ini");
|
||||
initSubsystem(TheWeaponStore, new WeaponStore(), NULL, "Data\\INI\\Weapon.ini");
|
||||
initSubsystem(TheObjectCreationListStore, new ObjectCreationListStore(), "Data\\INI\\Default\\ObjectCreationList.ini", "Data\\INI\\ObjectCreationList.ini");
|
||||
initSubsystem(TheLocomotorStore, new LocomotorStore(), NULL, "Data\\INI\\Locomotor.ini");
|
||||
initSubsystem(TheDamageFXStore, new DamageFXStore(), NULL, "Data\\INI\\DamageFX.ini");
|
||||
initSubsystem(TheArmorStore, new ArmorStore(), NULL, "Data\\INI\\Armor.ini");
|
||||
initSubsystem(TheThingFactory, new ThingFactory(), "Data\\INI\\Default\\Object.ini", NULL, "Data\\INI\\Object");
|
||||
initSubsystem(TheCrateSystem, new CrateSystem(), "Data\\INI\\Default\\Crate.ini", "Data\\INI\\Crate.ini");
|
||||
initSubsystem(TheUpgradeCenter, new UpgradeCenter, "Data\\INI\\Default\\Upgrade.ini", "Data\\INI\\Upgrade.ini");
|
||||
initSubsystem(TheAnim2DCollection, new Anim2DCollection ); //Init's itself.
|
||||
|
||||
_TheSubsystemList.postProcessLoadAll();
|
||||
|
||||
TheWritableGlobalData->m_buildMapCache = TRUE;
|
||||
|
||||
TheMapCache = new MapCache;
|
||||
|
||||
// add in allowed maps
|
||||
for (std::list<std::string>::const_iterator cit = argvSet.begin(); cit != argvSet.end(); ++cit)
|
||||
{
|
||||
DEBUG_LOG(("Adding shipping map: '%s'\n", cit->c_str()));
|
||||
TheMapCache->addShippingMap((*cit).c_str());
|
||||
}
|
||||
|
||||
TheMapCache->updateCache();
|
||||
|
||||
delete TheMapCache;
|
||||
TheMapCache = NULL;
|
||||
|
||||
// load the dialog box
|
||||
//DialogBox( hInstance, (LPCTSTR)IMAGE_PACKER_DIALOG,
|
||||
// NULL, (DLGPROC)ImagePackerProc );
|
||||
|
||||
// delete TheGlobalData
|
||||
//delete TheGlobalData;
|
||||
//TheGlobalData = NULL;
|
||||
|
||||
_TheSubsystemList.shutdownAll();
|
||||
|
||||
delete TheFileSystem;
|
||||
TheFileSystem = NULL;
|
||||
|
||||
delete TheNameKeyGenerator;
|
||||
TheNameKeyGenerator = NULL;
|
||||
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
DEBUG_CRASH(("Munkee munkee!"));
|
||||
}
|
||||
|
||||
// close the log
|
||||
shutdownMemoryManager();
|
||||
DEBUG_SHUTDOWN();
|
||||
|
||||
// all done
|
||||
return 0;
|
||||
|
||||
} // end WinMain
|
Reference in a new issue