diff --git a/CMakeLists.txt b/CMakeLists.txt index 7295bbc..1d99d54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,7 +83,6 @@ set(MAIN_HEADERS ) set(MAIN_SOURCE - ${OLDIMPLS_SOURCE} src/main.cpp src/audio.cpp src/bitmap.cpp diff --git a/binding-mri/tilemap-binding.cpp b/binding-mri/tilemap-binding.cpp index a204f83..74b0d00 100644 --- a/binding-mri/tilemap-binding.cpp +++ b/binding-mri/tilemap-binding.cpp @@ -30,8 +30,7 @@ DEF_TYPE_CUSTOMFREE(TilemapAutotiles, RUBY_TYPED_NEVER_FREE); -RB_METHOD(tilemapAutotilesSet) -{ +RB_METHOD(tilemapAutotilesSet){ Tilemap::Autotiles *a = getPrivateData(self); int i; @@ -49,8 +48,7 @@ RB_METHOD(tilemapAutotilesSet) return self; } -RB_METHOD(tilemapAutotilesGet) -{ +RB_METHOD(tilemapAutotilesGet){ int i; rb_get_args (argc, argv, "i", &i RB_ARG_END); @@ -64,8 +62,7 @@ RB_METHOD(tilemapAutotilesGet) DEF_TYPE(Tilemap); -RB_METHOD(tilemapInitialize) -{ +RB_METHOD(tilemapInitialize){ Tilemap *t; /* Get parameters */ @@ -101,8 +98,7 @@ RB_METHOD(tilemapInitialize) return self; } -RB_METHOD(tilemapGetAutotiles) -{ +RB_METHOD(tilemapGetAutotiles){ RB_UNUSED_PARAM; checkDisposed(self); @@ -110,8 +106,7 @@ RB_METHOD(tilemapGetAutotiles) return rb_iv_get(self, "autotiles"); } -RB_METHOD(tilemapUpdate) -{ +RB_METHOD(tilemapUpdate){ RB_UNUSED_PARAM; Tilemap *t = getPrivateData(self); @@ -121,8 +116,7 @@ RB_METHOD(tilemapUpdate) return Qnil; } -RB_METHOD(tilemapGetViewport) -{ +RB_METHOD(tilemapGetViewport){ RB_UNUSED_PARAM; checkDisposed(self); @@ -141,9 +135,7 @@ DEF_PROP_B(Tilemap, Wrapping) DEF_PROP_I(Tilemap, OX) DEF_PROP_I(Tilemap, OY) -void -tilemapBindingInit() -{ +void tilemapBindingInit(){ VALUE klass = rb_define_class("TilemapAutotiles", rb_cObject); rb_define_alloc_func(klass, classAllocate<&TilemapAutotilesType>); diff --git a/binding-mri/viewport-binding.cpp b/binding-mri/viewport-binding.cpp index ca0e5da..7ce06f4 100644 --- a/binding-mri/viewport-binding.cpp +++ b/binding-mri/viewport-binding.cpp @@ -29,16 +29,13 @@ DEF_TYPE(Viewport); -RB_METHOD(viewportInitialize) -{ +RB_METHOD(viewportInitialize){ Viewport *v; - if (argc == 0 && rgssVer >= 3) - { + if (argc == 0 && rgssVer >= 3){ v = new Viewport(); } - else if (argc == 1) - { + else if (argc == 1){ /* The rect arg is only used to init the viewport, * and does NOT replace its 'rect' property */ VALUE rectObj; @@ -49,9 +46,7 @@ RB_METHOD(viewportInitialize) rect = getPrivateDataCheck(rectObj, RectType); v = new Viewport(rect); - } - else - { + }else{ int x, y, width, height; rb_get_args(argc, argv, "iiii", &x, &y, &width, &height RB_ARG_END); @@ -84,9 +79,7 @@ DEF_PROP_I(Viewport, OX) DEF_PROP_I(Viewport, OY) -void -viewportBindingInit() -{ +void viewportBindingInit(){ VALUE klass = rb_define_class("Viewport", rb_cObject); rb_define_alloc_func(klass, classAllocate<&ViewportType>); diff --git a/binding-mri/viewportelement-binding.h b/binding-mri/viewportelement-binding.h index d0235cf..f99c765 100644 --- a/binding-mri/viewportelement-binding.h +++ b/binding-mri/viewportelement-binding.h @@ -31,8 +31,7 @@ #include "disposable-binding.h" template -RB_METHOD(viewportElementGetViewport) -{ +RB_METHOD(viewportElementGetViewport){ RB_UNUSED_PARAM; checkDisposed(self); @@ -41,8 +40,7 @@ RB_METHOD(viewportElementGetViewport) } template -RB_METHOD(viewportElementSetViewport) -{ +RB_METHOD(viewportElementSetViewport){ RB_UNUSED_PARAM; ViewportElement *ve = getPrivateData(self); @@ -63,17 +61,14 @@ RB_METHOD(viewportElementSetViewport) } template -static C * -viewportElementInitialize(int argc, VALUE *argv, VALUE self) -{ +static C *viewportElementInitialize(int argc, VALUE *argv, VALUE self){ /* Get parameters */ VALUE viewportObj = Qnil; Viewport *viewport = 0; rb_get_args(argc, argv, "|o", &viewportObj RB_ARG_END); - if (!NIL_P(viewportObj)) - { + if (!NIL_P(viewportObj)){ viewport = getPrivateDataCheck(viewportObj, ViewportType); if (rgssVer == 1) @@ -90,9 +85,7 @@ viewportElementInitialize(int argc, VALUE *argv, VALUE self) } template -void -viewportElementBindingInit(VALUE klass) -{ +void viewportElementBindingInit(VALUE klass){ sceneElementBindingInit(klass); _rb_define_method(klass, "viewport", viewportElementGetViewport); diff --git a/binding-mri/wallpaper-binding.cpp b/binding-mri/wallpaper-binding.cpp index 1f0c05b..e0c272e 100644 --- a/binding-mri/wallpaper-binding.cpp +++ b/binding-mri/wallpaper-binding.cpp @@ -165,8 +165,7 @@ } #endif -RB_METHOD(wallpaperSet) -{ +RB_METHOD(wallpaperSet){ RB_UNUSED_PARAM; const char *name; int color; @@ -483,8 +482,7 @@ RB_METHOD(wallpaperReset) return Qnil; } -void wallpaperBindingInit() -{ +void wallpaperBindingInit(){ VALUE module = rb_define_module("Wallpaper"); // Functions @@ -493,8 +491,7 @@ void wallpaperBindingInit() } #ifdef __linux__ -void wallpaperBindingTerminate() -{ +void wallpaperBindingTerminate(){ // Clean up. if (desktop == "xfce") { xfconf_shutdown(); diff --git a/shader/bitmapBlit.frag b/shader/bitmapBlit.frag index 850b919..da074a6 100644 --- a/shader/bitmapBlit.frag +++ b/shader/bitmapBlit.frag @@ -10,8 +10,7 @@ uniform lowp float opacity; varying vec2 v_texCoord; -void main() -{ +void main(){ vec2 coor = v_texCoord; vec2 dstCoor = (coor - subRect.xy) * subRect.zw;