|
|
@ -958,6 +958,16 @@ void FaceBall::RenderPowerupMesh(mat4x4& matView, std::vector<Triangle>& vecTria |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (p.opened) { |
|
|
|
|
|
|
|
Mesh mesh; |
|
|
|
|
|
|
|
float uv = ((int)p.type - 1) * 0.125f; |
|
|
|
|
|
|
|
mesh.tris.push_back({ {{-0.25,0,0},{0.25,0,0},{-0.25,0.5,0}},{{uv,1},{uv + 0.125f,1},{uv,0}},{WHITE,WHITE,WHITE},powerups_tex }); |
|
|
|
|
|
|
|
mesh.tris.push_back({ {{-0.25,0.5,0},{0.25,0,0},{0.25,0.5,0}},{{uv,0},{uv + 0.125f,1},{uv + 0.125f,0}},{WHITE,WHITE,WHITE},powerups_tex }); |
|
|
|
|
|
|
|
Object billboard = { |
|
|
|
|
|
|
|
mesh,p.pos,std::atan2f(player.GetPos().z - p.pos.z,player.GetPos().x - p.pos.x) - PI / 2,0.25f |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
RenderMesh(matView, vecTrianglesToRaster, billboard, false); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void FaceBall::RenderMeshDeathScreen(mat4x4& matView, std::vector<Triangle>& vecTrianglesToRaster, Object& o) { |
|
|
|
void FaceBall::RenderMeshDeathScreen(mat4x4& matView, std::vector<Triangle>& vecTrianglesToRaster, Object& o) { |
|
|
@ -1508,6 +1518,7 @@ bool FaceBall::OnUserCreate() |
|
|
|
hudmeter = new Decal(new Sprite("assets/hudmeter.png")); |
|
|
|
hudmeter = new Decal(new Sprite("assets/hudmeter.png")); |
|
|
|
powerup_tex = new Decal(new Sprite("assets/powerup.png")); |
|
|
|
powerup_tex = new Decal(new Sprite("assets/powerup.png")); |
|
|
|
powerup2_tex = new Decal(new Sprite("assets/powerup2.png")); |
|
|
|
powerup2_tex = new Decal(new Sprite("assets/powerup2.png")); |
|
|
|
|
|
|
|
powerups_tex = new Decal(new Sprite("assets/powerups.png")); |
|
|
|
|
|
|
|
|
|
|
|
enemy_ShootMe = { "assets/enemies/ShootMe.obj", enemy_ShootMe_tex }; |
|
|
|
enemy_ShootMe = { "assets/enemies/ShootMe.obj", enemy_ShootMe_tex }; |
|
|
|
enemy_IShoot = { "assets/enemies/IShoot.obj", enemy_IShoot_tex }; |
|
|
|
enemy_IShoot = { "assets/enemies/IShoot.obj", enemy_IShoot_tex }; |
|
|
|