Skip to content

Commit

Permalink
Change scaling factor from int to double
Browse files Browse the repository at this point in the history
This fixes #9.
  • Loading branch information
kuroni committed Jan 30, 2019
1 parent 5f0a2bf commit 44de3b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void create_config()
"rgb": [255, 255, 255],
"offsetX": [0, 11],
"offsetY": [0, -65],
"scalar": [1, 1]
"scalar": [1.0, 1.0]
},
"osu": {
"mouse": true,
Expand Down
7 changes: 4 additions & 3 deletions src/osu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ namespace osu
{
Json::Value left_key_value, right_key_value, smoke_key_value, wave_key_value;
int osu_x, osu_y, osu_h, osu_v;
int offset_x, offset_y, scale;
int offset_x, offset_y;
int horizontal, vertical;
double scale;
bool is_mouse, is_letterbox, is_left_handed;
sf::Sprite bg, up, left, right, device, smoke, wave;

Expand Down Expand Up @@ -71,13 +72,13 @@ bool init()
{
offset_x = (data::cfg["decoration"]["offsetX"])[0].asInt();
offset_y = (data::cfg["decoration"]["offsetY"])[0].asInt();
scale = (data::cfg["decoration"]["scalar"])[0].asInt();
scale = (data::cfg["decoration"]["scalar"])[0].asDouble();
}
else
{
offset_x = (data::cfg["decoration"]["offsetX"])[1].asInt();
offset_y = (data::cfg["decoration"]["offsetY"])[1].asInt();
scale = (data::cfg["decoration"]["scalar"])[1].asInt();
scale = (data::cfg["decoration"]["scalar"])[1].asDouble();
}

// importing sprites
Expand Down

0 comments on commit 44de3b3

Please sign in to comment.