The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New game: Earthraid
#20
Oh - it's pretty easy. You have to output assembly, and perhaps do a search and replace on "PAT" for a unique name.

For example, right now my never-to-be-completed footy game has multiple tunes in it:

Code:
SUB FASTCALL playTune(tune AS UBYTE) REM gets a 0,1,2 in A and sets HL to point to relevant tune before dropping into player. ASM AND A LD HL,TUNE1 JR Z,TUNESTART DEC A LD HL,TUNE2 JR Z,TUNESTART LD HL,TUNE3 #include "Player.asm" TUNE1: #INCLUDE "Grandstand.asm" ; 400 bytes TUNE2: #INCLUDE "MOTD.asm" ; 489 bytes. TUNE3: #INCLUDE "WorldOfSport.asm" ; 102 bytes END ASM END SUB


And each assembly output from beepola has been tweaked to be unique:

Code:
DEFB 0 ; GrandStandPATtern loop begin * 2 DEFB 50 ; Song length * 2 DEFW 12 ; Offset to start of song (length of instrument table) DEFB 1 ; Multiple DEFW 0 ; Detune DEFB 0 ; Phase DEFB 0 ; Multiple DEFW 6 ; Detune DEFB 0 ; Phase DEFB 1 ; Multiple DEFW 12 ; Detune DEFB 0 ; Phase GrandStandPATTERNDATA: DEFW GrandStandPAT0 DEFW GrandStandPAT0 DEFW GrandStandPAT1 DEFW GrandStandPAT3 DEFW GrandStandPAT2 DEFW GrandStandPAT6 DEFW GrandStandPAT3 DEFW GrandStandPAT5 DEFW GrandStandPAT6 DEFW GrandStandPAT3 DEFW GrandStandPAT4 DEFW GrandStandPAT7 DEFW GrandStandPAT4 DEFW GrandStandPAT8 DEFW GrandStandPAT9 DEFW GrandStandPAT10 DEFW GrandStandPAT1 DEFW GrandStandPAT3 DEFW GrandStandPAT2 DEFW GrandStandPAT6 DEFW GrandStandPAT3 DEFW GrandStandPAT5 DEFW GrandStandPAT6 DEFW GrandStandPAT3 DEFW GrandStandPAT11 ; *** GrandStandPATtern data - $00 marks the end of a GrandStandPATtern *** GrandStandPAT0: DEFB $BD,0 DEFB 190 DEFB 119 DEFB 190 DEFB 118 DEFB 6 DEFB $00 GrandStandPAT1: DEFB 178 DEFB 154 DEFB 119

Just by search and replace of "PAT" with "GrandStandPAT" to make all labels unique to this bit of code.

Player code is included separately from data, therefore.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)