Repository navigation
iPhone: New Game chapters, clean text, no audio buzz, pad drives menus - #16
Merged
Merged
Conversation
When a GLSL program failed to link, CGLMShaderPair::SetProgramPair called
glGetShaderiv(GL_INFO_LOG_LENGTH) on the *program* id. Emscripten serves
that through getShaderInfoLog(GL.shaders[id]), so WebGL received something
that is not a shader and threw - the iPhone crash "Argument 1 ('shader')
to WebGL2RenderingContext.getShaderInfoLog must be an instance of
WebGLShader". The program info log is now read with glGetProgramInfoLog
only, and both link and compile failures log one bounded line with the
shader names and the driver's message instead of dumping both full shader
sources through Msg.
Programs failing to link on iPhone also fits the menu text drawing as
boxes; the new lines land in the diagnostics' error list so the driver's
reason is visible on the next run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qy5DKdwTqGQqScWvJyNcft
New Game: the dialog lists chapters with FindFirst("cfg/chapter*.cfg").
Directory listings come from the main thread's shared FS, which only had
gameinfo and VPK placeholders; the user's loose cfg/scripts/resource/maps
files were linked on the Source worker only. The chapter list was empty
and "Start new game" had nothing to start. post.js now adds zero-byte
names for those loose files too; opens and stats are still intercepted by
filesystem_stdio and served from the real File.
Text: the font page reaches the screen with alpha read as opaque, so each
glyph drew on a black box. Glyph coverage is already in RGB on the web
build, so the procedural font materials now blend additively there; the
box disappears whether or not alpha survives. Bitmap fonts keep alpha
blending.
Audio: the AudioWorklet kept reading the ring even when the engine had not
painted new samples, replaying stale contents - the buzz. The engine now
publishes the sample time it has written (m_paintedEnd) and the reader
never plays past it, outputting silence instead. snd_mixahead 0.25 gives
slower phone frames more headroom inside the 0.37 s ring.
Rendering: mat_bumpmap/mat_specular stay on; turning them off made Portal
materials request a $bumpmap texture that was never loaded (red console
errors), and the crash they were meant to avoid was the togles link-log
bug.
Controller: works on the menus. Menu mode (background map, pause menu):
stick sends arrow keys with auto-repeat, A/Start/X Enter, B/Back Escape,
LB/RB left/right. Game mode once a real map loads; Pause toggles between
the two. It stays visible on the menus.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qy5DKdwTqGQqScWvJyNcft
…pad fades New Game now reaches testchmb_a_00, but ~75 s into loading the level the engine thread died with an out-of-bounds access inside the main module's low-numbered runtime functions (allocator range) - the signature of heap memory overwritten earlier. Level load is where Source recurses deepest (BSP and physics collision building), and under PROXY_TO_PTHREAD the engine thread gets STACK_SIZE, which was 4 MB against Linux's 8 MB. A silent stack overflow into the heap fits. STACK_SIZE is now 16 MB. To make the next crash, if any, conclusive: modules and the main module are linked with --profiling-funcs so Safari's Wasm stacks carry function names (the CI ban on it is lifted while crashes are traced), and the worker crash stack is kept whole (40 frames, 3000 chars) instead of being cut at 300 characters. Controller: fades to 16% opacity after 4 s without a touch and comes back on any touch; never fades while a control is held. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qy5DKdwTqGQqScWvJyNcft
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cfg/scripts/resource/mapsfiles.post.jsnow adds zero-byte names for them. Reads are still served from the real files throughfilesystem_stdio.m_paintedEnd). The AudioWorklet never plays past that point, which stops the stale-ring buzz.snd_mixahead 0.25.mat_bumpmapandmat_specularare back on. Turning them off caused the$bumpmapconsole errors.🤖 Generated with Claude Code
https://claude.ai/code/session_01Qy5DKdwTqGQqScWvJyNcft
Generated by Claude Code