Skip to content

Commit a8c54ca

Browse files
committedMar 10, 2022
release 2.8.2
* Crosshair options
1 parent 0f6b78e commit a8c54ca

8 files changed

+24
-7
lines changed
 

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ The following additional, and reimplemented, arguments have been added to Hypseu
181181
-bootsilent [ Mute sound during initVLDP() if possible ]
182182
-js_range <1-20> [ Adjust Singe joystick sensitivity: [def:5] ]
183183
-manymouse [ Enable ABS mouse input [lightguns] [gungames] ]
184+
-nocrosshair [ Request game does not display crosshairs ]
184185
-oversize_overlay [ Use with HD gungame m2v video sources ]
185186
-retropath [ Singe data path rewrites [libretro] ]
186187
-sinden <1-10> <color> [ Enable software border for lightguns ]

‎src/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.0)
22

3-
set(PKG_VERSION "v2.8.1")
3+
set(PKG_VERSION "v2.8.2")
44

55
project(hypseus)
66

‎src/HyperseusManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<version>
33
<major>2</major>
44
<minor>8</minor>
5-
<build>1</build>
5+
<build>2</build>
66
</version>
77
</manifest>

‎src/game/singe.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ void singe::start()
211211
g_ldp->set_seek_frames_per_ms(0);
212212
g_ldp->set_min_seek_delay(0);
213213

214+
if (notarget) g_pSingeOut->sep_call_lua("noCrosshair", "i", 1);
214215
if (muteinit) g_pSingeOut->sep_call_lua("mutevldpInit", "i", 1);
215216
if (oc) g_pSingeOut->sep_call_lua("luaChangeSpeed", "i", 1);
216217

@@ -381,6 +382,10 @@ bool singe::handle_cmdline_arg(const char *arg)
381382
game::set_manymouse(true);
382383
bResult = true;
383384
}
385+
else if (strcasecmp(arg, "-nocrosshair") == 0) {
386+
notarget = true;
387+
bResult = true;
388+
}
384389
else if (strcasecmp(arg, "-sinden") == 0) {
385390
get_next_word(s, sizeof(s));
386391
i = atoi(s);

‎src/game/singe.h

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class singe : public game
6868
bool singe_alt_pressed = false;
6969
bool oversize_overlay = false;
7070
bool muteinit = false;
71+
bool notarget = false;
7172
bool oc = false;
7273

7374
// g_ldp function wrappers (to make function pointers out of them)

‎src/game/singe/singeproxy.cpp

+11-2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ double g_sep_overlay_scale_x = 1;
6969
double g_sep_overlay_scale_y = 1;
7070
bool g_pause_state = false; // by RDG2010
7171
bool g_init_mute = false;
72+
bool g_show_crosshair = true;
7273

7374
int (*g_original_prepare_frame)(uint8_t *Yplane, uint8_t *Uplane, uint8_t *Vplane,
7475
int Ypitch, int Upitch, int Vpitch);
@@ -554,10 +555,11 @@ void sep_startup(const char *script)
554555
lua_register(g_se_lua_context, "overlaySetResolution", sep_singe_two_pseudo_call_true);
555556
lua_register(g_se_lua_context, "singeSetGameName", sep_singe_two_pseudo_call_true);
556557
lua_register(g_se_lua_context, "onOverlayUpdate", sep_singe_two_pseudo_call_true);
557-
lua_register(g_se_lua_context, "singeWantsCrosshairs", sep_singe_two_pseudo_call_false);
558+
lua_register(g_se_lua_context, "singeWantsCrosshairs", sep_singe_wants_crosshair);
558559

559560
lua_register(g_se_lua_context, "luaChangeSpeed", sep_alter_lua_clock);
560561
lua_register(g_se_lua_context, "mutevldpInit", sep_mute_vldp_init);
562+
lua_register(g_se_lua_context, "noCrosshair", sep_no_crosshair);
561563

562564
// by RDG2010
563565
lua_register(g_se_lua_context, "keyboardGetMode", sep_keyboard_get_mode);
@@ -957,8 +959,9 @@ static int sep_singe_two_pseudo_call_true(lua_State *L)
957959
return 0;
958960
}
959961

960-
static int sep_singe_two_pseudo_call_false(lua_State *L)
962+
static int sep_singe_wants_crosshair(lua_State *L)
961963
{
964+
lua_pushboolean(L, g_show_crosshair);
962965
return 1;
963966
}
964967

@@ -980,6 +983,12 @@ static int sep_mute_vldp_init(lua_State *L)
980983
return 1;
981984
}
982985

986+
static int sep_no_crosshair(lua_State *L)
987+
{
988+
g_show_crosshair = false;
989+
return 1;
990+
}
991+
983992
static int sep_mpeg_get_width(lua_State *L)
984993
{
985994
lua_pushnumber(L, g_pSingeIn->g_vldp_info->w);

‎src/game/singe/singeproxy.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ static int sep_color_set_forecolor(lua_State *L);
8181
static int sep_hypseus_get_height(lua_State *L);
8282
static int sep_alter_lua_clock(lua_State *L);
8383
static int sep_mute_vldp_init(lua_State *L);
84+
static int sep_no_crosshair(lua_State *L);
8485
static int sep_hypseus_get_width(lua_State *L);
8586
static int sep_debug_say(lua_State *L);
8687
static int sep_font_load(lua_State *L);
@@ -131,4 +132,4 @@ static int sep_sound_stop(lua_State *L);
131132
static int sep_sound_flush_queue(lua_State *L);
132133
// by DBX - Singe 2
133134
static int sep_singe_two_pseudo_call_true(lua_State *L);
134-
static int sep_singe_two_pseudo_call_false(lua_State *L);
135+
static int sep_singe_wants_crosshair(lua_State *L);

‎win32/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
Latest build is: (_32bit_ and _64bit_ versions are available.)
1010

1111
hypseus.exe -v
12-
[version] Hypseus Singe: v2.8.1
12+
[version] Hypseus Singe: v2.8.2
1313
[console] Windows 10
1414
[console] SDL(CC): 2.0.14
1515
[console] SDL(LD): 2.0.16
16-
[console] Build: Feb 10 2022 00:30:00
16+
[console] Build: Mar 10 2022 00:10:00
1717

1818

1919
## Install

0 commit comments

Comments
 (0)
Please sign in to comment.