Skip to content

Commit

Permalink
Fix small audio mistake and fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sol-vin committed May 10, 2024
1 parent 56537f9 commit a5a87e9
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion examples/collisionarea/shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ version: 2.0
shards:
raylib-cr:
path: ../../
version: 0.9
version: 5.0

2 changes: 1 addition & 1 deletion examples/fogshader/shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ version: 2.0
shards:
raylib-cr:
path: ../../
version: 0.9+git.commit.68f9e5489547eb992e2394b4e5391890617a2ae6
version: 5.0

Binary file removed examples/raygui_button/bin/raygui_button
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/raygui_button/shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ version: 2.0
shards:
raylib-cr:
path: ../../
version: 4.6
version: 5.0

2 changes: 1 addition & 1 deletion examples/raygui_button/src/raygui_button.cr
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ until Raylib.close_window?
height: button_height
),
"Click This Button"
)
) == 1
show_text = !show_text
end

Expand Down
2 changes: 1 addition & 1 deletion examples/rlgl_solar_system/shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ version: 2.0
shards:
raylib-cr:
path: ../../
version: 0.9
version: 5.0

2 changes: 1 addition & 1 deletion examples/rlgl_solar_system/src/rlgl_solar_system.cr
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ moon_orbit_rotation = 0.0_f32
Rl.set_target_fps(60)

until Rl.close_window?
Rl.update_camera(pointerof(camera), Rl::CameraMode::Free)
# Rl.update_camera(pointerof(camera), Rl::CameraMode::Free)
earth_rotation += (5.0_f32 * rotation_speed)
earth_orbit_rotation += (365/360.0_f32*(5.0_f32*rotation_speed)*rotation_speed)
moon_rotation += (2.0_f32*rotation_speed)
Expand Down
2 changes: 1 addition & 1 deletion examples/shapes/shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ version: 2.0
shards:
raylib-cr:
path: ../../
version: 0.9
version: 5.0

2 changes: 1 addition & 1 deletion examples/shapes_top_down_lights/shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ version: 2.0
shards:
raylib-cr:
path: ../../
version: 0.9
version: 5.0

2 changes: 1 addition & 1 deletion examples/smooth_pixel_perfect_camera/shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ version: 2.0
shards:
raylib-cr:
path: ../../
version: 0.9
version: 5.0

2 changes: 1 addition & 1 deletion examples/sound_test/shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ version: 2.0
shards:
raylib-cr:
path: ../../
version: 0.9
version: 5.0

2 changes: 1 addition & 1 deletion examples/three_d_camera_mode/shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ version: 2.0
shards:
raylib-cr:
path: ../../
version: 0.9
version: 5.0

4 changes: 3 additions & 1 deletion rsrc/build-examples/build.cr
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ FileUtils.cd("examples") do
file = "../_build/#{name}"
{% if flag?(:windows) %}
file = "../_build/#{name}.exe"
FileUtils.cp("../../rsrc/native/windows/raylib.dll", "../_build/raylib.dll")
FileUtils.cp("../../rsrc/native/windows/raygui.dll", "../_build/raygui.dll")
{% end %}

unless File.exists?(file)
Expand All @@ -37,7 +39,7 @@ FileUtils.cd("examples") do
end

begin
FileUtils.cp_r("./rsrc", "../_build/rsrc")
FileUtils.cp_r("./rsrc", "../_build/")
rescue
end
end
Expand Down
2 changes: 0 additions & 2 deletions rsrc/miniaudiohelpers/miniaudiohelpers.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#define MINIAUDIO_IMPLEMENTATION

#include "miniaudio.h"

size_t MADataConverterSize();
Expand Down
Binary file added rsrc/native/windows/raygui.dll
Binary file not shown.
Binary file added rsrc/native/windows/raylib.dll
Binary file not shown.
10 changes: 10 additions & 0 deletions src/raylib-cr/audio.cr
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ lib RAudio
ctx_type : LibC::Int
ctx_data : Void*
end

enum MusicContextType
AudioNone = 0
AudioWav = 1
AudioOGG = 2
AudioFLAC = 3
AudioMP3 = 4
ModuleXM = 5
ModuleMod = 6
end

fun init_audio_device = InitAudioDevice
fun close_audio_device = CloseAudioDevice
Expand Down
9 changes: 0 additions & 9 deletions src/raylib-cr/raylib.cr
Original file line number Diff line number Diff line change
Expand Up @@ -374,15 +374,6 @@ lib Raylib
ThreePatchHorizontal = 2
end

enum MusicContextType
AudioNone = 0
AudioWav = 1
AudioOGG = 2
AudioFLAC = 3
AudioMP3 = 4
ModuleXM = 5
ModuleMod = 6
end

LIGHTGRAY = Color.new r: 200, g: 200, b: 200, a: 255
GRAY = Color.new r: 130, g: 130, b: 130, a: 255
Expand Down

0 comments on commit a5a87e9

Please sign in to comment.