mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
weapons.con.sample: Add internal temp variables for rotatesprite parameters that the subroutines need to modify. This fixes weapon scaling.
git-svn-id: https://svn.eduke32.com/eduke32@6034 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
1157557426
commit
df13c2f8cb
1 changed files with 32 additions and 31 deletions
|
@ -45,6 +45,11 @@ gamevar hud_temp4 0 1
|
||||||
// The following temporary gamevars are internal to the G_Draw subroutines.
|
// The following temporary gamevars are internal to the G_Draw subroutines.
|
||||||
gamevar hud_int_temp 0 1
|
gamevar hud_int_temp 0 1
|
||||||
gamevar hud_int_temp2 0 1
|
gamevar hud_int_temp2 0 1
|
||||||
|
gamevar hud_int_x 0 1
|
||||||
|
gamevar hud_int_y 0 1
|
||||||
|
gamevar hud_int_scale 0 1
|
||||||
|
gamevar hud_int_angle 0 1
|
||||||
|
gamevar hud_int_orientation 0 1
|
||||||
|
|
||||||
gamevar weapon_pos 0 1
|
gamevar weapon_pos 0 1
|
||||||
gamevar weaponscale 0 1
|
gamevar weaponscale 0 1
|
||||||
|
@ -55,21 +60,24 @@ gamevar playerid 0 1
|
||||||
// preliminary functions
|
// preliminary functions
|
||||||
|
|
||||||
state G_DrawTilePal
|
state G_DrawTilePal
|
||||||
ifvarand hud_orientation 4
|
setvarvar hud_int_angle hud_angle
|
||||||
addvar hud_angle 1024
|
setvarvar hud_int_orientation hud_orientation
|
||||||
|
|
||||||
orvar hud_orientation 2
|
|
||||||
|
|
||||||
rotatesprite hud_x hud_y hud_scale hud_angle hud_tilenum hud_shade hud_pal hud_orientation windowx1 windowy1 windowx2 windowy2
|
|
||||||
|
|
||||||
ifvarand hud_orientation 2
|
|
||||||
xorvar hud_orientation 2
|
|
||||||
|
|
||||||
ifvarand hud_orientation 4
|
ifvarand hud_orientation 4
|
||||||
subvar hud_angle 1024
|
addvar hud_int_angle 1024
|
||||||
|
|
||||||
|
orvar hud_int_orientation 2
|
||||||
|
|
||||||
|
rotatesprite hud_x hud_y hud_scale hud_int_angle hud_tilenum hud_shade hud_pal hud_int_orientation windowx1 windowy1 windowx2 windowy2
|
||||||
ends
|
ends
|
||||||
|
|
||||||
state G_DrawTileScaled
|
state G_DrawTileScaled
|
||||||
|
setvarvar hud_int_x hud_x
|
||||||
|
setvarvar hud_int_y hud_y
|
||||||
|
setvarvar hud_int_scale hud_scale
|
||||||
|
setvarvar hud_int_angle hud_angle
|
||||||
|
setvarvar hud_int_orientation hud_orientation
|
||||||
|
|
||||||
setvar hud_int_temp 192 // xoff
|
setvar hud_int_temp 192 // xoff
|
||||||
|
|
||||||
switch currentweapon
|
switch currentweapon
|
||||||
|
@ -81,13 +89,13 @@ state G_DrawTileScaled
|
||||||
ifvarand hud_orientation 262144
|
ifvarand hud_orientation 262144
|
||||||
{
|
{
|
||||||
setvar hud_int_temp 160
|
setvar hud_int_temp 160
|
||||||
xorvar hud_orientation 262144
|
xorvar hud_int_orientation 262144
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
endswitch
|
endswitch
|
||||||
|
|
||||||
ifvarand hud_orientation 4
|
ifvarand hud_orientation 4
|
||||||
addvar hud_angle 1024
|
addvar hud_int_angle 1024
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ifvarg rendermode 2
|
ifvarg rendermode 2
|
||||||
|
@ -98,41 +106,34 @@ state G_DrawTileScaled
|
||||||
mulvarvar hud_int_temp2 weaponscale
|
mulvarvar hud_int_temp2 weaponscale
|
||||||
divvar hud_int_temp2 100
|
divvar hud_int_temp2 100
|
||||||
|
|
||||||
addvar hud_y 224
|
addvar hud_int_y 224
|
||||||
subvarvar hud_y hud_int_temp2
|
subvarvar hud_int_y hud_int_temp2
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mulvarvar hud_x weaponscale
|
mulvarvar hud_int_x weaponscale
|
||||||
divvar hud_x 100
|
divvar hud_int_x 100
|
||||||
setvarvar hud_int_temp2 hud_int_temp
|
setvarvar hud_int_temp2 hud_int_temp
|
||||||
mulvarvar hud_int_temp2 weaponscale
|
mulvarvar hud_int_temp2 weaponscale
|
||||||
divvar hud_int_temp2 100
|
divvar hud_int_temp2 100
|
||||||
subvarvar hud_int_temp hud_int_temp2
|
subvarvar hud_int_temp hud_int_temp2
|
||||||
addvarvar hud_x hud_int_temp
|
addvarvar hud_int_x hud_int_temp
|
||||||
|
|
||||||
mulvarvar hud_y weaponscale
|
mulvarvar hud_int_y weaponscale
|
||||||
divvar hud_y 100
|
divvar hud_int_y 100
|
||||||
setvar hud_int_temp 200
|
setvar hud_int_temp 200
|
||||||
setvarvar hud_int_temp2 hud_int_temp
|
setvarvar hud_int_temp2 hud_int_temp
|
||||||
mulvarvar hud_int_temp2 weaponscale
|
mulvarvar hud_int_temp2 weaponscale
|
||||||
divvar hud_int_temp2 100
|
divvar hud_int_temp2 100
|
||||||
subvarvar hud_int_temp hud_int_temp2
|
subvarvar hud_int_temp hud_int_temp2
|
||||||
addvarvar hud_y hud_int_temp
|
addvarvar hud_int_y hud_int_temp
|
||||||
|
|
||||||
// setvar hud_scale 65536 // do this elsewhere; leave it open for modification
|
mulvarvar hud_int_scale weaponscale
|
||||||
mulvarvar hud_scale weaponscale
|
divvar hud_int_scale 100
|
||||||
divvar hud_scale 100
|
|
||||||
|
|
||||||
orvar hud_orientation 2
|
orvar hud_int_orientation 2
|
||||||
|
|
||||||
rotatesprite hud_x hud_y hud_scale hud_angle hud_tilenum hud_shade hud_pal hud_orientation windowx1 windowy1 windowx2 windowy2
|
rotatesprite hud_int_x hud_int_y hud_int_scale hud_int_angle hud_tilenum hud_shade hud_pal hud_int_orientation windowx1 windowy1 windowx2 windowy2
|
||||||
|
|
||||||
ifvarand hud_orientation 2
|
|
||||||
xorvar hud_orientation 2
|
|
||||||
|
|
||||||
ifvarand hud_orientation 4
|
|
||||||
subvar hud_angle 1024
|
|
||||||
ends
|
ends
|
||||||
|
|
||||||
state G_DrawWeaponTile
|
state G_DrawWeaponTile
|
||||||
|
|
Loading…
Reference in a new issue