Added secondary weapon indicators to new reticle types; Fixed disks being drawn as circles - whoops
This commit is contained in:
parent
a025d430c0
commit
53c9fa987f
|
@ -5,6 +5,7 @@ D1X-Rebirth Changelog
|
|||
main/automap.c, main/gauges.c, main/gauges.h, main/kconfig.c, main/newmenu.c, main/newmenu.h: Fixed broken FlightSim indicator on Automap; Fixed Assert for using mouse buttons in kconfig (which can react to UP and DOWN states); Added scrolling support for menus flagged tiny_mode and all_text
|
||||
arch/ogl/gr.c, arch/sdl/gr.c, d1x.ini, include/args.h, main/inferno.c, misc/args.c: Simplified ogl version of gr.c in terms of SDL video flags and fullscreen toggle; Added command-line/INI option to remove borders from windowed program
|
||||
main/multi.c: Fixed compiler warning related to generation of game_id for Coop Savegames
|
||||
arch/ogl/ogl.c, main/gauges.c: Added secondary weapon indicators to new reticle types; Fixed disks being drawn as circles - whoops
|
||||
|
||||
20110209
|
||||
--------
|
||||
|
|
|
@ -806,7 +806,7 @@ int gr_disk(fix x,fix y,fix r)
|
|||
nsides = 10 + 2 * (int)(M_PI * f2fl(r) / 19);
|
||||
if(!disk_va)
|
||||
disk_va = circle_array_init(nsides);
|
||||
ogl_drawcircle(nsides, GL_LINE_LOOP, disk_va);
|
||||
ogl_drawcircle(nsides, GL_TRIANGLE_FAN, disk_va);
|
||||
glPopMatrix();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1990,7 +1990,7 @@ xy primary_offsets[4] = { {-30,14}, {-16,6}, {-15,6}, {-8, 2} };
|
|||
xy secondary_offsets[4] = { {-24,2}, {-12,0}, {-12,1}, {-6,-2} };
|
||||
|
||||
//draw the reticle
|
||||
void show_reticle(int reticle_type)
|
||||
void show_reticle(int reticle_type, int secondary_display)
|
||||
{
|
||||
int x,y,size;
|
||||
int laser_ready,missile_ready,laser_ammo,missile_ammo;
|
||||
|
@ -2058,30 +2058,66 @@ void show_reticle(int reticle_type)
|
|||
|
||||
}
|
||||
case RET_TYPE_X:
|
||||
gr_uline(i2f(x-(size/2)), i2f(y-(size/2)), i2f(x-(size/5)), i2f(y-(size/5)));
|
||||
gr_uline(i2f(x+(size/2)), i2f(y-(size/2)), i2f(x+(size/5)), i2f(y-(size/5)));
|
||||
gr_uline(i2f(x-(size/2)), i2f(y+(size/2)), i2f(x-(size/5)), i2f(y+(size/5)));
|
||||
gr_uline(i2f(x+(size/2)), i2f(y+(size/2)), i2f(x+(size/5)), i2f(y+(size/5)));
|
||||
gr_uline(i2f(x-(size/2)), i2f(y-(size/2)), i2f(x-(size/5)), i2f(y-(size/5))); // top-left
|
||||
gr_uline(i2f(x+(size/2)), i2f(y-(size/2)), i2f(x+(size/5)), i2f(y-(size/5))); // top-right
|
||||
gr_uline(i2f(x-(size/2)), i2f(y+(size/2)), i2f(x-(size/5)), i2f(y+(size/5))); // bottom-left
|
||||
gr_uline(i2f(x+(size/2)), i2f(y+(size/2)), i2f(x+(size/5)), i2f(y+(size/5))); // bottom-right
|
||||
if (secondary_display && secondary_bm_num == 1)
|
||||
gr_uline(i2f(x-(size/2)-(size/5)), i2f(y-(size/2)), i2f(x-(size/5)-(size/5)), i2f(y-(size/5)));
|
||||
else if (secondary_display && secondary_bm_num == 2)
|
||||
gr_uline(i2f(x+(size/2)+(size/5)), i2f(y-(size/2)), i2f(x+(size/5)+(size/5)), i2f(y-(size/5)));
|
||||
else if (secondary_display && secondary_bm_num == 4)
|
||||
gr_uline(i2f(x+(size/2)), i2f(y+(size/2)+(size/5)), i2f(x+(size/5)), i2f(y+(size/5)+(size/5)));
|
||||
break;
|
||||
case RET_TYPE_DOT:
|
||||
gr_disk(i2f(x),i2f(y),i2f(size/4));
|
||||
gr_disk(i2f(x),i2f(y),i2f(size/5));
|
||||
if (secondary_display && secondary_bm_num == 1)
|
||||
gr_uline(i2f(x-(size/2)-(size/5)), i2f(y-(size/2)), i2f(x-(size/5)-(size/5)), i2f(y-(size/5)));
|
||||
else if (secondary_display && secondary_bm_num == 2)
|
||||
gr_uline(i2f(x+(size/2)+(size/5)), i2f(y-(size/2)), i2f(x+(size/5)+(size/5)), i2f(y-(size/5)));
|
||||
else if (secondary_display && secondary_bm_num == 4)
|
||||
gr_uline(i2f(x), i2f(y+(size/2)+(size/5)), i2f(x), i2f(y+(size/5)+(size/5)));
|
||||
break;
|
||||
case RET_TYPE_CIRCLE:
|
||||
gr_ucircle(i2f(x),i2f(y),i2f(size/4));
|
||||
if (secondary_display && secondary_bm_num == 1)
|
||||
gr_uline(i2f(x-(size/2)-(size/5)), i2f(y-(size/2)), i2f(x-(size/5)-(size/5)), i2f(y-(size/5)));
|
||||
else if (secondary_display && secondary_bm_num == 2)
|
||||
gr_uline(i2f(x+(size/2)+(size/5)), i2f(y-(size/2)), i2f(x+(size/5)+(size/5)), i2f(y-(size/5)));
|
||||
else if (secondary_display && secondary_bm_num == 4)
|
||||
gr_uline(i2f(x), i2f(y+(size/2)+(size/5)), i2f(x), i2f(y+(size/5)+(size/5)));
|
||||
break;
|
||||
case RET_TYPE_CROSS_V1:
|
||||
gr_uline(i2f(x),i2f(y-(size/2)),i2f(x),i2f(y+(size/2)+1));
|
||||
gr_uline(i2f(x-(size/2)),i2f(y),i2f(x+(size/2)+1),i2f(y));
|
||||
gr_uline(i2f(x),i2f(y-(size/2)),i2f(x),i2f(y+(size/2)+1)); // horiz
|
||||
gr_uline(i2f(x-(size/2)),i2f(y),i2f(x+(size/2)+1),i2f(y)); // vert
|
||||
if (secondary_display && secondary_bm_num == 1)
|
||||
gr_uline(i2f(x-(size/2)), i2f(y-(size/2)), i2f(x-(size/5)), i2f(y-(size/5)));
|
||||
else if (secondary_display && secondary_bm_num == 2)
|
||||
gr_uline(i2f(x+(size/2)), i2f(y-(size/2)), i2f(x+(size/5)), i2f(y-(size/5)));
|
||||
else if (secondary_display && secondary_bm_num == 4)
|
||||
gr_uline(i2f(x-(size/2)), i2f(y+(size/2)), i2f(x-(size/5)), i2f(y+(size/5)));
|
||||
break;
|
||||
case RET_TYPE_CROSS_V2:
|
||||
gr_uline(i2f(x), i2f(y-(size/2)), i2f(x), i2f(y-(size/6)));
|
||||
gr_uline(i2f(x), i2f(y+(size/2)), i2f(x), i2f(y+(size/6)));
|
||||
gr_uline(i2f(x-(size/2)), i2f(y), i2f(x-(size/6)), i2f(y));
|
||||
gr_uline(i2f(x+(size/2)), i2f(y), i2f(x+(size/6)), i2f(y));
|
||||
gr_uline(i2f(x), i2f(y-(size/2)), i2f(x), i2f(y-(size/6))); // vert-top
|
||||
gr_uline(i2f(x), i2f(y+(size/2)), i2f(x), i2f(y+(size/6))); // vert-bottom
|
||||
gr_uline(i2f(x-(size/2)), i2f(y), i2f(x-(size/6)), i2f(y)); // horiz-left
|
||||
gr_uline(i2f(x+(size/2)), i2f(y), i2f(x+(size/6)), i2f(y)); // horiz-right
|
||||
if (secondary_display && secondary_bm_num == 1)
|
||||
gr_uline(i2f(x-(size/2)), i2f(y-(size/2)), i2f(x-(size/5)), i2f(y-(size/5)));
|
||||
else if (secondary_display && secondary_bm_num == 2)
|
||||
gr_uline(i2f(x+(size/2)), i2f(y-(size/2)), i2f(x+(size/5)), i2f(y-(size/5)));
|
||||
else if (secondary_display && secondary_bm_num == 4)
|
||||
gr_uline(i2f(x-(size/2)), i2f(y+(size/2)), i2f(x-(size/5)), i2f(y+(size/5)));
|
||||
break;
|
||||
case RET_TYPE_ANGLE:
|
||||
gr_uline(i2f(x),i2f(y),i2f(x),i2f(y+(size/2)));
|
||||
gr_uline(i2f(x),i2f(y),i2f(x+(size/2)),i2f(y));
|
||||
gr_uline(i2f(x),i2f(y),i2f(x),i2f(y+(size/2))); // vert
|
||||
gr_uline(i2f(x),i2f(y),i2f(x+(size/2)),i2f(y)); // horiz
|
||||
if (secondary_display && secondary_bm_num == 1)
|
||||
gr_uline(i2f(x-(size/2)), i2f(y-(size/2)), i2f(x-(size/5)), i2f(y-(size/5)));
|
||||
else if (secondary_display && secondary_bm_num == 2)
|
||||
gr_uline(i2f(x+(size/2)), i2f(y-(size/2)), i2f(x+(size/5)), i2f(y-(size/5)));
|
||||
else if (secondary_display && secondary_bm_num == 4)
|
||||
gr_uline(i2f(x-(size/2)), i2f(y+(size/2)), i2f(x-(size/5)), i2f(y+(size/5)));
|
||||
break;
|
||||
case RET_TYPE_NONE:
|
||||
break;
|
||||
|
@ -2392,7 +2428,7 @@ void draw_hud()
|
|||
#endif
|
||||
#endif
|
||||
if (PlayerCfg.CockpitMode[1] != CM_LETTERBOX)
|
||||
show_reticle(PlayerCfg.ReticleType);
|
||||
show_reticle(PlayerCfg.ReticleType, 1);
|
||||
if (PlayerCfg.CockpitMode[1] != CM_LETTERBOX && Newdemo_state != ND_STATE_PLAYBACK && PlayerCfg.MouseFlightSim && PlayerCfg.MouseFSIndicator)
|
||||
show_mousefs_indicator(Controls.raw_mouse_axis[0], Controls.raw_mouse_axis[1], Controls.raw_mouse_axis[2], GWIDTH/2, GHEIGHT/2, GHEIGHT/4);
|
||||
|
||||
|
|
Loading…
Reference in a new issue