Tell the compiler which max() and min() to use
This fixes an error with the build server's version of mingw that was not finding max() or min()
This commit is contained in:
@@ -6,7 +6,7 @@ WINDRES = $(PREFIX)windres
|
||||
RES = Blades_of_Exile_Scenario_Editor_private.res
|
||||
OBJ = buttonmg.o dlogtool.o global.o graphutl.o keydlgs.o tfileio.o townout.o edsound.o graphics.o scenario.o blscened.o tactions.o $(RES)
|
||||
LINKOBJ = buttonmg.o dlogtool.o global.o graphutl.o keydlgs.o tfileio.o townout.o edsound.o graphics.o scenario.o blscened.o tactions.o $(RES)
|
||||
LIBS = -mwindows -lwinmm --strip-all -static-libgcc -static-libstdc++
|
||||
LIBS = -mwindows -lwinmm -static-libgcc -static-libstdc++
|
||||
INCS = -I"include"
|
||||
CXXINCS =
|
||||
BIN = "Blades of Exile Scenario Editor.exe"
|
||||
|
@@ -1,5 +1,6 @@
|
||||
|
||||
#include <windows.h>
|
||||
#include <algorithm>
|
||||
|
||||
#define ND 15
|
||||
#define NI 500
|
||||
@@ -494,12 +495,12 @@ BOOL CALLBACK dummy_dialog_proc (HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||
edit_box[l] = CreateWindow("edit",NULL,WS_CHILD | WS_BORDER | WS_VISIBLE | ES_AUTOVSCROLL,
|
||||
item_rect[free_item].left,item_rect[free_item].top,
|
||||
item_rect[free_item].right - item_rect[free_item].left,
|
||||
max(22,item_rect[free_item].bottom - item_rect[free_item].top),
|
||||
std::max<short>(22,item_rect[free_item].bottom - item_rect[free_item].top),
|
||||
dlgs[free_slot],(HMENU)150,store_hInstance,NULL);
|
||||
else edit_box[l] = CreateWindow("edit",NULL,WS_CHILD | WS_BORDER | WS_VISIBLE | ES_MULTILINE | ES_AUTOVSCROLL,
|
||||
item_rect[free_item].left,item_rect[free_item].top,
|
||||
item_rect[free_item].right - item_rect[free_item].left,
|
||||
max(22,item_rect[free_item].bottom - item_rect[free_item].top),
|
||||
std::max<short>(22,item_rect[free_item].bottom - item_rect[free_item].top),
|
||||
dlgs[free_slot],(HMENU)150,store_hInstance,NULL);
|
||||
num_text_boxes++;
|
||||
store_edit_parent[l] = dlgs[free_slot];
|
||||
@@ -516,8 +517,8 @@ BOOL CALLBACK dummy_dialog_proc (HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||
}
|
||||
break;
|
||||
}
|
||||
win_height = max(win_height, item_rect[free_item].bottom + 28);
|
||||
win_width = max(win_width, item_rect[free_item].right + 11);
|
||||
win_height = std::max<short>(win_height, item_rect[free_item].bottom + 28);
|
||||
win_width = std::max<short>(win_width, item_rect[free_item].right + 11);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include <windows.h>
|
||||
#include <algorithm>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -1509,8 +1510,8 @@ Boolean handle_keystroke(WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
if (store_ter != current_terrain_type)
|
||||
draw_terrain();
|
||||
mouse_button_held = FALSE;
|
||||
|
||||
mouse_button_held = FALSE;
|
||||
|
||||
return are_done;
|
||||
}
|
||||
|
||||
@@ -1540,8 +1541,8 @@ Boolean where_lit[64][64];
|
||||
l.x = i; l.y = j;
|
||||
rad = scenario.ter_types[t_d.terrain[i][j]].light_radius;
|
||||
if (rad > 0) {
|
||||
for (where.x = max(0,i - rad); where.x < min(max_dim[town_type],i + rad + 1); where.x++)
|
||||
for (where.y = max(0,j - rad); where.y < min(max_dim[town_type],j + rad + 1); where.y++)
|
||||
for (where.x = std::max<short>(0,i - rad); where.x < std::min<short>(max_dim[town_type],i + rad + 1); where.x++)
|
||||
for (where.y = std::max<short>(0,j - rad); where.y < std::min<short>(max_dim[town_type],j + rad + 1); where.y++)
|
||||
if ((where_lit[where.x][where.y] == 0) && (dist(where,l) <= rad) && (can_see(l,where,0) < 5))
|
||||
where_lit[where.x][where.y] = 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user