mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Replace SET_MIN
with std::min
This commit is contained in:
parent
76e86fed8c
commit
88d1dfa948
@ -85,6 +85,8 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@ -640,8 +642,8 @@ void grSurface::xlat16_24(char *data, int w, int h) {
|
||||
|
||||
dptr = (char *)m_DataPtr;
|
||||
sptr = (uint16_t *)data;
|
||||
height = SET_MIN(h, ddsfObj.h);
|
||||
width = SET_MIN(w, ddsfObj.w);
|
||||
height = std::min(h, ddsfObj.h);
|
||||
width = std::min(w, ddsfObj.w);
|
||||
|
||||
for (row = 0; row < height; row++) {
|
||||
dcol = 0;
|
||||
@ -705,8 +707,8 @@ void grSurface::xlat32_16(char *data, int w, int h) {
|
||||
dptr = (uint16_t *)m_DataPtr;
|
||||
sptr = (unsigned *)data;
|
||||
rowsize_w = m_DataRowsize / 2;
|
||||
height = SET_MIN(h, ddsfObj.h);
|
||||
width = SET_MIN(w, ddsfObj.w);
|
||||
height = std::min(h, ddsfObj.h);
|
||||
width = std::min(w, ddsfObj.w);
|
||||
|
||||
for (row = 0; row < height; row++) {
|
||||
for (col = 0; col < width; col++) {
|
||||
|
@ -959,8 +959,8 @@ void grfont_XlateColorChar(int bmp_handle, int x, int y, int index, tFontFileInf
|
||||
sptr = (uint16_t *)ft->char_data[index];
|
||||
rowsize_w = bm_rowsize(bmp_handle, 0) / 2;
|
||||
|
||||
// height = SET_MIN(h, ddsfObj.h);
|
||||
// width = SET_MIN(w, ddsfObj.w);
|
||||
// height = std::min(h, ddsfObj.h);
|
||||
// width = std::min(w, ddsfObj.w);
|
||||
dptr = dptr + (y * rowsize_w);
|
||||
|
||||
if (ft->flags & FT_FMT4444) {
|
||||
@ -999,8 +999,8 @@ void grfont_XlateColorGrayChar(int bmp_handle, int x, int y, int index, tFontFil
|
||||
sptr = (uint16_t *)ft->char_data[index];
|
||||
rowsize_w = bm_rowsize(bmp_handle, 0) / 2;
|
||||
|
||||
// height = SET_MIN(h, ddsfObj.h);
|
||||
// width = SET_MIN(w, ddsfObj.w);
|
||||
// height = std::min(h, ddsfObj.h);
|
||||
// width = std::min(w, ddsfObj.w);
|
||||
dptr = dptr + (y * rowsize_w);
|
||||
|
||||
float recip32 = 1.0f / 32.0f;
|
||||
|
@ -66,7 +66,6 @@
|
||||
(a) = (b); \
|
||||
(b) = _swap_var_; \
|
||||
} while (0)
|
||||
#define SET_MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#define CHECK_FLAG(_var, _flag) ((_var) & (_flag))
|
||||
#define makeword(_h, _l) (((_h) << 16) + ((_l) & 0xffff))
|
||||
#define hiword(_v) ((_v) >> 16)
|
||||
|
Loading…
Reference in New Issue
Block a user