Word Unperfect
public
Read
Owner: themaster
Branch: main
Commits: 0
Git CLI clone URL
git clone https://www.xt-emporium.com/git/word-unperfect.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
word-unperfect
/
rev
/
wp_layout_variant.h
File editor
#ifndef WP_LAYOUT_VARIANT_H #define WP_LAYOUT_VARIANT_H #include "wp_layout_shared.h" #include <stdbool.h> #include <stddef.h> #include <stdint.h> /* Host-safe ports of the recovered layout variant / metric-table cluster around * 1000:1bc2 through 1000:1daa. The original routines walk small DS tables, * update two active variant metric words, repair line origin/limit words, and * optionally route selected variant records through overlay code. This module * keeps the 16-bit arithmetic and exposes jumps as counters/booleans. */ typedef struct WpLayoutVariantEntry { uint8_t flags; /* original entry byte at BX[0] */ uint16_t value; /* little-endian word at BX[1] */ } WpLayoutVariantEntry; typedef struct WpLayoutVariantInitResult { uint8_t flags; uint16_t value; uint16_t old_slot_a; uint16_t new_slot_a; uint16_t old_slot_b; uint16_t new_slot_b; bool bit0_updated_slot_a; bool bit1_clear_updated_slot_b; bool bit1_set_aux_clear_updated_slot_a; bool no_op_zero_flags; } WpLayoutVariantInitResult; typedef struct WpLayoutWordPassResult { uint16_t raw_word; uint16_t adjusted_word; uint16_t compare_word; uint16_t emit_scratch_word; uint16_t extent_cap; int16_t signed_adjustment; bool compare_active; bool sentinel_word; bool saturated_to_zero; bool clamped_to_extent_cap; bool wrapped_positive_adjustment; } WpLayoutWordPassResult; typedef struct WpLayoutPathWalkResult { size_t words_seen; size_t max_words; uint16_t stop_index; uint16_t raw_word; uint16_t adjusted_word; bool stopped; bool stopped_on_raw_less_than_adjusted; bool stopped_on_raw_less_or_equal_adjusted; bool first_slot_stop; bool dirty_helper_called; } WpLayoutPathWalkResult; typedef struct WpLayoutLargeEmitResult { uint8_t record_mode_flags; uint8_t record_cursor_mode; int16_t record_cursor_metric; int16_t initial_axis_a; int16_t initial_axis_b; uint16_t slot_a; uint16_t slot_b; size_t table_init_calls; size_t slot_a_updates; size_t slot_b_updates; size_t aux_clear_updates; int16_t secondary_origin; int16_t secondary_limit; int16_t primary_origin; int16_t primary_limit; bool secondary_origin_used_cursor_metric; bool render_dirty_set; } WpLayoutLargeEmitResult; typedef struct WpLayoutMultiVariantResult { uint16_t input_mask; uint16_t return_mask; uint16_t rotated_mask; uint16_t shift_reg; size_t bits_examined; size_t selected_bits; size_t selector_loads; size_t ignored_ff_selectors; size_t overlay_jump_hints; uint8_t last_selector; uint16_t last_selector_offset; bool irq_misc_set; } WpLayoutMultiVariantResult; bool wp_layout_variant_table_init(uint16_t *slot_a, uint16_t *slot_b, WpLayoutVariantEntry entry, bool aux_flag_set, WpLayoutVariantInitResult *out_result); bool wp_layout_word_passthrough(const WpLayoutGlobals *wl, uint16_t raw_word, WpLayoutWordPassResult *out_result); bool wp_layout_heap_cursor_rebase(const WpLayoutGlobals *wl, const uint16_t *words, size_t word_count, WpLayoutPathWalkResult *out_result); bool wp_layout_record_path_walk(WpLayoutGlobals *wl, const uint16_t *words, size_t word_count, WpLayoutPathWalkResult *out_result); bool wp_layout_large_emit_measure_hub(WpLayoutGlobals *wl, const WpLayoutVariantEntry entries[4], WpLayoutLargeEmitResult *out_result); bool wp_layout_emit_multi_variant_records(WpLayoutGlobals *wl, uint16_t mask, int8_t allow_overlay_jump, const uint16_t variant_masks[16], const uint8_t selectors[16], WpLayoutMultiVariantResult *out_result); /* Raw wrappers for monolith compatibility */ uint16_t __cdecl16near layout_restore_flag_state(WpLayoutGlobals *wl); uint16_t __cdecl16near layout_large_emit_measure_hub(WpLayoutGlobals *wl); void __cdecl16near layout_variant_table_init(WpLayoutGlobals *wl, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4); uint32_t __cdecl16near layout_heap_cursor_rebase(WpLayoutGlobals *wl); uint32_t __cdecl16near layout_word_passthrough(WpLayoutGlobals *wl); uint16_t __cdecl16near layout_dirty_flags_or_mask(WpLayoutGlobals *wl); uint32_t __cdecl16near layout_record_path_walk(WpLayoutGlobals *wl); uint16_t __cdecl16near layout_emit_multi_variant_records(WpLayoutGlobals *wl, uint16_t ax, int8_t bl); #endif
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
main
Visibility
public
Your access
Read
Remote
None
File activity
View file history