#ifndef TDKPIN_RESOURCES_H #define TDKPIN_RESOURCES_H #include #include /* * Semantic C view of TDKPIN.EXE's NE resource table. The immutable payload * bytes live in assets/raw and are tied to these entries by type, id, file * offset, allocation size, and assets/manifest.json's SHA-256 digests. */ typedef enum { TDKPIN_RESOURCE_DAT, TDKPIN_RESOURCE_PAL, TDKPIN_RESOURCE_WAV, TDKPIN_RESOURCE_BITMAP, TDKPIN_RESOURCE_ICON, TDKPIN_RESOURCE_GROUP_ICON, TDKPIN_RESOURCE_VERSION, TDKPIN_RESOURCE_DIALOG, } TdkpinResourceType; typedef enum { /* Loaded or selected by an instruction path reconstructed from the image. */ TDKPIN_RESOURCE_DIRECT, /* Resolved by Windows as a dependency or metadata, rather than image code. */ TDKPIN_RESOURCE_SYSTEM_RESOLVED, /* Linked Borland library resource with no reachable in-image selector. */ TDKPIN_RESOURCE_LINKED_UNUSED, } TdkpinResourceDisposition; typedef struct { TdkpinResourceType type; uint16_t id; uint32_t file_offset; uint32_t allocated_size; uint32_t meaningful_size; uint16_t flags; uint16_t width; uint16_t height; uint32_t sample_rate; TdkpinResourceDisposition disposition; const char *role; } TdkpinResourceDescriptor; enum { TDKPIN_RESOURCE_COUNT = 63 }; extern const TdkpinResourceDescriptor tdkpin_resource_catalog[TDKPIN_RESOURCE_COUNT]; #endif