Skip to content

Numeric casting/imprecision issue in sprites demo when X_Scale/Y_Scale are not constant #20

@98devin

Description

@98devin

Rather than a rotating effect, the sprites jump around at random very erratically.
This must be due to some kind of fixed-point conversion and imprecision, before or during conversion to screen coordinates.
The definition of the OBJ_{X,Y}_Coordinate type may also be a factor.

A more detailed analysis of exactly what changes at the assembly level between versions would be required to fully understand this. Introducing explicit intermediate values with specified fixed-point types would also be useful to find the breaking point.

Considered not a crucial use-case for now, and fixed point demonstrates working just fine elsewhere (e.g. within the Sin/Cos implementations themselves). The demo works fine as-is. When more facilities for interfacing with emulator debuggers are present later on, this will be easier to resolve, too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions