This commit is contained in:
Issac332 2026-07-02 17:24:37 +03:00
parent fa75eb2a8f
commit f88218d5b5
5 changed files with 11 additions and 15 deletions

View file

@ -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

View file

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

View file

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

View file

@ -33,18 +33,13 @@ 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);

View file

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