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_reader :through # through
attr_accessor :animation_id # animation ID attr_accessor :animation_id # animation ID
attr_accessor :transparent # transparent flag attr_accessor :transparent # transparent flag
attr_accessor :shader
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Object Initialization # * Object Initialization
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
@ -65,6 +66,7 @@ class Game_Character
@locked = false @locked = false
@prelock_direction = 0 @prelock_direction = 0
@custom_flags = [] @custom_flags = []
@shader = Shader::Sprite
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Determine if Moving # * Determine if Moving

View file

@ -34,7 +34,10 @@ class Sprite_Character
def update def update
# Choose the appropriate light sprite # Choose the appropriate light sprite
@light_sprite.viewport = ($game_screen.tone.blank?) ? @viewport : @light_viewport @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 dir = (@character.direction - 2) / 2
if Settings[:debug_text] && (@last_char_name != character.character_name || dir != @old_dir) 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); lowp float underBush = float(v_texCoord.y < bushDepth);
frag.a *= clamp(bushOpacity + underBush, 0.0, 1.0); frag.a *= clamp(bushOpacity + underBush, 0.0, 1.0);
frag.a = clamp(frag.a, 0.0, 1.0);
gl_FragColor = frag; gl_FragColor = frag;
} }

View file

@ -34,17 +34,12 @@ struct SDLSoundSource : ALDataSource{
ALenum alFormat; ALenum alFormat;
ALsizei alFreq; ALsizei alFreq;
SDL_AudioSpec spec;
SDLSoundSource(SDL_IOStream &ops, const char *extension, uint32_t maxBufSize, bool looped) SDLSoundSource(SDL_IOStream &ops, const char *extension, uint32_t maxBufSize, bool looped)
: srcOps(ops), : srcOps(ops),
looped(looped) 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){ if (!sample){
SDL_CloseIO(&ops); SDL_CloseIO(&ops);

View file

@ -174,18 +174,12 @@ void SoundEmitter::stop(){
struct SoundOpenHandler : FileSystem::OpenHandler{ struct SoundOpenHandler : FileSystem::OpenHandler{
SoundBuffer *buffer; SoundBuffer *buffer;
SDL_AudioSpec spec;
SoundOpenHandler() SoundOpenHandler()
: buffer(0) : buffer(0)
{ {}
spec.format = SDL_AUDIO_S16LE;
spec.channels = 2;
spec.freq = 44100;
}
bool tryRead(SDL_IOStream* &ops, const char *ext){ 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){ if (!sample){
SDL_CloseIO(ops); SDL_CloseIO(ops);