mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
scale(1<<##, b, c) --> divscale##(b, c)
git-svn-id: https://svn.eduke32.com/eduke32@6256 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
bd9abf33ad
commit
adf62d216c
4 changed files with 10 additions and 10 deletions
|
@ -3420,19 +3420,19 @@ MenuAnimation_t m_animation;
|
|||
|
||||
int32_t Menu_Anim_SinOutRight(MenuAnimation_t *animdata)
|
||||
{
|
||||
return sintable[scale(1024, totalclock - animdata->start, animdata->length) + 512] - 16384;
|
||||
return sintable[divscale10(totalclock - animdata->start, animdata->length) + 512] - 16384;
|
||||
}
|
||||
int32_t Menu_Anim_SinInRight(MenuAnimation_t *animdata)
|
||||
{
|
||||
return sintable[scale(1024, totalclock - animdata->start, animdata->length) + 512] + 16384;
|
||||
return sintable[divscale10(totalclock - animdata->start, animdata->length) + 512] + 16384;
|
||||
}
|
||||
int32_t Menu_Anim_SinOutLeft(MenuAnimation_t *animdata)
|
||||
{
|
||||
return -sintable[scale(1024, totalclock - animdata->start, animdata->length) + 512] + 16384;
|
||||
return -sintable[divscale10(totalclock - animdata->start, animdata->length) + 512] + 16384;
|
||||
}
|
||||
int32_t Menu_Anim_SinInLeft(MenuAnimation_t *animdata)
|
||||
{
|
||||
return -sintable[scale(1024, totalclock - animdata->start, animdata->length) + 512] - 16384;
|
||||
return -sintable[divscale10(totalclock - animdata->start, animdata->length) + 512] - 16384;
|
||||
}
|
||||
|
||||
void Menu_AnimateChange(int32_t cm, MenuAnimationType_t animtype)
|
||||
|
@ -3775,7 +3775,7 @@ static int32_t ydim_from_200_16(int32_t y)
|
|||
|
||||
static void Menu_BlackRectangle(int32_t x, int32_t y, int32_t width, int32_t height, int32_t orientation)
|
||||
{
|
||||
const int32_t xscale = scale(65536, width, tilesiz[0].x<<16), yscale = scale(65536, height, tilesiz[0].y<<16);
|
||||
const int32_t xscale = divscale16(width, tilesiz[0].x<<16), yscale = divscale16(height, tilesiz[0].y<<16);
|
||||
|
||||
rotatesprite_(x, y, max(xscale, yscale), 0, 0, 127, 4, (orientation&(1|32))|2|8|16, 0, 0, xdim_from_320_16(x), ydim_from_200_16(y), xdim_from_320_16(x + width), ydim_from_200_16(y + height));
|
||||
}
|
||||
|
@ -4521,7 +4521,7 @@ static int32_t M_RunMenu_Menu(Menu_t *cm, MenuMenu_t *menu, MenuEntry_t *current
|
|||
dim = Menu_Text(origin.x + stringx, stringy, object->font, object->editfield, status | MT_Literal, ydim_upper, ydim_lower);
|
||||
h = max(dim.y, entry->font->get_yline());
|
||||
|
||||
rotatesprite_ybounds(origin.x + x + dim.x + (1<<16) + scale(tilesiz[SPINNINGNUKEICON].x<<15, h, tilesiz[SPINNINGNUKEICON].y<<16), stringy, scale(65536, h, tilesiz[SPINNINGNUKEICON].y<<16), 0, SPINNINGNUKEICON+(((totalclock>>3))%7), cursorShade, 0, 10, ydim_upper, ydim_lower);
|
||||
rotatesprite_ybounds(origin.x + x + dim.x + (1<<16) + scale(tilesiz[SPINNINGNUKEICON].x<<15, h, tilesiz[SPINNINGNUKEICON].y<<16), stringy, divscale16(h, tilesiz[SPINNINGNUKEICON].y<<16), 0, SPINNINGNUKEICON+(((totalclock>>3))%7), cursorShade, 0, 10, ydim_upper, ydim_lower);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2148,7 +2148,7 @@ void P_DisplayWeapon(void)
|
|||
case 1: break;
|
||||
case 2:
|
||||
if ((unsigned)hudweap.cur < MAX_WEAPONS && hudweap.cur != KNEE_WEAPON)
|
||||
rotatesprite_win(160 << 16, (180 + (pPlayer->weapon_pos * pPlayer->weapon_pos)) << 16, scale(65536, ud.statusbarscale, 100), 0,
|
||||
rotatesprite_win(160 << 16, (180 + (pPlayer->weapon_pos * pPlayer->weapon_pos)) << 16, divscale16(ud.statusbarscale, 100), 0,
|
||||
hudweap.cur == GROW_WEAPON ? GROWSPRITEICON : WeaponPickupSprites[hudweap.cur], 0,
|
||||
0, 2);
|
||||
default: goto enddisplayweapon;
|
||||
|
|
|
@ -1153,12 +1153,12 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
|
||||
vec2_t crosshairpos = { 160<<16, 100<<16 };
|
||||
|
||||
rotatesprite_win(crosshairpos.x-(g_player[myconnectindex].ps->look_ang<<15), crosshairpos.y, scale(65536, ud.crosshairscale, 100),
|
||||
rotatesprite_win(crosshairpos.x-(g_player[myconnectindex].ps->look_ang<<15), crosshairpos.y, divscale16(ud.crosshairscale, 100),
|
||||
0, a, 0, CROSSHAIR_PAL, 2+1);
|
||||
|
||||
#ifdef GEKKO
|
||||
if ((g_player[myconnectindex].ps->gm&MODE_MENU) == 0 && readmouseabsxy(&crosshairpos, &mouseabs))
|
||||
rotatesprite_win(crosshairpos.x, crosshairpos.y, scale(65536, ud.crosshairscale, 100), 0, a, 0, CROSSHAIR_PAL, 2+1);
|
||||
rotatesprite_win(crosshairpos.x, crosshairpos.y, divscale16(ud.crosshairscale, 100), 0, a, 0, CROSSHAIR_PAL, 2+1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -258,7 +258,7 @@ void ExtPreCheckKeys(void)
|
|||
dy = dmulscale1(i,cosang,320,sinang);
|
||||
horizval2 = dy*(320>>1)/dx+1;
|
||||
|
||||
daviewingrange = scale(65536,16384*(xdim>>1),mindx-16);
|
||||
daviewingrange = divscale30(xdim>>1, mindx-16);
|
||||
daaspect = scale(daviewingrange,scale(320,tilesiz[4094].x,tilesiz[4094].y),horizval2+6-horizval1);
|
||||
setaspect(daviewingrange,scale(daaspect,ydim*320,xdim*i));
|
||||
horiz = 100-divscale15(horizval1+horizval2,daviewingrange);
|
||||
|
|
Loading…
Reference in a new issue