Users browsing this thread: 1 Guest(s)
Guest Adder Patch and Events
03-21-2015, 07:14 PM
Quote:Anyway, how hard would it be to make this check on a rare item instead of a common item? Or the unused bits for the unused rare items?
You will need to rewrite the following code:
Code:
check current item for guest adder items
C3/F0A3 BD 69 18 LDA $1869,X item id
C3/F0A6 C9 FF CMP #$FF empty item
C3/F0A8 F0 0C BEQ $F0B6 skip if item is invalid
C3/F0AA CF C0 80 ED CMP $ED80C0 item id of guest #$30
C3/F0AE F0 0E BEQ $F0BE set guest adder as available
C3/F0B0 CF D6 80 ED CMP $ED80D6 item id of guest #$31
C3/F0B4 F0 0C BEQ $F0C2 set guest adder as available
search next item
C3/F0B6 E8 INX try next item slot
C3/F0B7 E0 00 01 CPX #$0100 max item slots
C3/F0BA D0 E7 BNE $F0A3 try all items
The routine will branch to C3/F0BE to flag the setup of the first guest and to C3/F0C2 to flag the setup of the second guest. Instead of the item in the guest data as a condition, you can use another variable to determine if the guest will be added to the roster. It can be a rare item flag or events flags. You only need to discovery its variable/RAM address and the appropriated opcodes.
In summary, the new routine must branch/call to C3/F0BE (first guest setup) or C3/F0C2 (second guest setup) based on your specific conditions. If they aren't called, the guests aren't added to the roster. Otherwise, the specific guest is added.
You will also need to rewrite the end of C3/F0BE and C3/F0C2. They branch back to C3/F0B6 in the old code. Because the code will be rewritten, you must take it in consideration. If you call C3/F0BE and C3/F0C2 with JSRs, you can substitute the branchs for RTS (return), but it depends on your implementation.
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)