mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
im tired
This commit is contained in:
parent
f3a06ceb6d
commit
17c3f38685
6 changed files with 21 additions and 48 deletions
|
|
@ -83,7 +83,6 @@ set(MAIN_HEADERS
|
|||
)
|
||||
|
||||
set(MAIN_SOURCE
|
||||
${OLDIMPLS_SOURCE}
|
||||
src/main.cpp
|
||||
src/audio.cpp
|
||||
src/bitmap.cpp
|
||||
|
|
|
|||
|
|
@ -30,8 +30,7 @@
|
|||
|
||||
DEF_TYPE_CUSTOMFREE(TilemapAutotiles, RUBY_TYPED_NEVER_FREE);
|
||||
|
||||
RB_METHOD(tilemapAutotilesSet)
|
||||
{
|
||||
RB_METHOD(tilemapAutotilesSet){
|
||||
Tilemap::Autotiles *a = getPrivateData<Tilemap::Autotiles>(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<Tilemap>(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<Tilemap>(self);
|
||||
|
|
@ -121,8 +116,7 @@ RB_METHOD(tilemapUpdate)
|
|||
return Qnil;
|
||||
}
|
||||
|
||||
RB_METHOD(tilemapGetViewport)
|
||||
{
|
||||
RB_METHOD(tilemapGetViewport){
|
||||
RB_UNUSED_PARAM;
|
||||
|
||||
checkDisposed<Tilemap>(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>);
|
||||
|
||||
|
|
|
|||
|
|
@ -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<Rect>(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>);
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@
|
|||
#include "disposable-binding.h"
|
||||
|
||||
template<class C>
|
||||
RB_METHOD(viewportElementGetViewport)
|
||||
{
|
||||
RB_METHOD(viewportElementGetViewport){
|
||||
RB_UNUSED_PARAM;
|
||||
|
||||
checkDisposed<C>(self);
|
||||
|
|
@ -41,8 +40,7 @@ RB_METHOD(viewportElementGetViewport)
|
|||
}
|
||||
|
||||
template<class C>
|
||||
RB_METHOD(viewportElementSetViewport)
|
||||
{
|
||||
RB_METHOD(viewportElementSetViewport){
|
||||
RB_UNUSED_PARAM;
|
||||
|
||||
ViewportElement *ve = getPrivateData<C>(self);
|
||||
|
|
@ -63,17 +61,14 @@ RB_METHOD(viewportElementSetViewport)
|
|||
}
|
||||
|
||||
template<class C>
|
||||
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<Viewport>(viewportObj, ViewportType);
|
||||
|
||||
if (rgssVer == 1)
|
||||
|
|
@ -90,9 +85,7 @@ viewportElementInitialize(int argc, VALUE *argv, VALUE self)
|
|||
}
|
||||
|
||||
template<class C>
|
||||
void
|
||||
viewportElementBindingInit(VALUE klass)
|
||||
{
|
||||
void viewportElementBindingInit(VALUE klass){
|
||||
sceneElementBindingInit<C>(klass);
|
||||
|
||||
_rb_define_method(klass, "viewport", viewportElementGetViewport<C>);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue