Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trasparent color not being set correctly here...
#10
@SMcNeill nice fix, I hadn't a clue! Thanks!

Looks like this was an added check before main _putimage line:
If y + dy * (i + 1) >= 0 Then ' _putimage

Meanwhile I try something without _putimage:
Code: (Select All)
' Star Wars Episode V: The Empire Strikes Back opening crawl?
' http://www.galaxyfaraway.com/gfa/2006/02/what-is-the-text-of-the-star-wars-episode-v-the-empire-strikes-back-opening-crawl/

Screen _NewImage(1200, 600, 32)
_ScreenMove 0, 20
Color _RGB32(0, 180, 0)
Dim sw$(14)
sw$(0) = "It is a dark time for the Rebellion."
sw$(1) = "Although the Death Star has been"
sw$(2) = "destroyed, Imperial troops have driven"
sw$(3) = "the Rebel forces from their hidden base"
sw$(4) = "and pursued them across the galaxy."
sw$(5) = "***"
sw$(6) = "Evading the dreaded Imperial Starfleet,"
sw$(7) = "a group of freedom fighters led by Luke"
sw$(8) = "Skywalker has established a new secret"
sw$(9) = "base on the remote ice world of Hoth."
sw$(10) = "***"
sw$(11) = "The evil lord Darth Vader, obsessed"
sw$(12) = "with finding young Skywalker, has"
sw$(13) = "dispatched thousands of remote probes"
sw$(14) = "into the far reaches of space.... "

cx = _Width / 2

row = _Height - 64 - 8
size = 64


tstart = 0
Do
    row = _Height - 64 - 8
    size = 64
    Cls
    t = tstart
    For i = 20 To 1 Step -1
        t = t - 1
        If t >= 0 And t <= 14 Then t$ = sw$(t) Else t$ = " "
        Text cx - (Len(t$) * size / 2) / 2, row, size, &HFFAA8800, t$
        size = 64 * .9 ^ (21 - i)
        row = row - size - 1
    Next
    _Display
    _Limit 2
    tstart = tstart + 1
Loop


Sub Text (x, y, textHeight, K As _Unsigned Long, txt$)
    Dim fg As _Unsigned Long, bg As _Unsigned Long, cur&, i&
    fg = _DefaultColor: bg = _BackgroundColor: cur& = _Dest
    i& = _NewImage(8 * Len(txt$), 16, 32)
    _Dest i&: Color K, _RGBA32(0, 0, 0, 0): _PrintString (0, 0), txt$
    _PutImage (x, y)-Step(Len(txt$) * textHeight / 2, textHeight), i&, cur&
    Color fg, bg: _FreeImage i&: _Dest cur&
End Sub

Not quite as smoooth! Big Grin
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


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

Possibly Related Threads…
Thread Author Replies Views Last Post
  find color of a pixel PhilOfPerth 8 744 10-09-2025, 05:20 PM
Last Post: SMcNeill
  palette color help pmackay 7 975 07-13-2025, 11:51 PM
Last Post: madscijr
  A Question on memory set aside for Zero Dimster 11 1,755 12-01-2024, 04:01 PM
Last Post: SMcNeill
  Need some help getting characters to follow each other correctly Cobalt 6 1,050 11-22-2024, 01:19 AM
Last Post: Cobalt
  Error displaying 256 color PCX image program? macalwen 8 1,630 07-05-2024, 01:39 PM
Last Post: SMcNeill

Forum Jump:


Users browsing this thread: 1 Guest(s)