/* Web64 SDK header printout: web64/assets.h * Generated by scripts/copy-web64-ide-source.mjs. * The IDE resolves this header as a read-only virtual SDK document. */ #ifndef WEB64_ASSETS_H #define WEB64_ASSETS_H #include #define WEB64_ASSET_MODEL_VERSION 0x0001 #define WEB64_GENERATED_ASSETS_VERSION 0x0001 #define WEB64_ASSET_ADDRESS_NONE 0x0000 #define WEB64_ASSET_REF_NONE 0x0000 #define WEB64_SPRITE_BLOCK_NONE 0xff #define WEB64_ASSET_KIND_BINARY 1 #define WEB64_ASSET_KIND_CHAR 2 #define WEB64_ASSET_KIND_CHARSET 3 #define WEB64_ASSET_KIND_SPRITE_MONO 4 #define WEB64_ASSET_KIND_SPRITE_MC 5 #define WEB64_ASSET_KIND_SPRITE_OVERLAY 6 #define WEB64_ASSET_KIND_BLOCK 7 #define WEB64_ASSET_KIND_BLOCKSET 8 #define WEB64_ASSET_KIND_MAP 9 #define WEB64_ASSET_KIND_SID 10 #define WEB64_ASSET_KIND_SOURCE 11 #define WEB64_SPRITE_MODE_MONO 1 #define WEB64_SPRITE_MODE_MULTICOLOR 2 #define WEB64_MAP_CELL_CHAR 1 #define WEB64_MAP_CELL_BLOCK 2 #define WEB64_SPRITE_FLAG_ENABLED 1 #define WEB64_SPRITE_FLAG_MULTICOLOR 2 #define WEB64_SPRITE_FLAG_EXPAND_X 4 #define WEB64_SPRITE_FLAG_EXPAND_Y 8 #define WEB64_SPRITE_FLAG_BEHIND_BACKGROUND 16 #define WEB64_CHAR_FLAG_MULTICOLOR 1 #define WEB64_BLOCK_FLAG_HAS_COLORS 1 #define WEB64_BLOCK_FLAG_HAS_ATTRIBUTES 2 #define WEB64_MAP_FLAG_BLOCK_CELLS 1 #define WEB64_MAP_FLAG_HAS_COLORS 2 #define WEB64_MAP_FLAG_HAS_ATTRIBUTES 4 #define WEB64_MAP_FLAG_HAS_SCREEN 8 #define WEB64_ASSET_COPY_OK 0 #define WEB64_ASSET_COPY_INVALID_DESCRIPTOR 1 #define WEB64_ASSET_COPY_INVALID_PLANE 2 #define WEB64_ASSET_COPY_LENGTH_OVERFLOW 4 #define WEB64_MAP_PLANE_CELLS 0 #define WEB64_MAP_PLANE_COLORS 1 #define WEB64_MAP_PLANE_ATTRIBUTES 2 #define WEB64_MAP_PLANE_SCREEN 3 typedef uint8_t Web64AssetKind; typedef uint8_t Web64SpriteMode; typedef uint8_t Web64MapCellType; typedef uint8_t Web64AssetFlags; typedef uint8_t Web64Bool; typedef uint16_t Web64AssetAddress; typedef uint16_t Web64AssetRef; typedef struct { Web64AssetAddress data; uint8_t width_pixels; uint8_t height_pixels; uint8_t bytes_per_char; uint8_t mode; uint8_t default_color; } Web64CharAsset; typedef struct { Web64AssetAddress data; uint16_t byte_size; uint16_t char_count; uint8_t bytes_per_char; uint8_t mode; } Web64CharsetAsset; typedef struct { Web64AssetAddress data; uint16_t byte_size; uint16_t frame_count; uint8_t bytes_per_frame; uint8_t payload_bytes_per_frame; uint8_t width_pixels; uint8_t height_pixels; uint8_t mode; uint8_t default_color; uint8_t multicolor_1; uint8_t multicolor_2; uint8_t data_block; } Web64SpriteAsset; typedef struct { Web64AssetRef base; Web64AssetRef overlay; uint16_t frame_count; uint8_t base_color; uint8_t overlay_color; uint8_t multicolor_1; uint8_t multicolor_2; uint8_t flags; } Web64SpriteOverlayAsset; typedef struct { Web64AssetAddress data; uint16_t byte_size; uint8_t width_chars; uint8_t height_chars; uint8_t char_index_width; uint8_t flags; } Web64BlockAsset; typedef struct { Web64AssetAddress data; Web64AssetRef charset; uint16_t byte_size; uint16_t block_count; uint8_t width_chars; uint8_t height_chars; uint16_t bytes_per_block; uint8_t index_width; uint8_t flags; } Web64BlockSetAsset; typedef struct { Web64AssetAddress cells; Web64AssetAddress colors; Web64AssetAddress attributes; Web64AssetRef source; uint16_t width; uint16_t height; uint16_t cell_count; uint8_t cell_type; uint8_t index_width; uint8_t flags; Web64AssetAddress screen; } Web64MapAsset; typedef struct { Web64AssetAddress data; uint16_t file_size; uint16_t c64_data_offset; uint16_t c64_data_size; uint16_t load_address; uint16_t init_address; uint16_t play_address; uint16_t song_count; uint16_t start_song; uint32_t speed_flags; uint16_t flags; } Web64SidAsset; _web64_rt void web64_asset_copy(uint8_t *destination, const uint8_t *source, uint16_t length); _web64_rt uint8_t web64_asset_copy_char(uint8_t *destination, const Web64CharAsset *asset); _web64_rt uint8_t web64_asset_copy_charset(uint8_t *destination, const Web64CharsetAsset *asset); _web64_rt uint8_t web64_asset_copy_sprite(uint8_t *destination, const Web64SpriteAsset *asset); _web64_rt uint8_t web64_asset_copy_sprite_pair(uint8_t *base_destination, uint8_t *overlay_destination, const Web64SpriteOverlayAsset *asset); _web64_rt uint8_t web64_asset_copy_block(uint8_t *destination, const Web64BlockAsset *asset); _web64_rt uint8_t web64_asset_copy_blockset(uint8_t *destination, const Web64BlockSetAsset *asset); _web64_rt uint8_t web64_asset_copy_map_plane(uint8_t *destination, const Web64MapAsset *asset, uint8_t plane); _web64_rt uint8_t web64_asset_copy_sid_payload(uint8_t *destination, const Web64SidAsset *asset); typedef struct { Web64AssetRef asset; uint16_t x; uint8_t y; uint8_t frame; uint8_t hardware_sprite; uint8_t data_block; uint8_t color; uint8_t flags; } Web64Sprite; typedef struct { Web64AssetRef asset; uint16_t x; uint8_t y; uint8_t frame; uint8_t base_hardware_sprite; uint8_t overlay_hardware_sprite; uint8_t flags; } Web64SpriteOverlay; typedef struct { Web64AssetRef asset; uint16_t map_x; uint16_t map_y; uint8_t screen_x; uint8_t screen_y; uint8_t viewport_width; uint8_t viewport_height; uint8_t flags; } Web64MapView; #endif