2020-12-30 06:41:14 +00:00
|
|
|
; TFV world
|
|
|
|
; the main part of the game
|
|
|
|
|
|
|
|
|
|
|
|
.include "zp.inc"
|
|
|
|
.include "hardware.inc"
|
|
|
|
.include "common_defines.inc"
|
|
|
|
|
|
|
|
;================================
|
|
|
|
; Clear screen and setup graphics
|
|
|
|
;================================
|
|
|
|
|
2021-01-19 17:20:53 +00:00
|
|
|
;================================
|
|
|
|
; Init Variables
|
|
|
|
;================================
|
|
|
|
|
|
|
|
jsr init_multiply_tables
|
|
|
|
|
2021-02-12 04:54:45 +00:00
|
|
|
;================================
|
|
|
|
; Copy over Name
|
|
|
|
;================================
|
|
|
|
; both battle and info
|
|
|
|
|
|
|
|
ldx #0
|
|
|
|
load_name_loop:
|
|
|
|
lda HERO_NAME,X
|
|
|
|
bne load_name_zero
|
|
|
|
lda #' '
|
|
|
|
load_name_zero:
|
|
|
|
sta battle_name_string+2,X
|
|
|
|
sta info_name_string+2,X
|
|
|
|
inx
|
|
|
|
cpx #8
|
|
|
|
bne load_name_loop
|
|
|
|
really_done_load_name:
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-01-19 19:39:37 +00:00
|
|
|
;================================
|
|
|
|
; Setup sound
|
|
|
|
;================================
|
|
|
|
|
|
|
|
jsr setup_music
|
|
|
|
|
2020-12-30 06:41:14 +00:00
|
|
|
;=====================
|
2020-12-31 20:01:44 +00:00
|
|
|
; Handle Overworld
|
2020-12-30 06:41:14 +00:00
|
|
|
;=====================
|
|
|
|
|
2020-12-31 20:01:44 +00:00
|
|
|
jsr handle_overworld
|
2020-12-30 06:41:14 +00:00
|
|
|
|
|
|
|
;=====================
|
|
|
|
; Game Over
|
|
|
|
;=====================
|
|
|
|
; return to title screen?
|
|
|
|
|
|
|
|
jsr game_over
|
|
|
|
|
|
|
|
lda #LOAD_TITLE
|
|
|
|
sta WHICH_LOAD
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
|
|
;===============================================
|
|
|
|
; External modules
|
|
|
|
;===============================================
|
|
|
|
|
2021-02-10 18:16:52 +00:00
|
|
|
.include "tfv_info.s"
|
2020-12-30 06:41:14 +00:00
|
|
|
.include "tfv_drawmap.s"
|
|
|
|
.include "tfv_overworld.s"
|
|
|
|
.include "tfv_game_over.s"
|
2020-12-31 20:01:44 +00:00
|
|
|
.include "help_overworld.s"
|
2020-12-30 06:41:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
.include "gr_fast_clear.s"
|
|
|
|
.include "gr_hlin.s"
|
2021-01-15 04:26:24 +00:00
|
|
|
.include "gr_vlin.s"
|
2020-12-30 06:41:14 +00:00
|
|
|
.include "gr_pageflip.s"
|
2021-01-18 04:48:12 +00:00
|
|
|
.include "gr_put_num.s"
|
2020-12-30 06:41:14 +00:00
|
|
|
.include "keyboard.s"
|
|
|
|
.include "joystick.s"
|
2021-01-11 20:20:43 +00:00
|
|
|
.include "gr_putsprite_crop.s"
|
2021-01-18 19:00:30 +00:00
|
|
|
.include "gr_putsprite_mask.s"
|
2020-12-30 06:41:14 +00:00
|
|
|
.include "text_print.s"
|
|
|
|
.include "gr_copy.s"
|
|
|
|
.include "decompress_fast_v2.s"
|
|
|
|
.include "gr_offsets.s"
|
|
|
|
.include "wait_keypressed.s"
|
2021-01-17 21:12:06 +00:00
|
|
|
.include "long_wait.s"
|
2020-12-30 06:41:14 +00:00
|
|
|
|
2021-01-17 18:54:29 +00:00
|
|
|
;===============================================
|
|
|
|
; Battle
|
|
|
|
;===============================================
|
|
|
|
|
2021-01-05 20:32:11 +00:00
|
|
|
.include "tfv_battle.s"
|
2021-01-17 18:54:29 +00:00
|
|
|
.include "tfv_battle_menu.s"
|
2021-01-17 21:14:56 +00:00
|
|
|
.include "tfv_battle_attack.s"
|
2021-01-17 20:34:23 +00:00
|
|
|
.include "tfv_battle_enemy.s"
|
2021-01-17 20:27:03 +00:00
|
|
|
.include "tfv_battle_magic.s"
|
2021-01-17 19:11:38 +00:00
|
|
|
.include "tfv_battle_limit.s"
|
2021-01-17 20:22:30 +00:00
|
|
|
.include "tfv_battle_summons.s"
|
|
|
|
.include "tfv_battle_boss.s"
|
2021-01-17 21:12:06 +00:00
|
|
|
.include "tfv_battle_draw_hero.s"
|
2021-01-17 20:22:30 +00:00
|
|
|
|
2021-01-05 20:32:11 +00:00
|
|
|
.include "rotate_intro.s"
|
2021-01-19 16:02:56 +00:00
|
|
|
.include "rotozoom.s"
|
|
|
|
.include "multiply_fast.s"
|
|
|
|
.include "c00_scrn_offsets.s"
|
2021-01-05 20:32:11 +00:00
|
|
|
|
2020-12-30 06:41:14 +00:00
|
|
|
;===============================================
|
2021-01-13 17:16:20 +00:00
|
|
|
; Graphics
|
2020-12-30 06:41:14 +00:00
|
|
|
;===============================================
|
|
|
|
|
|
|
|
.include "tfv_sprites.inc"
|
2021-01-13 20:17:15 +00:00
|
|
|
.include "battle_sprites.inc"
|
2020-12-30 06:41:14 +00:00
|
|
|
.include "graphics_map/tfv_backgrounds.inc"
|
2021-01-19 18:51:00 +00:00
|
|
|
.include "graphics_battle/battle_graphics.inc"
|
2021-01-17 18:54:29 +00:00
|
|
|
|
|
|
|
;===============================================
|
|
|
|
; Sound
|
|
|
|
;===============================================
|
|
|
|
.include "sound_effects.s"
|
|
|
|
.include "speaker_tone.s"
|
2021-01-19 19:39:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
.include "play_music.s"
|