chibi: Move to a module

This commit is contained in:
Rémi Verschelde 2016-10-14 19:14:40 +02:00
parent cbf52606f4
commit e6dc51a0f7
52 changed files with 84 additions and 12 deletions

1
drivers/SCsub vendored
View file

@ -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");

View file

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

View file

@ -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
modules/chibi/SCsub Normal file
View file

@ -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
modules/chibi/config.py Normal file
View file

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

View file

@ -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();
}

View file

@ -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();