Conversation
|
I feel obligated to inform the user(s) in charge of this repository that this individual recently admitted to using Claude code, a plagiarism-powered slop engine, to code for this exact repository and does not appear to be disclosing as such within their Pull Requests. |
|
Please address the mentioned issues to make this eligible for merge. |
| SET( SDL2IMAGE_JXL OFF ) | ||
| SET( SDL2IMAGE_TIF OFF ) | ||
| SET( SDL2IMAGE_WEBP OFF ) |
There was a problem hiding this comment.
Not fully sure there is a reason to disable those
There was a problem hiding this comment.
- If you would have actually tested the result you would see that OK and Cancel buttons are stuck together without space between them - fix this (make popup slightly wider?).
- No reason to have such wide inputs for width and height which will have 3 or 4 digits at most, maybe place them on single line?
| if (width * height > 180 * 90) { | ||
| i.popup.error('Custom map area cannot exceed Huge Planet (180x90).'); | ||
| return true; | ||
| } |
There was a problem hiding this comment.
There is no reason for this limitation, let's allow people to have as large maps as their hardware can support
| free( m_buffer ); | ||
| free( m_mix_buffer ); |
There was a problem hiding this comment.
You're freeing NULL pointer here.
This whole block is unnecessary because if malloc fails - it's all over anyway
| free( m_mix_buffer ); | ||
| m_buffer = nullptr; | ||
| m_mix_buffer = nullptr; | ||
| SDL_QuitSubSystem( SDL_INIT_AUDIO ); |
There was a problem hiding this comment.
If SDL_OpenAudio failed we don't need to call SDL_QuitSubSystem
| if ( !width || !height || ( width & 1 ) || ( height & 1 ) ) { | ||
| THROW( "map dimensions must be positive even numbers" ); | ||
| } |
| if ( tile_count > m_data.max_size() ) { | ||
| THROW( "map dimensions exceed tile storage capacity" ); | ||
| } |
| if ( static_cast< uint64_t >( ms ) > static_cast< uint64_t >( std::numeric_limits< std::chrono::milliseconds::rep >::max() ) ) { | ||
| THROW( "timer duration is too large" ); | ||
| } |
There was a problem hiding this comment.
replace with ASSERT. for timers coming from scripts - validate them in GSE handler (and throw GSE_ERROR if something is wrong)
| if ( ms == 0 ) { | ||
| THROW( "timer interval must be greater than zero" ); | ||
| } | ||
| if ( static_cast< uint64_t >( ms ) > static_cast< uint64_t >( std::numeric_limits< std::chrono::milliseconds::rep >::max() ) ) { | ||
| THROW( "timer duration is too large" ); | ||
| } |
| SET( CMAKE_CXX_FLAGS " -std=c++17 ${CMAKE_CXX_FLAGS} -Wno-pointer-arith " ) | ||
| SET( CMAKE_CXX_STANDARD 17 ) | ||
| SET( CMAKE_CXX_STANDARD_REQUIRED ON ) | ||
| IF ( NOT MSVC ) |
There was a problem hiding this comment.
this compiler was not supported anyway, does it work with this changeset?
Summary
Why
The Windows build and several launch paths were blocked by dependency and configuration issues. Runtime stress testing also exposed malformed-map crashes, unsafe cross-thread script callbacks, timer resurrection and GC lifetime races, integer overflow, invalid argument handling, and excessive huge-map working memory.
Impact
GLSMAC now builds in Debug and Release on Windows, loads original SMAC assets, handles malformed maps without an access violation, supports validated custom map sizes, and runs generated maps more reliably. In the tested huge-map configuration, working memory dropped to about 1.0 GB (about 1.5 GB private memory).
Validation
git diff --checkThe stabilization pass spans the build configuration and several runtime subsystems. It can be split by subsystem if that would make review easier.