Skip to content

Commit ea9580c

Browse files
author
Trulio
committed
Merge branch 'master' of https://github.com/RednibCoding/OpenShadowFlare into feature/androidPort
2 parents cc167af + 6b66769 commit ea9580c

7 files changed

Lines changed: 542 additions & 0 deletions

File tree

‎documentation/data-files.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,14 @@ supplies the run/walk fallback, while the requested initial scenario and entry
639639
remain the fallback for saves which predate the retail world-state owner. The
640640
rest of the later state is still pending.
641641
642+
The early quest items show why these coordinates must remain part of the item
643+
definition. Malse's stolen gem `99000000`, Syria's stolen Spirit Stone
644+
`99000001`, and Rosanna's Memorable Ruby `99000002` occupy cells `(0,0)`,
645+
`(1,0)`, and `(2,0)` on automatic page zero. Script opcode 58 finds them there
646+
and opcode 59 removes the returned item from that owner before completing the
647+
matching mission. The other Spirit Stone named by definition `98000001` is a
648+
different item on page two.
649+
642650
## Transport destination table
643651
644652
Table 40 in `Table.Tbd` has 51 rows and three columns:

‎documentation/script-engine.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,20 @@ edge before clearing Dusty Ruins correctly does nothing. Scenario `1000001`
990990
is the enemy-occupied Cold Svalt Town map; it is distinct from the recovered
991991
town in scenario `1000000`.
992992

993+
The next edge and first town mission stay script-owned as well. Object 2 in
994+
occupied scenario `1000001` calls opcode 17 for inhabited Cold Svalt scenario
995+
`1000000`, entry zero. Alex's clear flag 11 starts messages `1000000..1000006`
996+
through his status-zero/status-one chain and saves the first-visit latch.
997+
Rosanna owns flag 15: her first visit runs messages `1000047..1000049`, and
998+
the next runs `1000050..1000051`, sets mission four active, selects its notice,
999+
and queues sample 65. Wild Ice in the occupied outskirts owns loot row 56 and
1000+
therefore the fixed category-four definition `99000002`, stored on automatic
1001+
page zero at `(2,0)`. On return, Rosanna's message `1000053` is followed by
1002+
opcode 59 and opcode 62 before acknowledgement, so the ruby is removed and
1003+
sample 66 is queued immediately. Callback message `1000054` creates category
1004+
two definition `1100003`; later visits use message `1000055` without repeating
1005+
the item.
1006+
9931007
Opcode 25 is the other half of that lifecycle. Its four evaluated operands are
9941008
absolute enemy character number, world X, world Y, and direction. The native
9951009
owner refuses to mutate an already-living enemy, but the script command still

‎reverse/shadowflare-exe/status.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,6 +1730,17 @@ Cold Svalt scenario `1000001` at entry zero. This keeps the route, gate, map
17301730
titles, and entry coordinates in MCT/SCS ownership rather than a portable
17311731
quest-name special case.
17321732

1733+
Cold Svalt's first mission is covered through the same owners. Occupied
1734+
scenario `1000001` has 108 enemies and its object-two overlap enters inhabited
1735+
scenario `1000000`, entry zero. Alex's messages `1000000..1000006` latch flag
1736+
11, while Rosanna uses flag 15 and two visits for messages `1000047..1000051`
1737+
before starting mission four. Wild Ice character `14000001` owns loot row 56,
1738+
which resolves to fixed category four definition `99000002` on automatic page
1739+
zero at `(2,0)`. Rosanna's return sentence removes it and completes the mission
1740+
before message acknowledgement, then callback `1000054` creates category two
1741+
definition `1100003`. Completion sample 66, reward landing sample 93, saved
1742+
quest and latch state, and the no-repeat `1000055` follow-up are all covered.
1743+
17331744
Outdoor containers use ordinary scenario scripts rather than a separate
17341745
hard-coded chest owner. Their status hides the closed object, shows its open
17351746
partner, calls opcode 16 for positional sound, and calls opcode 24 with a

‎roadmap.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,16 @@ once complete, opcode 17 loads occupied Cold Svalt scenario `01000001` at
11751175
entry zero. Titles, entry values, quest state, and every transition remain
11761176
owned by the shipped MCT and SCS data.
11771177

1178+
The first Cold Svalt mission is covered end to end. Occupied outskirts
1179+
scenario `01000001` loads all 108 enemies and its object-two edge enters the
1180+
inhabited town in scenario `01000000`. Alex's seven-message introduction and
1181+
saved first-visit latch run before Rosanna's two-conversation request. Wild
1182+
Ice owns loot row 56, which creates the fixed Memorable Ruby in automatic-item
1183+
page zero at cell `(2,0)`. Returning it removes the real item, completes
1184+
mission four with sample 66, and creates Rosanna's category-two definition
1185+
`1100003` reward on the following callback. Its sample 93 landing sound,
1186+
completed save, ordinary follow-up, and no-repeat behavior are covered too.
1187+
11781188
The first Tower of Ordeal minigame service is reconstructed through the same
11791189
boundary. Opcodes 73 and 74 launch Blackjack and return its draw/player/dealer
11801190
result, while status kind 8 keeps the following branches in scenarios

‎tests/native/CMakeLists.txt‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,37 @@ if(TARGET sf_game_core)
15611561
NAME episode_one_cold_svalt_route
15621562
COMMAND episode_one_cold_svalt_route_test)
15631563

1564+
add_executable(
1565+
episode_one_memorable_ruby_test
1566+
episode_one_memorable_ruby_test.cpp
1567+
)
1568+
target_link_libraries(
1569+
episode_one_memorable_ruby_test
1570+
PRIVATE
1571+
OpenShadowFlare::World
1572+
)
1573+
target_compile_features(
1574+
episode_one_memorable_ruby_test PRIVATE cxx_std_17)
1575+
target_compile_definitions(
1576+
episode_one_memorable_ruby_test
1577+
PRIVATE
1578+
"OPENSHADOWFLARE_SOURCE_DIR=\"${PROJECT_SOURCE_DIR}\""
1579+
)
1580+
set_target_properties(
1581+
episode_one_memorable_ruby_test
1582+
PROPERTIES CXX_EXTENSIONS OFF)
1583+
if(MSVC)
1584+
target_compile_options(
1585+
episode_one_memorable_ruby_test PRIVATE /W4 /permissive-)
1586+
else()
1587+
target_compile_options(
1588+
episode_one_memorable_ruby_test PRIVATE
1589+
-Wall -Wextra -Wpedantic)
1590+
endif()
1591+
add_test(
1592+
NAME episode_one_memorable_ruby
1593+
COMMAND episode_one_memorable_ruby_test)
1594+
15641595
add_executable(script_engine_test script_engine_test.cpp)
15651596
target_link_libraries(
15661597
script_engine_test

0 commit comments

Comments
 (0)