changing screen size
This commit is contained in:
parent
dd700b923f
commit
872261f9fc
|
@ -8,8 +8,6 @@ we also discuss working with shorts (2-bytes) besides single bytes in uxntal.
|
|||
|
||||
if you haven't done it already, i recommend you read the previous section at {uxn tutorial day 1}
|
||||
|
||||
12021-07-31: updated to correspond to the latest version of the varvara screen device.
|
||||
|
||||
# where are your shorts?
|
||||
|
||||
before jumping right into drawing to the screen, we need to talk about bytes and shorts :)
|
||||
|
@ -1072,7 +1070,22 @@ as programmers, we are expected to decide what to do with these: our programs ca
|
|||
|
||||
## changing the screen size
|
||||
|
||||
as of today, the way of changing the screen size in uxnemu is by editing its source code.
|
||||
we can change the varvara screen size by writing to the .Screen/width and .Screen/height fields.
|
||||
|
||||
for example, the following would change it to a 640x480 resolution:
|
||||
|
||||
```
|
||||
#0280 .Screen/width DEO2 ( width of 640 )
|
||||
#01e0 .Screen/height DEO2 ( height of 480 )
|
||||
```
|
||||
|
||||
note that this would only work for instances of the varvara emulator where the screen size can actually be changed, e.g. because the virtual screen is a window.
|
||||
|
||||
it would be important to keep in mind the responsiveness aspects that are discussed below, for the cases where we can't change the screen size!
|
||||
|
||||
### default screen size
|
||||
|
||||
originally, the way of changing the screen size in uxnemu implied editing its source code.
|
||||
|
||||
in the uxn repo we downloaded, inside the src/ directory, there's uxnemu.c, with a line that looks like the following:
|
||||
|
||||
|
|
Loading…
Reference in New Issue