From 4d04a86bdfb84cce7fbb510c9d831295bcc3a224 Mon Sep 17 00:00:00 2001 From: "Marco Antonio J. Costa" Date: Wed, 22 Jul 2026 15:01:48 -0300 Subject: [PATCH] drop the non-editor screen stubs the editor never contributes editscreen.cpp and LoadScreen.cpp each end in an "#else //non-editor version" branch defining EditScreenInit/Handle/Shutdown and the LoadSaveScreen trio. jascreens.cpp defines the same six under "#ifndef JA2EDITOR", so a non-editor build compiles both. Nothing linked the editor copies. The map file for JA2.exe resolves all six to JA2_Ja2:jascreens.cpp.obj, link.exe having taken the first archive that answered and never pulled the other. lld-link pulls both and calls it what it is: six duplicate symbols. The two sets are not identical -- the editor Handle stubs return ERROR_SCREEN where jascreens returns TRUE -- so this removes the copies that lose, leaving the behaviour the linked image already had. --- Editor/LoadScreen.cpp | 21 --------------------- Editor/editscreen.cpp | 21 --------------------- 2 files changed, 42 deletions(-) diff --git a/Editor/LoadScreen.cpp b/Editor/LoadScreen.cpp index 4cd76d65e..eaccf839a 100644 --- a/Editor/LoadScreen.cpp +++ b/Editor/LoadScreen.cpp @@ -1263,25 +1263,4 @@ BOOLEAN ExternalSaveMap(STR16 szFilename) return(TRUE); } -#else //non-editor version - -#include "types.h" -#include "screenids.h" - -UINT32 LoadSaveScreenInit() -{ - return TRUE ; -} - -UINT32 LoadSaveScreenHandle( ) -{ - //If this screen ever gets set, then this is a bad thing -- endless loop - return ERROR_SCREEN ; -} - -UINT32 LoadSaveScreenShutdown( ) -{ - return TRUE ; -} - #endif diff --git a/Editor/editscreen.cpp b/Editor/editscreen.cpp index 759a30c55..31c21680c 100644 --- a/Editor/editscreen.cpp +++ b/Editor/editscreen.cpp @@ -4638,25 +4638,4 @@ BOOLEAN FindLight(INT32 iGridNo, INT8 bLightType, UINT8 *pubLightRadius, UINT8 * return(FALSE); } -#else //non-editor version - -#include "types.h" -#include "screenids.h" - -UINT32 EditScreenInit() -{ - return TRUE ; -} - -UINT32 EditScreenHandle( ) -{ - //If this screen ever gets set, then this is a bad thing -- endless loop - return ERROR_SCREEN ; -} - -UINT32 EditScreenShutdown( ) -{ - return TRUE ; -} - #endif