Skip to content

Reimplement 4 Map::Units functions and RenderAnimatedTutorialFloatOverlay, with UnitState names (100%) - #409

Merged
gynt merged 7 commits into
sourcehold:mainfrom
kotijekriv:reimpl/units-A-round2-100
Nov 17, 2026
Merged

gynt merged 7 commits into
sourcehold:mainfrom
kotijekriv:reimpl/units-A-round2-100

Conversation

@kotijekriv

Copy link
Copy Markdown
Contributor

Five more functions at 100%, and one header commit that names six unit states. Four of the functions are Map::Units functions from gynt's units branch reimpl/map-units-updatefunctions (his draft #204). The fifth is UI::Rendering's tutorial arrow, from our draft #313, in the form TheRedDaemon worked out in his review there. Each commit cites the drafts it builds on and credits gynt as co-author; the arrow's commit credits TheRedDaemon too.

Function Address Before After
Units::CurrentUnitHasHealer 0x0053A020 gynt's draft 89.29% (6d8ad88) 100.0%
Units::UpdateRabbit 0x00542630 gynt's draft 79.00% (49bd9c9; 69.32% at 209f6d4) 100.0%
Units::UpdateDeer 0x00541DE0 gynt's draft 64.64% (6458bca; 36.18% at f7d126f) 100.0%
Units::UpdateMerchant 0x005416B0 gynt's draft 63.80% (8372c08; 53.39% at 0adb264) 100.0%, under /GL (see below)
UI::Rendering::RenderAnimatedTutorialFloatOverlay 0x004BC790 our draft #313, 67.2% (ce6bd1e); gynt's 60.8% (e8e27aa; 60.79% at 5236e98) 100.0%

Measured.

  • Setup: the bundled MSVC1400-SP1 against the Steam Stronghold Crusader.exe (3bb0a8c1…5387ac5a), both resolver sets enabled locally (not committed), and sourcehold's reccmp (cce67bcab) with --resolve-wrapped-calls --ignore-security-cookie.
  • Full build: all 2,363 source files of main 72c6a2e with this branch, against a full build of main alone as the baseline (2,358 files), each with its own compiler-flags-gl.txt. All five read 100.0% raw and normalised, and so do UpdateMerchant's nine reimplemented callees. Of the 2,376 functions measured on main, 2,374 read exactly the same with this branch and none read lower. Two read higher, UI::Menu::Constructor_Menu (98.4% to 100.0%) and UI::Menu::handleMenuItems (97.9% to 100.0%). Those are the same two as in Reimplement 5 UI functions from gynt's drafts and #328 (100%) #407's measurement, for the same reason: both compare with the constant 0x11000000, a symbol in main's DLL happens to sit at that address, and reccmp names the constant after it until the DLL's layout moves. Neither file changes.
  • Checks: openshc-pr-fix finds nothing to change, and openshc-pr-check gives no errors.
  • Not run in game.

What got them to 100%

  • CurrentUnitHasHealer: the current player is read into a const local before the loop. The original loads currentPlayerSlotID before the loop's first test, the way PlayArmoryIsFullWarning and WarnIfPlayersGranaryIsFull read theirs. maxUnitCount is an int, so the draft's (int) cast goes.
  • The three update functions: after each call it can't see into, the original reads DAT_CurrentUnitSlotID again instead of keeping unitID. So the statements where it does that index units[DAT_CurrentUnitSlotID::instance], and the rest keep unitID. They were picked by a quick_diff search, one statement per step. In UpdateMerchant every call also passes the slot.
  • Two stores through a Unit* const local. This is the compiler's instruction scheduler, not the order of the statements. In UpdateRabbit and UpdateDeer, when hasUnitReachedDestination returns TRUE, animationCycleNumber and substate are written through the pointer. With every store through units[unitID], MSVC sees them as independent and puts the epilogue's pop edi before them (UpdateRabbit read 99.8%). Through a pointer it can't tell them apart from the state store, so they keep their place before it, as in the original. We found this by running the compiler under cdb and listing the scheduler's dependency edges. UpdateMerchant's state 3 uses the same lever to keep gfxNumber and field_0x30_animRelated after the stateBasedSpeed store. Each pointer has a one-line comment saying why.
  • UpdateRabbit: the state-203 path sits inside the > 0 test, the slowdown is an int compare with fixedRng & 0xf, and the death cases test animationFrame <= 0 first. These are the original's branch directions. tribe is an int local read at the top, so its load is a movsx as in the original.
  • UpdateDeer: state 204 tests substate through the slot, as state 203 does, so its substate isn't kept in a register for the increment, and the two states share one idle tail as in the original. In both seated branches of state 205, the frame-0 path sets DAT_UnitHasBecomeIdle and falls into the shared idle block; the original has that block copied into each path. frameOffset is declared at the top, because the original holds its 1 in edx from the start.
  • UpdateMerchant: in state 3 the three stores after the destination test go through the slot, which the original reads again after setDestinationForUnit. State 2's fade step is written as -2, the byte the original stores (0xFE). The rest is the /GL list change below.
  • RenderAnimatedTutorialFloatOverlay: TheRedDaemon's form from his review (Reimplement 16 rendering, UI and GameSynchronyState functions (not yet 100%) #313 (comment)). x and y step down by 8 and 32 before the per-resolution offset, and by 28 and 69 after the draw buffer is saved, and the offset comes from a chain of plain ifs. The original pushes the trailing 0 before it works out the other arguments, and this form gives that order. His second restore of the draw buffer after the first call compiles to the same code, so it is left out. Thanks a lot to TheRedDaemon for that one!

Header change (a commit of its own)

UnitState gets US_UNKNOWN_117, US_UNKNOWN_202, US_UNKNOWN_203, US_UNKNOWN_204, US_UNKNOWN_205 and US_UNKNOWN_209 (7724c54), in the US_UNKNOWN_<n> form, in place of (UnitState)N and numeric case labels in UpdateRabbit and UpdateDeer. Code generation is the same.

  • The switches: both functions dispatch on the unit's state through jump tables that run to 209. UpdateDeer's has its own entries for 117, 202 to 205 and 209 (0x00541E5F, cmp ecx, 0xd1, tables at 0x00542558 and 0x00542528). UpdateRabbit's has its own entries for 117, 203, 204 and 209, and sends 202 and 205 to its default (0x0054276E, cmp eax, 0xd1, tables at 0x00542C34 and 0x00542C0C).
  • The stores (mov word ptr [reg + 0x138880C]: the units array at 0x0138854C plus state at 0x2C0): UpdateDeer stores 205, 203 and 204 at 0x00541EBC, 0x00541ED5 and 0x00541EE0, and 117 at 0x0054244B and 0x0054249C. UpdateRabbit stores 203, 204 and 117 at 0x005427C6, 0x005427D3 and 0x00542B0E. scatterTribeUnitsRandomly stores 209 at 0x00523A0A; main's scatterTribeUnitsRandomly.cpp writes it as state.generic = 209 and can use the name once this is in.
  • Functions still to come store some of these too: UpdateCamel and UpdateLion (205 and 117), and UpdateCageDog (117).
  • The enum goes from US_STONE_DEATH_03 (116) to US_UNKNOWN_120, and ends at US_ASSASSIN_CLIMBING_DOWN (129).

Main's declaration check will fail on this PR and label it until the six values are synced to main. Then we merge main in, and the check passes.

One line added to cmake/compiler-flags-gl.txt

UpdateMerchant.cpp goes on the list. It reads 100.0% with the line and 78.0% without it.

The original keeps values in registers across checkIfCitizenUnitIsAliveBasedOnState and hasUnitReachedDestination, so UpdateMerchant has to see their bodies. Both are on main's list already. It also reads DAT_CurrentUnitSlotID again after activateTraderState, so that callee must stay off the list: with its body visible, the slot stays in esi across the call and UpdateMerchant reads 90.0%. UpdateMerchant is activateTraderState's only caller.

We checked each of these numbers again in small builds of UpdateMerchant and its nine reimplemented callees: 100.0% as the branch has it, 78.0% without the line, and 90.0% with activateTraderState on the list too. gynt's #378 puts two more of its callees on the list, clearHiddenFlagAndUpdatePosition and resetUnitMovementState. With those two added, UpdateMerchant still reads 100.0%, and so do they, so the two PRs can go in in either order.

Kept as they are, measured with quick_diff

Function Kept The cleaner form
CurrentUnitHasHealer the player read into a local before the loop read in the loop condition: 0.9259 -> 0.8519
UpdateRabbit calculatedOwnerPlayerIndex mapped by an else-if chain (9 to 2, 10 and 11 to 3, 12 to 4, 13 to 6, 14 to 8, 15 to 3) a switch: 0.9591 -> 0.9288
UpdateRabbit tribe read at the top read where it is used: 1.0000 -> 0.5216
UpdateDeer tribe read at the top read just before the switch: 0.9122
UpdateDeer frameOffset declared at the top declared in the movement case: 0.8300
RenderAnimatedTutorialFloatOverlay x and y stepped down in two places one step of 36 and 101: 0.8035 / 0.6356
RenderAnimatedTutorialFloatOverlay the offset as a chain of plain ifs an else-if chain: 0.8983

Most of these have a one-line comment in the code that says why.

One odd number kept: RenderAnimatedTutorialFloatOverlay's offset for 1680x1050 is 4050. Every other resolution gets its height minus 600, so 450 was probably meant, but the original has 4050 (mov ebx, 0xfd2 at 0x004BC862), so it stays, with a comment.

What some placeholders hold

  • INT_00df563c: the time (timeGetTime) when the tutorial arrow's current cycle of 10 frames started.
  • INT_00df5640: bit 0 says that start time has been set.
  • DAT_00df5540: the tutorial step transition (0, 1 or 2; InitTutorialStepTransition stores 1 or 2). While it is nonzero, the arrow isn't drawn.

Proposed, not changed here

One function leaves #313

  • UI::Rendering::RenderAnimatedTutorialFloatOverlay (0x004BC790)

#313 gets one commit that removes its .cpp file and puts its status line back to main's (21b73bc). Main has no file for it, and #313 changed no header for it. #313 still compiles as before without it: its one file that doesn't compile, RenderGreatestLordScreen, failed before this change too.

Other PRs

🤖 Generated with Claude Code

kotijekriv and others added 6 commits November 14, 2026 04:37
Units::UpdateDeer (0x00541DE0) and Units::UpdateRabbit (0x00542630) dispatch on the unit's state through jump
tables that run to 209 (cmp ecx, 0xd1 at 0x00541E5F with tables at 0x00542558 and 0x00542528; cmp eax, 0xd1 at
0x0054276E with tables at 0x00542C34 and 0x00542C0C). Deer's table has its own entries for 117, 202 to 205 and
209, Rabbit's for 117, 203, 204 and 209 (202 and 205 go to its default). They store these states (mov word ptr
[reg + 0x138880C]: the units array at 0x0138854C plus state at 0x2C0): Deer 205, 203 and 204 at 0x00541EBC,
0x00541ED5 and 0x00541EE0 and 117 at 0x0054244B and 0x0054249C, Rabbit 203, 204 and 117 at 0x005427C6,
0x005427D3 and 0x00542B0E, and TribesState::scatterTribeUnitsRandomly stores 209 at 0x00523A0A. The enum goes
from US_STONE_DEATH_03 (116) to US_UNKNOWN_120 and ends at US_ASSASSIN_CLIMBING_DOWN (129); the six are named in
the US_UNKNOWN_<n> form. Used in place of (UnitState)N and the numeric case labels; code generation is the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Units::CurrentUnitHasHealer, from Gynt's draft on sourcehold's reimpl/map-units-updatefunctions, the branch of
PR sourcehold#204 (6d8ad88, 89.29%, "loop precheck scheduling"; the file last changed in 974c32f; 92.9 on main's headers
in the 43a17df baseline). The current player is read into a const local, currentPlayer, before the loop, as the
original loads currentPlayerSlotID before the loop's precheck, the way PlayArmoryIsFullWarning and
WarnIfPlayersGranaryIsFull read theirs (read in the condition: quick_diff 0.9259 -> 0.8519). maxUnitCount is an
int, so the (int) cast goes, and the loop counts unitID as main's unit loops do. reccmp 100.0%.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Units::UpdateRabbit, from Gynt's draft on sourcehold's reimpl/map-units-updatefunctions (209f6d4 at 69.32%,
49bd9c9 at 79.00%):
- units[] is indexed through unitID or through DAT_CurrentUnitSlotID::instance per statement, as a greedy
  quick_diff search picked them one statement per step;
- the US_UNKNOWN_203 path sits inside the `> 0` test, the slowdown is an int compare with (fixedRng & 0xf), and
  the death cases test animationFrame <= 0 first, the original's branch directions (structural_diff.py);
- tribe is an int local, so its load is movsx as in the original; it is read at the top, as reading it where it
  is used loses the match (quick_diff 1.0000 -> 0.5216);
- when hasUnitReachedDestination returns TRUE in the movement case, animationCycleNumber and substate are written
  through a local Unit pointer. The scheduler (Schedule, called from dop2_PreEncode) cannot tell those two stores
  apart from the state.generic store through units[unitID] and gives each a memory edge to it, so they come before
  pop edi and pop edi before the third store, as in the original; with all three through units[unitID] the stores
  are independent and pop edi went first. Found with cdb: tuple_dump.py shows the block in source order at
  dop2_PreEncode entry and reordered when it returns, and a breakpoint on DagMakeDep lists the edges;
- states 117, 203, 204 and 209 use the US_UNKNOWN_<n> names of the header commit.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Units::UpdateDeer, from Gynt's draft on sourcehold's reimpl/map-units-updatefunctions (f7d126f at 36.18%,
6458bca at 64.64%, cases in jump-table order):
- units[] is indexed through unitID or through DAT_CurrentUnitSlotID::instance per statement, as a greedy
  quick_diff search picked them one statement per step; in states 204 and 205 the two forms were picked over
  every combination: 204 tests substate through the slot, as 203 does, so its substate is not kept in a register
  for the increment and the two states share one idle tail as in the original;
- when hasUnitReachedDestination returns TRUE, animationCycleNumber and substate are written through a local Unit
  pointer, so the two stores stay ahead of the epilogue's pop edi as in the original (the same lever as in
  UpdateRabbit);
- in both seated branches of state 205 the frame-0 path sets DAT_UnitHasBecomeIdle and falls through to the shared
  idle block instead of repeating it and returning: the original has that block copied into each path;
- frameOffset is declared at the top: the original holds its 1 in edx from the prologue, where it also adds it to
  deerCount (declared in the movement case: quick_diff 0.8300); tribe is read at the top too (just before the
  switch: 0.9122);
- states 117, 202 to 205 and 209 use the US_UNKNOWN_<n> names of the header commit.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Units::UpdateMerchant, from Gynt's draft on sourcehold's reimpl/map-units-updatefunctions (0adb264 at 53.39%,
8372c08 at 63.80%), under /GL:
- every call that takes the unit passes DAT_CurrentUnitSlotID::instance, and units[] is indexed through unitID or
  through the slot per statement, as a greedy quick_diff search picked them one statement per step;
- in state 3 the three stores after the destination test go through the slot, which the original reads again
  after setDestinationForUnit, and gfxNumber and field_0x30_animRelated are written through a local Unit pointer,
  so they come after the stateBasedSpeed store as in the original;
- states 2 and 3 are US_STATE_2Unk and US_STATE_3Unk, and state 2's fade step is written as -2 (the byte the
  original stores, 0xFE; same code);
- compiler-flags-gl.txt lists UpdateMerchant.cpp: 100% with the line, 78.0% without it. The original keeps values
  in registers across checkIfCitizenUnitIsAliveBasedOnState and hasUnitReachedDestination, which main's list
  already has, and reads DAT_CurrentUnitSlotID again after activateTraderState, which stays off the list: with its
  body visible the slot stays in esi across the call (90.0% instead of 100%).

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
UI::Rendering::RenderAnimatedTutorialFloatOverlay, from 0287fe5 on reimpl/batch1-development, in the form
TheRedDaemon worked out in his review: x and y step down by 8 and 32 before the per-resolution offset, and by 28
and 69 after the draw buffer is saved, and the offset comes from a chain of plain ifs. The original pushes the
trailing 0 before it computes the other arguments, and this form gives that order; one subtraction of 36 and 101
loses the match (quick_diff 0.8035 in the first place, 0.6356 in the second), so the two steps stay, with a
comment. The 1680x1050 offset is the original's 4050, where every other offset is the screen height - 600; a fixme
says so.

The function is Gynt's: 5236e98 (60.79%) and 63cc49f on his fork's reimpl/UI-Rendering-development, and
e8e27aa (60.8%) on reimpl/UI-Rendering (his sourcehold#255); ce6bd1e took it to 67.2% on reimpl/batch1-development.

Co-authored-by: TheRedDaemon <66257843+TheRedDaemon@users.noreply.github.com>
Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the declaration/type change This requires changes to the generated/exported types or definitions. label Nov 14, 2026
Main's Ghidra sync 1b36c0a has this PR's six UnitState values, so the
PR no longer changes a header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot removed the declaration/type change This requires changes to the generated/exported types or definitions. label Nov 17, 2026
@kotijekriv

Copy link
Copy Markdown
Contributor Author

Main is merged in now (e086ba7). Its Ghidra sync 1b36c0a has this PR's six UnitState values, so the PR no longer changes a header and the declaration check passes.

Because of the symbol-count effect gynt found on #366, we measured again after the merge. This was a full build of main e086ba7 with this PR and #410 merged on it, against a full build of main alone.

  • All five functions here read 100.0%, raw and normalised.
  • So do UpdateMerchant's nine reimplemented callees.
  • No function on main reads lower than in the baseline.

MapEditorLandscaping's GeneralButtons action handler (0x004314E0) doesn't compile on main since the sync retyped editorRockType and rockOrientation. #366 changes that file, so it was left out of both builds.

@gynt
gynt self-requested a review November 17, 2026 11:46
@gynt
gynt added this pull request to the merge queue Nov 17, 2026
Merged via the queue into sourcehold:main with commit d25d347 Nov 17, 2026
4 checks passed
kotijekriv added a commit to kotijekriv/OpenSHC that referenced this pull request Nov 18, 2026
Main has six commits since e086ba7 (sourcehold#401, sourcehold#409, sourcehold#410 and three tool commits). sourcehold#409 appended a line to
cmake/compiler-flags-gl.txt at the place where the next commit of this branch adds its three, so main goes in
first.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
kotijekriv added a commit to kotijekriv/OpenSHC that referenced this pull request Nov 21, 2026
The entry for UpdateMerchant listed GameStateStructures::activateTraderState. That edge was measured on a 93.8%
draft of UpdateMerchant. The function has since landed on main at 100% (sourcehold#409), and it reaches that under /GL
without the body: activateTraderState.cpp is not on the /GL list. With the body in its unit the caller keeps the
unit slot in esi across the call, where the original reads it again, so the original's caller did not know it.

Measured on main 3458fea with sourcehold#399's wrapper build (-DOPENSHC_FUNCTION_VISIBILITY_UNITS=ON), reccmp, raw:
UpdateMerchant reads 100.0 under /GL, 90.0 with the wrappers before this change and 100.0 after it. It was the only
one of the 150 functions in that build (main's /GL list plus every file the manifest names) whose raw number
differed between /GL and the wrappers, and none differs now.

The manifest now has 85 entries and 124 edges. On main's sources the generator makes 24 units holding 92 source
files (93 before).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
kotijekriv added a commit to kotijekriv/OpenSHC that referenced this pull request Nov 21, 2026
…rcehold#399)

* cmake: function-visibility.txt, which callers must see which callees' bodies

One entry per caller, with the callees whose bodies it must see when it is
compiled, fully qualified as the definitions are written:

    OpenSHC::funcA
        OpenSHC::funcB

87 entries, 127 edges, sorted by the caller's address. Every edge is a
tu_merge.py measurement: pasting the callee into the caller's unit raises the
caller's quick_diff ratio, and for callers with several callees a leave-one-out
over the full set decided which are needed together. In all 127 the callee is
at a lower address than its caller.

Twelve measured gains are left out because they cannot be same-file edges:
in seven the callee is at a higher address than its caller, and the other
five would put a callee into a unit with callers that measure worse when they
see it.

23 names are not on main yet. 22 are Map::Units Update callers: they were
measured on our local branches reimpl/units-B-development and
reimpl/units-A-development (UpdateCamel is also on the local
reimpl/units-B-round2-100), and gynt's reimpl/map-units-updatefunctions has
drafts of all 22. The 23rd is UnitsState::changeDestinationByAmount from sourcehold#378.
A generator skips names it cannot find. The measurements are in the PR
description.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* cmake: optional wrapper units built from function-visibility.txt

With -DOPENSHC_FUNCTION_VISIBILITY_UNITS=ON, configure runs
cmake/function-visibility-units.py. It groups every caller of
cmake/function-visibility.txt with the callees whose bodies it must see (one
group per connected set, since a function is defined once) and writes one
wrapper .cpp per group that #includes the members. The wrappers replace their
members in the build, and the members leave the /GL list; the wrappers are
built without /GL. Off by default; nothing changes without the option.

Groups are formed over files, so a .cpp that defines several listed functions
is included once. A group whose members define the same internal-linkage name
(a file-scope static or anything in an anonymous namespace) is not wrapped,
and its files build as before. Manifest names with no .cpp in the build are
skipped and listed at configure time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* cmake: Gibbet and StretchingRack no longer need updateBuildingSignpostCounter's body

sourcehold#290 rewrote UpdateBadBuildingGibbet and UpdateBadBuildingStretchingRack so that they reach 100% without /GL. On
main (ea63a49), tu_merge.py gives both 1.0000 in all three layouts: the caller alone, the callee's body pasted
before it, and pasted after it (45 of 45 and 41 of 41 instructions). Seeing updateBuildingSignpostCounter no longer
helps either of them, so their two entries go. The callee keeps its other two callers, UpdateBadBuildingGallows and
UpdateBadBuildingDungeon.

The manifest now has 85 entries and 125 edges. On main's sources the wrapper generator from sourcehold#399 makes 24 units
holding 91 source files (93 before), with no internal-name clashes and the same 23 names not on main yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* cmake: UpdateMerchant must not see activateTraderState's body

The entry for UpdateMerchant listed GameStateStructures::activateTraderState. That edge was measured on a 93.8%
draft of UpdateMerchant. The function has since landed on main at 100% (sourcehold#409), and it reaches that under /GL
without the body: activateTraderState.cpp is not on the /GL list. With the body in its unit the caller keeps the
unit slot in esi across the call, where the original reads it again, so the original's caller did not know it.

Measured on main 3458fea with sourcehold#399's wrapper build (-DOPENSHC_FUNCTION_VISIBILITY_UNITS=ON), reccmp, raw:
UpdateMerchant reads 100.0 under /GL, 90.0 with the wrappers before this change and 100.0 after it. It was the only
one of the 150 functions in that build (main's /GL list plus every file the manifest names) whose raw number
differed between /GL and the wrappers, and none differs now.

The manifest now has 85 entries and 124 edges. On main's sources the generator makes 24 units holding 92 source
files (93 before).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants