Skip to content

Commit

Permalink
Fixed macro redefinition in Float.cpp (Windows only bug).
Browse files Browse the repository at this point in the history
Note:
As a result of redefinition, objects inside the world are located incorrectly.
For Windows, you need to use the definitions from the header which is in the SDK.
  • Loading branch information
tx00100xt committed Jan 3, 2023
1 parent 35ebe88 commit 7060d48
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,8 @@ All notable changes to this project will be documented in this file.
- Fixed incorrect x64 cpp-implementation of ASM code in lightmap.
- Fixed 64-bit issues in the World Editor. Now the 64-bit version of the World Editor works.
- Fixed levels load from subdirectory (for Windows).

## 2023-01-02
- Fixed macro redefinition in Float.cpp (Windows only bug).
(Note: As a result of redefinition, objects inside the world are located incorrectly.
For Windows, you need to use the definitions from the header which is in the SDK).
5 changes: 5 additions & 0 deletions SamTFE/Sources/Engine/Math/Float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,

#include <Engine/Math/Float.h>

// Note: macro redefinition for _MSC_VER
// As a result of redefinition, objects inside the world are located incorrectly.
// For Windows, you need to use the definitions from the header which is in the SDK.
#if (!defined _MSC_VER)
#define MCW_PC 0x0300
#define _MCW_PC MCW_PC
#define _PC_24 0x0000
#define _PC_53 0x0200
#define _PC_64 0x0300
#endif

// !!! FIXME: I'd like to remove any dependency on the FPU control word from the game, asap. --ryan.
#if (defined _MSC_VER)
Expand Down
5 changes: 5 additions & 0 deletions SamTSE/Sources/Engine/Math/Float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,

#include <Engine/Math/Float.h>

// Note: macro redefinition for _MSC_VER
// As a result of redefinition, objects inside the world are located incorrectly.
// For Windows, you need to use the definitions from the header which is in the SDK.
#if (!defined _MSC_VER)
#define MCW_PC 0x0300
#define _MCW_PC MCW_PC
#define _PC_24 0x0000
#define _PC_53 0x0200
#define _PC_64 0x0300
#endif

// !!! FIXME: I'd like to remove any dependency on the FPU control word from the game, asap. --ryan.
#if (defined _MSC_VER)
Expand Down

0 comments on commit 7060d48

Please sign in to comment.