Skip to content

Commit 2350488

Browse files
committed
refactor(memory): Move memory pool size arrays into separate source files (#1408)
1 parent 7f5f713 commit 2350488

File tree

9 files changed

+1410
-1324
lines changed

9 files changed

+1410
-1324
lines changed

Core/GameEngine/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,10 @@ if(RTS_GAMEMEMORY_ENABLE)
11411141
list(APPEND GAMEENGINE_SRC
11421142
# Source/Common/System/GameMemory.cpp
11431143
# Source/Common/System/GameMemoryInit.cpp
1144+
# Source/Common/System/GameMemoryInitDMA_Generals.inl
1145+
# Source/Common/System/GameMemoryInitDMA_GeneralsMD.inl
1146+
# Source/Common/System/GameMemoryInitPools_Generals.inl
1147+
# Source/Common/System/GameMemoryInitPools_GeneralsMD.inl
11441148
)
11451149
else()
11461150
# Uses the null implementation when disabled.

Generals/Code/GameEngine/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,8 @@ if(RTS_GAMEMEMORY_ENABLE)
10611061
# Uses the original Game Memory implementation.
10621062
list(APPEND GAMEENGINE_SRC
10631063
Source/Common/System/GameMemory.cpp
1064+
Source/Common/System/GameMemoryInitDMA_Generals.inl
1065+
Source/Common/System/GameMemoryInitPools_Generals.inl
10641066
Source/Common/System/MemoryInit.cpp
10651067
)
10661068
else()
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
** Command & Conquer Generals(tm)
3+
** Copyright 2025 TheSuperHackers
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+
static const PoolInitRec DefaultDMA[] =
20+
{
21+
// name, allocSize, initialCount, overflowCount
22+
{ "dmaPool_16", 16, 65536, 1024 },
23+
{ "dmaPool_32", 32, 150000, 1024 },
24+
{ "dmaPool_64", 64, 60000, 1024 },
25+
{ "dmaPool_128", 128, 32768, 1024 },
26+
{ "dmaPool_256", 256, 8192, 1024 },
27+
{ "dmaPool_512", 512, 8192, 1024 },
28+
{ "dmaPool_1024", 1024, 24000, 1024 }
29+
};

0 commit comments

Comments
 (0)