MadMockers / BareBonesOS

ROM / Firmware for DCPU
9 stars 2 forks source link

Reverse documented return order of height and width for screen size #9

Closed interfect closed 8 years ago

interfect commented 8 years ago

The code for getting the screen size is:

.getsize:
    SET [Z+0], LEM_WID
    SET [Z+1], LEM_HGT
    SET PC, POP

This clearly returns the height in the argument that was pushed first (and will be popped last) and the width in the argument that was pushed last (and will be popped first).

The documentation specified the other order. This PR changes the documentation to match the code.

MadMockers commented 8 years ago

To be consistent with 'GetCursorPos', I want to keep Y (height) first and X (width) second. As such I'm going to swap the code around instead, and keep the documentation as is.

interfect commented 8 years ago

Sounds good.

MadMockers commented 8 years ago

Fixed in master