The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.3.33 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Users browsing this thread: 1 Guest(s)
Patch: Reward Display

#1
Posts: 149
Threads: 21
Thanks Received: 40
Thanks Given: 3
Joined: Dec 2013
Reputation: 9
Status
Auto-life
Patch:  Reward Display 1.0
Target: Final Fantasy 3, Version 1.0, English, With Header
Download


Description:

The Colosseum system is based on a duel between a opponent and a character. To participate in the duel, a bet item must be selected in the item screen. The selected item will determinate the opponent and the reward item for the duel.

Unfortunately, the item window in the Colosseum doesn't display the reward item before the bet item is selected. After the bet item is selected, the reward item is displayed. However, without prior knowledge of the reward item, it can be a undesired reward for the bet item. The selection can't be undone and the player are forced to participate in the duel.

The patch changes the item display in the Colosseum window. It now displays two columns. The left column is the reward items and the right column is the bet items. It allows to know in advance the reward item for the selected item.

Code:
;-------------------------------------------------------------------------------
;reward display 1.0
;
;display reward items in Colosseum item screen
;-------------------------------------------------------------------------------

header
hirom

;-------------------------------------------------------------------------------
;main link
;-------------------------------------------------------------------------------
org     $C37FD0
    JMP selection       ;select text to display
warnpc  $C37FD3

;-------------------------------------------------------------------------------
;selection
;
;select between normal text display or new Colosseum setup display
;-------------------------------------------------------------------------------
org     $C3F800         ;(*) change for any free space
print   "seg start: ", pc

selection:

    ;check system event
    LDA $26             ;system event
    CMP #$71            ;to init colloseum screen (item selection)
    BEQ bet_display
    CMP #$72            ;to mantain colosseum screen (item selection)
    BEQ bet_display

    ;old code for no-Colosseum events
    JSR $80B9           ;build string for item name
    JSR $7FD9           ;display text. (Y=location in rom)
    JMP $7FE6           ;display item type

;-------------------------------------------------------------------------------
;bet display
;
;setup and display formated strings for the new Colosseum setup 
;-------------------------------------------------------------------------------
bet_display:

    JSR display_setup
    JSR display_reward
    JSR display_delimiter
    JSR display_item
    RTS

;-------------------------------------------------------------------------------
;transfer start
;
;init transfer of string
;-------------------------------------------------------------------------------
transfer_start:

    ;setup transfer
    LDX #$9E8B
    STX $2181

    ;exit
    RTS

;-------------------------------------------------------------------------------
;transfer advance
;
;advance position onscreen for string based on X value
;-------------------------------------------------------------------------------
transfer_advance:

    ;advance position
    REP #$20            ;set C
    TXA                 ;get position to advance
    CLC
    ADC $7E9E89         ;sum with existing one
    STA $7E9E89         ;save position
    SEP #$20            ;set A

    ;exit
    RTS

;-------------------------------------------------------------------------------
;display setup
;
;setup variables for Colosseum
;-------------------------------------------------------------------------------
display_setup:

    ;discovery item ID in window
    TDC
    LDA $E5             ;index in window
    TAY
    LDA $1869,Y         ;item in window index

    ;calculate variables
    STA $0205           ;save item to bet
    JSR $B22C           ;setup Colosseum variables

    ;exit
    RTS

;-------------------------------------------------------------------------------
;display reward
;
;create and display string for reward item
;-------------------------------------------------------------------------------
display_reward:

    ;setup transfer
    JSR transfer_start

    ;check bet item
    LDA $0205           ;item to bet
    CMP #$FF            ;empty item
    BNE .set_reward     ;set default reward if item is valid

    ;set empty reward item for invalid item
    LDA #$FF            ;empty
    BRA .skip

    ;set default reward item
    .set_reward
    LDA $0207           ;reward item
    .skip

    ;display item
    JSR $C068           ;setup string as the item name
    JSR $7FD9           ;display item

    ;advance position
    LDX #$001A
    JSR transfer_advance

    ;exit
    RTS

;-------------------------------------------------------------------------------
;display delimiter
;
;display character delimiter between reward and bet items
;-------------------------------------------------------------------------------
display_delimiter:

    ;setup transfer
    JSR transfer_start

    ;setup delimiter
    LDA #$C1            ;':' character
    STA $2180
    STZ $2180           ;end of string

    ;display string
    JSR $7FD9

    ;advance position
    LDX #$0002
    JSR transfer_advance

    ;exit
    RTS

;-------------------------------------------------------------------------------
;display_item
;
;display bet item
;-------------------------------------------------------------------------------
display_item:

    ;setup transfer
    JSR transfer_start

    ;get discovery item ID in window
    LDA $0205           ;item to bet

    ;display string
    JSR $C068           ;setup string as the item name
    JSR $7FD9           ;display string

    ;advance position
    LDX #$001A
    JSR transfer_advance

    ;exit
    RTS

print   "seg end  : ", pc
  Find
Quote  
[-] The following 2 users say Thank You to HatZen08 for this post:
  • CVReynolds (04-23-2022), Gi Nattak (01-15-2016)



Messages In This Thread
Patch: Reward Display - by HatZen08 - 01-15-2016, 06:43 AM
RE: Patch: Reward Display - by Landmine36 - 01-15-2016, 09:57 AM
RE: Patch: Reward Display - by Tenkarider - 01-15-2016, 11:34 AM
RE: Patch: Reward Display - by Lockirby2 - 01-15-2016, 01:00 PM
RE: Patch: Reward Display - by HatZen08 - 01-15-2016, 02:50 PM
RE: Patch: Reward Display - by Gi Nattak - 01-15-2016, 04:56 PM
RE: Patch: Reward Display - by Tenkarider - 01-15-2016, 05:09 PM
RE: Patch: Reward Display - by HatZen08 - 01-15-2016, 06:24 PM
RE: Patch: Reward Display - by doofenH - 04-22-2022, 09:13 PM
RE: Patch: Reward Display - by Gi Nattak - 04-22-2022, 09:25 PM
RE: Patch: Reward Display - by doofenH - 04-22-2022, 09:47 PM
RE: Patch: Reward Display - by Tenkarider - 01-16-2016, 09:29 AM
RE: Patch: Reward Display - by madsiur - 01-16-2016, 09:57 AM
RE: Patch: Reward Display - by Catone - 01-16-2016, 11:52 AM
RE: Patch: Reward Display - by madsiur - 01-16-2016, 02:27 PM
RE: Patch: Reward Display - by Landmine36 - 01-16-2016, 02:07 PM
RE: Patch: Reward Display - by Gi Nattak - 01-16-2016, 03:05 PM
RE: Patch: Reward Display - by HatZen08 - 01-16-2016, 03:31 PM
RE: Patch: Reward Display - by Tenkarider - 01-16-2016, 04:40 PM
RE: Patch: Reward Display - by FF6Fanatic - 05-12-2016, 08:16 PM
RE: Patch: Reward Display - by HatZen08 - 04-23-2022, 07:40 PM
RE: Patch: Reward Display - by Gi Nattak - 04-23-2022, 07:49 PM
RE: Patch: Reward Display - by HatZen08 - 04-23-2022, 09:25 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite