04-01-2024, 03:57 PM
(This post was last modified: 04-01-2024, 03:58 PM by TerryRitchie.)
Here's a little proof of concept. You'll need the si3.png image I included below. I had to resize it to 960x960 and convert to 32bit color.
Play around with the x,y coordinates in the secondary x,y,z coordinates of _MAPTRIANGLE to fit the image.
Play around with the x,y coordinates in the secondary x,y,z coordinates of _MAPTRIANGLE to fit the image.
Code: (Select All)
DIM si3 AS LONG ' space invaders image
DIM bg2 AS LONG ' background image
DIM by AS INTEGER ' background y
DIM GameScreen AS LONG ' software screen to update
DIM HWScreen AS LONG ' hardware screen to display
si3 = _LOADIMAGE("si3.png", 32)
bg2 = _LOADIMAGE("bg2.png", 32)
GameScreen = _NEWIMAGE(960, 960, 32)
HWScreen = _COPYIMAGE(GameScreen, 33)
SCREEN _NEWIMAGE(960, 960, 32)
DO
_LIMIT 60
_DEST GameScreen
CLS
_PUTIMAGE (0, by), bg2
_PUTIMAGE (0, 0), si3
_DEST 0
_FREEIMAGE HWScreen
HWScreen = _COPYIMAGE(GameScreen, 33)
_MAPTRIANGLE (0, 0)-(0, 959)-(959, 959), HWScreen TO(-1, 1, -3)-(-1, -1, -1)-(1, -1, -1), 0
_MAPTRIANGLE (0, 0)-(959, 959)-(959, 0), HWScreen TO(-1, 1, -3)-(1, -1, -1)-(1, 1, -3), 0
_DISPLAY
by = by - 1
IF by = -1040 THEN by = 0
LOOP UNTIL _KEYHIT = 27
SYSTEM