News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Beam specific beam caps and grapple

Started by Mettyk25jigsaw, August 17, 2014, 03:58:29 AM

Previous topic - Next topic

Mettyk25jigsaw

Hi, I found these two pieces of asm (below) under the trading section...
It is coding to make door caps I believe for beams and grapple...

lorom

org $freespace in $84
LDA $1D77,X   ;Variable use PLM value
BEQ HERE1           ;BRANCH TO HERE1 IF EQUAL
CMP #$8000
BEQ HERE2         ;BRANCH TO HERE2 IF EQUAL
HERE1:
STZ $1D77,X
RTS
HERE2:
STZ $1D77,X   ;Variable use PLM value
LDA $7EDEBC,X   ;PLM Goto Instruction Pointer
STA $1D27,X   ;Next PLM instruction
LDA #$0001
STA $7EDE1C,X   ;PLM frame delay
RTS


AND


lorom

org $freespace in $84
LDA $1D77,X   ;Variable use PLM value
BEQ HERE1           ;BRANCH TO HERE1 IF EQUAL
AND #$0F00
CMP #$0500
BEQ HERE1
LDA $1D77,X   ;Variable use PLM value
AND #$000F       ;getting rid of the extra bits
CMP #$0001       ;REPLACE WITH WHAT BEAM YOU WANT IT TO BE VULNERABLE TO
BEQ HERE2         ;BRANCH TO HERE2 IF EQUAL
HERE1:
STZ $1D77,X
RTS
HERE2:
STZ $1D77,X   ;Variable use PLM value
LDA $7EDEBC,X   ;PLM Goto Instruction Pointer
STA $1D27,X   ;Next PLM instruction
LDA #$0001
STA $7EDE1C,X   ;PLM frame delay
RTS


The post sais to make a hex code to point to this information, I am guessing it's meaning the 3 set of pointers the PLM ID (eg. the value which you would place on the png image inside PLM folder in Smile) is located and points to. I believe the PLM ID door caps use only 3 set of pointers, and nothing beyond that and these pointers point to the necessary data needed for the door cap.

My question is, what would these 3 pointers be that you would need to put where the Door cap plm ID points to, Where in this asm code I have above here in this post do I point to?

Any help would be appreciated, thankyou...

P.JBoy

The three pointers that define door caps are in order: Setup, closing animation, opening animation; where the two animations are PLM instruction lists. By the looks of it, what you would want is to have the setup point to the same routine as the other coloured doorcaps ($C7B1), and you want the two animation pointers to point to a clone of another doors animation instruction lists, *but*, with one of the instructions changed so that it sets the PLM pre-instruction to the above-posted code, i.e., the parameter to the instruction $86C1 will be [$freespace in $84].

This will probably go largely above your head unless you've studied PLMs a bit

Mettyk25jigsaw

Thanks Pjboy, however after some more fiddling around, I found out how to do it myself, but thankyou anyway... :yay: