Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Displayscroll (EAB)
#1
Ich hatte mal (damals) ein modifiziertes Beispiel für Displayscroll auf EAB gepostet:
http://eab.abime.net/showpost.php?p=1086590&postcount=7

Das läuft auch super, zumindest mit 50MHz 030er. Big Grin 

Kürzlich jedoch scheint es wieder Diskussionen zu geben, man findet es zu langsam.

Da im o.g. Thread niemand auf das offensichtliche Optimierungspotenzial kommt, schreib ich es hier mal rein (ich bin dort rausgeekelt worden):

Die Leute wollen halt nicht mehr selbst denken.....

Org. Src:

;display scroll adapted by cylon

DEFTYPE.w
BitMap1,320,256,3

LoadBitMap1,"face8.iff",1  ;3planes 8 cols

VWait50
BLITZ

BitMapOutput1    ;print onto bmap

Locate 2,28: Print "THIS IS AGA DISPLAYSCROLL"
Locate 2,30: Print "<<<<< Move Mouse >>>>>"
Use BitMap1

;For a=7To1 Step -1
;  b=1-b
;  Circlef160,128,10*a,10*a,b
;Next

InitCopList1,44,256,$10003,8,8,-$10

CreateDisplay1

DisplayBitMap1,1

DisplayPalette1,1

For y=0 To7                           ;debug colour boxes

 Boxf 0,y*16,7,y*16+15,y

 Locate2,y*2+0.5:Colour1: Print y

Next y

Dim xpo.q(256),xpe.q(256)

a=0
VWait150
Mouse On

tpi.q=2*Pi  ;precalc

xpe(0)=-13  ;offset for even planes start at ypos=0
;not quite accurate! sub-pixel fetch or what the hell....

While Joyb(0)=0

For a=1 To 253
  d.q+Pi/18:If d>tpi Then d=0.0

  c.q=Sin(d)+(MouseX-160)/160

  xpo(a)=c

  xpe(a)=c  ;same as odd, but with offset

Next
VWait

DisplayScroll1,&xpo(0),&xpe(0);,-13 offset does not work here?

VWait
Wend

VWait25
QAMIGA
End

NoCli:CloseEd

In Fett habe ich mal die dicksten Brummer markiert:
wenn man dort ansetzt (precalc, Tabelle), dann läuft es auch auf dem Standard A1200 mit etwas FastRAM schnell! Tongue

Und hier noch die letzte Version.

Da ist der SIN() noch nicht rausoptimiert als Tabelle/Array, aber es reicht auch so....
(getestet auf der realen Maschine, nicht UAE)

Das Pic ist mit drin, ein Exe, und auch der orig. Src vom BUM. Shy

Verdammt, ich kann kein LHA anhängen!


Angehängte Dateien
.zip   Displayscr_bb.lha.zip (Größe: 24,5 KB / Downloads: 1.074)
Zitieren


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste