Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HW image version of this little stupid thing
#6
OK I have the hardware images working I think, but I can't figure out how to make the background blue.

Code: (Select All)

OPTION _EXPLICIT

DIM AS INTEGER lim, st, x, y, w, h
DIM AS SINGLE d
DIM AS STRING FGC, BGC, T, M, B, F, ALIEN
DIM AS LONG ALIEN_SPRITE, ALIEN_32, ALIEN_HW, CANVAS, CANVAS_HW

CANVAS& = _NEWIMAGE(320, 200, 32)
SCREEN CANVAS&
CLS , _RGB32(0, 0, 255)
_FULLSCREEN _SQUAREPIXELS

d! = 0
lim% = 120
st% = 1
x% = 0
y% = 10
w% = 50
h% = 50

FGC$ = "12" : BGC$="8"
T$ = "C" + FGC$ + " R10 E5 R20 F5 R10 BL50"
M$ = "D20 BR50 BU20 D20 BL50"
B$ = "D10 E10 U10 R30 D10 F10 U10 BL50"
F$ = "BU20 BF5 P " + BGC$ + "," + FGC$
ALIEN$ = T$ + M$ + B$ + F$

ALIEN_SPRITE& = _NEWIMAGE(w% + 1, h% + 1, 256)
_DEST ALIEN_SPRITE&
PSET (0, 10)
DRAW ALIEN$
ALIEN_32& = _NEWIMAGE(w% + 1, h% + 1, 32)
_SOURCE ALIEN_SPRITE& : _DEST ALIEN_32& : _PUTIMAGE
ALIEN_HW& = _COPYIMAGE(ALIEN_32&, 33)

_DISPLAYORDER _HARDWARE
_DEST CANVAS&
DO
FOR x% = 0 TO _WIDTH - w% + 1 STEP st%
IF lim% > 0 THEN _LIMIT lim%
_PUTIMAGE (x%, y%)-(x% + w%, y% + h%), ALIEN_HW&, 0, (0,0)-(w%, h%)
CANVAS_HW& = _COPYIMAGE(CANVAS&, 33)
_DISPLAY
IF d! > 0 THEN _DELAY d!
NEXT x%
FOR x% = _WIDTH - w% + 1 TO 0 STEP -st%
IF lim% > 0 THEN _LIMIT lim%
_PUTIMAGE (x%, y%)-(x% + w%, y% + h%), ALIEN_HW&, 0, (0,0)-(w%, h%)
CANVAS_HW& = _COPYIMAGE(CANVAS&, 33)
_DISPLAY
IF d! > 0 THEN _DELAY d!
NEXT
LOOP UNTIL _KEYHIT=27

_FREEIMAGE ALIEN_SPRITE&
_FREEIMAGE ALIEN_HW&

SYSTEM
grymmjack (gj!)
GitHubYouTube | Soundcloud | 16colo.rs
Reply


Messages In This Thread
RE: HW image version of this little stupid thing - by grymmjack - 09-12-2023, 10:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is ther a version 4.2.2 still available? astrovidiot 1 242 01-15-2026, 09:07 AM
Last Post: SMcNeill
  A funny thing happened on the way to the Forum... PhilOfPerth 4 518 10-22-2025, 12:11 AM
Last Post: madscijr
  error doing image collision detection with _MemGet madscijr 55 4,793 10-01-2025, 03:25 PM
Last Post: bplus
Photo from png tile, create symmetrical screen image hsiangch_ong 11 980 08-23-2025, 01:23 AM
Last Post: bplus
  need help printing a scaled string in a custom font to a 32-bit image madscijr 9 1,168 07-03-2025, 04:48 PM
Last Post: SMcNeill

Forum Jump:


Users browsing this thread: 1 Guest(s)