Skip to content

Commit

Permalink
Prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
xtreme8000 committed Apr 4, 2019
1 parent 3551b1a commit afab133
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/common.h
Expand Up @@ -17,9 +17,9 @@
along with BetterSpades. If not, see <http://www.gnu.org/licenses/>.
*/

#define BETTERSPADES_VERSION "v0.1.3"
#define BETTERSPADES_VERSION "v0.1.4"

#define BETTERSPADES_PATCH 3
#define BETTERSPADES_PATCH 4
#define BETTERSPADES_MINOR 1
#define BETTERSPADES_MAJOR 0

Expand Down
8 changes: 4 additions & 4 deletions src/hud.c
Expand Up @@ -675,7 +675,7 @@ static void hud_ingame_render(float scalex, float scalef) {
}

if(gamestate.gamemode_type==GAMEMODE_CTF) {
if(!gamestate.gamemode.ctf.team_1_intel && map_object_visible(gamestate.gamemode.ctf.team_1_intel_location.dropped.x,0.0F,gamestate.gamemode.ctf.team_1_intel_location.dropped.y)) {
if(!gamestate.gamemode.ctf.team_1_intel) {
glColor3ub(gamestate.team_1.red,gamestate.team_1.green,gamestate.team_1.blue);
texture_draw_rotated(&texture_intel,minimap_x+gamestate.gamemode.ctf.team_1_intel_location.dropped.x*scalef,minimap_y-gamestate.gamemode.ctf.team_1_intel_location.dropped.y*scalef,12*scalef,12*scalef,0.0F);
}
Expand All @@ -686,7 +686,7 @@ static void hud_ingame_render(float scalex, float scalef) {
texture_draw_rotated(&texture_medical,minimap_x+gamestate.gamemode.ctf.team_1_base.x*scalef,minimap_y-gamestate.gamemode.ctf.team_1_base.y*scalef,12*scalef,12*scalef,0.0F);
}

if(!gamestate.gamemode.ctf.team_2_intel && map_object_visible(gamestate.gamemode.ctf.team_2_intel_location.dropped.x,0.0F,gamestate.gamemode.ctf.team_2_intel_location.dropped.y)) {
if(!gamestate.gamemode.ctf.team_2_intel) {
glColor3ub(gamestate.team_2.red,gamestate.team_2.green,gamestate.team_2.blue);
texture_draw_rotated(&texture_intel,minimap_x+gamestate.gamemode.ctf.team_2_intel_location.dropped.x*scalef,minimap_y-gamestate.gamemode.ctf.team_2_intel_location.dropped.y*scalef,12*scalef,12*scalef,0.0F);
}
Expand Down Expand Up @@ -782,7 +782,7 @@ static void hud_ingame_render(float scalex, float scalef) {
glColor3f(1.0F,1.0F,1.0F);
texture_draw_rotated(&texture_medical,settings.window_width-143*scalef+tent1_x*scalef,(585-tent1_y)*scalef,12*scalef,12*scalef,0.0F);
}
if(!gamestate.gamemode.ctf.team_1_intel && map_object_visible(gamestate.gamemode.ctf.team_1_intel_location.dropped.x,0.0F,gamestate.gamemode.ctf.team_1_intel_location.dropped.y)) {
if(!gamestate.gamemode.ctf.team_1_intel) {
float intel_x = min(max(gamestate.gamemode.ctf.team_1_intel_location.dropped.x,view_x),view_x+128.0F)-view_x;
float intel_y = min(max(gamestate.gamemode.ctf.team_1_intel_location.dropped.y,view_z),view_z+128.0F)-view_z;
glColor3ub(gamestate.team_1.red,gamestate.team_1.green,gamestate.team_1.blue);
Expand All @@ -795,7 +795,7 @@ static void hud_ingame_render(float scalex, float scalef) {
glColor3f(1.0F,1.0F,1.0F);
texture_draw_rotated(&texture_medical,settings.window_width-143*scalef+tent2_x*scalef,(585-tent2_y)*scalef,12*scalef,12*scalef,0.0F);
}
if(!gamestate.gamemode.ctf.team_2_intel && map_object_visible(gamestate.gamemode.ctf.team_2_intel_location.dropped.x,0.0F,gamestate.gamemode.ctf.team_2_intel_location.dropped.y)) {
if(!gamestate.gamemode.ctf.team_2_intel) {
float intel_x = min(max(gamestate.gamemode.ctf.team_2_intel_location.dropped.x,view_x),view_x+128.0F)-view_x;
float intel_y = min(max(gamestate.gamemode.ctf.team_2_intel_location.dropped.y,view_z),view_z+128.0F)-view_z;
glColor3ub(gamestate.team_2.red,gamestate.team_2.green,gamestate.team_2.blue);
Expand Down
30 changes: 14 additions & 16 deletions src/main.c
Expand Up @@ -98,27 +98,23 @@ void drawScene(float dt) {
float x = gamestate.gamemode.ctf.team_1_intel_location.dropped.x;
float y = 63.0F-gamestate.gamemode.ctf.team_1_intel_location.dropped.z+1.0F;
float z = gamestate.gamemode.ctf.team_1_intel_location.dropped.y;
if(map_object_visible(x,y,z)) {
matrix_push();
matrix_translate(x,y,z);
kv6_calclight(x,y,z);
matrix_upload();
kv6_render(&model_intel,TEAM_1);
matrix_pop();
}
matrix_push();
matrix_translate(x,y,z);
kv6_calclight(x,y,z);
matrix_upload();
kv6_render(&model_intel,TEAM_1);
matrix_pop();
}
if(!gamestate.gamemode.ctf.team_2_intel) {
float x = gamestate.gamemode.ctf.team_2_intel_location.dropped.x;
float y = 63.0F-gamestate.gamemode.ctf.team_2_intel_location.dropped.z+1.0F;
float z = gamestate.gamemode.ctf.team_2_intel_location.dropped.y;
if(map_object_visible(x,y,z)) {
matrix_push();
matrix_translate(x,y,z);
kv6_calclight(x,y,z);
matrix_upload();
kv6_render(&model_intel,TEAM_2);
matrix_pop();
}
matrix_push();
matrix_translate(x,y,z);
kv6_calclight(x,y,z);
matrix_upload();
kv6_render(&model_intel,TEAM_2);
matrix_pop();
}
if(map_object_visible(gamestate.gamemode.ctf.team_1_base.x,
63.0F-gamestate.gamemode.ctf.team_1_base.z+1.0F,
Expand Down Expand Up @@ -611,9 +607,11 @@ int main(int argc, char** argv) {

window_init();

#ifndef OPENGL_ES
if(glewInit()) {
log_error("Could not load extended OpenGL functions!");
}
#endif

log_info("Vendor: %s",glGetString(GL_VENDOR));
log_info("Renderer: %s",glGetString(GL_RENDERER));
Expand Down

0 comments on commit afab133

Please sign in to comment.