Files
Cesarus85--ringfall-mjolnir-vr/source/bitmaps/bitmap_group.h
T
Jonas VolmanandClaude Opus 5.5 6eef02f1b1 R2 batch 1a: admit xbox_texture_cache (first-party names, HCEX bitmap_data fields, owner headers)
- symbols.json: IDirect3DDevice8_IsBusy/KickPushBuffer and IDirect3DBaseTexture8_IsBusy
  are static (D3DINLINE is static __forceinline; none is a cachebeta public).
- Three invented static names replaced by first-party names from the 2001-09-25
  cachebeta-xbe linker map (atlas 7eacac85, re-anchored on 20 named symbols):
  texture_cache_name_block_proc, compare (also January atlas exact tier) and
  texture_cache_initialize_hardware_format.
- bitmap_group.h (shared, 45 includers): struct bitmap_data fields per HCEX
  (mipmap_pad, long pixels_offset/pixels_size/tag_index/cache_block_index);
  bink_playback.c and bitmaps.c adopt the names. The TU-local bitmap_data view
  and raw tag_get('bitm') prefix view in xbox_texture_cache.c are gone.
- texture_cache.h declares texture_cache_debug_render (render_debug.c had no
  prototype in scope). The Xbox-only public format mappers get the object's own
  header cache/xbox_texture_cache.h. Adding them to texture_cache.h regresses
  declaration-count-sensitive consumers (decals); this is disclosed in the header.
- Reviewer amendment: the invented pad member reserved006[2] in the TU-private
  texture struct is removed (natural alignment; HCEX texture_datum has no pad).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 15:12:09 -07:00

109 lines
2.0 KiB
C

/*
BITMAP_GROUP.H
header included in hcex build.
*/
#ifndef __BITMAP_GROUP_H
#define __BITMAP_GROUP_H
#pragma once
/* ---------- headers */
#include "math/real_math.h"
#include "tag_files/tag_groups.h"
/* ---------- constants */
enum
{
BITMAP_GROUP_TAG = 'bitm',
};
/* ---------- macros */
#define bitmap_group_get(index) ((struct bitmap_group *)tag_get(BITMAP_GROUP_TAG, (index)))
/* ---------- structures */
struct bitmap_data
{
unsigned long signature;
short width;
short height;
short depth;
short type;
short format;
unsigned short flags;
union point2d registration_point;
short mipmap_count;
short mipmap_pad;
long pixels_offset;
long pixels_size;
long tag_index;
long cache_block_index;
void *hardware_format;
void *base_address;
};
struct bitmap_group_sprite
{
short bitmap_index;
short bitmap_pad;
long unused;
real_rectangle2d bounds;
real_point2d registration_point;
};
struct bitmap_group_sequence
{
char name[32];
short first_bitmap_index;
short bitmap_count;
long unused[4];
struct tag_block sprites;
};
typedef char bitmap_group_sprite_size_assert[
sizeof(struct bitmap_group_sprite) == 0x20 ? 1 : -1];
typedef char bitmap_group_sequence_size_assert[
sizeof(struct bitmap_group_sequence) == 0x40 ? 1 : -1];
struct bitmap_group
{
short type;
short format;
short usage;
unsigned short flags;
real detail_fade;
real sharpen_amount;
real bump_height;
short sprite_budget_size;
unsigned short sprite_budget_count;
short import_width;
short import_height;
struct tag_data import_bitmap;
struct tag_data pixel_data;
real smoothing_filter_size;
real alpha_bias;
short mipmap_count;
short sprite_usage;
short sprite_spacing;
unsigned short unused;
struct tag_block sequences;
struct tag_block bitmaps;
};
/* ---------- prototypes/BITMAP_GROUP.C */
struct bitmap_data *bitmap_group_get_bitmap_from_sequence(
long bitmap_group_index,
short sequence_index,
short frame_index);
/* ---------- globals */
/* ---------- public code */
#endif // __BITMAP_GROUP_H