Skip to content

Commit b758f34

Browse files
committed
Make some more static variables in adventure non-static
These would break if xppcm and yppcm become dynamic sometime...
1 parent 9584af2 commit b758f34

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/adventure.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -964,8 +964,8 @@ adventure::handle_input_playing(tms::event *ev, int action)
964964
robot *r = static_cast<robot*>(adventure::player);
965965

966966
/* click handlign to switch weapon and tool */
967-
static const float weapon_tol_x = icon_width/2.f + _tms.xppcm*.1f;
968-
static const float weapon_tol_y = icon_height/2.f + _tms.yppcm*.1f;
967+
const float weapon_tol_x = icon_width/2.f + _tms.xppcm*.1f;
968+
const float weapon_tol_y = icon_height/2.f + _tms.yppcm*.1f;
969969

970970
for (int x=0; x<adventure::num_weapons; x++) {
971971
if (fabsf(weapon_icon_pos[x].x - sp.x) < weapon_tol_x
@@ -1542,7 +1542,7 @@ adventure::render()
15421542
icon_height = roundf(_tms.yppcm / 2.5f);
15431543
margin_x = _tms.xppcm / 15.f;
15441544
margin_y = _tms.yppcm / 15.f;
1545-
static float base_x = margin_x + (.5f * _tms.xppcm)/2.f;// + (icon_width / 2.f);
1545+
float base_x = margin_x + (.5f * _tms.xppcm)/2.f;// + (icon_width / 2.f);
15461546
float base_y = _tms.window_height - G->wm->get_margin_y() - (1.0f * _tms.yppcm)/2.f;
15471547

15481548
/* calculate how much space we have to work with */

0 commit comments

Comments
 (0)