Skip to content

Commit f8bb477

Browse files
committed
Windows fix
1 parent ee29e33 commit f8bb477

File tree

3 files changed

+43
-5
lines changed

3 files changed

+43
-5
lines changed

CMakeSettings.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "x64-Debug",
5+
"generator": "Ninja",
6+
"configurationType": "Debug",
7+
"inheritEnvironments": [ "msvc_x64_x64" ],
8+
"buildRoot": "${projectDir}\\out\\build\\${name}",
9+
"installRoot": "${projectDir}\\out\\install\\${name}",
10+
"cmakeCommandArgs": "",
11+
"buildCommandArgs": "-v",
12+
"ctestCommandArgs": "",
13+
"variables": []
14+
},
15+
{
16+
"name": "x64-Release",
17+
"generator": "Ninja",
18+
"configurationType": "RelWithDebInfo",
19+
"buildRoot": "${projectDir}\\out\\build\\${name}",
20+
"installRoot": "${projectDir}\\out\\install\\${name}",
21+
"cmakeCommandArgs": "",
22+
"buildCommandArgs": "-v",
23+
"ctestCommandArgs": "",
24+
"inheritEnvironments": [ "msvc_x64_x64" ],
25+
"variables": [
26+
{
27+
"name": "CMAKE_C_FLAGS",
28+
"value": "/DWIN32 /D_WINDOWS",
29+
"type": "STRING"
30+
},
31+
{
32+
"name": "CMAKE_CXX_FLAGS",
33+
"value": "/DWIN32 /D_WINDOWS /GR /EHsc",
34+
"type": "STRING"
35+
}
36+
]
37+
}
38+
]
39+
}

ruby/split.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#console.enabled = false
22
# Sprite split and tween example
3-
img = Image.from_file("data/ball.png")
4-
sprites = img.split(3, 4).map { |img| add_sprite(img) }
5-
scale = 10.0
3+
img = Image.from_file("data/face.png")
4+
sprites = img.split(16, 4).map { |img| add_sprite(img) }
5+
scale = 4.0
66
sprites.each do | s |
77
s.pos = s.pos * scale
8-
p "#{s.pos.x} #{s.pos.y}"
98
tween(s).seconds(5.0).fn(:out_back).
109
from(pos: s.pos + Vec2.rand(5000, 5000)).
1110
from(rotation: 4 * rand(Math::PI * 2)).

src/settings.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22
#include <filesystem>
33

4-
enum ScreenType
4+
enum class ScreenType
55
{
66
Full,
77
Window,

0 commit comments

Comments
 (0)