0 Members and 1 Guest are viewing this topic.
pt-Get(X,Y)->WFor(I,0,7){W+I} xor ({sprite+I})->{W+I}EndPt-Off(X,Y,W)
Thanks, that's good enough for my purposes.I found a pixel-wise xor (or / and) function for sprites, to invert a sprite if it is on dark background.Code: [Select]pt-Get(X,Y)->WFor(I,0,7){W+I} xor ({sprite+I})->{W+I}EndPt-Off(X,Y,W)
That might come in handy for monochrome games
Is something wrong with Pt-Change(X,Y,sprite)?
Quote from: calc84maniac on November 25, 2011, 10:48:05 amIs something wrong with Pt-Change(X,Y,sprite)?Yeah, else I wouldn't have posted this. The Pt-Change function inverts also white pixels, which isn't desired.My routine only inverts if the background-pixel AND the sprite-pixel are black.
Quote from: MGOS on November 25, 2011, 12:07:32 pmQuote from: calc84maniac on November 25, 2011, 10:48:05 amIs something wrong with Pt-Change(X,Y,sprite)?Yeah, else I wouldn't have posted this. The Pt-Change function inverts also white pixels, which isn't desired.My routine only inverts if the background-pixel AND the sprite-pixel are black.Actually looking at your code, it looks like your routine and Pt-Change() will do exactly the same things. All Pt-Change is, is an XOR sprite display, which is exactly what you wrote