Import Amiga applications and desktop tools
This commit is contained in:
commit
1c144c9a3c
347 files changed
+423483
No files matched your search
@@ -0,0 +1,9 @@
|
||||
from pathlib import Path
|
||||
p=Path(__file__).parent/'player.c';s=p.read_text()
|
||||
s=s.replace('lastState=-1,full=1,lastw=0','lastState=-1,full=1,hud=0,repaint=0,lastw=0')
|
||||
s=s.replace('full=dirty||seconds!=lastSecond||(hip?hip->play:0)!=lastState;','hud=seconds!=lastSecond||(hip?hip->play:0)!=lastState;repaint=dirty;full=dirty||hud;')
|
||||
s=s.replace('memcpy(frame,panel,W*H);drawAudio();','full=repaint;memcpy(frame,panel,W*H);drawAudio();')
|
||||
s=s.replace('frame+504*W+382,W);}','frame+504*W+382,W);if(hud)WriteChunkyPixels(w->RPort,w->BorderLeft+382,w->BorderTop+354,w->BorderLeft+741,w->BorderTop+409,frame+354*W+382,W);}')
|
||||
s=s.replace('}else if(full){scaledRegion(w,iw,rw,rh,ox,oy,0,0,W,H);}','}else if(full){for(y=0;y<rh;y++){UBYTE*src=frame+ymap[y]*W;UBYTE*dst=scaled+(ULONG)(oy+y)*iw+ox;for(x=0;x<rw;x++)dst[x]=src[xmap[x]];}WriteChunkyPixels(w->RPort,w->BorderLeft,w->BorderTop,w->BorderLeft+iw-1,w->BorderTop+ih-1,scaled,iw);}')
|
||||
s=s.replace('scaledRegion(w,iw,rw,rh,ox,oy,382,504,742,510);}','scaledRegion(w,iw,rw,rh,ox,oy,382,504,742,510);if(hud)scaledRegion(w,iw,rw,rh,ox,oy,382,354,742,410);}')
|
||||
p.write_text(s)
|
||||
Reference in new issue
Block a user