Attempt for reproducible builds

* ducible.exe is built with v140_xp toolset and /arch:SSE.

Code edits to Interface.cpp.

* to avoid error C3068 for Debug config in VS2010.
This commit is contained in:
NovaRain
2023-04-17 10:09:21 +08:00
parent 576bea2aa9
commit 291370a96c
5 changed files with 39 additions and 6 deletions
+1
View File
@@ -26,6 +26,7 @@
*.exe
*.out
*.app
!ducible.exe
# NetBeans
nbproject/private/
+7 -6
View File
@@ -238,7 +238,7 @@ static void AddNewDot() {
}
static void __declspec(naked) DrawingDots() {
long x_offset, y_offset;
long x_offset, y_offset;
__asm {
mov ebp, esp; // prolog
sub esp, __LOCAL_SIZE;
@@ -250,12 +250,13 @@ static void __declspec(naked) DrawingDots() {
x_offset = 22 - *fo::ptr::wmWorldOffsetX;
y_offset = 21 - *fo::ptr::wmWorldOffsetY;
for (std::vector<DotPosition>::const_iterator it = dots.begin(); it != dots.end(); ++it) { // redraws all dots
if (it->x < *fo::ptr::wmWorldOffsetX || it->y < *fo::ptr::wmWorldOffsetY) continue; // the pixel is out of viewport
if (it->x > *fo::ptr::wmWorldOffsetX + wmapViewPortWidth || it->y > *fo::ptr::wmWorldOffsetY + wmapViewPortHeight) continue;
for (size_t i = 0; i < dots.size(); i++) { // redraws all dots
const DotPosition dot = dots[i];
if (dot.x < *fo::ptr::wmWorldOffsetX || dot.y < *fo::ptr::wmWorldOffsetY) continue; // the pixel is out of viewport
if (dot.x > *fo::ptr::wmWorldOffsetX + wmapViewPortWidth || dot.y > *fo::ptr::wmWorldOffsetY + wmapViewPortHeight) continue;
long wmPixelX = (it->x + x_offset);
long wmPixelY = (it->y + y_offset);
long wmPixelX = (dot.x + x_offset);
long wmPixelY = (dot.y + y_offset);
wmPixelY *= wmapWinWidth;
BIN
View File
Binary file not shown.
+21
View File
@@ -0,0 +1,21 @@
@ECHO OFF
rem debug, release, etc.
SET type=%1
rem full path to the compiled DLL
SET target=%2
SET destination=C:\Games\Fallout2\ddraw.dll
SET pdb="%~dpn2.pdb"
IF EXIST ducible.exe (
IF EXIST %pdb% (
ducible %target% %pdb%
) ELSE (
ducible %target%
)
)
rem echo Copying %target% to %destination% ...
rem copy %target% %destination%
+10
View File
@@ -7,5 +7,15 @@ SET target=%2
SET destination=d:\GAMES\Fallout2\@RP\ddraw.dll
SET pdb="%~dpn2.pdb"
IF EXIST ducible.exe (
IF EXIST %pdb% (
ducible %target% %pdb%
) ELSE (
ducible %target%
)
)
echo Copying %target% to %destination% ...
copy %target% %destination%