File tree 3 files changed +20
-6
lines changed
3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -1072,8 +1072,22 @@ Graphic and Sound Statements
1072
1072
the player or missile data use the
1073
1073
` PMADR() ` function.
1074
1074
1075
- ** Sets displayed color**
1076
- ** SETCOLOR _ num_ , _ hue_ , _ lum_ / SE.**
1075
+ ** Player/Missile horizontal move**
1076
+ ** PMHPOS _ num_ ,_ pos_ / PMH.**
1077
+
1078
+ Set horizontal position register for
1079
+ the player or missile _ num_ to _ pos_ .
1080
+
1081
+ Players 0 to 3 correspond to values 0
1082
+ to 3 of _ num_ , missiles 0 to 3
1083
+ correspond to the values 4 to 7
1084
+ respectively.
1085
+
1086
+ This is the same as writing:
1087
+ ` POKE $D000 + num , pos `
1088
+
1089
+ ** Sets displayed color**
1090
+ ** SETCOLOR _ num_ , _ hue_ , _ lum_ / SE.**
1077
1091
1078
1092
Alters the color registers so that
1079
1093
color number _ num_ has the given
Original file line number Diff line number Diff line change 1
1
' P/M test program
2
- HPOSP0 = $D000
3
2
4
3
graphics 0 ' Setups graphics mode
5
4
pmgraphics 2 ' And P/M mode
@@ -39,8 +38,8 @@ proc MovePm
39
38
x = xPos / 128 : y = P0Mem + yPos / 128
40
39
poke $D01A, $74 ' Change background color
41
40
pause 0
42
- poke HPOSP0 , x
43
- mset oldPos, 5 , 0
44
- move adr(PMdata), y, 5
41
+ pmhpos 0 , x ' Set new horizontal position
42
+ mset oldPos, 5 , 0 ' Clear old sprite
43
+ move adr(PMdata), y, 5 ' Draw at new vertical pos.
45
44
oldPos = y
46
45
endproc
Original file line number Diff line number Diff line change @@ -605,6 +605,7 @@ PARSE_LINE_COMMAND:
605
605
" RAd" emit TOK_BYTE_SADDR emit DEGFLAG emit TOK_0 emit TOK_POKE
606
606
# @endif FASTBASIC_FP
607
607
" PMGraphics" EXPR emit TOK_PMGRAPHICS
608
+ " PMHpos" EXPR emit TOK_PUSH_NUM word HPOSP0 emit TOK_ADD emit TOK_SADDR " ," EXPR emit TOK_POKE
608
609
609
610
PARSE_LINE_ASSIGN:
610
611
VAR_WORD_SAVE " =" EXPR emit TOK_VAR_STORE E_POP_VAR
You can’t perform that action at this time.
0 commit comments