Skip to content

Archipelago Randomizer Support - #1433

Draft
stubobis1 wants to merge 10 commits into
omf2097:masterfrom
stubobis1:omf-0.0.4
Draft

Archipelago Randomizer Support#1433
stubobis1 wants to merge 10 commits into
omf2097:masterfrom
stubobis1:omf-0.0.4

Conversation

@stubobis1

Copy link
Copy Markdown

No description provided.

stubobis1 added 10 commits June 30, 2026 20:27
Refactored a bunch to remove footprint in the omf c code.
New ap_alert module — extracted alert/notification display from arena
New ap_sgmanager module — AP-aware save game manager extracted from core sgmanager
New ap_melee module — character select AP logic extracted
Major refactor of ap_mechlab and ap_arena
Mechlab trade/customize/training menus improved
Windows build support added
# Conflicts:
#	src/game/scenes/arena.c
#	src/game/scenes/mechlab.c
# Conflicts:
#	src/game/scenes/mechlab/lab_menu_customize.c
Fix tournament-goal persistence and stale forfeit scoring

ap_on_tournament_win now persists APSave to disk immediately after
setting the tournament-won bit, instead of leaving it to the next
autosave — mechlab reloads APSave from disk on entry, so the just-set
bit could get clobbered by a stale on-disk copy first.

Also force fight_stats.winner to a real value on forfeit so
arena_end()'s AP match-check can't read a leftover value from the
previous match.

Split AP-only tests into a separate openomf_test_ap binary
(testing/test_ap_*.c convention) since they link Archipelago-only
symbols, and add test_ap_tournament_goal.c covering the fix above.
Comment thread src/game/utils/settings.h
Comment on lines +148 to +150
#if ARCHIPELAGO_ENABLED
settings_archipelago archipelago;
#endif

@Nopey Nopey Aug 11, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use compile-time guards in settings.c/.h, as binaries built without ARCHIPELAGO_ENABLED will be unaware of these settings & silently remove them from the .conf file.

If we want binaries built without ARCHIPELAGO_ENABLED to be entirely archipelago-unaware, then its settings will have to go in a separate archipelago.conf file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are the files under resources/archipelago from?
Are they under a compatible license (e.g. MIT or CC0), or are they your own work?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the prospect of adding submodules for dependencies, especially conditionally-enabled ones such as these.

If someone wants to check the various package managers we're using for our other deps (apt, brew, vcpkg) and see if these packages are all available (or, in the case of vcpkg, easily added via our vcpkg-ports folder), we could start looking at moving these deps into Dependencies.cmake.

Comment thread CMakeLists.txt
Comment on lines +34 to +36
enable_language(CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems unnecessary.

Suggested change
enable_language(CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Comment thread Dockerfile.build

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These Dockerfiles seem like build infrastructure that is entirely independent of the rest of the PR.
If you'd like to introduce these, I would suggest creating a separate PR for them.

@Nopey Nopey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't read the rest of the .c changes, but these changes in textinput.c stood out to me.

Comment thread src/game/gui/textinput.c
Comment on lines +390 to +393
str tmp;
str_from_c(&tmp, " ");
text_set_from_str(ti->text, &tmp);
str_free(&tmp);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to construct a str here.

Suggested change
str tmp;
str_from_c(&tmp, " ");
text_set_from_str(ti->text, &tmp);
str_free(&tmp);
text_set_from_c(ti->text, " ");

Comment thread src/game/gui/textinput.c

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain or motivate the changes to this file?

@Nopey Nopey changed the title Omf 0.0.4 Archipelago Randomizer Support Aug 19, 2026
@Nopey
Nopey marked this pull request as draft August 19, 2026 19:17
@Nopey

Nopey commented Aug 19, 2026

Copy link
Copy Markdown
Member

feel free to undraft when this is ready for review 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants