Editing
Textdata event.txt
(section)
From Raynegard Wiki
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Loader / parser (Ghidra) == {| class="wikitable" ! Function !! Addr !! Role |- | <code>Struct_Setup_Effect_Manager</code> || <code>00498546</code> || opens <code>event.txt</code>, parses every row, builds the trees |- | <code>Archive_OpenTextFileByName</code> || <code>004bc800</code> || opens the file from <code>g_NewArchive2</code> |- | <code>TextAsset_ReadNextLine</code> || β || row iterator |- | <code>TickKey_InitFromCoords</code> β <code>TickKey_ComputeAndDecompose</code> || <code>004b50c0</code> / <code>004b5250</code> || converts cols 2β6 (calendar) β absolute tick key |- | <code>EffectDef_AppendKeyframe</code> || β || stores the row payload as a keyframe on the effect def |} Parse loop (paraphrased): <pre> while (TextAsset_ReadNextLine(&buf, line)) { if (line[0] == '#') continue; // '#' = comment line if (sscanf(line, "%d,%d,...,%d", &c1..&c16) != 16) // exactly 16 ints continue; // malformed -> skip if (c12 < 10000) c12 -= 1; // sprite id -> 0-based for <10000 key = TickKey(c2,c3,c4,c5,c6); // week,day,hour,min,sec -> tick tree = (c1 == 0) ? ground_effect_tree : air_effect_tree; ... insert effect def at key into tree, append keyframe(c7..c16) ... } </pre> Format string <code>"%d,%d,β¦,%d"</code> (16 fields) @ <code>004e4dd4</code>. Lines beginning with <code>#</code> are comments; any line that doesn't scan to exactly 16 ints is skipped.
Summary:
Please note that all contributions to Raynegard Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Raynegard Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
Reddit Community
Discord Server
Recent changes
Random page
Help about MediaWiki
Special pages
Search
Tools
What links here
Related changes
Page information