**************************************************************************** **************************************************************************** ** ** Platinum Edition (Display routine) ** ** This software is in the public domain. There is no warranty. ** ** by Patrick Davidson (pad@calc.org, http://pad.calc.org/) ** ** Last updated July 28, 2001 ** **************************************************************************** **************************************************************************** ******************************************** PREPARE DISPLAY SYSTEM * * This routine prepares the display by drawing the status bar information * and copying it into the display buffer. * ******** Initialize_Info: pea message(pc) JSR_ROM ST_helpMsg addq.w #4,sp IFD ti89 lea LCD_MEM+95*30,a2 ENDIF IFD ti92plus lea LCD_MEM+123*30,a2 ENDIF lea 6+95*32(a5),a0 lea 3200(a0),a1 moveq #4,d0 lib1: moveq #3,d1 lib2: move.l (a2)+,d2 move.l d2,(a0)+ move.l d2,(a1)+ dbra d1,lib2 clr.l (a0)+ clr.l (a1)+ lea 12(a1),a1 lea 12(a0),a0 lea 14(a2),a2 dbra d0,lib1 rts message: dc.b "Cash: $ - Shield: - Score:",0 EVEN Status_Prepare: RTS ******************************************** DISPLAY SCREEN BUFFER Display_Screen: LEA 6(A5),A0 lea 3206(a5),a3 move.l plane1(a5),a1 move.l plane0(a5),a2 MOVEQ #99,D0 LAB_0124: MOVE.L (A0)+,(A1)+ move.l (a3)+,(a2)+ MOVE.L (A0)+,(A1)+ move.l (a3)+,(a2)+ MOVE.L (A0)+,(A1)+ move.l (a3)+,(a2)+ MOVE.L (A0)+,(A1)+ move.l (a3)+,(a2)+ MOVE.L (A0)+,(A1)+ move.l (a3)+,(a2)+ lea 12(a0),a0 lea 12(a3),a3 lea 10(a1),A1 lea 10(a2),a2 DBF D0,LAB_0124 RTS ******************************************** CLEAR GAMEPLAY AREA Clear_Screen_Main: lea 94*32+26(a5),a0 lea 3200(a0),a1 moveq #0,d0 move.l d0,d1 move.l d0,d2 move.l d0,d3 move.l d0,d4 moveq #94,d5 Clear_Screen_Loop_: movem.l d0-d4,-(a0) lea -12(a0),a0 movem.l d0-d4,-(a1) lea -12(a1),a1 dbra d5,Clear_Screen_Loop_ rts Clear_Screen: move.l plane0(a5),a1 move.l plane1(a5),a0 add.w #2990,a1 add.w #2990,a0 moveq #0,d0 moveq #0,d1 moveq #0,d2 moveq #0,d3 moveq #0,d4 moveq #99,d5 Clear_Screen_Loop: movem.l d0-d4,-(a0) lea -10(a0),a0 movem.l d0-d4,-(a1) lea -10(a1),a1 dbra d5,Clear_Screen_Loop rts ******************************************** BASIC TEXT DISPLAY ROUTINES Set_Font: ; Set font to D0 move.w d0,-(sp) JSR_ROM FontSetSys addq.w #2,sp rts Display_String: ; Display (A0) at (D1,D0) move.w #4,-(sp) pea (a0) move.w d0,-(sp) move.w d1,-(sp) JSR_ROM DrawStr lea 10(sp),sp rts _sprintf: ____sprintf: JMP_ROM sprintf