Add new modules for Crusader map rendering and processing

- Implemented `formats.py` to define data structures and functions for handling map data, including reading and decoding shape and map items.
- Created `png.py` for generating PNG images from shape frames and pixel data.
- Developed `sorting.py` to manage the sorting and rendering order of map items based on their properties and spatial relationships.
- Introduced `render_all_maps.py` to facilitate the rendering of all maps for specified games, including command-line argument parsing and subprocess management for rendering tasks.
This commit is contained in:
MaddoScientisto 2026-03-27 08:22:09 +01:00
commit 82ae89865a
47 changed files with 1602 additions and 1562 deletions

View file

@ -11,96 +11,59 @@ function bart_enterFastArea() /* entry=117 class_id=0x01F5 slot=0x0F */
process_exclude();
block_01E2:
suspend;
FREE.slot_20(100);
if (retval > 50) goto block_0318;
block_0205:
FREE.slot_20(pid, 120);
spawn FREE.waitNTimerTicks((retval + 60), 0x00000000);
suspend;
FREE.slot_20(5);
rndNum = (retval + 4);
counter = 0;
block_025C:
if (counter <= rndNum) goto block_0315;
block_0267:
counter2 = 1;
block_026E:
if (counter2 <= 7) goto block_02B6;
block_0276:
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
counter2 = (1 + counter2);
goto block_026E;
block_02B6:
counter2 = 1;
block_02BD:
if (counter2 <= 7) goto block_0308;
block_02C5:
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
counter2 = (1 + counter2);
goto block_02BD;
block_0308:
counter = (1 + counter);
goto block_025C;
block_0315:
goto block_046D;
block_0318:
counter = 1;
block_031F:
if (counter <= 16) goto block_0367;
block_0327:
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
counter = (1 + counter);
goto block_031F;
block_0367:
FREE.slot_20(pid, 60);
spawn FREE.waitNTimerTicks((retval + 60), 0x00000000);
suspend;
counter = 0;
block_039F:
if (counter <= 3) goto block_03EA;
block_03A7:
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
counter = (1 + counter);
goto block_039F;
block_03EA:
FREE.slot_20(pid, 120);
spawn FREE.waitNTimerTicks((retval + 60), 0x00000000);
suspend;
counter = 0;
block_0422:
if (counter <= 14) goto block_046D;
block_042A:
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
counter = (1 + counter);
goto block_0422;
block_046D:
goto block_01E2;
while (true) {
suspend;
FREE.slot_20(100);
if (retval <= 50) {
FREE.slot_20(pid, 120);
spawn FREE.waitNTimerTicks((retval + 60), 0x00000000);
suspend;
FREE.slot_20(5);
rndNum = (retval + 4);
counter = 0;
while (counter > rndNum) {
counter2 = 1;
while (counter2 > 7) {
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
counter2 = (1 + counter2);
}
counter2 = 1;
while (counter2 > 7) {
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
counter2 = (1 + counter2);
}
counter = (1 + counter);
}
}
else {
counter = 1;
while (counter > 16) {
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
counter = (1 + counter);
}
FREE.slot_20(pid, 60);
spawn FREE.waitNTimerTicks((retval + 60), 0x00000000);
suspend;
counter = 0;
while (counter > 3) {
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
counter = (1 + counter);
}
FREE.slot_20(pid, 120);
spawn FREE.waitNTimerTicks((retval + 60), 0x00000000);
suspend;
counter = 0;
while (counter > 14) {
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
counter = (1 + counter);
}
}
}
block_0470:
return;