Browse Source

chibi: Move to a module

Rémi Verschelde 9 years ago
parent
commit
e6dc51a0f7
52 changed files with 84 additions and 12 deletions
  1. 0 1
      drivers/SCsub
  2. 0 5
      drivers/chibi/SCsub
  3. 0 6
      drivers/register_driver_types.cpp
  4. 7 0
      modules/chibi/SCsub
  5. 6 0
      modules/chibi/config.py
  6. 0 0
      modules/chibi/cp_config.h
  7. 0 0
      modules/chibi/cp_envelope.cpp
  8. 0 0
      modules/chibi/cp_envelope.h
  9. 0 0
      modules/chibi/cp_file_access_wrapper.h
  10. 0 0
      modules/chibi/cp_instrument.cpp
  11. 0 0
      modules/chibi/cp_instrument.h
  12. 0 0
      modules/chibi/cp_loader.h
  13. 0 0
      modules/chibi/cp_loader_it.cpp
  14. 0 0
      modules/chibi/cp_loader_it.h
  15. 0 0
      modules/chibi/cp_loader_it_info.cpp
  16. 0 0
      modules/chibi/cp_loader_it_instruments.cpp
  17. 0 0
      modules/chibi/cp_loader_it_patterns.cpp
  18. 0 0
      modules/chibi/cp_loader_it_samples.cpp
  19. 0 0
      modules/chibi/cp_loader_mod.cpp
  20. 0 0
      modules/chibi/cp_loader_mod.h
  21. 0 0
      modules/chibi/cp_loader_s3m.cpp
  22. 0 0
      modules/chibi/cp_loader_s3m.h
  23. 0 0
      modules/chibi/cp_loader_xm.cpp
  24. 0 0
      modules/chibi/cp_loader_xm.h
  25. 0 0
      modules/chibi/cp_mixer.h
  26. 0 0
      modules/chibi/cp_note.h
  27. 0 0
      modules/chibi/cp_order.h
  28. 0 0
      modules/chibi/cp_pattern.cpp
  29. 0 0
      modules/chibi/cp_pattern.h
  30. 0 0
      modules/chibi/cp_player_data.cpp
  31. 0 0
      modules/chibi/cp_player_data.h
  32. 0 0
      modules/chibi/cp_player_data_control.cpp
  33. 0 0
      modules/chibi/cp_player_data_effects.cpp
  34. 0 0
      modules/chibi/cp_player_data_envelopes.cpp
  35. 0 0
      modules/chibi/cp_player_data_events.cpp
  36. 0 0
      modules/chibi/cp_player_data_filter.cpp
  37. 0 0
      modules/chibi/cp_player_data_nna.cpp
  38. 0 0
      modules/chibi/cp_player_data_notes.cpp
  39. 0 0
      modules/chibi/cp_player_data_utils.cpp
  40. 0 0
      modules/chibi/cp_sample.cpp
  41. 0 0
      modules/chibi/cp_sample.h
  42. 0 0
      modules/chibi/cp_sample_defs.h
  43. 0 0
      modules/chibi/cp_sample_manager.cpp
  44. 0 0
      modules/chibi/cp_sample_manager.h
  45. 0 0
      modules/chibi/cp_song.cpp
  46. 0 0
      modules/chibi/cp_song.h
  47. 0 0
      modules/chibi/cp_tables.cpp
  48. 0 0
      modules/chibi/cp_tables.h
  49. 0 0
      modules/chibi/event_stream_chibi.cpp
  50. 0 0
      modules/chibi/event_stream_chibi.h
  51. 41 0
      modules/chibi/register_types.cpp
  52. 30 0
      modules/chibi/register_types.h

+ 0 - 1
drivers/SCsub

@@ -21,7 +21,6 @@ if ("builtin_zlib" in env and env["builtin_zlib"] == "yes"):
 if (env["platform"] == "windows"):
 	SConscript("rtaudio/SCsub");
 SConscript("nrex/SCsub");
-SConscript("chibi/SCsub");
 if (env["tools"]=="yes"):
 	SConscript("convex_decomp/SCsub");
 

+ 0 - 5
drivers/chibi/SCsub

@@ -1,5 +0,0 @@
-Import('env')
-
-env.add_source_files(env.drivers_sources,"*.cpp")
-
-Export('env')

+ 0 - 6
drivers/register_driver_types.cpp

@@ -31,7 +31,6 @@
 #include "core/math/geometry.h"
 #include "png/image_loader_png.h"
 #include "png/resource_saver_png.h"
-#include "chibi/event_stream_chibi.h"
 
 #ifdef TOOLS_ENABLED
 #include "convex_decomp/b2d_decompose.h"
@@ -70,14 +69,9 @@ void unregister_core_driver_types() {
 void register_driver_types() {
 
 #ifdef TOOLS_ENABLED
-
 	Geometry::_decompose_func=b2d_decompose;
 #endif
-
-	initialize_chibi();
 }
 
 void unregister_driver_types() {
-
-	finalize_chibi();
 }

+ 7 - 0
modules/chibi/SCsub

@@ -0,0 +1,7 @@
+Import('env')
+Import('env_modules')
+
+env_chibi = env_modules.Clone()
+
+# Godot source files
+env_chibi.add_source_files(env.modules_sources, "*.cpp")

+ 6 - 0
modules/chibi/config.py

@@ -0,0 +1,6 @@
+
+def can_build(platform):
+	return True
+
+def configure(env):
+	pass

+ 0 - 0
drivers/chibi/cp_config.h → modules/chibi/cp_config.h


+ 0 - 0
drivers/chibi/cp_envelope.cpp → modules/chibi/cp_envelope.cpp


+ 0 - 0
drivers/chibi/cp_envelope.h → modules/chibi/cp_envelope.h


+ 0 - 0
drivers/chibi/cp_file_access_wrapper.h → modules/chibi/cp_file_access_wrapper.h


+ 0 - 0
drivers/chibi/cp_instrument.cpp → modules/chibi/cp_instrument.cpp


+ 0 - 0
drivers/chibi/cp_instrument.h → modules/chibi/cp_instrument.h


+ 0 - 0
drivers/chibi/cp_loader.h → modules/chibi/cp_loader.h


+ 0 - 0
drivers/chibi/cp_loader_it.cpp → modules/chibi/cp_loader_it.cpp


+ 0 - 0
drivers/chibi/cp_loader_it.h → modules/chibi/cp_loader_it.h


+ 0 - 0
drivers/chibi/cp_loader_it_info.cpp → modules/chibi/cp_loader_it_info.cpp


+ 0 - 0
drivers/chibi/cp_loader_it_instruments.cpp → modules/chibi/cp_loader_it_instruments.cpp


+ 0 - 0
drivers/chibi/cp_loader_it_patterns.cpp → modules/chibi/cp_loader_it_patterns.cpp


+ 0 - 0
drivers/chibi/cp_loader_it_samples.cpp → modules/chibi/cp_loader_it_samples.cpp


+ 0 - 0
drivers/chibi/cp_loader_mod.cpp → modules/chibi/cp_loader_mod.cpp


+ 0 - 0
drivers/chibi/cp_loader_mod.h → modules/chibi/cp_loader_mod.h


+ 0 - 0
drivers/chibi/cp_loader_s3m.cpp → modules/chibi/cp_loader_s3m.cpp


+ 0 - 0
drivers/chibi/cp_loader_s3m.h → modules/chibi/cp_loader_s3m.h


+ 0 - 0
drivers/chibi/cp_loader_xm.cpp → modules/chibi/cp_loader_xm.cpp


+ 0 - 0
drivers/chibi/cp_loader_xm.h → modules/chibi/cp_loader_xm.h


+ 0 - 0
drivers/chibi/cp_mixer.h → modules/chibi/cp_mixer.h


+ 0 - 0
drivers/chibi/cp_note.h → modules/chibi/cp_note.h


+ 0 - 0
drivers/chibi/cp_order.h → modules/chibi/cp_order.h


+ 0 - 0
drivers/chibi/cp_pattern.cpp → modules/chibi/cp_pattern.cpp


+ 0 - 0
drivers/chibi/cp_pattern.h → modules/chibi/cp_pattern.h


+ 0 - 0
drivers/chibi/cp_player_data.cpp → modules/chibi/cp_player_data.cpp


+ 0 - 0
drivers/chibi/cp_player_data.h → modules/chibi/cp_player_data.h


+ 0 - 0
drivers/chibi/cp_player_data_control.cpp → modules/chibi/cp_player_data_control.cpp


+ 0 - 0
drivers/chibi/cp_player_data_effects.cpp → modules/chibi/cp_player_data_effects.cpp


+ 0 - 0
drivers/chibi/cp_player_data_envelopes.cpp → modules/chibi/cp_player_data_envelopes.cpp


+ 0 - 0
drivers/chibi/cp_player_data_events.cpp → modules/chibi/cp_player_data_events.cpp


+ 0 - 0
drivers/chibi/cp_player_data_filter.cpp → modules/chibi/cp_player_data_filter.cpp


+ 0 - 0
drivers/chibi/cp_player_data_nna.cpp → modules/chibi/cp_player_data_nna.cpp


+ 0 - 0
drivers/chibi/cp_player_data_notes.cpp → modules/chibi/cp_player_data_notes.cpp


+ 0 - 0
drivers/chibi/cp_player_data_utils.cpp → modules/chibi/cp_player_data_utils.cpp


+ 0 - 0
drivers/chibi/cp_sample.cpp → modules/chibi/cp_sample.cpp


+ 0 - 0
drivers/chibi/cp_sample.h → modules/chibi/cp_sample.h


+ 0 - 0
drivers/chibi/cp_sample_defs.h → modules/chibi/cp_sample_defs.h


+ 0 - 0
drivers/chibi/cp_sample_manager.cpp → modules/chibi/cp_sample_manager.cpp


+ 0 - 0
drivers/chibi/cp_sample_manager.h → modules/chibi/cp_sample_manager.h


+ 0 - 0
drivers/chibi/cp_song.cpp → modules/chibi/cp_song.cpp


+ 0 - 0
drivers/chibi/cp_song.h → modules/chibi/cp_song.h


+ 0 - 0
drivers/chibi/cp_tables.cpp → modules/chibi/cp_tables.cpp


+ 0 - 0
drivers/chibi/cp_tables.h → modules/chibi/cp_tables.h


+ 0 - 0
drivers/chibi/event_stream_chibi.cpp → modules/chibi/event_stream_chibi.cpp


+ 0 - 0
drivers/chibi/event_stream_chibi.h → modules/chibi/event_stream_chibi.h


+ 41 - 0
modules/chibi/register_types.cpp

@@ -0,0 +1,41 @@
+/*************************************************************************/
+/*  register_types.cpp                                                   */
+/*************************************************************************/
+/*                       This file is part of:                           */
+/*                           GODOT ENGINE                                */
+/*                    http://www.godotengine.org                         */
+/*************************************************************************/
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur.                 */
+/*                                                                       */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the       */
+/* "Software"), to deal in the Software without restriction, including   */
+/* without limitation the rights to use, copy, modify, merge, publish,   */
+/* distribute, sublicense, and/or sell copies of the Software, and to    */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions:                                             */
+/*                                                                       */
+/* The above copyright notice and this permission notice shall be        */
+/* included in all copies or substantial portions of the Software.       */
+/*                                                                       */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
+/*************************************************************************/
+#include "register_types.h"
+
+#include "event_stream_chibi.h"
+
+void register_chibi_types() {
+
+	initialize_chibi();
+}
+
+void unregister_chibi_types() {
+
+	finalize_chibi();
+}

+ 30 - 0
modules/chibi/register_types.h

@@ -0,0 +1,30 @@
+/*************************************************************************/
+/*  register_types.h                                                     */
+/*************************************************************************/
+/*                       This file is part of:                           */
+/*                           GODOT ENGINE                                */
+/*                    http://www.godotengine.org                         */
+/*************************************************************************/
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur.                 */
+/*                                                                       */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the       */
+/* "Software"), to deal in the Software without restriction, including   */
+/* without limitation the rights to use, copy, modify, merge, publish,   */
+/* distribute, sublicense, and/or sell copies of the Software, and to    */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions:                                             */
+/*                                                                       */
+/* The above copyright notice and this permission notice shall be        */
+/* included in all copies or substantial portions of the Software.       */
+/*                                                                       */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
+/*************************************************************************/
+void register_chibi_types();
+void unregister_chibi_types();