source: Readingame/tools/msg.rehex.bt@ c52dd7b

main
Last change on this file since c52dd7b was c52dd7b, checked in by PulkoMandy <pulkomandy@…>, 8 weeks ago

Add rehex scripts in easy to use form

This is more convenient than having them on the wiki

  • Property mode set to 100644
File size: 513 bytes
Line 
1LittleEndian();
2
3// Simple string chunks are defined by a size (self-including) and a
4// string (NULL terminated)
5struct lenstring
6{
7 uint16_t len;
8 local uint16_t realLen = len - 2;
9 char string[realLen];
10};
11
12// Room chunks have a size and are filled by string chunks
13struct ROOM
14{
15 local uint16_t start = FTell();
16
17 uint16_t sizeInBytes;
18
19 struct lenstring substrings[0];
20 while (FTell() - start < sizeInBytes)
21 {
22 ArrayExtend(substrings);
23 }
24};
25
26struct ROOM rooms[0];
27
28while(!FEof())
29{
30 ArrayExtend(rooms);
31}
Note: See TracBrowser for help on using the repository browser.