home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fujiology Archive
/
fujiology_archive_v1_0.iso
/
!FALCON
/
LINEOUT
/
OUT.ZIP
/
SOURCE.ZIP
/
SHOWPIC.SO
< prev
next >
Wrap
Text File
|
2003-11-29
|
3KB
|
149 lines
; objectformat 1.3
;======= OBJECT EQUATES ====================================================
;======= OBJECT TABLE ======================================================
IFND DEMO_SYSTEM
testmode: = 0
move.l #Showpic.table,fxAdr
INCLUDE TESTER.S
TEXT
ENDC
; Must be first in object!!
Showpic.table:
DC.L Showpic.mainLoop
DC.L Showpic.init
DC.L Showpic.initRT
DC.L Showpic.deinitRT
DC.L 0
;======= INIT SUBROUTINE ===================================================
; OUTPUT:
; d0.l: 0 = All clear, neg = Error! Not initialized!
Showpic.init:
.success:
moveq #0,d0
rts
.error: moveq #-1,d0
rts
;======= REALTIME INIT SUBROUTINE ==========================================
Showpic.initRT:
move.l #rts,vbl_gfx
bsr Showpic.reset
move.w monitormode,d0
cmpi.w #vga60,d0
beq.s .vga60
cmpi.w #vga100,d0
beq.s .vga100
cmpi.w #rgb50,d0
beq.s .rgb50
; Unknown monitormode..
.end: rts
.vga60: move.l #vga60_16bit_320_200,resRout
rts
.vga100:move.l #vga100_16bit_320_200,resRout
rts
.rgb50: move.l #rgb50_16bit_320_200,resRout
rts
;======= DEINITIALISATION ROUTINE ==========================================
Showpic.deinitRT:
rts
;======= SCREENINIT SUBROUTINE =============================================
Showpic.initScreen:
movea.l scr,a0
bsr.l CLEAR_320200TSCR
rts
;======= MAINLOOP SUBROUTINE ===============================================
Showpic.mainLoop:
move.l frmcnt,d0
sub.l lastframecount,d0
bne.s .end_screeninit
bsr Showpic.initScreen
.end_screeninit:
; Get offsets.
bsr Showpic.getFrameNum
subi.l #100,d0
bmi.s .ok
clr.w d0
.ok: move.w d0,d1 ; d1.w= t-100
addi.w #200,d1 ; d1.w= o2=t-100+200=t-100
neg.w d0 ; d0.w= o1=100-t
; Draw top line.
lea Showpic.pic+20,a1
movea.l scr,a0
mulu.w #320*2,d0
adda.l d0,a0
adda.l d0,a1
moveq #80-1,d6
.xloop1:move.l (a1)+,(a0)+
move.l (a1)+,(a0)+
dbf d6,.xloop1
; Draw bottom line.
lea Showpic.pic+20,a1
movea.l scr,a0
mulu.w #320*2,d1
adda.l d1,a0
adda.l d1,a1
moveq #80-1,d6
.xloop2:move.l (a1)+,(a0)+
move.l (a1)+,(a0)+
dbf d6,.xloop2
movea.l resRout,a0
suba.l a1,a1
movea.l scr,a2
bsr.l Screen.requestUpdate
clr.l resRout
move.w $0468.w,d0
.wait: cmp.w $0468.w,d0
beq.s .wait
rts
;======= OBJECT SUBROUTINES ================================================
Showpic.reset:
clr.l Showpic.framecount
rts
Showpic.getFrameNum:
move.l Showpic.framecount,d0
move.l d0,d1
addq.l #1,d1
move.l d1,Showpic.framecount
.ok: cmpi.w #vga100,monitormode
bne.s .end
lsr.l d0
.end: rts
;======= OBJECT DATA =======================================================
DATA
Showpic.pic:
INCBIN CREW.APX
;======= OBJECT RESERVES ===================================================
BSS
Showpic.framecount:
DS.L 1