Skip to content

Commit

Permalink
🐛 add missing constants
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbrain committed Jan 3, 2023
1 parent af1f674 commit 1272309
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
6 changes: 3 additions & 3 deletions demo/Scenes/FmodScriptTest.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ shape = SubResource("2")

[node name="icon" type="Sprite2D" parent="SoundArea1"]
self_modulate = Color(0.113725, 0.823529, 0.317647, 1)
scale = Vector2(3, 3)
z_index = -1
scale = Vector2(3, 3)
texture = ExtResource("2")

[node name="Label2" type="Label" parent="SoundArea1"]
Expand All @@ -91,9 +91,9 @@ shape = SubResource("3")

[node name="icon" type="Sprite2D" parent="SoundArea2"]
self_modulate = Color(0.0117647, 0.956863, 0.0156863, 1)
z_index = -1
position = Vector2(52.3218, 46.0544)
scale = Vector2(3, 3)
z_index = -1
texture = ExtResource("2")

[node name="Label3" type="Label" parent="SoundArea2"]
Expand All @@ -111,9 +111,9 @@ shape = SubResource("3")

[node name="icon" type="Sprite2D" parent="SoundArea3"]
self_modulate = Color(0.827451, 0.345098, 0.0941176, 1)
z_index = -1
position = Vector2(52.3218, 46.0544)
scale = Vector2(3, 3)
z_index = -1
texture = ExtResource("2")

[node name="Label3" type="Label" parent="SoundArea3"]
Expand Down
4 changes: 2 additions & 2 deletions demo/Script/ChangeColor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ func _ready():
# warning-ignore:return_value_discarded
body_exited.connect(leave)
id = Fmod.create_event_instance("event:/Music/Level 02")
Fmod.set_callback(id, Fmod.FMOD_STUDIO_EVENT_CALLBACK_SOUND_PLAYED)
Fmod.set_callback(id, Fmod.FMOD_STUDIO_EVENT_CALLBACK_ALL)
Fmod.start_event(id)
Fmod.set_event_paused(id, false)
Fmod.set_event_paused(id, true)

# warning-ignore:unused_argument
func enter(area):
Expand Down
20 changes: 19 additions & 1 deletion src/helpers/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,24 @@
BIND_CONSTANT(FMOD_STUDIO_EVENT_CALLBACK_VIRTUAL_TO_REAL) \
BIND_CONSTANT(FMOD_STUDIO_EVENT_CALLBACK_START_EVENT_COMMAND) \
BIND_CONSTANT(FMOD_STUDIO_EVENT_CALLBACK_NESTED_TIMELINE_BEAT) \
BIND_CONSTANT(FMOD_STUDIO_EVENT_CALLBACK_ALL)
BIND_CONSTANT(FMOD_STUDIO_EVENT_CALLBACK_ALL) \
\
BIND_CONSTANT(FMOD_STUDIO_LOADING_STATE_UNLOADING) \
BIND_CONSTANT(FMOD_STUDIO_LOADING_STATE_UNLOADED) \
BIND_CONSTANT(FMOD_STUDIO_LOADING_STATE_LOADING) \
BIND_CONSTANT(FMOD_STUDIO_LOADING_STATE_LOADED) \
BIND_CONSTANT(FMOD_STUDIO_LOADING_STATE_ERROR) \
BIND_CONSTANT(FMOD_STUDIO_LOADING_STATE_FORCEINT) \
\
BIND_CONSTANT(FMOD_STUDIO_PLAYBACK_PLAYING) \
BIND_CONSTANT(FMOD_STUDIO_PLAYBACK_SUSTAINING) \
BIND_CONSTANT(FMOD_STUDIO_PLAYBACK_STOPPED) \
BIND_CONSTANT(FMOD_STUDIO_PLAYBACK_STARTING) \
BIND_CONSTANT(FMOD_STUDIO_PLAYBACK_STOPPING) \
BIND_CONSTANT(FMOD_STUDIO_PLAYBACK_FORCEINT) \
\
BIND_CONSTANT(FMOD_STUDIO_STOP_ALLOWFADEOUT) \
BIND_CONSTANT(FMOD_STUDIO_STOP_IMMEDIATE) \
BIND_CONSTANT(FMOD_STUDIO_STOP_FORCEINT)

#endif// GODOTFMOD_CONSTANTS_H

0 comments on commit 1272309

Please sign in to comment.