Commit d1726911 authored by ROOL's avatar ROOL 🤖
Browse files

Update sprites to use 16 colours (greys)

Detail:
  Improve the visual appearance of scores by using blended graphics.
  Only the sprite set in use is now held in memory, previously unused sets were too, and add support for EX0 EY0 modes.
  Sprites updated based on bitmap captures of the PMS font by Richard Hallas, with kind permission.
Admin:
  Submission from Chris Wraight.

Version 2.02. Tagged as 'Maestro-2_02'
parent 59e2e920
......@@ -14,17 +14,7 @@
#
# Makefile for Maestro
#
# ***********************************
# *** C h a n g e L i s t ***
# ***********************************
# Date Name Description
# ---- ---- -----------
# 05-Nov-94 AMcC Updated for Black build
#
#
# Program specific options:
#
COMPONENT = Maestro
APP = !${COMPONENT}
RDIR = Resources
......@@ -33,10 +23,6 @@ INSTAPP = ${INSTDIR}.${APP}
include StdTools
SQUISH = squish
SQFLAGS = -nolist
MSGVERSION = ${AWK} -f Build:AwkVers
FILES =\
$(RDIR).!Boot\
$(LDIR).!Help\
......@@ -48,6 +34,7 @@ FILES =\
$(RDIR).EnsureRMA\
$(RDIR).GenMessage\
$(RDIR).Sprites\
$(RDIR).Sprites11\
$(RDIR).Sprites22\
$(LDIR).Templates
......@@ -55,16 +42,15 @@ FILES =\
# Main rules:
#
all: ${FILES}
@echo ${COMPONENT}: Application built (Disc}
@${ECHO} ${COMPONENT}: application built
install: install_${TARGET}
install_Examples:
${MKDIR} ${INSTDIR}
${CP} Examples ${INSTDIR} ${CPFLAGS}
Access ${INSTDIR} /r
Access ${INSTDIR}.* lr/r
@echo ${COMPONENT}: Example files installed {Disc}
${CHMOD} -R a+r ${INSTAPP}
@${ECHO} ${COMPONENT}: example files installed
install_ install_Maestro: ${FILES}
${MKDIR} ${INSTAPP}
......@@ -75,6 +61,7 @@ install_ install_Maestro: ${FILES}
${CP} ${RDIR}.EnsureRMA ${INSTAPP}.EnsureRMA ${CPFLAGS}
${CP} ${RDIR}.GenMessage ${INSTAPP}.Messages ${CPFLAGS}
${CP} ${RDIR}.Sprites ${INSTAPP}.Sprites ${CPFLAGS}
${CP} ${RDIR}.Sprites11 ${INSTAPP}.Sprites11 ${CPFLAGS}
${CP} ${RDIR}.Sprites22 ${INSTAPP}.Sprites22 ${CPFLAGS}
${CP} ${LDIR}.Templates ${INSTAPP}.Templates ${CPFLAGS}
${MKDIR} ${INSTAPP}.Themes.Ursula
......@@ -86,9 +73,8 @@ install_ install_Maestro: ${FILES}
${CP} ${RDIR}.Ursula.!Sprites22 ${INSTAPP}.Themes.Ursula.!Sprites22 ${CPFLAGS}
${CP} ${RDIR}.Morris4.!Sprites ${INSTAPP}.Themes.Morris4.!Sprites ${CPFLAGS}
${CP} ${RDIR}.Morris4.!Sprites22 ${INSTAPP}.Themes.Morris4.!Sprites22 ${CPFLAGS}
Access ${INSTAPP} /r
Access ${INSTAPP}.* lr/r
@echo ${COMPONENT}: Application installed {Disc}
${CHMOD} -R a+rx ${INSTAPP}
@${ECHO} ${COMPONENT}: application installation complete
clean:
${RM} ${RDIR}.!RunImage
......@@ -96,16 +82,16 @@ clean:
${RM} ${RDIR}.GenMessage
${WIPE} crunched.* ${WFLAGS}
${WIPE} o ${WFLAGS}
@echo ${COMPONENT}: cleaned
@${ECHO} ${COMPONENT}: cleaned
#
# Static dependencies:
#
${RDIR}.!RunImage: crunched.!RunImage
${SQUISH} ${SQFLAGS} -from crunched.!RunImage -to $@
${SQUISH} ${SQUISHFLAGS} -from crunched.!RunImage -to $@
crunched.!RunImage: bas.!RunImage
crunch.!RunImage; BASIC
${RUN}BasCrunch -1 bas.!RunImage $@
o.EnsureRMA: s.EnsureRMA
${MKDIR} o
......@@ -113,10 +99,10 @@ o.EnsureRMA: s.EnsureRMA
$(RDIR).EnsureRMA: o.EnsureRMA
${LD} -bin -o $@ o.EnsureRMA
SetType $@ Utility
${SETTYPE} $@ Utility
$(RDIR).GenMessage: $(LDIR).Messages
${MSGVERSION} $(LDIR).Messages > $(RDIR).GenMessage
${INSERTVERSION} $(LDIR).Messages > $(RDIR).GenMessage
#---------------------------------------------------------------------------
# Dynamic dependencies:
No preview for this file type
No preview for this file type
/* (2.01)
/* (2.02)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 2.01
#define Module_MajorVersion_CMHG 2.02
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 22 Nov 2014
#define Module_Date_CMHG 27 May 2017
#define Module_MajorVersion "2.01"
#define Module_Version 201
#define Module_MajorVersion "2.02"
#define Module_Version 202
#define Module_MinorVersion ""
#define Module_Date "22 Nov 2014"
#define Module_Date "27 May 2017"
#define Module_ApplicationDate "22-Nov-14"
#define Module_ApplicationDate "27-May-17"
#define Module_ComponentName "Maestro"
#define Module_ComponentPath "castle/RiscOS/Sources/Apps/Maestro"
#define Module_FullVersion "2.01"
#define Module_HelpVersion "2.01 (22 Nov 2014)"
#define Module_LibraryVersionInfo "2:1"
#define Module_FullVersion "2.02"
#define Module_HelpVersion "2.02 (27 May 2017)"
#define Module_LibraryVersionInfo "2:2"
......@@ -1582,9 +1582,7 @@ WHILE R%
CASE s% OF
WHEN key% : PROCfloat_key_sig(X%,Y%+y%(s%))
WHEN time% : PROCfloat_time_sig(X%,Y%)
OTHERWISE : pixtrans%?1 = pixtrans%?0 EOR pixtrans%?1
SYS SpriteOp%, SprPlot%, SprBlk%, ChSprite%, X%,Y%, 11, factors%, pixtrans%
pixtrans%?1 = pixtrans%?0 EOR pixtrans%?1
OTHERWISE : SYS SpriteOp%, SprPlot%, SprBlk%, ChSprite%, X%,Y%, 11, factors%, fpixtrans%
ENDCASE
SYS GetRectangle%,,Window%+handle% TO R%
ENDWHILE
......@@ -1599,11 +1597,11 @@ I%=accidental%+2+A%
W%=x%(I%)+X%(I%):Y%-=y%(I%)
ChSprite%=S%(I%)
FOR I%=0 TO KEY_SIG%(1)-1
SYS SpriteOp%, SprPlot%, SprBlk%, ChSprite%, X%, Y%+Li%*Key_Y%(C%,A%,I%), 3, factors%, pixtrans%
SYS SpriteOp%, SprPlot%, SprBlk%, ChSprite%, X%, Y%+Li%*Key_Y%(C%,A%,I%), 3, factors%, fpixtrans%
X%+=W%
NEXT
ELSE
SYS SpriteOp%, SprPlot%, SprBlk%, ChSprite%, X%, Y%-y%(s%), 3, factors%, pixtrans%
SYS SpriteOp%, SprPlot%, SprBlk%, ChSprite%, X%, Y%-y%(s%), 3, factors%, fpixtrans%
ENDIF
ENDPROC
......@@ -1995,6 +1993,15 @@ x%=Window%!x0%-Window%!scx%
lx1%=x%+Score_Width%:IF lx1%>Clip%!x1% lx1%=Clip%!x1%
c%=Clip%!x0%:IFc%<x%+Hi% c%=x%+Hi%
b%=Clip%!y0%:t%=Clip%!y1%
B%=Score_Width%
T%=Clip%!x1%-x%:IFT%<B% B%=T%:REM Right bound
T%=Clip%!x0%-x%:IFT%<0 T%=0:REM Left bound
IF NOT BADMODE% THEN
PROCdraw_score(x%,y%,T%,B%):REM Draw symbols on stave
ELSE
MOVE Window%!x0%, Window%!y1%-100
PRINT "Cannot display score in this (256-colour) mode"
ENDIF
IFPERC% THEN
FOR S%=STAVE%+1TOSTAVE%+PERC%
Y%=y%+Y_STAVE%(S%)
......@@ -2012,15 +2019,7 @@ NEXT
ENDIF
NEXT
B%=Score_Width%
T%=Clip%!x1%-x%:IFT%<B% B%=T%:REM Right bound
T%=Clip%!x0%-x%:IFT%<0 T%=0:REM Left bound
IF NOT BADMODE% THEN
PROCdraw_score(x%,y%,T%,B%):REM Draw symbols on stave
ELSE
MOVE Window%!x0%, Window%!y1%-100
PRINT "Cannot display score in this (256-colour) mode"
ENDIF
ENDPROC
::
REM PROCEDURE: draw_score(Based X%,Y%, PX bounds A%,B%)
......@@ -2066,36 +2065,38 @@ REM
REM Join=?N%(C%)AND2
:
DEF PROCdraw_notes(G%)
LOCAL C%,x%,y%,s%,l%,NC0%,NC1%,lasty%,checkstagger%
LOCAL C%,x%,y%,s%,l%,ly%,NC0%,NC1%,lasty%,checkstagger%
PX%+=1:REM Move on to next position
x%=X%+PX%(PX%):REM Calculate gate column X (convert from work- to screen-coord)
checkstagger%=FALSE
C%=-1
REPEAT
REPEATC%-=TRUE:UNTILG%AND%1<<C%
NC0%=?N%(C%) : NC1%=N%(C%)?1 :REM fast local vars
y%=Y%+Y_STAVE%(S_C%(C%))
IFNC0%AND&F8 THEN
l%=(NC0%>>3)-16
IFABSl%>5 PROCsprite(ledger%+l%DIV2,x%,y%):REM Ledger lines
y%+=Li%*l%
s%=NC1%>>5ORNC0%<<3AND8
IF checkstagger% THEN
REM stagger next note if too close to one below
REM stagger fails sometimes if channels of 2 adjacent notes are not in draw order?
IF ABS(lasty%-y%)<2*Li% PROCsprite(s%,x%+Pgap%,y%):checkstagger%=FALSE ELSE PROCsprite(s%,x%,y%)
ELSE
PROCsprite(s%,x%,y%):checkstagger%=TRUE
ENDIF
lasty%=y%
IFNC1%AND7 PROCsprite(accidental%ORNC1%AND7,x%-x%(s%),y%)
ELSE
s%=rest%ORNC1%>>5
PROCsprite(s%,x%,y%)
ENDIF
IFNC1%AND24 PROCsprite(dot%+(NC1%>>3AND3),x%+x%(s%),y%)
IFNC0%AND4 PROCsprite(tie%,x%,y%)
N%(C%)+=2:REM Pull from note queue
REPEAT C%-=TRUE:UNTIL G% AND %1<<C%
NC0%=?N%(C%) : NC1%=N%(C%)?1 :REM fast local vars
y%=Y%+Y_STAVE%(S_C%(C%))
IF NC0% AND &F8 THEN
l%=(NC0%>>3)-16
ly%=y%
y%+=Li%*l%
s%=NC1%>>5 OR NC0%<<3 AND 8
IF checkstagger% THEN
REM stagger next note if too close to one below
REM stagger fails sometimes if channels of 2 adjacent notes
REM are not in draw order?
IF ABS(lasty%-y%)<2*Li% PROCsprite(s%,x%+Pgap%,y%):checkstagger%=FALSE ELSE PROCsprite(s%,x%,y%)
ELSE
PROCsprite(s%,x%,y%):checkstagger%=TRUE
ENDIF
IF ABSl%>5 PROCsprite(ledger%+l%DIV2,x%,ly%):REM Ledger lines
lasty%=y%
IF NC1% AND 7 PROCsprite(accidental% OR NC1% AND 7,x%-x%(s%),y%)
ELSE
s%=rest% OR NC1%>>5
PROCsprite(s%,x%,y%)
ENDIF
IF NC1% AND 24 PROCsprite(dot%+(NC1%>>3AND3),x%+x%(s%),y%)
IF NC0% AND 4 PROCsprite(tie%,x%,y%)
N%(C%)+=2:REM Pull from note queue
UNTIL(2<<C%)>G%:REM Until no more notes (1 bits)
ENDPROC
::
......@@ -2259,7 +2260,7 @@ IF(STAVE%+1)AND2 THEN
LOCAL y%
MOVEx%+Hi%,Y%+Y_STAVE%(STAVE%)+Stave_Height%DIV2
y%=Y_STAVE%(STAVE%-1)-Y_STAVE%(STAVE%)-Stave_Height%
DRAW BY 0,y% : MOVE BY Hi%,0 : DRAW BY 0,-y% : REM Connect keyboard staves
DRAW BY 0,y% : REM Connect keyboard staves
ENDIF
ENDPROC
......@@ -2888,7 +2889,6 @@ ENDPROC
DEF PROCinitialise_miscellany
LOCAL len, v%, a$, s%
DIM davidstempworkspaceforcolourtrans% 8
DIM Resourcedir 255
SYS "OS_ReadVarVal", "Maestro$dir", Resourcedir, 255, 0, 0 TO ,,len
Resourcedir?len=13 : REM It needs a cr termination
......@@ -2938,7 +2938,7 @@ C_MenuItemfg = 7
C_MenuItembg = 0
ENDPROC
DEF PROCgetmodeinfo(new)
DEF PROCgetmodeinfo(new%)
LOCAL S_Rows%, S_Columns%
......@@ -2962,157 +2962,33 @@ DEF PROCgetmodeinfo(new)
Hi%=2: Vi%=4
C_Width%=8*Hi% : C_Height%=8*Vi%
REM Reinitialise sprites will decide which sprite pool to use and
REM set wimp_sprite_scaling% to indicate whether the wimp sets
REM the scale factors or we do. At present, we always let the wimp
REM set the scale factors.
IF NOT new THEN
PROCreinitialise_sprites (FALSE)
IF wimp_sprite_scaling% THEN
SYS"Wimp_ReadPixTrans",&200,SprBlk%,S%(0),,,,factors%,pixtrans%
ELSE
SYS"Wimp_ReadPixTrans",&200,SprBlk%,S%(0),,,,,pixtrans%
ENDIF
ENDIF
ENDPROC
DEF PROCset_sprites (printer)
REM Change the sprite block pointer to point to the block
REM containing sprites for this new mode.
REM The wimp_sprite_scaling% flag is always TRUE now, but
REM does allow for manual insertion of scale factors if
REM necessary.
LOCAL mode_class%,xeig%,yeig%
IF printer THEN
mode_class% = 22
ELSE
SYS"OS_ReadModeVariable",-1,4 TO ,,xeig%
SYS"OS_ReadModeVariable",-1,5 TO ,,yeig%
mode_class% = ((1<<xeig%) * 10) + (1<<yeig%)
ENDIF
CASE mode_class% OF
WHEN 48,24,12:
REM Rectangular pixel mode
REM Always use block 1 here. It may contain hi-res sprites
REM but in that case, they're the only ones available.
SprBlk% = SprBlk1%
wimp_sprite_scaling% = TRUE
OTHERWISE:
REM Square pixel mode
REM If we have two pools, go for ths hi-res one else fall back
REM on the lo-res ones
IF two_pools% THEN
SprBlk% = SprBlk2%
ELSE
SprBlk% = SprBlk1%
ENDIF
wimp_sprite_scaling% = TRUE
ENDCASE
ENDPROC
DEF PROCreinitialise_sprites (printer)
REM Called on a mode change. First, calls set_sprites to set the
REM current sprite block pointer to the relevant block for the mode
REM (See Above). Then, we go through the block setting up the pointers
REM that index into the block.
PROCset_sprites (printer)
RESTORE
FOR I% = 0 TO Num%
READ S$(I%),x%,y%,W%,H%
SYS SpriteOp%, 256+24, SprBlk%, S$(I%) TO ,,S%(I%) : REM get pointer to sprite
x%(I%)=x%*Hi%
y%(I%)=y%*Vi%
X%(I%)=(W%-x%)*Hi%
Y%(I%)=(H%-y%)*Vi%
NEXT
IF new%=FALSE THEN
SYS "Wimp_ReadPixTrans",&200,SprBlk%,S%(0),,,,factors%,pixtrans%
j%=7
FOR i%=0 TO 15
fpixtrans%?i%=pixtrans%?j%
IF i%>6 THEN j%-=1
NEXT
ENDIF
ENDPROC
DEF PROCinitialise_sprites
REM Initialise sprites pools as necessary. Will use either one or two
REM pools as necessary depending upon which files are available.
LOCAL temp$, a%
wimp_sprite_scaling% = TRUE : REM We do have to do some manual scaling now and then
two_pools% = FALSE
DIM factors% 16
DIM pixtrans% 16
SpriteLen% = 12000
REM See what sprites we have available
REM We can cope with having Sprites, Sprites22 or both but will fall
REM over with none.
temp$ = Sprite$
a% = OPENIN temp$
IF a% <> 0 THEN
have_lores% = TRUE
SpriteLen% = 64 + EXT#a%
CLOSE#a%
ELSE
have_lores% = FALSE
ENDIF
temp$ += "22"
a% = OPENIN temp$
IF a% <> 0 THEN
have_hires% = TRUE
SpriteLen% = 64 + EXT#a%
CLOSE#a%
ELSE
have_hires% = FALSE
ENDIF
two_pools% = have_hires% AND have_lores%
DIM SprBlk1% SpriteLen%
!SprBlk1% = SpriteLen% :REM initialise private sprite area
SprBlk1%!4 = 0
SprBlk1%!8 = 16
SprBlk1%!12 = 16
IF two_pools% THEN
DIM SprBlk2% SpriteLen%
!SprBlk2% = SpriteLen%
SprBlk2%!4 = 0
SprBlk2%!8 = 16
SprBlk2%!12 = 16
ENDIF
REM Do the equivalent of a *SLoad to load our sprites in
IF two_pools% THEN
REM Load both sets of sprites
SYS SpriteOp%, 512+10, SprBlk1%, Sprite$
SYS SpriteOp%, 512+10, SprBlk2%, Sprite$+"22"
ELSE
REM Load whichever set is available
IF have_lores% THEN
SYS SpriteOp%, 512+10, SprBlk1%, Sprite$
ELSE
SYS SpriteOp%, 512+10, SprBlk1%, Sprite$+"22"
ENDIF
ENDIF
PROCset_sprites (FALSE) : REM decide which sprite pool to use depending upon mode
LOCAL path$,size%,file%
path$="<Maestro$Dir>.Sprites"
SYS "OS_ReadModeVariable",-1,5 TO ,,yeig%
IF yeig%=1 THEN path$=path$+"22"
IF yeig%=0 THEN path$=path$+"11"
file%=OPENIN path$
size%=EXT#file%+16
CLOSE#file%
DIM SprBlk% size%
SprBlk%!0=size%
SprBlk%!8=16
SYS "OS_SpriteOp",&109,SprBlk%
SYS "OS_SpriteOp",&10A,SprBlk%,path$
SprPlot% = &234 : REM sprite plot code
LOCAL I%,x%,y%,W%,H%
......@@ -3164,18 +3040,26 @@ line%=15:REM Current stave line symbol is on
posx%=16:REM X music position
sgp%=17:REM Symbol gate pointer
sc%=18:REM Channel number if symbol specified close to note
REM Set up sprite colours for fixed and floating objects
DIM factors% 15
DIM pixtrans% 15
DIM fpixtrans% 15
PROCgetmodeinfo(FALSE)
ENDPROC
REM name, x, y, w, h
DATA B,7,3,26,7,SB,0,2,12,5,Mu,0,2,11,15,Cu,0,2,11,15,Qu,0,2,17,17,SQu,0,2,17,17,DSQu,0,2,17,17,SDSQu,0,2,17,17
DATA B,7,3,26,7,SB,0,2,12,5,Md,0,12,11,15,Cd,0,12,11,15,Qd,0,14,11,17,SQd,0,14,11,17,DSQd,0,14,11,17,SDSQd,0,14,11,17
DATA Rest,-1,-1,8,4,Rest,-1,-2,8,4,Rest,-1,0,8,4,Rest4,-2,5,7,12,Rest8,-1,4,9,8,Rest16,0,8,11,12,Rest32,1,8,13,16,Rest64,2,12,15,20
DATA M,0,2,11,5,Natural,8,6,7,13,Sharp,10,5,9,11,Flat,8,3,7,12,Sharp2,9,2,8,5,Flat2,14,3,13,12,NSharp,17,6,16,13,NFlat,15,6,14,15
DATA Treble,0,16,18,31,Alto,0,8,16,19,Alto,0,4,16,19,Bass,0,7,20,17
DATA B,7,3,24,6,SB,0,2,13,5,Mu,0,2,12,16,Cu,0,2,12,16
DATA Qu,0,2,19,16,SQu,0,2,20,16,DSQu,0,2,20,16,SDSQu,0,2,20,16
DATA B,7,3,24,6,SB,0,2,13,5,Md,0,14,12,16,Cd,0,14,12,16
DATA Qd,0,14,12,17,SQd,0,14,12,17,DSQd,0,14,12,17,SDSQd,0,14,12,17
DATA Rest,-1,-1,10,4,Rest,-1,-2,10,4,Rest,-1,0,10,4,Rest4,-2,5,9,13
DATA Rest8,-1,4,9,9,Rest16,0,8,12,12,Rest32,1,8,15,16,Rest64,2,12,18,19
DATA M,0,2,11,5,Natural,8,6,7,12,Sharp,10,5,9,12,Flat,8,3,8,11
DATA Sharp2,9,2,10,5,Flat2,14,3,16,11,NSharp,17,6,17,12,NFlat,15,6,16,14
DATA Treble,0,14,23,31,Alto,0,8,23,17,Alto,0,4,23,17,Bass,0,5,24,14
DATA Bh,7,3,26,7,SBh,0,2,12,5,Mh,0,2,11,5,Ch,0,2,11,5
DATA ldg5,2,28,15,17,ldg4,2,24,15,13,ldg3,2,20,15,9,ldg2,2,16,15,5,ldg1,2,12,15,1
DATA Dot1,-12,2,3,2,Dot2,-12,2,8,2,Dot3,-12,2,13,2,Bar,-1,8,2,17,C,0,2,11,5
DATA ldg1,2,-12,15,1,ldg2,2,-12,15,5,ldg3,2,-12,15,9,ldg4,2,-12,15,13,ldg5,2,-12,15,17
DATA ldg5,2,28,16,17,ldg4,2,24,16,13,ldg3,2,20,16,9,ldg2,2,16,16,5,ldg1,2,12,16,1
DATA Dot1,-12,2,4,2,Dot2,-12,2,9,2,Dot3,-12,2,14,2,Bar,-1,8,1,17,C,0,2,11,5
DATA ldg1,2,-12,16,1,ldg2,2,-12,16,5,ldg3,2,-12,16,9,ldg4,2,-12,16,13,ldg5,2,-12,16,17
DATA Time,1,9,25,19,Key,0,13,0,30,Tie,-12,-3,23,3,""
DEF PROCinitialise_wimp
......@@ -4173,7 +4057,7 @@ DEF PROCprint
LOCAL NC0%, NC1%
LOCAL x%, y%, lasty%, checkstagger%
LOCAL N%
LOCAL note_factors%, factors%
LOCAL note_factors% :REMfactors%
LOCAL bars_plotted%
LOCAL on_page%, last_pos%, index%, last_x_offset%
LOCAL current_gate%, n_bars%, multiplier, w1, xs
......@@ -4181,7 +4065,7 @@ DEF PROCprint
LOCAL bar_at_front%, bar_at_front_start%
LOCAL x_res%, y_res%, ptr%, features%
DIM note_factors% 16, factors% 16
DIM note_factors% 16 :REMfactors% 16
DIM N%(7)
DIM n_start%(7), n%(7)
DIM SIG%(1), sig%(1)
......@@ -4195,7 +4079,7 @@ DEF PROCprint
ENDIF
Hi% = 2
Vi% = 4
Vi% = 2
x_mul_scale% = 3
y_mul_scale% = 3
......@@ -4203,8 +4087,6 @@ DEF PROCprint
y_div_scale% = 4
SYS "Hourglass_On"
PROCreinitialise_sprites (TRUE)
SYS"Wimp_ReadPixTrans",&200,SprBlk%,S%(0),,,,factors%,pixtrans%
note_factors%!0 = factors%!0 * x_mul_scale%
note_factors%!4 = factors%!4 * y_mul_scale%
note_factors%!8 = (factors%!8) * x_div_scale%
......@@ -4225,7 +4107,7 @@ DEF PROCprint
title$ = MID$(title$, s%)
LOCAL ERROR
ON ERROR LOCAL: RESTORE ERROR:e%=FNCheckOK (REPORT$, 1):PROCreinitialise_sprites (FALSE): ENDPROC
ON ERROR LOCAL: RESTORE ERROR:e%=FNCheckOK (REPORT$, 1):ENDPROC
f% = OPENOUT("printer:")
SYS "PDriver_SelectJob", f%, title$
......@@ -4242,7 +4124,7 @@ REM ENDIF
SYS "PDriver_DeclareFont", 0, 0, 0 : REM We don't want to use any
ENDIF
ON ERROR LOCAL: RESTORE ERROR: SYS "PDriver_AbortJob", f%: CLOSE#f%:e%=FNCheckOK (REPORT$, 1):PROCreinitialise_sprites (FALSE): ENDPROC
ON ERROR LOCAL: RESTORE ERROR: SYS "PDriver_AbortJob", f%: CLOSE#f%:e%=FNCheckOK (REPORT$, 1):ENDPROC
SYS "PDriver_PageSize" TO ,page_x%,page_y%, l_edge%, b_edge%, r_edge%, t_edge%
page_x% = page_x% / 400: page_y% = page_y% / 400
......@@ -4562,7 +4444,6 @@ REM ENDIF
RESTORE ERROR
SYS "PDriver_EndJob", f%
CLOSE#f%
PROCreinitialise_sprites (FALSE)
SYS "Hourglass_Off"
ENDPROC
......@@ -4571,10 +4452,6 @@ DEF PROCprint_sprite(s%, X%, Y%, scale_factors%) : REM plot sprite S%(s%) at X%,
LOCAL spr_y, scaled_y, y_add, x_add: REM, sprite_factors%
REM SYS"Wimp_ReadPixTrans",&200,SprBlk%,S%(s%),,,,sprite_factors%
REM spr_y = ((S%(s%)!20) + 1) * ((factors%!4) / (factors%!12)) : REM actual height
REM scaled_y = spr_y * ((scale_factors%!4) / (scale_factors%!12)) : REM scaled height
spr_y = ((S%(s%)!20) + 1) * (2 / 4) : REM actual height
scaled_y = spr_y * (2 / 4) : REM scaled height
......@@ -4597,12 +4474,7 @@ REM Below are various hack factors to deal with the fact that the sprites are sc
y_add = 0 : x_add = 6
ENDCASE
!davidstempworkspaceforcolourtrans% = &FFFFFF00
davidstempworkspaceforcolourtrans%!4 = &00000000
SYS "ColourTrans_SelectTable",18,davidstempworkspaceforcolourtrans%,-1,-1,colour_temp%,1
SYS SpriteOp%, SprPlot%, SprBlk%, S%(s%), X%-(x%(s%)) + x_add, Y% - y%(s%) + y_add, 8, scale_factors%, colour_temp%
SYS SpriteOp%, SprPlot%, SprBlk%, S%(s%), X%-(x%(s%)) + x_add, Y% - y%(s%) + y_add, 8, factors%, pixtrans%
ENDPROC
......
TEXTLOAD "bas.!RunImage"
CRUNCH -1
SAVE "crunched.!RunImage"
QUIT
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment