Crusader_Decomp/USECODE/EUSECODE_extracted/callback_family_decompile.md
MaddoScientisto 4d3c8cd81b Add detailed class event processing and family comparison tools
- Enhance `extract_eusecode_flx.py` to derive class event rows with additional metadata including derived body windows and repeated template statuses.
- Introduce `usecode_family_compare.py` for comparing event families, analyzing commonalities in event bodies, and generating reports on identical groups and differences.
- Implement new data structures for managing class event rows and family artifact specifications.
- Update output formats to include derived body information and repeated family regression checks.
- Ensure robust validation of repeated family expectations against actual extracted data.
2026-03-22 23:24:46 +01:00

5 KiB

SURCAM Callback Family Decompiled Event Sketches

This is a reversible per-class rendering derived directly from class_event_index.tsv plus the raw extracted chunk bytes. ScummVM event labels remain hints only; the authoritative data here is the slot id, raw row bytes, and derived body window.

SURCAMEW

class:
  entry_index: 0x11C
  class_id: 0x4DE
  class_name: SURCAMEW
  class_object_index: 0x4E0
  raw_code_base_u32: 0xE6
  code_base_minus_one: 0xE5
  conservative_event_count: 35
  events:
    - slot: 0x01
      event_name_hint: use
      raw_event_entry_word: 0x00f7
      raw_code_offset: 0x000000d2
      derived_body_start: 0x01b7
      derived_body_end: 0x02ae
      derived_body_length: 247
      repeated_template_status: callback-eventtrigger/shared-slot-0x01/shared-slot-template
      body_sha1: a132370f9360cae36a81dd0372108c555a964d88
      body_prefix_hex: 5a005ce300535552
      body_suffix_hex: 666572656e74007a
    - slot: 0x0a
      event_name_hint: equip
      raw_event_entry_word: 0x00d1
      raw_code_offset: 0x00000001
      derived_body_start: 0x00e6
      derived_body_end: 0x01b7
      derived_body_length: 209
      repeated_template_status: callback-eventtrigger/shared-slot-0x0A/same-length-template
      body_sha1: 61ffc6347df026ded22dfebd2afe55826f1e9ad2
      body_prefix_hex: 5a005cb500535552
      body_suffix_hex: 690a00766172007a
    - slot: 0x20
      event_name_hint: 
      raw_event_entry_word: 0x02ba
      raw_code_offset: 0x000001c9
      derived_body_start: 0x02ae
      derived_body_end: 0x0568
      derived_body_length: 698
      repeated_template_status: callback-eventtrigger/shared-slot-0x20/same-length-template
      body_sha1: 155c3cf663c03a6f53846938ac7c289aeb3c4c26
      body_prefix_hex: 5a0b5c6302535552
      body_suffix_hex: f500636f6465007a
    - slot: 0x21
      event_name_hint: 
      raw_event_entry_word: 0x0655
      raw_code_offset: 0x00000483
      derived_body_start: 0x0568
      derived_body_end: 0x0bbd
      derived_body_length: 1621
      repeated_template_status: callback-eventtrigger/shared-slot-0x21/shared-slot-template
      body_sha1: dd8da26eae780920efc8ae8c51db5e9e8151914c
      body_prefix_hex: 5a145ce205535552
      body_suffix_hex: 000062ec007a007a
    - slot: 0x22
      event_name_hint: 
      raw_event_entry_word: 0x01a3
      raw_code_offset: 0x00000ad8
      derived_body_start: 0x0bbd
      derived_body_end: 0x0d60
      derived_body_length: 419
      repeated_template_status: callback-eventtrigger/shared-slot-0x22/same-length-template
      body_sha1: 0dd40a9416581d71aed72d5cdb63656468f50d43
      body_prefix_hex: 5a035c6b01535552
      body_suffix_hex: 756e6447756e007a

SURCAMNS

class:
  entry_index: 0x10D
  class_id: 0x4C6
  class_name: SURCAMNS
  class_object_index: 0x4C8
  raw_code_base_u32: 0xE6
  code_base_minus_one: 0xE5
  conservative_event_count: 35
  events:
    - slot: 0x01
      event_name_hint: use
      raw_event_entry_word: 0x0051
      raw_code_offset: 0x000000d2
      derived_body_start: 0x01b7
      derived_body_end: 0x0208
      derived_body_length: 81
      repeated_template_status: callback-eventtrigger/shared-slot-0x01/shared-slot-template
      body_sha1: af6e6f93e4879920b189bfdeede69bb18e3307d5
      body_prefix_hex: 5a005c3d00535552
      body_suffix_hex: 666572656e74007a
    - slot: 0x0a
      event_name_hint: equip
      raw_event_entry_word: 0x00d1
      raw_code_offset: 0x00000001
      derived_body_start: 0x00e6
      derived_body_end: 0x01b7
      derived_body_length: 209
      repeated_template_status: callback-eventtrigger/shared-slot-0x0A/same-length-template
      body_sha1: bb2bc85fb9064de32bb1d2807ab41d0634fba228
      body_prefix_hex: 5a005cb500535552
      body_suffix_hex: 690a00766172007a
    - slot: 0x20
      event_name_hint: 
      raw_event_entry_word: 0x02ba
      raw_code_offset: 0x00000123
      derived_body_start: 0x0208
      derived_body_end: 0x04c2
      derived_body_length: 698
      repeated_template_status: callback-eventtrigger/shared-slot-0x20/same-length-template
      body_sha1: 137f2bb8750946fa2c84750edcc6866fb77b2874
      body_prefix_hex: 5a0b5c6302535552
      body_suffix_hex: f500636f6465007a
    - slot: 0x21
      event_name_hint: 
      raw_event_entry_word: 0x0709
      raw_code_offset: 0x000003dd
      derived_body_start: 0x04c2
      derived_body_end: 0x0bcb
      derived_body_length: 1801
      repeated_template_status: callback-eventtrigger/shared-slot-0x21/shared-slot-template
      body_sha1: 215c83fb3e76bf447b8768b537edfb99f58e600b
      body_prefix_hex: 5a145c9606535552
      body_suffix_hex: 000062ec007a007a
    - slot: 0x22
      event_name_hint: 
      raw_event_entry_word: 0x01a3
      raw_code_offset: 0x00000ae6
      derived_body_start: 0x0bcb
      derived_body_end: 0x0d6e
      derived_body_length: 419
      repeated_template_status: callback-eventtrigger/shared-slot-0x22/same-length-template
      body_sha1: e01ce4b7741b642ddc4ebd220aafe847bd07300b
      body_prefix_hex: 5a035c6b01535552
      body_suffix_hex: 756e6447756e007a