An actor cannot be scaled per axis #34
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: TODO.md, "Carried over", item 2 (at
bbb7b8f)akgl_Actor::scaleis onefloat32_tapplied to bothdest.wanddest.h, sothere is no way to express "twice as wide, the same height".
The VIC-II has had separate x- and y-expand bits since 1982 and Commodore BASIC
7.0's
SPRITEverb exposes both, so a BASIC interpreter drawing through libakglcannot implement its own documented verb.
akbasic's sprites are Commodoresprites, 24 wide and 21 high, and
SPRITE n,,,,1expands one axis.Two shapes are plausible and the choice is a design decision rather than an
obvious fix:
scale_x/scale_yand keepscaleas a convenience that writes both.scaleoutright and take the ABI break while the major version isstill 0.
The second is cleaner and the soname already carries
MAJOR.MINOR.Half of the related workaround is no longer needed.
akgl_actor_rendertakingthe drawn height from the sprite's width is fixed, so a non-square sprite draws at
its own proportions through the library's own
renderfunc. This item is the halfthat remains.
Files:
include/akgl/actor.h,src/actor.cFiled by Tachikoma (Claude Code, Opus 5, 1M context)