mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
Move the remaining header build switches into the build system
Same reasoning as builddefines.h: BMP_RANDOM, CALLBACKTIMER, WINDOWED_MODE and the three multiplayer switches are build configuration, and a header is the wrong place to keep them. None of the six was ever toggled from source -- they were unconditional #defines, or in WINDOWED_MODE's case keyed off _DEBUG. WINDOWED_MODE now keys off the Debug configuration rather than _DEBUG. That is the same thing in an ordinary Debug build, and fixes the asan Debug build, which links the release CRT and so never saw _DEBUG at all. All twelve executables stay bit-identical, this time with no differing bytes to explain away at all. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
committed by
majcosta
co-authored by
Claude Opus 5
parent
1c9cf24421
commit
0a5ce33c08
+18
-1
@@ -106,6 +106,21 @@ add_compile_definitions(
|
||||
ROBOT_ALWAYS_READY
|
||||
# keep Assert() live in configurations that would otherwise compile it out
|
||||
FORCE_ASSERTS_ON
|
||||
# sgp/random.h: the 32-bit PRNG. Turning this off returns the old generator,
|
||||
# which only ever yields 2^15 distinct values -- it breaks big maps and
|
||||
# invalidates saves.
|
||||
BMP_RANDOM
|
||||
# Utils/Timer Control.h
|
||||
CALLBACKTIMER
|
||||
|
||||
# Multiplayer (WANNE), formerly Multiplayer/connect.h.
|
||||
# Interrupts stay off in COOP: AI interrupts computed on a pure client are
|
||||
# still wrong. This also drops the server-side ALT+E "override turn" dialog,
|
||||
# which should no longer be needed.
|
||||
DISABLE_MP_INTERRUPTS_IN_COOP
|
||||
# r5623 workaround for the enemy AI deadlocking on a pure-client interrupt
|
||||
INTERRUPT_MP_DEADLOCK_FIX
|
||||
ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV
|
||||
)
|
||||
|
||||
# ja2export utility
|
||||
@@ -199,7 +214,9 @@ ValidateOptions("${ValidApplications}" "Applications" "${Applications}" "Applica
|
||||
|
||||
|
||||
# preprocessor definitions for Debug build, per the legacy MSBuild
|
||||
set(debugFlags $<IF:$<CONFIG:Debug>,JA2BETAVERSION;JA2TESTVERSION;DEBUG_ATTACKBUSY,>)
|
||||
# WINDOWED_MODE was keyed off _DEBUG in Ja2/local.h, which an asan Debug build
|
||||
# does not get: it links the release CRT (see CMAKE_MSVC_RUNTIME_LIBRARY above).
|
||||
set(debugFlags $<IF:$<CONFIG:Debug>,JA2BETAVERSION;JA2TESTVERSION;DEBUG_ATTACKBUSY;WINDOWED_MODE,>)
|
||||
|
||||
foreach(app IN LISTS ApplicationTargets)
|
||||
set(isEditor $<STREQUAL:${app},JA2MAPEDITOR>)
|
||||
|
||||
@@ -18,14 +18,6 @@
|
||||
// Basic defines for the video manager. These represent the starting values
|
||||
//
|
||||
|
||||
#ifdef BOUNDS_CHECKER
|
||||
#define WINDOWED_MODE
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define WINDOWED_MODE
|
||||
#endif
|
||||
|
||||
extern UINT16 SCREEN_WIDTH;
|
||||
extern UINT16 SCREEN_HEIGHT;
|
||||
|
||||
|
||||
@@ -149,17 +149,6 @@ extern char cServerName[30];
|
||||
//OJW - 20081224
|
||||
#define MAX_CONNECT_RETRIES 5
|
||||
|
||||
// WANNE: Completly disable interrupts in a multiplayer COOP game (see TeamTurns.cpp::StandardInterruptConditionsMet), because we still have problems in the code with AI interrupts calculated on the pure client
|
||||
// This also disabled the "override turn" dialog, which would be displayed on the server by pressing ALT + E, because it should not be needed anymore
|
||||
#define DISABLE_MP_INTERRUPTS_IN_COOP
|
||||
|
||||
// WANNE: After some MP-Tests: It seems there are still problems with enemy interupt and if this define is enabled the ALT + E (give turn to client) does not work either. So I disabled this define for now ...
|
||||
// WANNE: If this define is enabled, it hopefully fixes the "enemy AI got stuck on pure client interrupt". (this "fix" was added in revision 5623)
|
||||
#define INTERRUPT_MP_DEADLOCK_FIX
|
||||
|
||||
// WANNE: This features seems to work without any errors, so it is enabled :)
|
||||
#define ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV
|
||||
|
||||
#define ENABLE_COLLISION (is_server && pBullet->ubFirerID<120) || (!is_server && is_client && pBullet->ubFirerID<20) || (!is_server && !is_client)
|
||||
extern bool auto_retry;
|
||||
extern int giNumTries;
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#ifndef __TIMER_CONTROL_H
|
||||
#define __TIMER_CONTROL_H
|
||||
|
||||
#ifndef CALLBACKTIMER
|
||||
#define CALLBACKTIMER
|
||||
#endif
|
||||
|
||||
typedef INT32 TIMECOUNTER;
|
||||
|
||||
//typedef void (__stdcall *JA2_TIMERPROC)( UINT32 uiID, UINT32 uiMsg, UINT32 uiUser, UINT32 uiDw1, UINT32 uiDw2 );
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef __RANDOM_
|
||||
#define __RANDOM_
|
||||
|
||||
#define BMP_RANDOM
|
||||
|
||||
#include "types.h"
|
||||
#include "DEBUG.H"
|
||||
#include "GameSettings.h"
|
||||
|
||||
Reference in New Issue
Block a user