From 6d644d7d67dec318a450d332d65b3579474d85c8 Mon Sep 17 00:00:00 2001 From: Jaredl-Dev <260281143+Jaredl-Dev@users.noreply.github.com> Date: Fri, 7 Aug 2026 12:04:23 -0700 Subject: [PATCH 1/2] unify(w3ddevice-common): Merge W3DModuleFactory from Zero Hour (#3073) --- .../Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp b/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp index 1c7f300f912..981fe518ef0 100644 --- a/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp +++ b/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp @@ -35,6 +35,8 @@ #include "W3DDevice/GameClient/Module/W3DModelDraw.h" #include "W3DDevice/GameClient/Module/W3DLaserDraw.h" #include "W3DDevice/GameClient/Module/W3DOverlordTankDraw.h" +#include "W3DDevice/GameClient/Module/W3DOverlordTruckDraw.h" +#include "W3DDevice/GameClient/Module/W3DOverlordAircraftDraw.h" #include "W3DDevice/GameClient/Module/W3DPoliceCarDraw.h" #include "W3DDevice/GameClient/Module/W3DProjectileStreamDraw.h" #include "W3DDevice/GameClient/Module/W3DRopeDraw.h" @@ -44,6 +46,8 @@ #include "W3DDevice/GameClient/Module/W3DTruckDraw.h" #include "W3DDevice/GameClient/Module/W3DTankTruckDraw.h" #include "W3DDevice/GameClient/Module/W3DTracerDraw.h" +#include "W3DDevice/GameClient/Module/W3DTreeDraw.h" +#include "W3DDevice/GameClient/Module/W3DPropDraw.h" //------------------------------------------------------------------------------------------------- /** Initialize method */ @@ -60,6 +64,8 @@ void W3DModuleFactory::init() addModule( W3DModelDraw ); addModule( W3DLaserDraw ); addModule( W3DOverlordTankDraw ); + addModule( W3DOverlordTruckDraw ); + addModule( W3DOverlordAircraftDraw ); addModule( W3DProjectileStreamDraw ); addModule( W3DPoliceCarDraw ); addModule( W3DRopeDraw ); @@ -70,5 +76,7 @@ void W3DModuleFactory::init() addModule( W3DTruckDraw ); addModule( W3DTracerDraw ); addModule( W3DTankTruckDraw ); + addModule( W3DTreeDraw ); + addModule( W3DPropDraw ); } From 29052fcabf36d0daf29b86e19c6b0bbd4786a992 Mon Sep 17 00:00:00 2001 From: Jaredl-Dev <260281143+Jaredl-Dev@users.noreply.github.com> Date: Fri, 7 Aug 2026 12:07:08 -0700 Subject: [PATCH 2/2] unify(w3ddevice-common): Move W3DDevice/Common to Core (#3073) --- Core/GameEngineDevice/CMakeLists.txt | 16 +- .../Include/W3DDevice/Common/W3DConvert.h | 0 .../W3DDevice/Common/W3DFunctionLexicon.h | 0 .../W3DDevice/Common/W3DModuleFactory.h | 0 .../W3DDevice/Common/W3DThingFactory.h | 0 .../Common/System/W3DFunctionLexicon.cpp | 0 .../Common/Thing/W3DModuleFactory.cpp | 0 .../Common/Thing/W3DThingFactory.cpp | 0 .../Source/W3DDevice/Common/W3DConvert.cpp | 0 Generals/Code/GameEngineDevice/CMakeLists.txt | 16 +- .../Include/W3DDevice/Common/W3DConvert.h | 61 ------- .../W3DDevice/Common/W3DFunctionLexicon.h | 51 ------ .../W3DDevice/Common/W3DModuleFactory.h | 48 ----- .../W3DDevice/Common/W3DThingFactory.h | 46 ----- .../Common/System/W3DFunctionLexicon.cpp | 170 ------------------ .../Common/Thing/W3DModuleFactory.cpp | 82 --------- .../Common/Thing/W3DThingFactory.cpp | 48 ----- .../Source/W3DDevice/Common/W3DConvert.cpp | 110 ------------ .../Code/GameEngineDevice/CMakeLists.txt | 16 +- scripts/cpp/unify_move_files.py | 9 + 20 files changed, 33 insertions(+), 640 deletions(-) rename {GeneralsMD/Code => Core}/GameEngineDevice/Include/W3DDevice/Common/W3DConvert.h (100%) rename {GeneralsMD/Code => Core}/GameEngineDevice/Include/W3DDevice/Common/W3DFunctionLexicon.h (100%) rename {GeneralsMD/Code => Core}/GameEngineDevice/Include/W3DDevice/Common/W3DModuleFactory.h (100%) rename {GeneralsMD/Code => Core}/GameEngineDevice/Include/W3DDevice/Common/W3DThingFactory.h (100%) rename {GeneralsMD/Code => Core}/GameEngineDevice/Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp (100%) rename {GeneralsMD/Code => Core}/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp (100%) rename {GeneralsMD/Code => Core}/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DThingFactory.cpp (100%) rename {GeneralsMD/Code => Core}/GameEngineDevice/Source/W3DDevice/Common/W3DConvert.cpp (100%) delete mode 100644 Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DConvert.h delete mode 100644 Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DFunctionLexicon.h delete mode 100644 Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DModuleFactory.h delete mode 100644 Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DThingFactory.h delete mode 100644 Generals/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp delete mode 100644 Generals/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp delete mode 100644 Generals/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DThingFactory.cpp delete mode 100644 Generals/Code/GameEngineDevice/Source/W3DDevice/Common/W3DConvert.cpp diff --git a/Core/GameEngineDevice/CMakeLists.txt b/Core/GameEngineDevice/CMakeLists.txt index 16794e4c043..e7e2f8ecf8f 100644 --- a/Core/GameEngineDevice/CMakeLists.txt +++ b/Core/GameEngineDevice/CMakeLists.txt @@ -1,11 +1,11 @@ set(GAMEENGINEDEVICE_SRC Include/MilesAudioDevice/MilesAudioManager.h Include/VideoDevice/Bink/BinkVideoPlayer.h -# Include/W3DDevice/Common/W3DConvert.h -# Include/W3DDevice/Common/W3DFunctionLexicon.h -# Include/W3DDevice/Common/W3DModuleFactory.h + Include/W3DDevice/Common/W3DConvert.h + Include/W3DDevice/Common/W3DFunctionLexicon.h + Include/W3DDevice/Common/W3DModuleFactory.h Include/W3DDevice/Common/W3DRadar.h -# Include/W3DDevice/Common/W3DThingFactory.h + Include/W3DDevice/Common/W3DThingFactory.h Include/W3DDevice/GameClient/BaseHeightMap.h # Include/W3DDevice/GameClient/camerashakesystem.h Include/W3DDevice/GameClient/FlatHeightMap.h @@ -93,11 +93,11 @@ set(GAMEENGINEDEVICE_SRC Include/Win32Device/GameClient/Win32Mouse.h Source/MilesAudioDevice/MilesAudioManager.cpp Source/VideoDevice/Bink/BinkVideoPlayer.cpp -# Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp + Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp Source/W3DDevice/Common/System/W3DRadar.cpp -# Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp -# Source/W3DDevice/Common/Thing/W3DThingFactory.cpp -# Source/W3DDevice/Common/W3DConvert.cpp + Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp + Source/W3DDevice/Common/Thing/W3DThingFactory.cpp + Source/W3DDevice/Common/W3DConvert.cpp Source/W3DDevice/GameClient/BaseHeightMap.cpp Source/W3DDevice/GameClient/CameraShakeSystem.cpp Source/W3DDevice/GameClient/Drawable/Draw/W3DDebrisDraw.cpp diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/Common/W3DConvert.h b/Core/GameEngineDevice/Include/W3DDevice/Common/W3DConvert.h similarity index 100% rename from GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/Common/W3DConvert.h rename to Core/GameEngineDevice/Include/W3DDevice/Common/W3DConvert.h diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/Common/W3DFunctionLexicon.h b/Core/GameEngineDevice/Include/W3DDevice/Common/W3DFunctionLexicon.h similarity index 100% rename from GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/Common/W3DFunctionLexicon.h rename to Core/GameEngineDevice/Include/W3DDevice/Common/W3DFunctionLexicon.h diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/Common/W3DModuleFactory.h b/Core/GameEngineDevice/Include/W3DDevice/Common/W3DModuleFactory.h similarity index 100% rename from GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/Common/W3DModuleFactory.h rename to Core/GameEngineDevice/Include/W3DDevice/Common/W3DModuleFactory.h diff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/Common/W3DThingFactory.h b/Core/GameEngineDevice/Include/W3DDevice/Common/W3DThingFactory.h similarity index 100% rename from GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/Common/W3DThingFactory.h rename to Core/GameEngineDevice/Include/W3DDevice/Common/W3DThingFactory.h diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp b/Core/GameEngineDevice/Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp similarity index 100% rename from GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp rename to Core/GameEngineDevice/Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp b/Core/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp similarity index 100% rename from GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp rename to Core/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DThingFactory.cpp b/Core/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DThingFactory.cpp similarity index 100% rename from GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DThingFactory.cpp rename to Core/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DThingFactory.cpp diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/W3DConvert.cpp b/Core/GameEngineDevice/Source/W3DDevice/Common/W3DConvert.cpp similarity index 100% rename from GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/W3DConvert.cpp rename to Core/GameEngineDevice/Source/W3DDevice/Common/W3DConvert.cpp diff --git a/Generals/Code/GameEngineDevice/CMakeLists.txt b/Generals/Code/GameEngineDevice/CMakeLists.txt index a0c6091420c..39fc007d68f 100644 --- a/Generals/Code/GameEngineDevice/CMakeLists.txt +++ b/Generals/Code/GameEngineDevice/CMakeLists.txt @@ -1,11 +1,11 @@ set(GAMEENGINEDEVICE_SRC # Include/MilesAudioDevice/MilesAudioManager.h # Include/VideoDevice/Bink/BinkVideoPlayer.h - Include/W3DDevice/Common/W3DConvert.h - Include/W3DDevice/Common/W3DFunctionLexicon.h - Include/W3DDevice/Common/W3DModuleFactory.h +# Include/W3DDevice/Common/W3DConvert.h +# Include/W3DDevice/Common/W3DFunctionLexicon.h +# Include/W3DDevice/Common/W3DModuleFactory.h # Include/W3DDevice/Common/W3DRadar.h - Include/W3DDevice/Common/W3DThingFactory.h +# Include/W3DDevice/Common/W3DThingFactory.h # Include/W3DDevice/GameClient/HeightMap.h # Include/W3DDevice/GameClient/Module/W3DDebrisDraw.h # Include/W3DDevice/GameClient/Module/W3DDefaultDraw.h @@ -79,11 +79,11 @@ set(GAMEENGINEDEVICE_SRC # Include/Win32Device/GameClient/Win32Mouse.h # Source/MilesAudioDevice/MilesAudioManager.cpp # Source/VideoDevice/Bink/BinkVideoPlayer.cpp - Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp +# Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp # Source/W3DDevice/Common/System/W3DRadar.cpp - Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp - Source/W3DDevice/Common/Thing/W3DThingFactory.cpp - Source/W3DDevice/Common/W3DConvert.cpp +# Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp +# Source/W3DDevice/Common/Thing/W3DThingFactory.cpp +# Source/W3DDevice/Common/W3DConvert.cpp # Source/W3DDevice/GameClient/Drawable/Draw/W3DDebrisDraw.cpp # Source/W3DDevice/GameClient/Drawable/Draw/W3DDefaultDraw.cpp # Source/W3DDevice/GameClient/Drawable/Draw/W3DDependencyModelDraw.cpp diff --git a/Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DConvert.h b/Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DConvert.h deleted file mode 100644 index f964eb5c917..00000000000 --- a/Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DConvert.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -** Command & Conquer Generals(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 . -*/ - -//////////////////////////////////////////////////////////////////////////////// -// // -// (c) 2001-2003 Electronic Arts Inc. // -// // -//////////////////////////////////////////////////////////////////////////////// - -//============================================================================== -// -// Westwood Studios Pacific. -// -// Confidential Information -// Copyright (C) 2001 - All Rights Reserved -// -//============================================================================= -// -// Project: RTS3 -// -// File name: W3DConvert.h -// -// Created: Colin Day, April 2001 -// -//============================================================================= - -#pragma once - -//============================================================================= -// Includes -//============================================================================= -#include "Lib/BaseType.h" - -//============================================================================= -// Forward References -//============================================================================= -extern void W3DLogicalScreenToPixelScreen( Real logX, Real logY, - Int *screenX, Int *screenY, - Int screenWidth, Int screenHeight ); -extern void PixelScreenToW3DLogicalScreen( Int screenX, Int screenY, - Real *logX, Real *logY, - Int screenWidth, Int screenHeight ); - -//============================================================================= -// Type Defines -//============================================================================= diff --git a/Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DFunctionLexicon.h b/Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DFunctionLexicon.h deleted file mode 100644 index cca4969ce3f..00000000000 --- a/Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DFunctionLexicon.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -** Command & Conquer Generals(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 . -*/ - -//////////////////////////////////////////////////////////////////////////////// -// // -// (c) 2001-2003 Electronic Arts Inc. // -// // -//////////////////////////////////////////////////////////////////////////////// - -// FILE: W3DFunctionLexicon.h ///////////////////////////////////////////////////////////////////// -// Created: Colin Day, September 2001 -// Desc: Function lexicon for w3d specific function pointers -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "Common/FunctionLexicon.h" - -//------------------------------------------------------------------------------------------------- -/** The function lexicon that can also contain w3d device methods */ -//------------------------------------------------------------------------------------------------- -class W3DFunctionLexicon : public FunctionLexicon -{ - -public: - - W3DFunctionLexicon(); - virtual ~W3DFunctionLexicon() override; - - virtual void init() override; - virtual void reset() override; - virtual void update() override; - -protected: - -}; diff --git a/Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DModuleFactory.h b/Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DModuleFactory.h deleted file mode 100644 index 150d8667265..00000000000 --- a/Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DModuleFactory.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -** Command & Conquer Generals(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 . -*/ - -//////////////////////////////////////////////////////////////////////////////// -// // -// (c) 2001-2003 Electronic Arts Inc. // -// // -//////////////////////////////////////////////////////////////////////////////// - -// FILE: W3DModuleFactory.h /////////////////////////////////////////////////////////////////////// -// Author: Steven Johnson, September 2001 -// Colin Day, November 2001 -// Desc: W3D game logic class, there shouldn't be a lot of new functionality -// in this class, but there are certain things that need to have close -// knowledge of each other like ther logical and visual terrain -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#pragma once - -// INCLUDES /////////////////////////////////////////////////////////////////////////////////////// -#include "Common/ModuleFactory.h" - -//------------------------------------------------------------------------------------------------- -/** W3D specific functionality for the module factory */ -//------------------------------------------------------------------------------------------------- -class W3DModuleFactory : public ModuleFactory -{ - -public: - - virtual void init() override; - -}; diff --git a/Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DThingFactory.h b/Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DThingFactory.h deleted file mode 100644 index d21e02d4395..00000000000 --- a/Generals/Code/GameEngineDevice/Include/W3DDevice/Common/W3DThingFactory.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -** Command & Conquer Generals(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 . -*/ - -//////////////////////////////////////////////////////////////////////////////// -// // -// (c) 2001-2003 Electronic Arts Inc. // -// // -//////////////////////////////////////////////////////////////////////////////// - -// FILE: W3DThingFactory.h //////////////////////////////////////////////////////////////////////// -// Author: Colin Day, February 2002 -// Desc: Device dependent thing factory access, for things like post processing the -// Thing database where we might want to look at device dependent stuff like -// model info and such -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#pragma once - -// USER INCLUDES ////////////////////////////////////////////////////////////////////////////////// -#include "Common/ThingFactory.h" - -//------------------------------------------------------------------------------------------------- -//------------------------------------------------------------------------------------------------- -class W3DThingFactory : public ThingFactory -{ - -public: - - W3DThingFactory(); - virtual ~W3DThingFactory() override; -}; diff --git a/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp b/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp deleted file mode 100644 index 51274860953..00000000000 --- a/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp +++ /dev/null @@ -1,170 +0,0 @@ -/* -** Command & Conquer Generals(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 . -*/ - -//////////////////////////////////////////////////////////////////////////////// -// // -// (c) 2001-2003 Electronic Arts Inc. // -// // -//////////////////////////////////////////////////////////////////////////////// - -// FILE: W3DFunctionLexicon.cpp /////////////////////////////////////////////////////////////////// -// Created: Colin Day, September 2001 -// Desc: Function lexicon for w3d specific function pointers -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#include - -#include "GameClient/GameWindow.h" -#include "W3DDevice/Common/W3DFunctionLexicon.h" -#include "W3DDevice/GameClient/W3DGUICallbacks.h" -#include "W3DDevice/GameClient/W3DGameWindow.h" -#include "W3DDevice/GameClient/W3DGadget.h" - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// PRIVATE DATA -/////////////////////////////////////////////////////////////////////////////////////////////////// - -// Game Window draw methods ----------------------------------------------------------------------- -static FunctionLexicon::TableEntry gameWinDrawTable [] = -{ - - { NAMEKEY_INVALID, "GameWinDefaultDraw", (void*)GameWinDefaultDraw }, - { NAMEKEY_INVALID, "W3DGameWinDefaultDraw", (void*)W3DGameWinDefaultDraw }, - - { NAMEKEY_INVALID, "W3DGadgetPushButtonDraw", (void*)W3DGadgetPushButtonDraw }, - { NAMEKEY_INVALID, "W3DGadgetPushButtonImageDraw", (void*)W3DGadgetPushButtonImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetCheckBoxDraw", (void*)W3DGadgetCheckBoxDraw }, - { NAMEKEY_INVALID, "W3DGadgetCheckBoxImageDraw", (void*)W3DGadgetCheckBoxImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetRadioButtonDraw", (void*)W3DGadgetRadioButtonDraw }, - { NAMEKEY_INVALID, "W3DGadgetRadioButtonImageDraw", (void*)W3DGadgetRadioButtonImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetTabControlDraw", (void*)W3DGadgetTabControlDraw }, - { NAMEKEY_INVALID, "W3DGadgetTabControlImageDraw", (void*)W3DGadgetTabControlImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetListBoxDraw", (void*)W3DGadgetListBoxDraw }, - { NAMEKEY_INVALID, "W3DGadgetListBoxImageDraw", (void*)W3DGadgetListBoxImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetComboBoxDraw", (void*)W3DGadgetComboBoxDraw }, - { NAMEKEY_INVALID, "W3DGadgetComboBoxImageDraw", (void*)W3DGadgetComboBoxImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetHorizontalSliderDraw", (void*)W3DGadgetHorizontalSliderDraw }, - { NAMEKEY_INVALID, "W3DGadgetHorizontalSliderImageDraw", (void*)W3DGadgetHorizontalSliderImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetVerticalSliderDraw", (void*)W3DGadgetVerticalSliderDraw }, - { NAMEKEY_INVALID, "W3DGadgetVerticalSliderImageDraw", (void*)W3DGadgetVerticalSliderImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetProgressBarDraw", (void*)W3DGadgetProgressBarDraw }, - { NAMEKEY_INVALID, "W3DGadgetProgressBarImageDraw", (void*)W3DGadgetProgressBarImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetStaticTextDraw", (void*)W3DGadgetStaticTextDraw }, - { NAMEKEY_INVALID, "W3DGadgetStaticTextImageDraw", (void*)W3DGadgetStaticTextImageDraw }, - { NAMEKEY_INVALID, "W3DGadgetTextEntryDraw", (void*)W3DGadgetTextEntryDraw }, - { NAMEKEY_INVALID, "W3DGadgetTextEntryImageDraw", (void*)W3DGadgetTextEntryImageDraw }, - - { NAMEKEY_INVALID, "W3DLeftHUDDraw", (void*)W3DLeftHUDDraw }, - { NAMEKEY_INVALID, "W3DCameoMovieDraw", (void*)W3DCameoMovieDraw }, - { NAMEKEY_INVALID, "W3DRightHUDDraw", (void*)W3DRightHUDDraw }, - { NAMEKEY_INVALID, "W3DPowerDraw", (void*)W3DPowerDraw }, - { NAMEKEY_INVALID, "W3DMainMenuDraw", (void*)W3DMainMenuDraw }, - { NAMEKEY_INVALID, "W3DMainMenuFourDraw", (void*)W3DMainMenuFourDraw }, - { NAMEKEY_INVALID, "W3DMetalBarMenuDraw", (void*)W3DMetalBarMenuDraw }, - { NAMEKEY_INVALID, "W3DCreditsMenuDraw", (void*)W3DCreditsMenuDraw }, - { NAMEKEY_INVALID, "W3DClockDraw", (void*)W3DClockDraw }, - { NAMEKEY_INVALID, "W3DMainMenuMapBorder", (void*)W3DMainMenuMapBorder }, - { NAMEKEY_INVALID, "W3DMainMenuButtonDropShadowDraw", (void*)W3DMainMenuButtonDropShadowDraw }, - { NAMEKEY_INVALID, "W3DMainMenuRandomTextDraw", (void*)W3DMainMenuRandomTextDraw }, - { NAMEKEY_INVALID, "W3DThinBorderDraw", (void*)W3DThinBorderDraw }, - { NAMEKEY_INVALID, "W3DShellMenuSchemeDraw", (void*)W3DShellMenuSchemeDraw }, - { NAMEKEY_INVALID, "W3DCommandBarBackgroundDraw", (void*)W3DCommandBarBackgroundDraw }, - { NAMEKEY_INVALID, "W3DCommandBarTopDraw", (void*)W3DCommandBarTopDraw }, - { NAMEKEY_INVALID, "W3DCommandBarGenExpDraw", (void*)W3DCommandBarGenExpDraw }, - { NAMEKEY_INVALID, "W3DCommandBarHelpPopupDraw", (void*)W3DCommandBarHelpPopupDraw }, - - { NAMEKEY_INVALID, "W3DCommandBarGridDraw", (void*)W3DCommandBarGridDraw }, - - - { NAMEKEY_INVALID, "W3DCommandBarForegroundDraw", (void*)W3DCommandBarForegroundDraw }, - { NAMEKEY_INVALID, "W3DNoDraw", (void*)W3DNoDraw }, - { NAMEKEY_INVALID, "W3DDrawMapPreview", (void*)W3DDrawMapPreview }, - - { NAMEKEY_INVALID, nullptr, nullptr } - -}; - -// Game Window init methods ----------------------------------------------------------------------- -static FunctionLexicon::TableEntry layoutInitTable [] = -{ - - { NAMEKEY_INVALID, "W3DMainMenuInit", (void*)W3DMainMenuInit }, - - { NAMEKEY_INVALID, nullptr, nullptr } - -}; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// PUBLIC FUNCTIONS -/////////////////////////////////////////////////////////////////////////////////////////////////// - -//------------------------------------------------------------------------------------------------- -//------------------------------------------------------------------------------------------------- -W3DFunctionLexicon::W3DFunctionLexicon() -{ - -} - -//------------------------------------------------------------------------------------------------- -//------------------------------------------------------------------------------------------------- -W3DFunctionLexicon::~W3DFunctionLexicon() -{ - -} - -//------------------------------------------------------------------------------------------------- -/** Initialize the function table specific for our implementations of - * the w3d device */ -//------------------------------------------------------------------------------------------------- -void W3DFunctionLexicon::init() -{ - - // extend functionality - FunctionLexicon::init(); - - // load our own tables - loadTable( gameWinDrawTable, TABLE_GAME_WIN_DEVICEDRAW ); - loadTable( layoutInitTable, TABLE_WIN_LAYOUT_DEVICEINIT ); - -} - -//------------------------------------------------------------------------------------------------- -/** Reset */ -//------------------------------------------------------------------------------------------------- -void W3DFunctionLexicon::reset() -{ - - // Pay attention to the order of what happens in the base class as you reset - - // extend - FunctionLexicon::reset(); - -} - -//------------------------------------------------------------------------------------------------- -/** Update */ -//------------------------------------------------------------------------------------------------- -void W3DFunctionLexicon::update() -{ - - // extend? - FunctionLexicon::update(); - -} - - diff --git a/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp b/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp deleted file mode 100644 index 981fe518ef0..00000000000 --- a/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* -** Command & Conquer Generals(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 . -*/ - -//////////////////////////////////////////////////////////////////////////////// -// // -// (c) 2001-2003 Electronic Arts Inc. // -// // -//////////////////////////////////////////////////////////////////////////////// - -// FILE: W3DModuleFactory.cpp ///////////////////////////////////////////////////////////////////// -// Author: Colin Day, April 2001 -// Desc: W3D specific module -/////////////////////////////////////////////////////////////////////////////////////////////////// - -// INCLUDES /////////////////////////////////////////////////////////////////////////////////////// -#include "W3DDevice/Common/W3DModuleFactory.h" -#include "W3DDevice/GameClient/Module/W3DDebrisDraw.h" -#include "W3DDevice/GameClient/Module/W3DDefaultDraw.h" -#include "W3DDevice/GameClient/Module/W3DDependencyModelDraw.h" -#include "W3DDevice/GameClient/Module/W3DModelDraw.h" -#include "W3DDevice/GameClient/Module/W3DLaserDraw.h" -#include "W3DDevice/GameClient/Module/W3DOverlordTankDraw.h" -#include "W3DDevice/GameClient/Module/W3DOverlordTruckDraw.h" -#include "W3DDevice/GameClient/Module/W3DOverlordAircraftDraw.h" -#include "W3DDevice/GameClient/Module/W3DPoliceCarDraw.h" -#include "W3DDevice/GameClient/Module/W3DProjectileStreamDraw.h" -#include "W3DDevice/GameClient/Module/W3DRopeDraw.h" -#include "W3DDevice/GameClient/Module/W3DSupplyDraw.h" -#include "W3DDevice/GameClient/Module/W3DScienceModelDraw.h" -#include "W3DDevice/GameClient/Module/W3DTankDraw.h" -#include "W3DDevice/GameClient/Module/W3DTruckDraw.h" -#include "W3DDevice/GameClient/Module/W3DTankTruckDraw.h" -#include "W3DDevice/GameClient/Module/W3DTracerDraw.h" -#include "W3DDevice/GameClient/Module/W3DTreeDraw.h" -#include "W3DDevice/GameClient/Module/W3DPropDraw.h" - -//------------------------------------------------------------------------------------------------- -/** Initialize method */ -//------------------------------------------------------------------------------------------------- -void W3DModuleFactory::init() -{ - - // extending functionality - ModuleFactory::init(); - - // add the specific module templates we need for the draw methods - addModule( W3DDefaultDraw ); - addModule( W3DDebrisDraw ); - addModule( W3DModelDraw ); - addModule( W3DLaserDraw ); - addModule( W3DOverlordTankDraw ); - addModule( W3DOverlordTruckDraw ); - addModule( W3DOverlordAircraftDraw ); - addModule( W3DProjectileStreamDraw ); - addModule( W3DPoliceCarDraw ); - addModule( W3DRopeDraw ); - addModule( W3DScienceModelDraw ); - addModule( W3DSupplyDraw ); - addModule( W3DDependencyModelDraw ); - addModule( W3DTankDraw ); - addModule( W3DTruckDraw ); - addModule( W3DTracerDraw ); - addModule( W3DTankTruckDraw ); - addModule( W3DTreeDraw ); - addModule( W3DPropDraw ); - -} diff --git a/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DThingFactory.cpp b/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DThingFactory.cpp deleted file mode 100644 index 51b6295f4e9..00000000000 --- a/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/Thing/W3DThingFactory.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* -** Command & Conquer Generals(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 . -*/ - -//////////////////////////////////////////////////////////////////////////////// -// // -// (c) 2001-2003 Electronic Arts Inc. // -// // -//////////////////////////////////////////////////////////////////////////////// - -// FILE: W3DThingFactory.cpp ////////////////////////////////////////////////////////////////////// -// Author: Colin Day, February 2002 -// Desc: Device dependent thing factory access, for things like post processing the -// Thing database where we might want to look at device dependent stuff like -// model info and such -/////////////////////////////////////////////////////////////////////////////////////////////////// - -// USER INCLUDES ////////////////////////////////////////////////////////////////////////////////// -#include "W3DDevice/Common/W3DThingFactory.h" - -//------------------------------------------------------------------------------------------------- -//------------------------------------------------------------------------------------------------- -W3DThingFactory::W3DThingFactory() -{ - -} - -//------------------------------------------------------------------------------------------------- -//------------------------------------------------------------------------------------------------- -W3DThingFactory::~W3DThingFactory() -{ - -} - diff --git a/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/W3DConvert.cpp b/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/W3DConvert.cpp deleted file mode 100644 index f32700d30e7..00000000000 --- a/Generals/Code/GameEngineDevice/Source/W3DDevice/Common/W3DConvert.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* -** Command & Conquer Generals(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 . -*/ - -//////////////////////////////////////////////////////////////////////////////// -// // -// (c) 2001-2003 Electronic Arts Inc. // -// // -//////////////////////////////////////////////////////////////////////////////// - -//============================================================================= -// -// Westwood Studios Pacific. -// -// Confidential Information -// Copyright (C) 2001 - All Rights Reserved -// -//============================================================================= -// -// Project: RTS3 -// -// File name: W3DConvert.cpp -// -// Created: Colin Day, April 2001 -// -//============================================================================= - -//============================================================================= -// Includes -//============================================================================= -#include "W3DDevice/Common/W3DConvert.h" - -//============================================================================= -// Externals -//============================================================================= - -//============================================================================= -// Defines -//============================================================================= - -//============================================================================= -// Private Types -//============================================================================= - -//============================================================================= -// Private Data -//============================================================================= - -//============================================================================= -// Public Data -//============================================================================= - -//============================================================================= -// Private Prototypes -//============================================================================= - -//============================================================================= -// Private Functions -//============================================================================= - -//============================================================================= -// Public Functions -//============================================================================= - -//============================================================================= -// W3DLogicalScreenToPixelScreen -//============================================================================= -/** Translate a W3D logical pixel coord with (-1,-1) at the lower left and - * (1,1) at the upper right to a pixel screen coord with (0,0) at the - * upper left */ -//============================================================================= -void W3DLogicalScreenToPixelScreen( Real logX, Real logY, - Int *screenX, Int *screenY, - Int screenWidth, Int screenHeight ) -{ - *screenX = REAL_TO_INT((screenWidth * (logX + 1.0f)) / 2.0f); - *screenY = REAL_TO_INT((screenHeight * (-logY + 1.0f)) / 2.0f); - -} - -//============================================================================= -// PixelScreenToW3DLogicalScreen -//============================================================================= -/** Translate a pixel coord with (0,0) at the upper left to the W3D logical - * coord system used with (-1,-1) in the lower left corner and (1,1) the - * upper right corner */ -//============================================================================= -void PixelScreenToW3DLogicalScreen( Int screenX, Int screenY, - Real *logX, Real *logY, - Int screenWidth, Int screenHeight ) -{ - - *logX = ((2.0f * screenX) / (Real)screenWidth) - 1.0f; - *logY = -(((2.0f * screenY) / (Real)screenHeight) - 1.0f); - -} diff --git a/GeneralsMD/Code/GameEngineDevice/CMakeLists.txt b/GeneralsMD/Code/GameEngineDevice/CMakeLists.txt index 0d50b778371..9a5def66a92 100644 --- a/GeneralsMD/Code/GameEngineDevice/CMakeLists.txt +++ b/GeneralsMD/Code/GameEngineDevice/CMakeLists.txt @@ -1,11 +1,11 @@ set(GAMEENGINEDEVICE_SRC # Include/MilesAudioDevice/MilesAudioManager.h # Include/VideoDevice/Bink/BinkVideoPlayer.h - Include/W3DDevice/Common/W3DConvert.h - Include/W3DDevice/Common/W3DFunctionLexicon.h - Include/W3DDevice/Common/W3DModuleFactory.h +# Include/W3DDevice/Common/W3DConvert.h +# Include/W3DDevice/Common/W3DFunctionLexicon.h +# Include/W3DDevice/Common/W3DModuleFactory.h # Include/W3DDevice/Common/W3DRadar.h - Include/W3DDevice/Common/W3DThingFactory.h +# Include/W3DDevice/Common/W3DThingFactory.h # Include/W3DDevice/GameClient/BaseHeightMap.h # Include/W3DDevice/GameClient/camerashakesystem.h # Include/W3DDevice/GameClient/FlatHeightMap.h @@ -91,11 +91,11 @@ set(GAMEENGINEDEVICE_SRC # Include/Win32Device/GameClient/Win32Mouse.h # Source/MilesAudioDevice/MilesAudioManager.cpp # Source/VideoDevice/Bink/BinkVideoPlayer.cpp - Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp +# Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp # Source/W3DDevice/Common/System/W3DRadar.cpp - Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp - Source/W3DDevice/Common/Thing/W3DThingFactory.cpp - Source/W3DDevice/Common/W3DConvert.cpp +# Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp +# Source/W3DDevice/Common/Thing/W3DThingFactory.cpp +# Source/W3DDevice/Common/W3DConvert.cpp # Source/W3DDevice/GameClient/BaseHeightMap.cpp # Source/W3DDevice/GameClient/camerashakesystem.cpp # Source/W3DDevice/GameClient/Drawable/Draw/W3DDebrisDraw.cpp diff --git a/scripts/cpp/unify_move_files.py b/scripts/cpp/unify_move_files.py index 9e45615c370..51eeb3fa863 100644 --- a/scripts/cpp/unify_move_files.py +++ b/scripts/cpp/unify_move_files.py @@ -667,6 +667,15 @@ def main(): #unify_file(Game.ZEROHOUR, "GameEngine/Source/GameClient/GUI/GUICallbacks/MessageBox.cpp", Game.CORE, "GameEngine/Source/GameClient/GUI/GUICallbacks/MessageBox.cpp") #unify_file(Game.ZEROHOUR, "GameEngine/Source/GameClient/GUI/GUICallbacks/ReplayControls.cpp", Game.CORE, "GameEngine/Source/GameClient/GUI/GUICallbacks/ReplayControls.cpp") + #unify_file(Game.ZEROHOUR, "GameEngineDevice/Include/W3DDevice/Common/W3DFunctionLexicon.h", Game.CORE, "GameEngineDevice/Include/W3DDevice/Common/W3DFunctionLexicon.h") + #unify_file(Game.ZEROHOUR, "GameEngineDevice/Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp", Game.CORE, "GameEngineDevice/Source/W3DDevice/Common/System/W3DFunctionLexicon.cpp") + #unify_file(Game.ZEROHOUR, "GameEngineDevice/Include/W3DDevice/Common/W3DModuleFactory.h", Game.CORE, "GameEngineDevice/Include/W3DDevice/Common/W3DModuleFactory.h") + #unify_file(Game.ZEROHOUR, "GameEngineDevice/Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp", Game.CORE, "GameEngineDevice/Source/W3DDevice/Common/Thing/W3DModuleFactory.cpp") + #unify_file(Game.ZEROHOUR, "GameEngineDevice/Include/W3DDevice/Common/W3DThingFactory.h", Game.CORE, "GameEngineDevice/Include/W3DDevice/Common/W3DThingFactory.h") + #unify_file(Game.ZEROHOUR, "GameEngineDevice/Source/W3DDevice/Common/Thing/W3DThingFactory.cpp", Game.CORE, "GameEngineDevice/Source/W3DDevice/Common/Thing/W3DThingFactory.cpp") + #unify_file(Game.ZEROHOUR, "GameEngineDevice/Include/W3DDevice/Common/W3DConvert.h", Game.CORE, "GameEngineDevice/Include/W3DDevice/Common/W3DConvert.h") + #unify_file(Game.ZEROHOUR, "GameEngineDevice/Source/W3DDevice/Common/W3DConvert.cpp", Game.CORE, "GameEngineDevice/Source/W3DDevice/Common/W3DConvert.cpp") + return