mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
sorry
This commit is contained in:
parent
fa75eb2a8f
commit
f88218d5b5
5 changed files with 11 additions and 15 deletions
|
|
@ -25,6 +25,7 @@ class Game_Character
|
|||
attr_reader :through # through
|
||||
attr_accessor :animation_id # animation ID
|
||||
attr_accessor :transparent # transparent flag
|
||||
attr_accessor :shader
|
||||
#--------------------------------------------------------------------------
|
||||
# * Object Initialization
|
||||
#--------------------------------------------------------------------------
|
||||
|
|
@ -65,6 +66,7 @@ class Game_Character
|
|||
@locked = false
|
||||
@prelock_direction = 0
|
||||
@custom_flags = []
|
||||
@shader = Shader::Sprite
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Determine if Moving
|
||||
|
|
|
|||
|
|
@ -34,7 +34,10 @@ class Sprite_Character
|
|||
def update
|
||||
# Choose the appropriate light sprite
|
||||
@light_sprite.viewport = ($game_screen.tone.blank?) ? @viewport : @light_viewport
|
||||
@light_sprite.shader = @sprite.shader = @character.character_name.start_with?("en") || (Settings[:twm_shader] && @character.character_name.start_with?("niko") && $game_switches[160]) ? Shader::WorldMachine : Shader::Sprite
|
||||
@light_sprite.shader = @sprite.shader =
|
||||
#idk what is this, maybe later i remake this
|
||||
@character.character_name.start_with?("en") || (Settings[:twm_shader] && @character.character_name.start_with?("niko") && $game_switches[160]) ? Shader::WorldMachine :
|
||||
@character.shader || Shader::Sprite
|
||||
|
||||
dir = (@character.direction - 2) / 2
|
||||
if Settings[:debug_text] && (@last_char_name != character.character_name || dir != @old_dir)
|
||||
|
|
|
|||
|
|
@ -61,5 +61,7 @@ void main(){
|
|||
lowp float underBush = float(v_texCoord.y < bushDepth);
|
||||
frag.a *= clamp(bushOpacity + underBush, 0.0, 1.0);
|
||||
|
||||
frag.a = clamp(frag.a, 0.0, 1.0);
|
||||
|
||||
gl_FragColor = frag;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,17 +34,12 @@ struct SDLSoundSource : ALDataSource{
|
|||
ALenum alFormat;
|
||||
ALsizei alFreq;
|
||||
|
||||
SDL_AudioSpec spec;
|
||||
|
||||
SDLSoundSource(SDL_IOStream &ops, const char *extension, uint32_t maxBufSize, bool looped)
|
||||
: srcOps(ops),
|
||||
looped(looped)
|
||||
{
|
||||
spec.format = SDL_AUDIO_S16LE;
|
||||
spec.channels = 2;
|
||||
spec.freq = 44100;
|
||||
|
||||
sample = Sound_NewSample(&srcOps, extension, &spec, maxBufSize);
|
||||
sample = Sound_NewSample(&srcOps, extension, 0, maxBufSize);
|
||||
|
||||
if (!sample){
|
||||
SDL_CloseIO(&ops);
|
||||
|
|
|
|||
|
|
@ -174,18 +174,12 @@ void SoundEmitter::stop(){
|
|||
struct SoundOpenHandler : FileSystem::OpenHandler{
|
||||
SoundBuffer *buffer;
|
||||
|
||||
SDL_AudioSpec spec;
|
||||
|
||||
SoundOpenHandler()
|
||||
: buffer(0)
|
||||
{
|
||||
spec.format = SDL_AUDIO_S16LE;
|
||||
spec.channels = 2;
|
||||
spec.freq = 44100;
|
||||
}
|
||||
{}
|
||||
|
||||
bool tryRead(SDL_IOStream* &ops, const char *ext){
|
||||
Sound_Sample *sample = Sound_NewSample(ops, ext, &spec, STREAM_BUF_SIZE); // df;lkjdsfl;kjgt;sjhdlhljkk;ljhgds;ljkglk;jdsl;fjgg;lhkjdsgklhjsdhl;jkg
|
||||
Sound_Sample *sample = Sound_NewSample(ops, ext, 0, STREAM_BUF_SIZE);
|
||||
|
||||
if (!sample){
|
||||
SDL_CloseIO(ops);
|
||||
|
|
|
|||
Loading…
Reference in a new issue