Merge pull request #131 from pzychotic/fix-release-build

Fixed Release build
This commit is contained in:
Jeod 2024-04-24 14:45:57 -04:00 committed by GitHub
commit 5b2b4f2f5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 4 deletions

View File

@ -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()
@ -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)

View File

@ -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;

View File

@ -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);
}

View File

@ -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;