mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Mapster32: factor out 3x computing "alwaysshowgray", but don't change anything.
git-svn-id: https://svn.eduke32.com/eduke32@3623 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
1f490a6fc3
commit
48406e744b
3 changed files with 9 additions and 4 deletions
|
@ -109,6 +109,7 @@ enum rendmode_t {
|
|||
#define YAX_CEILING 0 // don't change!
|
||||
#define YAX_FLOOR 1 // don't change!
|
||||
|
||||
int32_t get_alwaysshowgray(void); // editor only
|
||||
void yax_updategrays(int32_t posze);
|
||||
|
||||
#ifdef YAX_ENABLE
|
||||
|
|
|
@ -3369,8 +3369,7 @@ void overheadeditor(void)
|
|||
|
||||
if (zoom >= 768)
|
||||
{
|
||||
int32_t alwaysshowgray =
|
||||
(showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT32_MAX));
|
||||
int32_t alwaysshowgray = get_alwaysshowgray();
|
||||
|
||||
for (i=0, k=0; (m32_sideview && k<m32_swcnt) || (!m32_sideview && i<MAXSPRITES); i++, k++)
|
||||
{
|
||||
|
@ -8190,7 +8189,7 @@ int32_t getpointhighlight(int32_t xplc, int32_t yplc, int32_t point)
|
|||
{
|
||||
int32_t i, j, dst, dist = 512, closest = -1;
|
||||
int32_t dax,day;
|
||||
int32_t alwaysshowgray = (showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT32_MAX));
|
||||
int32_t alwaysshowgray = get_alwaysshowgray();
|
||||
|
||||
if (numwalls == 0)
|
||||
return -1;
|
||||
|
|
|
@ -236,6 +236,11 @@ double hitickspersec;
|
|||
int32_t engine_screenshot = 0;
|
||||
#endif
|
||||
|
||||
int32_t get_alwaysshowgray(void)
|
||||
{
|
||||
return showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT32_MAX);
|
||||
}
|
||||
|
||||
void yax_updategrays(int32_t posze)
|
||||
{
|
||||
int32_t i, j, k=1;
|
||||
|
@ -15671,7 +15676,7 @@ void draw2dscreen(const vec3_t *pos, int16_t cursectnum, int16_t ange, int32_t z
|
|||
|
||||
int32_t posxe=pos->x, posye=pos->y, posze=pos->z;
|
||||
uint8_t *graybitmap = (uint8_t *)tempbuf;
|
||||
int32_t alwaysshowgray = (showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT32_MAX));
|
||||
int32_t alwaysshowgray = get_alwaysshowgray();
|
||||
|
||||
if (qsetmode == 200) return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue