diff -Nru mupen64plus-video-glide64-2.0.0/debian/bzr-builder.manifest mupen64plus-video-glide64-2.0.0/debian/bzr-builder.manifest --- mupen64plus-video-glide64-2.0.0/debian/bzr-builder.manifest 2017-09-21 04:46:29.000000000 +0000 +++ mupen64plus-video-glide64-2.0.0/debian/bzr-builder.manifest 2017-09-23 05:03:34.000000000 +0000 @@ -1,3 +1,3 @@ -# bzr-builder format 0.3 deb-version {debupstream}-2+r104~1 -lp:~random-stuff/mupen64plus/mupen64plus-video-glide64 revid:git-v1:bf6258e7f1042f870a932d5ab8c896b292014b17 +# bzr-builder format 0.3 deb-version {debupstream}-2+r105~1 +lp:~random-stuff/mupen64plus/mupen64plus-video-glide64 revid:git-v1:0da93e7ab21c8e7a4902c08d380b93237b3ecfc4 nest packaging lp:~random-stuff/mupen64plus/mupen64plus-video-glide64-debian debian revid:sergio_br2@yahoo.com.br-20150420055809-5wtct3x8y38tly9d diff -Nru mupen64plus-video-glide64-2.0.0/debian/changelog mupen64plus-video-glide64-2.0.0/debian/changelog --- mupen64plus-video-glide64-2.0.0/debian/changelog 2017-09-21 04:46:29.000000000 +0000 +++ mupen64plus-video-glide64-2.0.0/debian/changelog 2017-09-23 05:03:34.000000000 +0000 @@ -1,8 +1,8 @@ -mupen64plus-video-glide64 (2.0.0-2+r104~1~ubuntu14.04.1) trusty; urgency=low +mupen64plus-video-glide64 (2.0.0-2+r105~1~ubuntu14.04.1) trusty; urgency=low * Auto build. - -- Launchpad Package Builder Thu, 21 Sep 2017 04:46:29 +0000 + -- Launchpad Package Builder Sat, 23 Sep 2017 05:03:34 +0000 mupen64plus-video-glide64 (2.0.0-2ubuntu3) UNRELEASED; urgency=low diff -Nru mupen64plus-video-glide64-2.0.0/.pc/.quilt_patches mupen64plus-video-glide64-2.0.0/.pc/.quilt_patches --- mupen64plus-video-glide64-2.0.0/.pc/.quilt_patches 2017-09-21 04:46:29.000000000 +0000 +++ mupen64plus-video-glide64-2.0.0/.pc/.quilt_patches 2017-09-23 05:03:35.000000000 +0000 @@ -1 +1 @@ -/home/buildd/build-RECIPEBRANCHBUILD-1452793/chroot-autobuild/home/buildd/work/tree/mupen64plus-video-glide64-2.0.0/debian/patches +/home/buildd/build-RECIPEBRANCHBUILD-1453987/chroot-autobuild/home/buildd/work/tree/mupen64plus-video-glide64-2.0.0/debian/patches diff -Nru mupen64plus-video-glide64-2.0.0/.pc/.quilt_series mupen64plus-video-glide64-2.0.0/.pc/.quilt_series --- mupen64plus-video-glide64-2.0.0/.pc/.quilt_series 2017-09-21 04:46:29.000000000 +0000 +++ mupen64plus-video-glide64-2.0.0/.pc/.quilt_series 2017-09-23 05:03:35.000000000 +0000 @@ -1 +1 @@ -/home/buildd/build-RECIPEBRANCHBUILD-1452793/chroot-autobuild/home/buildd/work/tree/mupen64plus-video-glide64-2.0.0/debian/patches/series +/home/buildd/build-RECIPEBRANCHBUILD-1453987/chroot-autobuild/home/buildd/work/tree/mupen64plus-video-glide64-2.0.0/debian/patches/series diff -Nru mupen64plus-video-glide64-2.0.0/src/rdp.cpp mupen64plus-video-glide64-2.0.0/src/rdp.cpp --- mupen64plus-video-glide64-2.0.0/src/rdp.cpp 2017-09-21 04:46:28.000000000 +0000 +++ mupen64plus-video-glide64-2.0.0/src/rdp.cpp 2017-09-23 05:03:34.000000000 +0000 @@ -522,10 +522,10 @@ GR_BLEND_ZERO); rdp.update |= UPDATE_COMBINE; - float scale_x_dst = (float)settings.scr_res_x / rdp.vi_width;//(float)max(rdp.frame_buffers[rdp.main_ci_index].width, rdp.ci_width); - float scale_y_dst = (float)settings.scr_res_y / rdp.vi_height;//(float)max(rdp.frame_buffers[rdp.main_ci_index].height, rdp.ci_lower_bound); - float scale_x_src = (float)rdp.vi_width / (float)settings.scr_res_x;//(float)max(rdp.frame_buffers[rdp.main_ci_index].width, rdp.ci_width); - float scale_y_src = (float)rdp.vi_height / (float)settings.scr_res_y;//(float)max(rdp.frame_buffers[rdp.main_ci_index].height, rdp.ci_lower_bound); + float scale_x_dst = (float)settings.scr_res_x / rdp.vi_width;//(float)std::max(rdp.frame_buffers[rdp.main_ci_index].width, rdp.ci_width); + float scale_y_dst = (float)settings.scr_res_y / rdp.vi_height;//(float)std::max(rdp.frame_buffers[rdp.main_ci_index].height, rdp.ci_lower_bound); + float scale_x_src = (float)rdp.vi_width / (float)settings.scr_res_x;//(float)std::max(rdp.frame_buffers[rdp.main_ci_index].width, rdp.ci_width); + float scale_y_src = (float)rdp.vi_height / (float)settings.scr_res_y;//(float)std::max(rdp.frame_buffers[rdp.main_ci_index].height, rdp.ci_lower_bound); int src_width = d_lr_x - d_ul_x + 1; int src_height = d_lr_y - d_ul_y + 1; int dst_width, dst_height, ul_x, ul_y; @@ -746,8 +746,8 @@ } else { - float scale_x = (float)settings.scr_res_x / rdp.vi_width;//(float)max(rdp.frame_buffers[rdp.main_ci_index].width, rdp.ci_width); - float scale_y = (float)settings.scr_res_y / rdp.vi_height;//(float)max(rdp.frame_buffers[rdp.main_ci_index].height, rdp.ci_lower_bound); + float scale_x = (float)settings.scr_res_x / rdp.vi_width;//(float)std::max(rdp.frame_buffers[rdp.main_ci_index].width, rdp.ci_width); + float scale_y = (float)settings.scr_res_y / rdp.vi_height;//(float)std::max(rdp.frame_buffers[rdp.main_ci_index].height, rdp.ci_lower_bound); FRDP("width: %d, height: %d, ul_y: %d, lr_y: %d, scale_x: %f, scale_y: %f, ci_width: %d, ci_height: %d\n",width, height, rdp.ci_upper_bound, rdp.ci_lower_bound, scale_x, scale_y, rdp.ci_width, rdp.ci_height); GrLfbInfo_t info; @@ -943,7 +943,7 @@ rdp.model_i = 0; // 0 matrices so far in stack //stack_size can be less then 32! Important for Silicon Vally. Thanks Orkin! - rdp.model_stack_size = min(32, (*(DWORD*)(gfx.DMEM+0x0FE4))>>6); + rdp.model_stack_size = std::min((DWORD) 32, (*(DWORD*)(gfx.DMEM+0x0FE4))>>6); if (rdp.model_stack_size == 0) rdp.model_stack_size = 32; rdp.fb_drawn = rdp.fb_drawn_front = FALSE; @@ -2284,10 +2284,10 @@ rdp.update |= UPDATE_ZBUF_ENABLED; if (settings.fb_depth_clear) { - ul_x = min(max(ul_x, rdp.scissor_o.ul_x), rdp.scissor_o.lr_x); - lr_x = min(max(lr_x, rdp.scissor_o.ul_x), rdp.scissor_o.lr_x); - ul_y = min(max(ul_y, rdp.scissor_o.ul_y), rdp.scissor_o.lr_y); - lr_y = min(max(lr_y, rdp.scissor_o.ul_y), rdp.scissor_o.lr_y); + ul_x = std::min(std::max(ul_x, rdp.scissor_o.ul_x), rdp.scissor_o.lr_x); + lr_x = std::min(std::max(lr_x, rdp.scissor_o.ul_x), rdp.scissor_o.lr_x); + ul_y = std::min(std::max(ul_y, rdp.scissor_o.ul_y), rdp.scissor_o.lr_y); + lr_y = std::min(std::max(lr_y, rdp.scissor_o.ul_y), rdp.scissor_o.lr_y); //FIXME:unused? DWORD zi_height = lr_y - ul_y - 1; // rdp.zi_nb_pixels = rdp.zi_width * zi_height; rdp.zi_lry = lr_y - 1; @@ -2349,10 +2349,10 @@ rdp.scissor.lr_y); // KILL the floating point error with 0.01f - DWORD s_ul_x = (DWORD)min(max(ul_x * rdp.scale_x + rdp.offset_x + 0.01f, rdp.scissor.ul_x), rdp.scissor.lr_x); - DWORD s_lr_x = (DWORD)min(max(lr_x * rdp.scale_x + rdp.offset_x + 0.01f, rdp.scissor.ul_x), rdp.scissor.lr_x); - DWORD s_ul_y = (DWORD)min(max(ul_y * rdp.scale_y + rdp.offset_y + 0.01f, rdp.scissor.ul_y), rdp.scissor.lr_y); - DWORD s_lr_y = (DWORD)min(max(lr_y * rdp.scale_y + rdp.offset_y + 0.01f, rdp.scissor.ul_y), rdp.scissor.lr_y); + DWORD s_ul_x = std::min(std::max((DWORD) (ul_x * rdp.scale_x + rdp.offset_x + 0.01f), rdp.scissor.ul_x), rdp.scissor.lr_x); + DWORD s_lr_x = std::min(std::max((DWORD) (lr_x * rdp.scale_x + rdp.offset_x + 0.01f), rdp.scissor.ul_x), rdp.scissor.lr_x); + DWORD s_ul_y = std::min(std::max((DWORD) (ul_y * rdp.scale_y + rdp.offset_y + 0.01f), rdp.scissor.ul_y), rdp.scissor.lr_y); + DWORD s_lr_y = std::min(std::max((DWORD) (lr_y * rdp.scale_y + rdp.offset_y + 0.01f), rdp.scissor.ul_y), rdp.scissor.lr_y); if (s_lr_x < 0.0f) s_lr_x = 0; if (s_lr_y < 0.0f) s_lr_y = 0; @@ -2520,7 +2520,7 @@ { rdp.prim_color = rdp.cmd1; rdp.prim_lodmin = (rdp.cmd0 >> 8) & 0xFF; - rdp.prim_lodfrac = max(rdp.cmd0 & 0xFF, rdp.prim_lodmin); + rdp.prim_lodfrac = std::max(rdp.cmd0 & 0xFF, rdp.prim_lodmin); rdp.update |= UPDATE_COMBINE; FRDP("setprimcolor: %08lx, lodmin: %d, lodfrac: %d\n", rdp.cmd1, rdp.prim_lodmin, @@ -2928,7 +2928,7 @@ if (rdp.zimg == rdp.cimg) { rdp.zi_width = rdp.ci_width; - // int zi_height = min((int)rdp.zi_width*3/4, (int)rdp.vi_height); + // int zi_height = std::min((int)rdp.zi_width*3/4, (int)rdp.vi_height); // rdp.zi_words = rdp.zi_width * zi_height; } DWORD format = (rdp.cmd0 >> 21) & 0x7; @@ -3249,10 +3249,10 @@ DWORD shift_l = (a-rdp.cimg) >> 1; DWORD shift_r = shift_l+2; - d_ul_x = min(d_ul_x, shift_l%rdp.ci_width); - d_ul_y = min(d_ul_y, shift_l/rdp.ci_width); - d_lr_x = max(d_lr_x, shift_r%rdp.ci_width); - d_lr_y = max(d_lr_y, shift_r/rdp.ci_width); + d_ul_x = std::min(d_ul_x, shift_l%rdp.ci_width); + d_ul_y = std::min(d_ul_y, shift_l/rdp.ci_width); + d_lr_x = std::max(d_lr_x, shift_r%rdp.ci_width); + d_lr_y = std::max(d_lr_y, shift_r/rdp.ci_width); } @@ -3654,7 +3654,7 @@ rdp.model_i = 0; // 0 matrices so far in stack //stack_size can be less then 32! Important for Silicon Vally. Thanks Orkin! - rdp.model_stack_size = min(32, (*(DWORD*)(gfx.DMEM+0x0FE4))>>6); + rdp.model_stack_size = std::min((DWORD) 32, (*(DWORD*)(gfx.DMEM+0x0FE4))>>6); if (rdp.model_stack_size == 0) rdp.model_stack_size = 32; rdp.fb_drawn = rdp.fb_drawn_front = FALSE; diff -Nru mupen64plus-video-glide64-2.0.0/src/TexBuffer.cpp mupen64plus-video-glide64-2.0.0/src/TexBuffer.cpp --- mupen64plus-video-glide64-2.0.0/src/TexBuffer.cpp 2017-09-21 04:46:28.000000000 +0000 +++ mupen64plus-video-glide64-2.0.0/src/TexBuffer.cpp 2017-09-23 05:03:34.000000000 +0000 @@ -49,9 +49,6 @@ #include #endif // _WIN32 -#define max(a,b) ((a) > (b) ? (a) : (b)) -#define min(a,b) ((a) < (b) ? (a) : (b)) - static HIRES_COLOR_IMAGE * AllocateTextureBuffer(COLOR_IMAGE & cimage) { HIRES_COLOR_IMAGE texbuf; @@ -60,13 +57,13 @@ texbuf.width = cimage.width; texbuf.height = cimage.height; texbuf.format = (WORD)cimage.format; - texbuf.scr_width = min(cimage.width * rdp.scale_x, settings.scr_res_x); - float height = min(rdp.vi_height,cimage.height); + texbuf.scr_width = std::min(cimage.width * rdp.scale_x, (float) settings.scr_res_x); + float height = std::min(rdp.vi_height, (float) cimage.height); if (cimage.status == ci_copy_self || (cimage.status == ci_copy && cimage.width == rdp.frame_buffers[rdp.main_ci_index].width)) height = rdp.vi_height; texbuf.scr_height = height * rdp.scale_y; - WORD max_size = max((WORD)texbuf.scr_width, (WORD)texbuf.scr_height); + WORD max_size = std::max((WORD)texbuf.scr_width, (WORD)texbuf.scr_height); if (max_size > max_tex_size) //texture size is too large return 0; DWORD tex_size; diff -Nru mupen64plus-video-glide64-2.0.0/src/TexCache.cpp mupen64plus-video-glide64-2.0.0/src/TexCache.cpp --- mupen64plus-video-glide64-2.0.0/src/TexCache.cpp 2017-09-21 04:46:28.000000000 +0000 +++ mupen64plus-video-glide64-2.0.0/src/TexCache.cpp 2017-09-23 05:03:34.000000000 +0000 @@ -171,28 +171,28 @@ if ((rdp.tiles[tile].clamp_s && tile_width <= 256) || (mask_width > 256)) { // loading width - width = min(mask_width, tile_width); + width = std::min(mask_width, tile_width); // actual width rdp.tiles[tile].width = tile_width; } else { // wrap all the way - width = min(mask_width, tile_width); // changed from mask_width only + width = std::min(mask_width, tile_width); // changed from mask_width only rdp.tiles[tile].width = width; } if ((rdp.tiles[tile].clamp_t && tile_height <= 256) || (mask_height > 256)) { // loading height - height = min(mask_height, tile_height); + height = std::min(mask_height, tile_height); // actual height rdp.tiles[tile].height = tile_height; } else { // wrap all the way - height = min(mask_height, tile_height); + height = std::min(mask_height, tile_height); rdp.tiles[tile].height = height; } } @@ -206,7 +206,7 @@ if ((rdp.tiles[tile].clamp_s && tile_width <= 256) || (mask_width > 256)) { // loading width - width = min(mask_width, tile_width); + width = std::min(mask_width, tile_width); // actual width rdp.tiles[tile].width = tile_width; } @@ -220,7 +220,7 @@ if ((rdp.tiles[tile].clamp_t && tile_height <= 256) || (mask_height > 256)) { // loading height - height = min(mask_height, tile_height); + height = std::min(mask_height, tile_height); // actual height rdp.tiles[tile].height = tile_height; } @@ -280,7 +280,7 @@ // Texture too big for tmem & needs to wrap? (trees in mm) - if (settings.wrap_big_tex && (rdp.tiles[tile].t_mem + min(height, tile_height) * (rdp.tiles[tile].line<<3) > 4096)) + if (settings.wrap_big_tex && (rdp.tiles[tile].t_mem + std::min(height, tile_height) * (rdp.tiles[tile].line<<3) > 4096)) { RDP ("TEXTURE WRAPS TMEM!!! "); @@ -318,7 +318,7 @@ crc = 0xFFFFFFFF; // unsigned __int64 * addr = (unsigned __int64 *)&rdp.tmem[rdp.tiles[tile].t_mem]; BYTE * addr = rdp.tmem + (rdp.tiles[tile].t_mem<<3); - DWORD line2 = max(line,1); + DWORD line2 = std::max(line,1); line2 <<= 3; for (int y = 0; y < height; y++) { @@ -975,7 +975,7 @@ } // Calculate the maximum size - int size_max = max (size_x, size_y); + int size_max = std::max(size_x, size_y); DWORD real_x=size_max, real_y=size_max; switch (size_max) { @@ -1198,11 +1198,11 @@ int min_x, min_y; if (rdp.tiles[td].mask_s != 0) - min_x = min((int)real_x, 1< (b) ? (a) : (b)) -#endif // _WIN32 - static void mod_tex_inter_color_using_factor_CI (DWORD color, DWORD factor) { float percent = factor / 255.0f; @@ -58,9 +53,9 @@ r = (BYTE)((float)((col&0xF800) >> 11) / 31.0f * 255.0f); g = (BYTE)((float)((col&0x07C0) >> 6) / 31.0f * 255.0f); b = (BYTE)((float)((col&0x003E) >> 1) / 31.0f * 255.0f); - r = (BYTE)(min(255, percent_i * r + percent * cr)); - g = (BYTE)(min(255, percent_i * g + percent * cg)); - b = (BYTE)(min(255, percent_i * b + percent * cb)); + r = (BYTE)(std::min(255.0f, percent_i * r + percent * cr)); + g = (BYTE)(std::min(255.0f, percent_i * g + percent * cg)); + b = (BYTE)(std::min(255.0f, percent_i * b + percent * cb)); rdp.pal_8[i] = (WORD)(((WORD)(r >> 3) << 11) | ((WORD)(g >> 3) << 6) | ((WORD)(b >> 3) << 1) | @@ -92,9 +87,9 @@ r = (BYTE)((float)((col&0xF800) >> 11) / 31.0f * 255.0f); g = (BYTE)((float)((col&0x07C0) >> 6) / 31.0f * 255.0f); b = (BYTE)((float)((col&0x003E) >> 1) / 31.0f * 255.0f); - r = (BYTE)(min(255, percent_r_i * r + percent_r * cr)); - g = (BYTE)(min(255, percent_g_i * g + percent_g * cg)); - b = (BYTE)(min(255, percent_b_i * b + percent_b * cb)); + r = (BYTE)(std::min(255.0f, percent_r_i * r + percent_r * cr)); + g = (BYTE)(std::min(255.0f, percent_g_i * g + percent_g * cg)); + b = (BYTE)(std::min(255.0f, percent_b_i * b + percent_b * cb)); rdp.pal_8[i] = (WORD)(((WORD)(r >> 3) << 11) | ((WORD)(g >> 3) << 6) | ((WORD)(b >> 3) << 1) | @@ -120,10 +115,10 @@ r = (BYTE)((float)((col&0xF800) >> 11) / 31.0f * 255.0f); g = (BYTE)((float)((col&0x07C0) >> 6) / 31.0f * 255.0f); b = (BYTE)((float)((col&0x003E) >> 1) / 31.0f * 255.0f); - a = max(0, ca - a); - r = max(0, cr - r); - g = max(0, cg - g); - b = max(0, cb - b); + a = std::max(0, ca - a); + r = std::max(0, cr - r); + g = std::max(0, cg - g); + b = std::max(0, cb - b); rdp.pal_8[i] = (WORD)(((WORD)(r >> 3) << 11) | ((WORD)(g >> 3) << 6) | ((WORD)(b >> 3) << 1) | @@ -152,9 +147,9 @@ percent_r = ((col&0xF800) >> 11) / 31.0f; percent_g = ((col&0x07C0) >> 6) / 31.0f; percent_b = ((col&0x003E) >> 1) / 31.0f; - r = (BYTE)(min((1.0f-percent_r) * cr0 + percent_r * cr1, 255)); - g = (BYTE)(min((1.0f-percent_g) * cg0 + percent_g * cg1, 255)); - b = (BYTE)(min((1.0f-percent_b) * cb0 + percent_b * cb1, 255)); + r = (BYTE)(std::min((1.0f-percent_r) * cr0 + percent_r * cr1, 255.0f)); + g = (BYTE)(std::min((1.0f-percent_g) * cg0 + percent_g * cg1, 255.0f)); + b = (BYTE)(std::min((1.0f-percent_b) * cb0 + percent_b * cb1, 255.0f)); rdp.pal_8[i] = (WORD)(((WORD)(r >> 3) << 11) | ((WORD)(g >> 3) << 6) | ((WORD)(b >> 3) << 1) | @@ -215,9 +210,9 @@ r = (BYTE)((float)((col&0xF800) >> 11) / 31.0f * 255.0f); g = (BYTE)((float)((col&0x07C0) >> 6) / 31.0f * 255.0f); b = (BYTE)((float)((col&0x003E) >> 1) / 31.0f * 255.0f); - r = (BYTE)(min(base + percent_r * r, 255)); - g = (BYTE)(min(base + percent_g * g, 255)); - b = (BYTE)(min(base + percent_b * b, 255)); + r = (BYTE)(std::min(base + percent_r * r, 255.0f)); + g = (BYTE)(std::min(base + percent_g * g, 255.0f)); + b = (BYTE)(std::min(base + percent_b * b, 255.0f)); rdp.pal_8[i] = (WORD)(((WORD)(r >> 3) << 11) | ((WORD)(g >> 3) << 6) | ((WORD)(b >> 3) << 1) | @@ -243,9 +238,9 @@ r = (BYTE)((float)((col&0xF800) >> 11) / 31.0f * 255.0f); g = (BYTE)((float)((col&0x07C0) >> 6) / 31.0f * 255.0f); b = (BYTE)((float)((col&0x003E) >> 1) / 31.0f * 255.0f); - r = min(cr + r, 255); - g = min(cg + g, 255); - b = min(cb + b, 255); + r = std::min(cr + r, 255); + g = std::min(cg + g, 255); + b = std::min(cb + b, 255); rdp.pal_8[i] = (WORD)(((WORD)(r >> 3) << 11) | ((WORD)(g >> 3) << 6) | ((WORD)(b >> 3) << 1) | @@ -270,9 +265,9 @@ r = (BYTE)((float)((col&0xF800) >> 11) / 31.0f * 255.0f); g = (BYTE)((float)((col&0x07C0) >> 6) / 31.0f * 255.0f); b = (BYTE)((float)((col&0x003E) >> 1) / 31.0f * 255.0f); - r = max(r - cr, 0); - g = max(g - cg, 0); - b = max(b - cb, 0); + r = std::max(r - cr, 0); + g = std::max(g - cg, 0); + b = std::max(b - cb, 0); rdp.pal_8[i] = (WORD)(((WORD)(r >> 3) << 11) | ((WORD)(g >> 3) << 6) | ((WORD)(b >> 3) << 1) | @@ -340,9 +335,9 @@ r = (BYTE)((float)((col&0xF800) >> 11) / 31.0f * 255.0f); g = (BYTE)((float)((col&0x07C0) >> 6) / 31.0f * 255.0f); b = (BYTE)((float)((col&0x003E) >> 1) / 31.0f * 255.0f); - r = (BYTE)(min(255, percent_r * r + percent_r_i * cr)); - g = (BYTE)(min(255, percent_g * g + percent_g_i * cg)); - b = (BYTE)(min(255, percent_b * b + percent_b_i * cb)); + r = (BYTE)(std::min(255.0f, percent_r * r + percent_r_i * cr)); + g = (BYTE)(std::min(255.0f, percent_g * g + percent_g_i * cg)); + b = (BYTE)(std::min(255.0f, percent_b * b + percent_b_i * cb)); rdp.pal_8[i] = (WORD)(((WORD)(r >> 3) << 11) | ((WORD)(g >> 3) << 6) | ((WORD)(b >> 3) << 1) | diff -Nru mupen64plus-video-glide64-2.0.0/src/ucode06.h mupen64plus-video-glide64-2.0.0/src/ucode06.h --- mupen64plus-video-glide64-2.0.0/src/ucode06.h 2017-09-21 04:46:28.000000000 +0000 +++ mupen64plus-video-glide64-2.0.0/src/ucode06.h 2017-09-23 05:03:34.000000000 +0000 @@ -38,9 +38,6 @@ // STANDARD DRAWIMAGE - draws a 2d image based on the following structure -#define max(a,b) ((a) > (b) ? (a) : (b)) -#define min(a,b) ((a) < (b) ? (a) : (b)) - void uc6_sprite2d (); typedef struct DRAWIMAGE_t { @@ -170,8 +167,8 @@ float scale_y_src = 1.0f/rdp.scale_y; int src_width = d->imageW; int src_height = d->imageH; - int dst_width = min(int(src_width*scale_x_dst), (int)settings.scr_res_x); - int dst_height = min(int(src_height*scale_y_dst), (int)settings.scr_res_y); + int dst_width = std::min(int(src_width*scale_x_dst), (int)settings.scr_res_x); + int dst_height = std::min(int(src_height*scale_y_dst), (int)settings.scr_res_y); #if 1 if (0 && grFramebufferCopyExt) { @@ -459,7 +456,7 @@ cur_u = min_256_u + 1; // calculate intersection with this point - nlr_v = min (min (cur_wrap_v*d->imageH, (cur_v<imageH, (cur_v<imageW, (cur_u<imageW, (cur_u<u0,(int)vtx[1]->u0); // bah, don't put two mins on one line - min_256 = min(min_256,(int)vtx[2]->u0) >> 8; // or it will be calculated twice + min_256 = std::min((int)vtx[0]->u0,(int)vtx[1]->u0); // bah, don't put two mins on one line + min_256 = std::min(min_256,(int)vtx[2]->u0) >> 8; // or it will be calculated twice - max_256 = max((int)vtx[0]->u0,(int)vtx[1]->u0); // not like it makes much difference - max_256 = max(max_256,(int)vtx[2]->u0) >> 8; // anyway :P + max_256 = std::max((int)vtx[0]->u0,(int)vtx[1]->u0); // not like it makes much difference + max_256 = std::max(max_256,(int)vtx[2]->u0) >> 8; // anyway :P for (cur_256=min_256; cur_256<=max_256; cur_256++) { diff -Nru mupen64plus-video-glide64-2.0.0/src/UcodeFB.h mupen64plus-video-glide64-2.0.0/src/UcodeFB.h --- mupen64plus-video-glide64-2.0.0/src/UcodeFB.h 2017-09-21 04:46:28.000000000 +0000 +++ mupen64plus-video-glide64-2.0.0/src/UcodeFB.h 2017-09-23 05:03:34.000000000 +0000 @@ -336,7 +336,7 @@ { if (rdp.cimg == rdp.main_ci) //switched to main fb again { - cur_fb.height = max(cur_fb.height, rdp.frame_buffers[rdp.main_ci_index].height); + cur_fb.height = std::max(cur_fb.height, rdp.frame_buffers[rdp.main_ci_index].height); rdp.main_ci_index = rdp.ci_count; rdp.main_ci_end = rdp.cimg + ((cur_fb.width * cur_fb.height) << cur_fb.size >> 1); cur_fb.status = ci_main; diff -Nru mupen64plus-video-glide64-2.0.0/src/Util.cpp mupen64plus-video-glide64-2.0.0/src/Util.cpp --- mupen64plus-video-glide64-2.0.0/src/Util.cpp 2017-09-21 04:46:28.000000000 +0000 +++ mupen64plus-video-glide64-2.0.0/src/Util.cpp 2017-09-23 05:03:34.000000000 +0000 @@ -51,9 +51,6 @@ #include #endif // _WIN32 -#define max(a,b) ((a) > (b) ? (a) : (b)) -#define min(a,b) ((a) < (b) ? (a) : (b)) - #define Vj rdp.vtxbuf2[j] #define Vi rdp.vtxbuf2[i] @@ -447,11 +444,11 @@ int index,i,j, min_256,max_256, cur_256,left_256,right_256; float percent; - min_256 = min((int)vtx[0]->u0,(int)vtx[1]->u0); // bah, don't put two mins on one line - min_256 = min(min_256,(int)vtx[2]->u0) >> 8; // or it will be calculated twice + min_256 = std::min((int)vtx[0]->u0,(int)vtx[1]->u0); // bah, don't put two mins on one line + min_256 = std::min(min_256,(int)vtx[2]->u0) >> 8; // or it will be calculated twice - max_256 = max((int)vtx[0]->u0,(int)vtx[1]->u0); // not like it makes much difference - max_256 = max(max_256,(int)vtx[2]->u0) >> 8; // anyway :P + max_256 = std::max((int)vtx[0]->u0,(int)vtx[1]->u0); // not like it makes much difference + max_256 = std::max(max_256,(int)vtx[2]->u0) >> 8; // anyway :P for (cur_256=min_256; cur_256<=max_256; cur_256++) { @@ -833,11 +830,11 @@ lodFactor = lodFactor / n; } long ilod = (long)lodFactor; - int lod_tile = min((int)(log((double)ilod)/log(2.0)), rdp.cur_tile + rdp.mipmap_level); + int lod_tile = std::min((int)(log((double)ilod)/log(2.0)), rdp.cur_tile + rdp.mipmap_level); float lod_fraction = 1.0f; if (lod_tile < rdp.cur_tile + rdp.mipmap_level) { - lod_fraction = max((float)modf(lodFactor / pow(2.0f,lod_tile),&intptr), rdp.prim_lodmin / 255.0f); + lod_fraction = std::max((float)modf(lodFactor / pow(2.0f,lod_tile),&intptr), rdp.prim_lodmin / 255.0f); } float detailmax; if (cmb.dc0_detailmax < 0.5f) @@ -1162,7 +1159,7 @@ { for (i = 0; i < n; i++) { - rdp.vtxbuf[i].f = 1.0f/max(16.0f,rdp.vtxbuf[i].f); + rdp.vtxbuf[i].f = 1.0f/std::max(16.0f,rdp.vtxbuf[i].f); } } @@ -1339,10 +1336,10 @@ rdp.update ^= UPDATE_SCISSOR; // KILL the floating point error with 0.01f - rdp.scissor.ul_x = (DWORD) max(min((rdp.scissor_o.ul_x * rdp.scale_x + rdp.offset_x + 0.01f),settings.res_x),0); - rdp.scissor.lr_x = (DWORD) max(min((rdp.scissor_o.lr_x * rdp.scale_x + rdp.offset_x + 0.01f),settings.res_x),0); - rdp.scissor.ul_y = (DWORD) max(min((rdp.scissor_o.ul_y * rdp.scale_y + rdp.offset_y + 0.01f),settings.res_y),0); - rdp.scissor.lr_y = (DWORD) max(min((rdp.scissor_o.lr_y * rdp.scale_y + rdp.offset_y + 0.01f),settings.res_y),0); + rdp.scissor.ul_x = (DWORD) std::max(std::min((rdp.scissor_o.ul_x * rdp.scale_x + rdp.offset_x + 0.01f), (float) settings.res_x),0.0f); + rdp.scissor.lr_x = (DWORD) std::max(std::min((rdp.scissor_o.lr_x * rdp.scale_x + rdp.offset_x + 0.01f), (float) settings.res_x),0.0f); + rdp.scissor.ul_y = (DWORD) std::max(std::min((rdp.scissor_o.ul_y * rdp.scale_y + rdp.offset_y + 0.01f), (float) settings.res_y),0.0f); + rdp.scissor.lr_y = (DWORD) std::max(std::min((rdp.scissor_o.lr_y * rdp.scale_y + rdp.offset_y + 0.01f), (float) settings.res_y),0.0f); FRDP (" |- scissor - (%d, %d) -> (%d, %d)\n", rdp.scissor.ul_x, rdp.scissor.ul_y, rdp.scissor.lr_x, rdp.scissor.lr_y); } @@ -1660,10 +1657,10 @@ float scale_y = (float)fabs(rdp.view_scale[1]); //printf("scale_y %g\n", scale_y); - DWORD min_x = (DWORD) max(rdp.view_trans[0] - scale_x, 0); - DWORD min_y = (DWORD) max(rdp.view_trans[1] - scale_y, 0); - DWORD max_x = (DWORD) min(rdp.view_trans[0] + scale_x + 1, settings.res_x); - DWORD max_y = (DWORD) min(rdp.view_trans[1] + scale_y + 1, settings.res_y); + DWORD min_x = (DWORD) std::max(rdp.view_trans[0] - scale_x, 0.0f); + DWORD min_y = (DWORD) std::max(rdp.view_trans[1] - scale_y, 0.0f); + DWORD max_x = (DWORD) std::min(rdp.view_trans[0] + scale_x + 1, (float) settings.res_x); + DWORD max_y = (DWORD) std::min(rdp.view_trans[1] + scale_y + 1, (float) settings.res_y); FRDP (" |- viewport - (%d, %d, %d, %d)\n", min_x, min_y, max_x, max_y); grClipWindow (min_x, min_y, max_x, max_y);