Skip to content

Commit

Permalink
Merge pull request DescentDevelopers#131 from pzychotic/fix-release-b…
Browse files Browse the repository at this point in the history
…uild

Fixed Release build
  • Loading branch information
JeodC authored Apr 24, 2024
2 parents a597f43 + 3daf5b2 commit 5b2b4f2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ endif()

if(UNIX AND NOT APPLE)
message("Building for Linux")
add_definitions( -D_DEBUG -D__LINUX__ -DLINUX -D_MAX_PATH=260 -D_MAX_FNAME=256 -D_REENRANT -D__32BIT__ -DHAVEALLOCA_H -D_USE_OGL_ACTIVE_TEXTURES)
add_definitions(-D__LINUX__ -DLINUX -D_MAX_PATH=260 -D_MAX_FNAME=256 -D_REENRANT -D__32BIT__ -DHAVEALLOCA_H -D_USE_OGL_ACTIVE_TEXTURES)
set(PLATFORM_INCLUDES "lib/linux" ${SDL_INCLUDE_DIR})
endif()

if(APPLE)
message("Building for MAC OSX")
add_definitions(-D_DEBUG -D__LINUX__ -DLINUX -D_MAX_PATH=260 -D_MAX_FNAME=256 -D_REENRANT -DMACOSX=1 -D_USE_OGL_ACTIVE_TEXTURES)
add_definitions(-D__LINUX__ -DLINUX -D_MAX_PATH=260 -D_MAX_FNAME=256 -D_REENRANT -DMACOSX=1 -D_USE_OGL_ACTIVE_TEXTURES)
set(PLATFORM_INCLUDES "lib/linux" ${SDL_INCLUDE_DIR} "/usr/X11/include")
endif()

Expand Down Expand Up @@ -111,6 +111,9 @@ if(WIN32)
endif()
endif()

add_compile_definitions($<$<CONFIG:Release>:RELEASE>)
add_compile_definitions($<$<CONFIG:Debug>:_DEBUG>)

find_package(ZLIB REQUIRED)

if(LOGGER)
Expand Down
2 changes: 1 addition & 1 deletion Descent3/render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ void BuildRoomListSub(int start_room_num, clip_wnd *wnd, int depth) {
}

ASSERT(N_render_rooms < MAX_RENDER_ROOMS);
#ifdef _DEBUG
#ifndef RELEASE
Mine_depth++;
#endif
Rooms_visited[start_room_num] = 1;
Expand Down
2 changes: 2 additions & 0 deletions Descent3/winmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -625,10 +625,12 @@ int PASCAL HandledWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR szCmdLine,
d3 = new oeD3Win32App(OEAPP_CONSOLE, (HInstance)hInst);
} else {
unsigned int flags = OEAPP_FULLSCREEN;
#ifndef RELEASE // TODO: remove #ifndef when window mode is ready for primetime
if (FindArg("-windowed")) {
// switch to windowed mode instead
flags = OEAPP_WINDOWED;
}
#endif

d3 = new oeD3Win32App(flags, (HInstance)hInst);
}
Expand Down
2 changes: 1 addition & 1 deletion model/polymodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2052,7 +2052,7 @@ extern int paged_in_num;
int LoadPolyModel(char *filename, int pageable) {
char name[256];
char fname[256], pname[256], extname[256];
int i, polynum;
int i, polynum = -1;
CFILE *infile = NULL;
int overlay = 0;

Expand Down

0 comments on commit 5b2b4f2

Please sign in to comment.