Skip to content

Commit bcde3ed

Browse files
committed
revert: Keep 3 GameClient files in Generals/MD to avoid PR conflicts
Reverting unification to avoid conflicts with: - PR #654 (tomsons26): Cleans up inconsistencies - PR #688 (tomsons26): Backports various things from ZH Files reverted: Color.h, Mouse.h, Color.cpp
1 parent 686952b commit bcde3ed

File tree

9 files changed

+687
-9
lines changed

9 files changed

+687
-9
lines changed

Core/GameEngine/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ set(GAMEENGINE_SRC
146146
# Include/GameClient/ChallengeGenerals.h
147147
# Include/GameClient/ClientInstance.h
148148
Include/GameClient/ClientRandomValue.h
149-
Include/GameClient/Color.h
149+
#Include/GameClient/Color.h
150150
# Include/GameClient/CommandXlat.h
151151
# Include/GameClient/ControlBar.h
152152
Include/GameClient/ControlBarResizer.h
@@ -208,7 +208,7 @@ set(GAMEENGINE_SRC
208208
Include/GameClient/Module/AnimatedParticleSysBoneClientUpdate.h
209209
Include/GameClient/Module/BeaconClientUpdate.h
210210
Include/GameClient/Module/SwayClientUpdate.h
211-
Include/GameClient/Mouse.h
211+
#Include/GameClient/Mouse.h
212212
# Include/GameClient/ParabolicEase.h
213213
# Include/GameClient/ParticleSys.h
214214
# Include/GameClient/PlaceEventTranslator.h
@@ -687,7 +687,7 @@ set(GAMEENGINE_SRC
687687
# Source/Common/version.cpp
688688
Source/Common/WorkerProcess.cpp
689689
# Source/GameClient/ClientInstance.cpp
690-
Source/GameClient/Color.cpp
690+
#Source/GameClient/Color.cpp
691691
# Source/GameClient/Credits.cpp
692692
# Source/GameClient/Display.cpp
693693
# Source/GameClient/DisplayString.cpp

Generals/Code/GameEngine/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ set(GAMEENGINE_SRC
136136
#Include/GameClient/CDCheck.h
137137
Include/GameClient/ClientInstance.h
138138
# Include/GameClient/ClientRandomValue.h
139-
#Include/GameClient/Color.h
139+
Include/GameClient/Color.h
140140
Include/GameClient/CommandXlat.h
141141
Include/GameClient/ControlBar.h
142142
#Include/GameClient/ControlBarResizer.h
@@ -198,7 +198,7 @@ set(GAMEENGINE_SRC
198198
#Include/GameClient/Module/AnimatedParticleSysBoneClientUpdate.h
199199
#Include/GameClient/Module/BeaconClientUpdate.h
200200
#Include/GameClient/Module/SwayClientUpdate.h
201-
#Include/GameClient/Mouse.h
201+
Include/GameClient/Mouse.h
202202
Include/GameClient/ParticleSys.h
203203
Include/GameClient/PlaceEventTranslator.h
204204
#Include/GameClient/ProcessAnimateWindow.h
@@ -639,7 +639,7 @@ set(GAMEENGINE_SRC
639639
Source/Common/version.cpp
640640
# Source/Common/WorkerProcess.cpp
641641
Source/GameClient/ClientInstance.cpp
642-
#Source/GameClient/Color.cpp
642+
Source/GameClient/Color.cpp
643643
Source/GameClient/Credits.cpp
644644
Source/GameClient/Display.cpp
645645
Source/GameClient/DisplayString.cpp
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
** Command & Conquer Generals(tm)
3+
** Copyright 2025 Electronic Arts Inc.
4+
**
5+
** This program is free software: you can redistribute it and/or modify
6+
** it under the terms of the GNU General Public License as published by
7+
** the Free Software Foundation, either version 3 of the License, or
8+
** (at your option) any later version.
9+
**
10+
** This program is distributed in the hope that it will be useful,
11+
** but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
** GNU General Public License for more details.
14+
**
15+
** You should have received a copy of the GNU General Public License
16+
** along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
////////////////////////////////////////////////////////////////////////////////
20+
// //
21+
// (c) 2001-2003 Electronic Arts Inc. //
22+
// //
23+
////////////////////////////////////////////////////////////////////////////////
24+
25+
// FILE: Color.h //////////////////////////////////////////////////////////////
26+
//-----------------------------------------------------------------------------
27+
//
28+
// Westwood Studios Pacific.
29+
//
30+
// Confidential Information
31+
// Copyright (C) 2001 - All Rights Reserved
32+
//
33+
//-----------------------------------------------------------------------------
34+
//
35+
// Project: RTS3
36+
//
37+
// File name: Color.h
38+
//
39+
// Created: Colin Day, July 2001
40+
//
41+
// Desc: Management of color representations
42+
//
43+
//-----------------------------------------------------------------------------
44+
///////////////////////////////////////////////////////////////////////////////
45+
46+
#pragma once
47+
48+
// SYSTEM INCLUDES ////////////////////////////////////////////////////////////
49+
50+
// USER INCLUDES //////////////////////////////////////////////////////////////
51+
#include "Lib/BaseType.h"
52+
53+
// FORWARD REFERENCES /////////////////////////////////////////////////////////
54+
55+
// TYPE DEFINES ///////////////////////////////////////////////////////////////
56+
enum { GAME_COLOR_UNDEFINED = 0x00FFFFFF }; // this is white with zero alpha... safe to use!
57+
58+
/** @todo we need real color representation, this is just palce holder so we
59+
can more easily identify sections of the code that need it */
60+
typedef Int Color;
61+
62+
// INLINING ///////////////////////////////////////////////////////////////////
63+
64+
// EXTERNALS //////////////////////////////////////////////////////////////////
65+
66+
inline Color GameMakeColor( UnsignedByte red, UnsignedByte green, UnsignedByte blue, UnsignedByte alpha )
67+
{
68+
return (alpha << 24) | (red << 16) | (green << 8) | (blue);
69+
}
70+
71+
extern void GameGetColorComponents( Color color,
72+
UnsignedByte *red,
73+
UnsignedByte *green,
74+
UnsignedByte *blue,
75+
UnsignedByte *alpha );
76+
77+
// Put on ice until later - M Lorenzen
78+
//extern void GameGetColorComponentsWithCheatSpy( Color color,
79+
// UnsignedByte *red,
80+
// UnsignedByte *green,
81+
// UnsignedByte *blue,
82+
// UnsignedByte *alpha );
83+
84+
85+
extern void GameGetColorComponentsReal( Color color, Real *red, Real *green, Real *blue, Real *alpha );
86+
87+
extern Color GameDarkenColor( Color color, Int percent = 10 );

0 commit comments

Comments
 (0)