Replies: 1 comment
-
Regarding your first question, I cannot replicate this, arrays of pointers work correctly for me. Could you provide a minimal self-contained compilable example? As for negation, the way it works currently is that for small numbers like 10 it performs the arithmetic on bytes, so you get an unsigned byte of 245 and only then it is promoted to word. A bit unfortunate design, I agree. |
Beta Was this translation helpful? Give feedback.
-
Does Millfork actually support arrays of pointers?
I'm trying to do something like:
const array ufoSpr1 = file("images/ufo1.spr", 0)
const array ufoSpr2 = file("images/ufo2.spr", 0)
const array ufoSpr3 = file("images/ufo3.spr", 0)
const array ufoSpr4 = file("images/ufo4.spr", 0)
array(pointer) ufoFrames = [ ufoSpr1, ufoSpr2, ufoSpr3, ufoSpr4 ]
However if I then try t access say ufoFrames[2], like this:
pointer p
p = ufoFrames[2]
then p does not point to ufoSpr3
Am I doing something wrong here, or does Millfork just not handle arrays of pointers correctly?
Bonus issue:
Addition of a word with another negative word does not seem to work correctly:
word a = 100
word b = -10
word c = a + b
c is not 90
(ie: addition operator for word does not handle adding negative number)
Beta Was this translation helpful? Give feedback.
All reactions