Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trasparent color not being set correctly here...
#9
@bplus The issue is trying to grab a line which is offscreen.  Something must've changed with the error checking inside _PutImage starting around version 3.6.   Try this and see if it works for you, with manual error checking involved:

Code: (Select All)
' Star Wars Episode V: The Empire Strikes Back opening crawl?
' http://www.galaxyfaraway.com/gfa/2006/02...ing-crawl/

Screen _NewImage(800, 700, 32)
_ScreenMove 300, 20
swt& = _NewImage(320, 512, 32)
_Dest swt&
Color _RGB32(0, 180, 0)
nl$ = Chr$(10)
sw$ = "It is a dark time for the Rebellion." + nl$
sw$ = sw$ + "Although the Death Star has been" + nl$
sw$ = sw$ + "destroyed, Imperial troops have driven" + nl$
sw$ = sw$ + "the Rebel forces from their hidden base" + nl$
sw$ = sw$ + "and pursued them across the galaxy." + nl$
sw$ = sw$ + nl$ + nl$
sw$ = sw$ + "Evading the dreaded Imperial Starfleet," + nl$
sw$ = sw$ + "a group of freedom fighters led by Luke" + nl$
sw$ = sw$ + "Skywalker has established a new secret" + nl$
sw$ = sw$ + "base on the remote ice world of Hoth." + nl$
sw$ = sw$ + nl$ + nl$
sw$ = sw$ + "The evil lord Darth Vader, obsessed" + nl$
sw$ = sw$ + "with finding young Skywalker, has" + nl$
sw$ = sw$ + "dispatched thousands of remote probes" + nl$
sw$ = sw$ + "into the far reaches of space.... " + nl$
Locate 20, 1
Print sw$

_Dest 0
yy = _Height / 3
For i = 11 To 60 Step .5
Cls
yy = yy - 60 / i
cText _Width / 2, yy + yy, yy, _RGB32(230, 220, 50), "Star Wars"
cText _Width / 2, yy + yy, yy * .96, _RGB32(0, 0, 0), "Star Wars"
_Display
_Limit 15
Next

cx = _Width / 2
power = 1024 'TO 1 STEP -1
x = (_Height - 20) ^ (1 / power)
dy = 1 '256 pixel height / 50 blocks across
For y = -840 To -270
Cls
For i = 0 To power - 1
'_PUTIMAGE [STEP] [(dx1, dy1)-[STEP][(dx2, dy2)]][, sourceHandle&][, destHandle&][, ][STEP][(sx1, sy1)[-STEP][(sx2, sy2)]]
If y + dy * (i + 1) >= 0 Then
_PutImage (cx - .75 * x ^ i, 10 + x ^ i)-(cx + .75 * x ^ i, 10 + x ^ (i + 1)), swt&, 0, (0, y + dy * i)-(319, y + dy * (i + 1))
End If
'LINE (cx - .75 * x ^ i, 10 + x ^ i)-(cx + .75 * x ^ i, 10 + x ^ (i + 1)), , B
Next
' Print y
_Display
_Limit 15
Next
yy = 80
For i = 60 To 0 Step -.5
Cls
yy = yy + 60 / i
cText _Width / 2, yy + yy, yy, _RGB32(230, 220, 50), "Star Wars"
cText _Width / 2, yy + yy, yy * .96, _RGB32(0, 0, 0), "Star Wars"
_Display
_Limit 75
Next

Sub cText (x, y, textHeight, K As _Unsigned Long, txt$)
Dim fg As _Unsigned Long
fg = _DefaultColor
'screen snapshot
cur& = _Dest
I& = _NewImage(8 * Len(txt$), 16, 32)
_Dest I&
Color K, _RGB32(0, 0, 0, 0)
_PrintString (0, 0), txt$
mult = textHeight / 16
xlen = Len(txt$) * 8 * mult
_PutImage (x - .5 * xlen, y - .5 * textHeight)-Step(xlen, textHeight), I&, cur&
Color fg
_FreeImage I&
End Sub

Looks to me like this is something which _PutImage used to catch, that it isn't currently catching. I've brought it up on Discord with our devs. Hopefully we'll see this fixed in the next update. Wink
Reply


Messages In This Thread
RE: Trasparent color not being set correctly here... - by SMcNeill - 11-10-2024, 01:28 AM



Users browsing this thread: 3 Guest(s)