Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Timothy E Baldwin
Wimp
Commits
1401ba7c
Commit
1401ba7c
authored
Jun 01, 2013
by
Robert Sprowson
Browse files
Order cachetoolspriteaddress out of line
Was previously inline but called as a function. Not tagged.
parent
d137f7ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
36 deletions
+40
-36
s/Wimp10
s/Wimp10
+40
-36
No files found.
s/Wimp10
View file @
1401ba7c
...
...
@@ -661,42 +661,6 @@ maketoollist EntryS "R1-R11"
BLVS
cachetoolspriteaddress
Pull
"R14"
STR
R14
,
thisCBptr
B
%FT07
cachetoolspriteaddress
; [spritename], [thisCBptr], [lengthflags] as for cachespriteaddress
; R4 -> resolution suffix
; R10 = first suffix tried (and failed)
Push
"R14"
MOV
R14
,#
&FF
AND
R5
,
R14
,
R10
AND
R6
,
R14
,
R10
,
LSR
#
8
SUBS
R5
,
R5
,#
'0'
SUB
R6
,
R6
,#
'0'
MOVEQ
R5
,#
2
MOVEQ
R6
,#
8
; pretend '0' was '28' so we try '24' next
TEQ
R6
,#
3
MOVEQ
R6
,#
4
; pretend '23' was '24' so we try '22' next
05
CMP
R5
,
R6
MOVLO
R5
,
R5
,
LSL
#
1
MOVHI
R6
,
R6
,
LSL
#
1
BNE
%FT06
; after rectangular pixels, try next squarer version
TEQ
R5
,#
1
MOVEQ
R5
,#
2
MOVEQ
R6
,#
2
; after '11', try '22'
MOVNE
R5
,#-
'0'
; after any other square pixels, try without suffix
06
ADD
R14
,
R5
,#
'0'
STRB
R14
,[
R4
]
ADD
R14
,
R6
,#
'0'
STRB
R14
,[
R4
,#
1
]
BL
cachespriteaddress
Pull
"PC"
,
VC
; success
TEQ
R5
,#
0
BPL
%BT05
; try next suffix
Pull
"PC"
; total failure, exit with
07
ADD
SP
,
SP
,#
16
ADDVS
R8
,
R8
,#
4
*
2
...
...
@@ -942,6 +906,46 @@ cachetoolspriteaddress ; [spritename], [thisCBptr], [lengthflags] as for cachesp
EXITS
LTORG
;..............................................................................
; cachetoolspriteaddress
;
; [spritename], [thisCBptr], [lengthflags] as for cachespriteaddress
; in: R4 -> resolution suffix
; R10 = first suffix tried (and failed)
; out: R2 -> sprite
cachetoolspriteaddress
Push
"R14"
MOV
R14
,#
&FF
AND
R5
,
R14
,
R10
AND
R6
,
R14
,
R10
,
LSR
#
8
SUBS
R5
,
R5
,#
'0'
SUB
R6
,
R6
,#
'0'
MOVEQ
R5
,#
2
MOVEQ
R6
,#
8
; pretend '0' was '28' so we try '24' next
TEQ
R6
,#
3
MOVEQ
R6
,#
4
; pretend '23' was '24' so we try '22' next
05
CMP
R5
,
R6
MOVLO
R5
,
R5
,
LSL
#
1
MOVHI
R6
,
R6
,
LSL
#
1
BNE
%FT06
; after rectangular pixels, try next squarer version
TEQ
R5
,#
1
MOVEQ
R5
,#
2
MOVEQ
R6
,#
2
; after '11', try '22'
MOVNE
R5
,#-
'0'
; after any other square pixels, try without suffix
06
ADD
R14
,
R5
,#
'0'
STRB
R14
,[
R4
]
ADD
R14
,
R6
,#
'0'
STRB
R14
,[
R4
,#
1
]
BL
cachespriteaddress
Pull
"PC"
,
VC
; success
TEQ
R5
,#
0
BPL
%BT05
; try next suffix
Pull
"PC"
; total failure, exit with V set
;..............................................................................
; defaultparams - modify the default parameters ready for further calculations
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment