diff --git a/polymer/eduke32/samples/weapons.con.sample b/polymer/eduke32/samples/weapons.con.sample index a28eaf34a..3a06aa7d1 100644 --- a/polymer/eduke32/samples/weapons.con.sample +++ b/polymer/eduke32/samples/weapons.con.sample @@ -66,15 +66,14 @@ state G_DrawTile ifvarand hud_orientation 4 addvar hud_angle 1024 - - ifvarand hud_orientation 2 nullop else - addvar hud_orientation 2 - + + orvar hud_orientation 2 + rotatesprite hud_x hud_y hud_scale hud_angle hud_tilenum hud_shade hud_G_Draw_temp2 hud_orientation windowx1 windowy1 windowx2 windowy2 - - ifvarand hud_orientation 2 nullop else - subvar hud_orientation 2 - + + ifvarand hud_orientation 2 + xorvar hud_orientation 2 + ifvarand hud_orientation 4 subvar hud_angle 1024 ends @@ -82,15 +81,14 @@ ends state G_DrawTilePal ifvarand hud_orientation 4 addvar hud_angle 1024 - - ifvarand hud_orientation 2 nullop else - addvar hud_orientation 2 + + 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 nullop else - subvar hud_orientation 2 - + + ifvarand hud_orientation 2 + xorvar hud_orientation 2 + ifvarand hud_orientation 4 subvar hud_angle 1024 ends @@ -107,14 +105,14 @@ state G_DrawTileScaled ifvarand hud_orientation 262144 { setvar hud_G_Draw_temp 160 - subvar hud_orientation 262144 + xorvar hud_orientation 262144 } break endswitch ifvarand hud_orientation 4 addvar hud_angle 1024 - + /* ifvarg rendermode 2 ifvarn usemodels 0 @@ -123,12 +121,12 @@ state G_DrawTileScaled setvar hud_G_Draw_temp2 224 mulvarvar hud_G_Draw_temp2 weaponscale divvar hud_G_Draw_temp2 100 - + addvar hud_y 224 subvarvar hud_y hud_G_Draw_temp2 } */ - + mulvarvar hud_x weaponscale divvar hud_x 100 setvarvar hud_G_Draw_temp2 hud_G_Draw_temp @@ -136,7 +134,7 @@ state G_DrawTileScaled divvar hud_G_Draw_temp2 100 subvarvar hud_G_Draw_temp hud_G_Draw_temp2 addvarvar hud_x hud_G_Draw_temp - + mulvarvar hud_y weaponscale divvar hud_y 100 setvar hud_G_Draw_temp 200 @@ -145,19 +143,18 @@ state G_DrawTileScaled divvar hud_G_Draw_temp2 100 subvarvar hud_G_Draw_temp hud_G_Draw_temp2 addvarvar hud_y hud_G_Draw_temp - + // setvar hud_scale 65536 // do this elsewhere; leave it open for modification mulvarvar hud_scale weaponscale divvar hud_scale 100 - - ifvarand hud_orientation 2 nullop else - addvar hud_orientation 2 - + + 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 nullop else - subvar hud_orientation 2 - + + ifvarand hud_orientation 2 + xorvar hud_orientation 2 + ifvarand hud_orientation 4 subvar hud_angle 1024 ends @@ -176,7 +173,7 @@ state G_DrawWeaponTile setvarvar hud_G_Draw_temp2 hud_G_Draw_temp shiftvarr hud_G_Draw_temp 2 addvarvar hud_shadef hud_G_Draw_temp - + ifvare hud_G_Draw_temp 0 { shiftvarr hud_G_Draw_temp2 1 @@ -188,10 +185,10 @@ state G_DrawWeaponTile } else setvarvar hud_shadef hud_shade - + setvarvar hud_palf hud_pal setvarvar hud_shade hud_shadef - + state G_DrawTileScaled ends @@ -204,7 +201,7 @@ state G_DrawWeaponTile_crystal setvarvar hud_G_Draw_temp2 hud_G_Draw_temp shiftvarr hud_G_Draw_temp 2 addvarvar hud_shadef_crystal hud_G_Draw_temp - + ifvare hud_G_Draw_temp 0 { shiftvarr hud_G_Draw_temp2 1 @@ -215,9 +212,9 @@ state G_DrawWeaponTile_crystal } else setvarvar hud_shadef_crystal hud_shade - + setvarvar hud_shade hud_shadef_crystal - + state G_DrawTileScaled ends @@ -241,7 +238,7 @@ ends state draw_shrunk_fists // Shrunk Running Fists // common calculations state reset_hud_weapon_x_coordinate - + setvarvar hud_temp3 looking_arc ifvare player[THISACTOR].jetpack_on 0 { @@ -251,7 +248,7 @@ state draw_shrunk_fists // Shrunk Running Fists subvarvar hud_temp3 hud_temp2 addvarvar hud_fistsign hud_temp2 } - // common calculations continued + // common calculations continued setvarvar hud_temp2 hud_fistsign andvar hud_temp2 2047 sin hud_temp2 hud_temp2 @@ -260,38 +257,38 @@ state draw_shrunk_fists // Shrunk Running Fists shiftvarr hud_temp4 8 ifvarl hud_temp4 0 mulvar hud_temp4 -1 - + // right fist guniqhudid 101 - + addvarvar hud_x hud_temp2 addvar hud_x 250 - + setvarvar hud_y hud_temp3 addvar hud_y 258 subvarvar hud_y hud_temp4 - + setvar hud_tilenum FIST - + state G_DrawTile - + // cleanup subvar hud_x 250 - + // left fist guniqhudid 102 - + subvarvar hud_x hud_temp2 addvar hud_x 40 - + setvarvar hud_y hud_temp3 addvar hud_y 200 addvarvar hud_y hud_temp4 - - addvar hud_orientation 4 - + + orvar hud_orientation 4 + state G_DrawTile - + // cleanup setvar hud_orientation 0 setvar hud_angle 0 @@ -301,7 +298,7 @@ ends state draw_quick_kick // Quick Kick setvar hud_temp 14 subvarvar hud_temp player[THISACTOR].quick_kick - + setvar hud_temp2 0 ifvarn hud_temp 14 setvar hud_temp2 1 ifvarn player[THISACTOR].last_quick_kick 0 setvar hud_temp2 1 @@ -318,36 +315,36 @@ state draw_quick_kick // Quick Kick } guniqhudid 100 - + // common calculations state reset_hud_weapon_coordinates - + setvar hud_tilenum KNEE - + setvar hud_orientation 262148 // o|4|262144 - + setvar hud_temp3 0 - + ifvarg hud_temp 5 ifvarl hud_temp 13 { addvar hud_x 144 // 160-16 - + addvar hud_y 214 - + addvar hud_tilenum 1 - + state G_DrawTileScaled - + setvar hud_temp3 1 } - + ifvare hud_temp3 0 { addvar hud_x 80 - + addvar hud_y 250 - + state G_DrawTileScaled } } @@ -359,9 +356,9 @@ state draw_kick // KNEE_WEAPON: ifvarg weaponcount 0 { guniqhudid currentweapon - + state reset_hud_weapon_coordinates - + getactor[playerid].pal hud_pal ifvarn hud_pal 1 { @@ -371,31 +368,31 @@ state draw_kick // KNEE_WEAPON: ifvare hud_pal 0 getplayer[THISACTOR].palookup hud_pal } - + setvar hud_tilenum KNEE - + setvar hud_temp3 0 - + ifvarg weaponcount 4 ifvarl weaponcount 10 { addvar hud_x 160 - + addvar hud_y 214 - + addvar hud_tilenum 1 - + state G_DrawTileScaled - + setvar hud_temp3 1 } - + ifvare hud_temp3 0 { addvar hud_x 220 - + addvar hud_y 250 - + state G_DrawTileScaled } } @@ -403,7 +400,7 @@ ends state draw_tripbomb // TRIPBOMB_WEAPON: state reset_hud_weapon_coordinates - + addvar hud_x 8 addvar hud_y 10 @@ -418,40 +415,40 @@ state draw_tripbomb // TRIPBOMB_WEAPON: setvarvar hud_temp currentweapon shiftvarl currentweapon 2 guniqhudid hud_temp - + addvar hud_x 142 addvar hud_y 234 - + setvar hud_tilenum HANDHOLDINGLASER addvar hud_tilenum 3 - + state G_DrawWeaponTile - + // undo subvar hud_x 142 subvar hud_y 234 } - + // common to both hands - + addvar hud_y 249 - + setvarvar hud_tilenum weaponcount shiftvarr hud_tilenum 2 addvar hud_tilenum HANDHOLDINGLASER - + // left hand guniqhudid currentweapon - + addvar hud_x 130 - + state G_DrawWeaponTile - + // right hand setvarvar hud_temp3 currentweapon shiftvarl hud_temp3 1 guniqhudid hud_temp3 - + /* // absolute method subvar hud_x 130 // undo @@ -459,62 +456,60 @@ state draw_tripbomb // TRIPBOMB_WEAPON: */ // relative method addvar hud_x 22 - - ifvarand hud_orientation 4 nullop else - addvar hud_orientation 4 - + + orvar hud_orientation 4 + state G_DrawWeaponTile - + ifvarand hud_orientation 4 - subvar hud_orientation 4 + xorvar hud_orientation 4 guniqhudid 0 ends state draw_rpg // RPG_WEAPON: - + setvarvar hud_x weapon_xoffset setvarvar hud_y looking_arc shiftvarl looking_arc 1 subvarvar hud_y gun_pos - + setvarvar hud_temp weaponcount shiftvarl hud_temp 7 addvar hud_temp 768 andvar hud_temp 2047 sin hud_temp hud_temp shiftvarr hud_temp 11 - + subvarvar hud_x hud_temp subvarvar hud_y hud_temp - - ifvarand hud_orientation 512 nullop else - addvar hud_orientation 512 - + + orvar hud_orientation 512 + addvar hud_x 164 - + addvar hud_y 176 - + ifvarg weaponcount 0 ifvarl weaponcount 8 { setvarvar hud_tilenum weaponcount shiftvarr hud_tilenum 1 addvar hud_tilenum RPGGUN - + state G_DrawWeaponTile } - + setvar hud_tilenum RPGGUN - + state G_DrawWeaponTile - + ifvarand hud_orientation 512 - subvar hud_orientation 512 + xorvar hud_orientation 512 ends state draw_shotgun // SHOTGUN_WEAPON: state reset_hud_weapon_coordinates - + subvar hud_x 8 switch weaponcount @@ -523,17 +518,17 @@ state draw_shotgun // SHOTGUN_WEAPON: setvarvar hud_temp4 currentweapon shiftvarl hud_temp4 1 guniqhudid hud_temp4 - + addvar hud_x 168 addvar hud_y 201 - + setvar hud_shade -128 - + setvar hud_tilenum SHOTGUN addvar hud_tilenum 2 - + state G_DrawWeaponTile - + subvar hud_x 168 subvar hud_y 201 setvarvar hud_shade gs @@ -542,14 +537,14 @@ state draw_shotgun // SHOTGUN_WEAPON: case 7 case 8 guniqhudid currentweapon - + addvar hud_x 146 addvar hud_y 202 - - setvar hud_tilenum SHOTGUN - + + setvar hud_tilenum SHOTGUN + state G_DrawWeaponTile - + guniqhudid 0 break case 3 @@ -568,36 +563,36 @@ state draw_shotgun // SHOTGUN_WEAPON: setvarvar hud_temp4 currentweapon shiftvarl hud_temp4 1 guniqhudid hud_temp4 - + addvar hud_x 178 addvar hud_y 194 - + setvar hud_shade -128 - + setvarvar hud_tilenum weaponcount subvar hud_tilenum 1 shiftvarr hud_tilenum 1 addvar hud_tilenum SHOTGUN addvar hud_tilenum 1 - + state G_DrawWeaponTile - + subvar hud_x 178 subvar hud_y 194 setvarvar hud_shade gs } - + guniqhudid currentweapon - + addvar hud_x 158 - + addvar hud_y 220 - + setvar hud_tilenum SHOTGUN addvar hud_tilenum 3 - + state G_DrawWeaponTile - + guniqhudid 0 break case 13 @@ -607,15 +602,15 @@ state draw_shotgun // SHOTGUN_WEAPON: case 29 case 30 guniqhudid currentweapon - + addvar hud_x 198 // 32 + 166 addvar hud_y 210 - + setvar hud_tilenum SHOTGUN addvar hud_tilenum 4 - + state G_DrawWeaponTile - + guniqhudid 0 break case 16 @@ -627,13 +622,13 @@ state draw_shotgun // SHOTGUN_WEAPON: case 26 case 27 guniqhudid currentweapon - + addvar hud_x 234 // 64 + 170 addvar hud_y 196 - + setvar hud_tilenum SHOTGUN addvar hud_tilenum 5 - + state G_DrawWeaponTile break case 20 @@ -641,13 +636,13 @@ state draw_shotgun // SHOTGUN_WEAPON: case 22 case 23 guniqhudid currentweapon - + addvar hud_x 240 // 64 + 176 addvar hud_y 196 - + setvar hud_tilenum SHOTGUN addvar hud_tilenum 6 - + state G_DrawWeaponTile break endswitch @@ -657,7 +652,7 @@ ends state draw_chaingun // CHAINGUN_WEAPON: // hud_temp4 = FIREDELAY state reset_hud_weapon_coordinates - + ifvarg weaponcount 0 { setvarvar hud_temp weaponcount @@ -665,7 +660,7 @@ state draw_chaingun // CHAINGUN_WEAPON: sin hud_temp hud_temp shiftvarr hud_temp 12 addvarvar hud_y hud_temp - + getactor[playerid].pal hud_temp ifvarn hud_pal 1 { @@ -676,29 +671,29 @@ state draw_chaingun // CHAINGUN_WEAPON: addvarvar hud_x hud_temp } } - + // base addvar hud_x 168 addvar hud_y 260 - + setvar hud_tilenum CHAINGUN state G_DrawWeaponTile - + subvar hud_x 168 subvar hud_y 260 - + switch weaponcount case 0 addvar hud_x 178 addvar hud_y 233 addvar hud_tilenum 1 // relative - + state G_DrawWeaponTile break default getactor[playerid].pal hud_temp3 - + ifvarvarg weaponcount hud_temp4 ifvarvarl weaponcount hud_totaltime { @@ -710,42 +705,42 @@ state draw_chaingun // CHAINGUN_WEAPON: } else setvar hud_temp 0 - + addvar hud_x 136 // -4+140 addvarvar hud_x hud_temp - + setvarvar hud_temp2 weaponcount shiftvarr hud_temp2 1 - + addvarvar hud_y hud_temp subvarvar hud_y hud_temp2 addvar hud_y 208 - + setvarvar hud_tilenum weaponcount subvar hud_tilenum 4 divvar hud_tilenum 5 addvar hud_tilenum CHAINGUN addvar hud_tilenum 5 - + state G_DrawWeaponTile - + // cleanup subvarvar hud_x hud_temp subvarvar hud_y hud_temp - + // muzzleflash 3 ifvarn hud_temp3 1 { displayrand hud_temp andvar hud_temp 7 } - + addvar hud_x 44 // relative addvarvar hud_x hud_temp addvarvar hud_y hud_temp - + state G_DrawWeaponTile - + // cleanup subvar hud_x 180 // -4+140 + 44 subvar hud_y 208 @@ -753,7 +748,7 @@ state draw_chaingun // CHAINGUN_WEAPON: subvarvar hud_y hud_temp addvarvar hud_y hud_temp2 } - + subvar hud_totaltime 4 ifvarvarl weaponcount hud_totaltime { @@ -765,53 +760,53 @@ state draw_chaingun // CHAINGUN_WEAPON: } else setvar hud_temp 0 - + setvarvar hud_temp2 weaponcount shiftvarr hud_temp2 1 - + addvarvar hud_x hud_temp addvar hud_x 158 // -4+162 - + addvarvar hud_y hud_temp subvarvar hud_y hud_temp2 addvar hud_y 208 - + setvarvar hud_tilenum weaponcount subvar hud_tilenum 2 divvar hud_tilenum 5 addvar hud_tilenum CHAINGUN addvar hud_tilenum 5 - + state G_DrawWeaponTile - + // cleanup subvarvar hud_x hud_temp subvar hud_x 158 subvarvar hud_y hud_temp addvarvar hud_y hud_temp2 subvar hud_y 208 - + // barrels (hot) addvar hud_x 178 - + addvar hud_y 233 - + setvar hud_tilenum CHAINGUN addvar hud_tilenum 1 addvarvar hud_tilenum hud_temp2 - + state G_DrawWeaponTile } else { // barrels addvar hud_x 178 - + addvar hud_y 233 - + setvar hud_tilenum CHAINGUN addvar hud_tilenum 1 - + state G_DrawWeaponTile } break @@ -821,195 +816,194 @@ ends state draw_pistol // PISTOL_WEAPON: // hud_temp4 = FIREDELAY // hud_temp3 = RELOAD - + state reset_hud_weapon_y_coordinate - + setvar hud_tilenum FIRSTGUN - + addvar hud_totaltime 1 ifvarvarl weaponcount hud_totaltime { setvar hud_x 183 // 195-12 addvarvar hud_x weapon_xoffset subvarvar hud_x looking_angSR1 - + addvar hud_y 244 - + ifvarvare weaponcount hud_temp4 subvar hud_x 3 - + ifvarl weaponcount 3 addvarvar hud_tilenum weaponcount - + setvar hud_orientation 2 - + guniqhudid currentweapon - + state G_DrawWeaponTile - + guniqhudid 0 } else { - ifvarand hud_orientation 512 nullop else - addvar hud_orientation 512 - + orvar hud_orientation 512 + subvarvar hud_temp3 weaponcount - + ifvarg hud_temp3 17 { guniqhudid currentweapon - + setvar hud_x 194 subvarvar hud_x looking_angSR1 - + addvar hud_y 230 - + addvar hud_tilenum 4 - + state G_DrawWeaponTile - + guniqhudid 0 } else ifvarg hud_temp3 12 { addvar hud_tilenum 6 - + setvarvar hud_temp weaponcount shiftvarl hud_temp 3 - + setvar hud_x 244 subvarvar hud_x hud_temp subvarvar hud_x looking_angSR1 - + setvarvar hud_temp2 weaponcount shiftvarl hud_temp2 4 - + addvar hud_y 130 addvarvar hud_y hud_temp2 - + state G_DrawWeaponTile - + subvar hud_y 130 subvarvar hud_y hud_temp2 subvar hud_tilenum 6 - + guniqhudid currentweapon - + setvar hud_x 224 subvarvar hud_x looking_angSR1 - + addvar hud_y 220 - + addvar hud_tilenum 5 - + state G_DrawWeaponTile - + guniqhudid 0 } else ifvarg hud_temp3 7 { addvar hud_tilenum 6 - + setvarvar hud_temp weaponcount shiftvarl hud_temp 1 - + setvar hud_x 124 addvarvar hud_x hud_temp subvarvar hud_x looking_angSR1 - + setvarvar hud_temp2 weaponcount shiftvarl hud_temp2 3 - + addvar hud_y 430 subvarvar hud_y hud_temp2 - + state G_DrawWeaponTile - + subvar hud_y 430 addvarvar hud_y hud_temp2 subvar hud_tilenum 6 - + guniqhudid currentweapon - + setvar hud_x 224 subvarvar hud_x looking_angSR1 - + addvar hud_y 220 - + addvar hud_tilenum 5 - + state G_DrawWeaponTile - + guniqhudid 0 } else ifvarg hud_temp3 4 { setvar hud_x 184 subvarvar hud_x looking_angSR1 - + addvar hud_y 235 - + addvar hud_tilenum 8 - + state G_DrawWeaponTile - + subvar hud_y 235 subvar hud_tilenum 8 - + guniqhudid currentweapon - + setvar hud_x 224 subvarvar hud_x looking_angSR1 - + addvar hud_y 210 - + addvar hud_tilenum 5 - + state G_DrawWeaponTile - + guniqhudid 0 } else ifvarg hud_temp3 2 { setvar hud_x 164 subvarvar hud_x looking_angSR1 - + addvar hud_y 245 - + addvar hud_tilenum 8 - + state G_DrawWeaponTile - + subvar hud_y 245 subvar hud_tilenum 8 - + guniqhudid currentweapon - + setvar hud_x 224 subvarvar hud_x looking_angSR1 - + addvar hud_y 220 - + addvar hud_tilenum 5 - + state G_DrawWeaponTile - + guniqhudid 0 } else ifvarg hud_temp3 0 { guniqhudid currentweapon - + setvar hud_x 194 subvarvar hud_x looking_angSR1 - + addvar hud_y 235 - + addvar hud_tilenum 5 - + state G_DrawWeaponTile - + guniqhudid 0 } } @@ -1017,17 +1011,17 @@ ends state draw_pipebomb // HANDBOMB_WEAPON: state reset_hud_weapon_coordinates - + guniqhudid currentweapon - + setvar hud_tilenum HANDTHROW - + ifvarn weaponcount 0 { ifvarvarl weaponcount hud_totaltime { ifvarl weaponcount 7 - { + { setvarvar hud_temp weaponcount mulvar hud_temp 10 addvarvar hud_y hud_temp // D @@ -1046,11 +1040,11 @@ state draw_pipebomb // HANDBOMB_WEAPON: mulvar hud_temp 9 addvarvar hud_y hud_temp // D } - + addvar hud_x 190 - + addvar hud_y 250 - + switch weaponcount /* case 0 @@ -1082,33 +1076,33 @@ state draw_pipebomb // HANDBOMB_WEAPON: addvar hud_tilenum 2 break endswitch - + state G_DrawWeaponTile } } else { addvar hud_x 190 - + addvar hud_y 260 - + state G_DrawWeaponTile } - + guniqhudid 0 ends state draw_detonator // HANDREMOTE_WEAPON: state reset_hud_weapon_coordinates - + guniqhudid currentweapon - + addvar hud_x 102 // -48+150 - + addvar hud_y 258 - + setvar hud_tilenum HANDREMOTE - + switch weaponcount /* case 0 @@ -1130,21 +1124,21 @@ state draw_detonator // HANDREMOTE_WEAPON: addvar hud_tilenum 2 break endswitch - + state G_DrawWeaponTile - + guniqhudid 0 ends state draw_devastator // DEVISTATOR_WEAPON: state reset_hud_weapon_coordinates - + // for guniqhudid setvarvar hud_temp4 currentweapon shiftvarl hud_temp4 1 - + setvar hud_tilenum DEVISTATOR - + setvar hud_temp -1 // flag ifvarg weaponcount 0 @@ -1153,7 +1147,7 @@ state draw_devastator // DEVISTATOR_WEAPON: ifvarvarl weaponcount hud_totaltime { setvar hud_temp 0 - + switch weaponcount default addlogvar weaponcount // debug @@ -1176,7 +1170,7 @@ state draw_devastator // DEVISTATOR_WEAPON: setvar hud_temp 24 break endswitch - + setvarvar hud_temp2 weaponcount shiftvarr hud_temp2 2 // sign function: @@ -1186,25 +1180,25 @@ state draw_devastator // DEVISTATOR_WEAPON: setvar hud_temp3 1 else ifvarl hud_temp2 0 setvar hud_temp3 -1 - + ifvarn player[THISACTOR].hbomb_hold_delay 0 { guniqhudid currentweapon - + setvarvar hud_temp2 hud_temp shiftvarr hud_temp2 1 addvarvar hud_x hud_temp2 addvar hud_x 268 - + addvarvar hud_y hud_temp addvar hud_y 238 - + addvarvar hud_tilenum hud_temp3 - + setvar hud_shade -32 - + state G_DrawWeaponTile - + // cleanup /* subvar hud_x 268 @@ -1215,44 +1209,42 @@ state draw_devastator // DEVISTATOR_WEAPON: state reset_hud_weapon_coordinates subvarvar hud_tilenum hud_temp3 setvarvar hud_shade gs - + guniqhudid hud_temp4 - + addvar hud_x 30 - + addvar hud_y 240 - - ifvarand hud_orientation 4 nullop else - addvar hud_orientation 4 - + + orvar hud_orientation 4 + state G_DrawWeaponTile - + ifvarand hud_orientation 4 - subvar hud_orientation 4 - + xorvar hud_orientation 4 + guniqhudid 0 } else { guniqhudid hud_temp4 - + addvar hud_x 30 setvarvar hud_temp2 hud_temp shiftvarr hud_temp2 1 subvarvar hud_x hud_temp2 - + addvar hud_y 240 addvarvar hud_y hud_temp - + addvarvar hud_tilenum hud_temp3 - + setvar hud_shade -32 - - ifvarand hud_orientation 4 nullop else - addvar hud_orientation 4 - + + orvar hud_orientation 4 + state G_DrawWeaponTile - + // cleanup /* subvar hud_x 30 @@ -1264,63 +1256,61 @@ state draw_devastator // DEVISTATOR_WEAPON: subvarvar hud_tilenum hud_temp3 setvarvar hud_shade gs ifvarand hud_orientation 4 - subvar hud_orientation 4 - + xorvar hud_orientation 4 + guniqhudid currentweapon - + addvar hud_x 268 - + addvar hud_y 238 - + state G_DrawWeaponTile - + guniqhudid 0 } break } } - + ifvare hud_temp -1 { guniqhudid currentweapon - + addvar hud_x 268 - + addvar hud_y 238 - + state G_DrawWeaponTile - + subvar hud_x 268 subvar hud_y 238 - + guniqhudid hud_temp4 - + addvar hud_x 30 - + addvar hud_y 240 - - ifvarand hud_orientation 4 nullop else - addvar hud_orientation 4 - + + orvar hud_orientation 4 + state G_DrawWeaponTile - + ifvarand hud_orientation 4 - subvar hud_orientation 4 - + xorvar hud_orientation 4 + guniqhudid 0 } ends state draw_freezer // FREEZE_WEAPON: state reset_hud_weapon_coordinates - + setvar hud_tilenum FREEZE - - ifvarand hud_orientation 512 nullop else - addvar hud_orientation 512 - + + orvar hud_orientation 512 + setvar hud_temp3 0 - + ifvarg weaponcount 0 { addvar hud_totaltime 1 @@ -1331,71 +1321,71 @@ state draw_freezer // FREEZE_WEAPON: { displayrand hud_temp andvar hud_temp 3 - + addvarvar hud_x hud_temp addvarvar hud_y hud_temp } - + guniqhudid 0 - + addvar hud_x 210 - + addvar hud_y 277 // 16 + 261 - + addvar hud_tilenum 2 - + setvar hud_shade -32 - + state G_DrawWeaponTile - + guniqhudid currentweapon - + subvar hud_y 26 // relative - + setvarvar hud_temp weaponcount modvar hud_temp 6 divvar hud_temp 2 addvar hud_tilenum 1 addvarvar hud_tilenum hud_temp - + state G_DrawWeaponTile - + guniqhudid 0 - + setvar hud_temp3 1 } } ifvare hud_temp3 0 { guniqhudid currentweapon - + addvar hud_x 210 - + addvar hud_y 261 - + state G_DrawWeaponTile - + guniqhudid 0 } - + ifvarand hud_orientation 512 - subvar hud_orientation 512 + xorvar hud_orientation 512 ends state draw_expander // GROW_WEAPON: state reset_hud_weapon_coordinates - + addvar hud_x 28 addvar hud_y 18 - + setvarvar hud_temp4 hud_pal setvar hud_pal 2 - + setvarvar hud_temp3 currentweapon shiftvarl hud_temp3 1 - + setvar hud_temp2 0 - + ifvarg weaponcount 0 { ifvarvarl weaponcount hud_totaltime @@ -1408,93 +1398,93 @@ state draw_expander // GROW_WEAPON: } else setvar hud_temp 0 - + addvarvar hud_x hud_temp addvar hud_x 184 - + addvar hud_y 240 subvarvar hud_y hud_temp - + setvarvar hud_tilenum weaponcount andvar hud_tilenum 3 addvar hud_tilenum SHRINKER addvar hud_tilenum 3 - + setvar hud_shade -32 - + guniqhudid hud_temp3 - + state G_DrawWeaponTile_crystal - + guniqhudid currentweapon - + addvar hud_x 4 - + setvar hud_tilenum SHRINKER subvar hud_tilenum 1 - + setvarvar hud_shade gs - + setvarvar hud_pal hud_temp4 - + state G_DrawWeaponTile - + guniqhudid 0 - + setvar hud_temp2 1 } } ifvare hud_temp2 0 { addvar hud_x 184 - + addvar hud_y 240 - + setvar hud_tilenum SHRINKER addvar hud_tilenum 2 - + getplayer[THISACTOR].random_club_frame hud_shade andvar hud_shade 2047 sin hud_shade hud_shade shiftvarr hud_shade 10 mulvar hud_shade -1 addvar hud_shade 16 - + guniqhudid hud_temp3 - + state G_DrawWeaponTile_crystal - + guniqhudid currentweapon - + addvar hud_x 4 - + setvar hud_tilenum SHRINKER subvar hud_tilenum 2 - + setvarvar hud_shade gs - + setvarvar hud_pal hud_temp4 - + state G_DrawWeaponTile - + guniqhudid 0 } ends state draw_shrinker // SHRINKER_WEAPON: state reset_hud_weapon_coordinates - + addvar hud_x 28 addvar hud_y 18 - + setvarvar hud_temp4 hud_pal setvar hud_pal 0 - + setvarvar hud_temp3 currentweapon shiftvarl hud_temp3 1 - + setvar hud_temp2 0 - + ifvarg weaponcount 0 { ifvarvarl weaponcount hud_totaltime @@ -1507,74 +1497,74 @@ state draw_shrinker // SHRINKER_WEAPON: } else setvar hud_temp 0 - + addvarvar hud_x hud_temp addvar hud_x 184 - + addvar hud_y 240 subvarvar hud_y hud_temp - + setvarvar hud_tilenum weaponcount andvar hud_tilenum 3 addvar hud_tilenum SHRINKER addvar hud_tilenum 3 - + setvar hud_shade -32 - + guniqhudid hud_temp3 - + state G_DrawWeaponTile_crystal - + guniqhudid currentweapon - + addvar hud_x 4 - + setvar hud_tilenum SHRINKER addvar hud_tilenum 1 - + setvarvar hud_shade gs - + setvarvar hud_pal hud_temp4 - + state G_DrawWeaponTile - + guniqhudid 0 - + setvar hud_temp2 1 } } ifvare hud_temp2 0 { addvar hud_x 184 - + addvar hud_y 240 - + setvar hud_tilenum SHRINKER addvar hud_tilenum 2 - + getplayer[THISACTOR].random_club_frame hud_shade andvar hud_shade 2047 sin hud_shade hud_shade shiftvarr hud_shade 10 mulvar hud_shade -1 addvar hud_shade 16 - + guniqhudid hud_temp3 - + state G_DrawWeaponTile_crystal - + guniqhudid currentweapon - + addvar hud_x 4 - + setvar hud_tilenum SHRINKER - + setvarvar hud_shade gs - + setvarvar hud_pal hud_temp4 - + state G_DrawWeaponTile - + guniqhudid 0 } ends @@ -1584,17 +1574,17 @@ ends onevent EVENT_DISPLAYWEAPON // P_DisplayWeapon setvar RETURN -1 - + getplayer[THISACTOR].weapon_pos weapon_pos getuserdef[THISACTOR].weaponscale weaponscale getplayer[THISACTOR].i playerid getuserdef[THISACTOR].drawweapon hud_temp - + ifvare hud_temp 2 // weapon icons { setvar hud_tilenum -1 - + switch currentweapon case PISTOL_WEAPON setvar hud_tilenum FIRSTGUNSPRITE @@ -1636,7 +1626,7 @@ onevent EVENT_DISPLAYWEAPON // P_DisplayWeapon break */ endswitch - + ifvarn hud_tilenum -1 { setvar hud_x 160 @@ -1650,22 +1640,22 @@ onevent EVENT_DISPLAYWEAPON // P_DisplayWeapon rotatesprite hud_x hud_y hud_scale 0 hud_tilenum 0 0 2 windowx1 windowy1 windowx2 windowy2 } } - + ifvarn hud_temp 1 break // If we are not displaying the actual HUD weapons, stop processing. - + // these gamevars can get changed in the states up above, so reset them now. setvar hud_scale 65536 setvar hud_orientation 0 setvar hud_angle 0 setvarvar hud_shade gs - + state draw_quick_kick - + // cleanup setvar hud_orientation 0 setvar hud_angle 0 guniqhudid 0 - + getactor[playerid].xrepeat hud_temp ifvarl hud_temp 40 state draw_shrunk_fists @@ -1680,7 +1670,7 @@ onevent EVENT_DISPLAYWEAPON // P_DisplayWeapon else setvar hud_pal 0 } - + switch currentweapon case KNEE_WEAPON setvarvar hud_totaltime WEAPON0_TOTALTIME @@ -1737,7 +1727,7 @@ onevent EVENT_DISPLAYWEAPON // P_DisplayWeapon addlogvar currentweapon break endswitch - + // cleanup setvar hud_orientation 0 setvar hud_angle 0