mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
Classic: implement horiz. tex panning for sprites (spriteext[].xpanning).
Known as getactor/sprite[].xpanning from CON, values are 0-255. It should be assumed that this is only valid for wall-aligned sprites (currently, face sprites also pan). A test is provided in lunatic/test/animatesprites.con. It should be run in E1L2 and only with the Lunatic build. git-svn-id: https://svn.eduke32.com/eduke32@4170 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
bc54631888
commit
fd978ced59
2 changed files with 25 additions and 1 deletions
|
@ -5498,7 +5498,8 @@ static void setup_globals_sprite1(const spritetype *tspr, const sectortype *sec,
|
|||
globalorientation = 0;
|
||||
globalpicnum = tilenum;
|
||||
if ((unsigned)globalpicnum >= MAXTILES) globalpicnum = 0;
|
||||
globalxpanning = 0;
|
||||
// sprite panning
|
||||
globalxpanning = (((256-spriteext[tspr->owner].xpanning)&255) * tilesizx[globalpicnum])>>8;
|
||||
globalypanning = 0;
|
||||
|
||||
globvis = globalvisibility;
|
||||
|
|
|
@ -13,6 +13,9 @@ gamevar florz 0 0
|
|||
gamevar florhit 0 0
|
||||
gamevar pi 0 0
|
||||
|
||||
gamevar doxp 0 0
|
||||
gamevar xp 0 0
|
||||
|
||||
define Q 500
|
||||
|
||||
gamevar pdist 0 2
|
||||
|
@ -20,6 +23,25 @@ gamevar pdist 0 2
|
|||
onevent EVENT_GAME
|
||||
ifactor LIZTROOP
|
||||
findplayer pdist
|
||||
|
||||
// Test both view/wall/floor sprites for
|
||||
// spriteext[].xpanning (Polymost only)
|
||||
setvar doxp 0
|
||||
ifactor 937 // --- vvv --- E2L1
|
||||
setvar doxp 1
|
||||
else ifactor FEMMAG1
|
||||
setvar doxp 1
|
||||
else ifactor PIGCOP
|
||||
setvar doxp 1
|
||||
else ifactor 849 // 64x24: in classic, better than nonpow2-x tile 937
|
||||
setvar doxp 1
|
||||
|
||||
ifvarn doxp 0
|
||||
{
|
||||
getactor[THISACTOR].xpanning xp
|
||||
addvar xp 1
|
||||
setactor[THISACTOR].xpanning xp
|
||||
}
|
||||
endevent
|
||||
|
||||
onevent EVENT_ANIMATESPRITES
|
||||
|
@ -43,6 +65,7 @@ onevent EVENT_DISPLAYREST
|
|||
}
|
||||
|
||||
getplayer[THISACTOR].i pi
|
||||
// This blows up on C-CON:
|
||||
getzrange sprite[pi].x sprite[pi].y sprite[pi].z player[THISACTOR].cursectnum
|
||||
/*out:*/ ceilz ceilhit florz florhit
|
||||
/*in:*/ 128 CLIPMASK0
|
||||
|
|
Loading…
Reference in a new issue