|
|
|
@ -1285,6 +1285,7 @@ bool FaceBall::OnUserCreate() |
|
|
|
|
life2 = new Decal(new Sprite("assets/life2.png")); |
|
|
|
|
life1 = new Decal(new Sprite("assets/life1.png")); |
|
|
|
|
crosshair = new Decal(new Sprite("assets/crosshair.png")); |
|
|
|
|
hudmeter = new Decal(new Sprite("assets/hudmeter.png")); |
|
|
|
|
|
|
|
|
|
enemy_ShootMe = { "assets/enemies/ShootMe.obj", enemy_ShootMe_tex }; |
|
|
|
|
enemy_IShoot = { "assets/enemies/IShoot.obj", enemy_IShoot_tex }; |
|
|
|
@ -1511,6 +1512,9 @@ void FaceBall::RenderHud(float fElapsedTime) { |
|
|
|
|
hudAdjustment.y += hudShakeAmt * 4; |
|
|
|
|
} |
|
|
|
|
vf2d hudLoc = { hudAdjustment.x + (hp>0?hudOffset:0),hudAdjustment.y}; |
|
|
|
|
DrawWarpedDecal(hudmeter, { meter_ARMOR[0] + hudLoc + vf2d{float(hudmeter->sprite->width),float(hudmeter->sprite->height)} / 2,meter_ARMOR[1] + hudLoc + vf2d{float(hudmeter->sprite->width),float(hudmeter->sprite->height)} / 2,meter_ARMOR[2].lerp(meter_ARMOR[1],1 - float(armorUpgrades)/maxArmorUpgrades) + hudLoc + vf2d{float(hudmeter->sprite->width),float(hudmeter->sprite->height)} / 2, meter_ARMOR[3].lerp(meter_ARMOR[0],1- float(armorUpgrades)/maxArmorUpgrades) + hudLoc + vf2d{float(hudmeter->sprite->width),float(hudmeter->sprite->height)} / 2}); |
|
|
|
|
DrawWarpedDecal(hudmeter, { meter_SPEED[0] + hudLoc + vf2d{float(hudmeter->sprite->width),float(hudmeter->sprite->height)}/2, meter_SPEED[1] + hudLoc + vf2d{float(hudmeter->sprite->width),float(hudmeter->sprite->height)} / 2,meter_SPEED[2].lerp(meter_SPEED[1],1 - float(speedUpgrades) / maxSpeedUpgrades) + hudLoc + vf2d{float(hudmeter->sprite->width),float(hudmeter->sprite->height)}/2, meter_SPEED[3].lerp(meter_SPEED[0],1-float(speedUpgrades) / maxSpeedUpgrades) + hudLoc + vf2d{float(hudmeter->sprite->width),float(hudmeter->sprite->height)} / 2 }); |
|
|
|
|
DrawWarpedDecal(hudmeter, { meter_SHOTS[0] + hudLoc + vf2d{float(hudmeter->sprite->width),float(hudmeter->sprite->height)} / 2,meter_SHOTS[1] + hudLoc + vf2d{float(hudmeter->sprite->width),float(hudmeter->sprite->height)} / 2,meter_SHOTS[2].lerp(meter_SHOTS[1],1 - float(shotsUpgrades) / maxShotsUpgrades) + hudLoc + vf2d{float(hudmeter->sprite->width),float(hudmeter->sprite->height)} / 2, meter_SHOTS[3].lerp(meter_SHOTS[0],1-float(shotsUpgrades) / maxShotsUpgrades) + hudLoc + vf2d{float(hudmeter->sprite->width),float(hudmeter->sprite->height)} / 2}); |
|
|
|
|
DrawDecal(hudLoc, hud, { 1.05,1.05 }); |
|
|
|
|
DrawDecal(hudLoc + vf2d{ 704+32,56+18 }, life4, { 1,1 }, float(hp) / maxHP > 0.75f ? WHITE : VERY_DARK_GREEN); |
|
|
|
|
DrawDecal(hudLoc + vf2d{ 704 - 64+32,56+18 }, life3, { 1,1 }, float(hp) / maxHP > 0.34f && float(hp) / maxHP <= 0.75f ? WHITE : VERY_DARK_GREEN); |
|
|
|
|