Merge separate RGSS version build configs into one
Setup active RGSS version at runtime. Desired version can be specified via config, or as default, auto detected from the game files. This removes the need to build specifically for each version, which should help packaging a lot. This also greatly reduces the danger of introducing code that wouldn't compile on all RGSS version paths (as certain code paths were completely ifdef'd out). This can be optimized more, eg. not compiling shaders that aren't needed in the active version.
This commit is contained in:
parent
b1981055e1
commit
55f1542c76
41 changed files with 460 additions and 465 deletions
|
@ -32,7 +32,10 @@
|
|||
int volume = 100; \
|
||||
int pitch = 100; \
|
||||
double pos = 0.0; \
|
||||
rb_get_args(argc, argv, "z|iif", &filename, &volume, &pitch, &pos RB_ARG_END); \
|
||||
if (rgssVer >= 3) \
|
||||
rb_get_args(argc, argv, "z|iif", &filename, &volume, &pitch, &pos RB_ARG_END); \
|
||||
else \
|
||||
rb_get_args(argc, argv, "z|ii", &filename, &volume, &pitch RB_ARG_END); \
|
||||
GUARD_EXC( shState->audio().entity##Play(filename, volume, pitch, pos); ) \
|
||||
return Qnil; \
|
||||
} \
|
||||
|
@ -83,13 +86,8 @@ RB_METHOD(audio_##entity##Fade) \
|
|||
return rb_float_new(shState->audio().entity##Pos()); \
|
||||
}
|
||||
|
||||
#ifdef RGSS3
|
||||
DEF_PLAY_STOP_POS( bgm )
|
||||
DEF_PLAY_STOP_POS( bgs )
|
||||
#else
|
||||
DEF_PLAY_STOP( bgm )
|
||||
DEF_PLAY_STOP( bgs )
|
||||
#endif
|
||||
|
||||
DEF_PLAY_STOP( me )
|
||||
|
||||
|
@ -124,10 +122,11 @@ audioBindingInit()
|
|||
BIND_PLAY_STOP_FADE( bgs );
|
||||
BIND_PLAY_STOP_FADE( me );
|
||||
|
||||
#ifdef RGSS3
|
||||
if (rgssVer >= 3)
|
||||
{
|
||||
BIND_POS( bgm );
|
||||
BIND_POS( bgs );
|
||||
#endif
|
||||
}
|
||||
|
||||
BIND_PLAY_STOP( se )
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue