Skip to content

Commit

Permalink
DisplayTownMap
Browse files Browse the repository at this point in the history
  • Loading branch information
akatsuki105 committed Sep 22, 2020
1 parent c7a3715 commit 6628a7c
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 14 deletions.
10 changes: 5 additions & 5 deletions engine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ add_mon.asm | Pokemon Data を新しい手持ちやPCなどのデータスロッ
bcd.asm | BCDフォーマットの数値計算を行う処理
black_out.asm | 『めのまえが まっくらに なった!』ときのゲームの状態を更新する処理
cable_club.asm | null
clear_save.asm | null
clear_save.asm | タイトル画面でのセーブデータ完全消去のダイアログ
debug1.asm | null
display_pokedex.asm | null
display_text_id_init.asm | null
Expand All @@ -25,7 +25,7 @@ experience.asm | 経験値からレベルを算出したりなど、経験値に
flag_action.asm | フラグアクションに関する処理
game_corner_slots.asm | null
game_corner_slots2.asm | null
gamefreak.asm | null
gamefreak.asm | ゲーム起動時のゲーフリのロゴと流れ星のアニメーション
get_bag_item_quantity.asm | null
give_pokemon.asm | null
hall_of_fame.asm | null
Expand All @@ -40,7 +40,7 @@ hp_bar.asm | null
in_game_trades.asm | null
init_player_data.asm | ゲームを『はじめから』始めたときにプレイヤーデータを初期化する
intro.asm | ゲーム起動時のアニメーションを流す
joypad.asm | null
joypad.asm | A,B,Start,Select を同時に押したときのリセット処理
learn_move.asm | null
load_mon_data.asm | ポケモンのデータが必要な時にそれを取得する処理
load_pokedex_tiles.asm | null
Expand All @@ -49,7 +49,7 @@ multiply_divide.asm | null
oak_speech.asm | 『さいしょからはじめる』を選んだ時のオーキド博士のスピーチ
oak_speech2.asm | オーキド博士のスピーチで使用されるユーティリティ関数などがまとめてある
oam_dma.asm | OAM DMA転送を行う処理
palettes.asm | null
palettes.asm | SGBでのみ有効なので割愛
pathfinding.asm | NPCがプレイヤーのところに歩いてくるときに道順(Path)を決定する処理
play_time.asm | プレイ時間をフレーム単位でインクリメントする処理
pokedex_rating.asm | ポケモン図鑑の評価テキストを表示する処理
Expand All @@ -64,7 +64,7 @@ remove_pokemon.asm | ポケモンを削除する処理
save.asm | null
slot_machine.asm | null
special_warps.asm | special warpを行う処理
status_ailments.asm | null
status_ailments.asm | 瀕死じゃないポケモンの状態異常を文字として描画する
subtract_paid_money.asm | プレイヤーの支払った額をプレイヤーの所持金から引く処理
test_battle.asm | null
titlescreen.asm | タイトル画面に関する処理
Expand Down
15 changes: 15 additions & 0 deletions engine/clear_save.asm
Original file line number Diff line number Diff line change
@@ -1,23 +1,38 @@
; **DoClearSaveDialogue**
; タイトル画面でセーブデータ完全消去のダイアログを出して、プレイヤーに選択させる
; - - -
; Yesを選んだらセーブデータを消去して Initへジャンプ
; Noなら何もせず Initへジャンプ
DoClearSaveDialogue:
; VRAMにデータを準備
call ClearScreen
call RunDefaultPaletteCommand
call LoadFontTilePatterns
call LoadTextBoxTilePatterns

; "Clear all saved data?"
ld hl, ClearSaveDataText
call PrintText

; No/Yes の 2択Menu を表示し、プレイヤーの選択を待つ
coord hl, 14, 7
lb bc, 8, 15
ld a, NO_YES_MENU
ld [wTwoOptionMenuID], a
ld a, TWO_OPTION_MENU
ld [wTextBoxID], a
call DisplayTextBoxID

; No を選んだ
ld a, [wCurrentMenuItem]
and a
jp z, Init

; Yesを選んだ
callba ClearSAV
jp Init

; "Clear all saved data?"
ClearSaveDataText:
TX_FAR _ClearSaveDataText
db "@"
12 changes: 7 additions & 5 deletions engine/joypad.asm
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
; ジョイパッドの状態を記録する変数を更新:
; - hJoyReleased: (hJoyLast ^ hJoyInput) & hJoyLast
; - hJoyPressed: (hJoyLast ^ hJoyInput) & hJoyInput (wJoyIgnoreを考慮)
; - hJoyLast: hJoyInput 今回の_Joypad処理で押されたボタン
; - hJoyHeld: 今回の_Joypad処理で押されたボタン(wJoyIgnoreを考慮)
; **_Joypad**
; ジョイパッドの状態を記録する変数を更新
; - - -
; hJoyReleased: (hJoyLast ^ hJoyInput) & hJoyLast
; hJoyPressed: (hJoyLast ^ hJoyInput) & hJoyInput (wJoyIgnoreを考慮)
; hJoyLast: hJoyInput 今回の_Joypad処理で押されたボタン
; hJoyHeld: 今回の_Joypad処理で押されたボタン(wJoyIgnoreを考慮)
_Joypad::
ld a, [hJoyInput] ; [↓, ↑, ←, →, Start, Select, B, A] 押されているときにbitが立つ

Expand Down
1 change: 1 addition & 0 deletions engine/menu/text_box.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
; INPUT:
; [wTextBoxID] = TextBoxID
; hl = テキストボックスのボーダーが描画されるべきアドレス
; [wTwoOptionMenuID] = 2択Menuを表示するなら 2択menu の種類
DisplayTextBoxID_:
ld a, [wTextBoxID]

Expand Down
3 changes: 1 addition & 2 deletions engine/mon_party_sprites.asm
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,8 @@ WriteMonPartySpriteOAMByPartyIndex:
pop hl
ret

; Write OAM blocks for the party sprite of the species in [wMonPartySpriteSpecies].
WriteMonPartySpriteOAMBySpecies:
; Write OAM blocks for the party sprite of the species in
; [wMonPartySpriteSpecies].
xor a
ld [hPartyMonIndex], a
ld a, [wMonPartySpriteSpecies]
Expand Down
2 changes: 1 addition & 1 deletion engine/status_ailments.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; **PrintStatusAilment**
; 瀕死じゃないポケモンの状態異常を描画する
; 瀕死じゃないポケモンの状態異常を文字として描画する
; - - -
; INPUT:
; de = status condition(`box_struct` の XXXStatus e.g. wLoadedMonStatus)
Expand Down
3 changes: 2 additions & 1 deletion home.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2768,6 +2768,7 @@ IsKeyItem::
; [wTextBoxID] = TextBox ID
; b, c = カーソルのy, x (2択メニューのみで引数として与える)
; hl = テキストボックスのボーダーが描画されるべきアドレス
; [wTwoOptionMenuID] = 2択Menuを表示するなら 2択menu の種類
DisplayTextBoxID::
ld a, [H_LOADEDROMBANK]
push af
Expand Down Expand Up @@ -3895,7 +3896,7 @@ LoadFontTilePatterns::
jp CopyVideoDataDouble ; if LCD is on, transfer during V-blank

; **LoadTextBoxTilePatterns**
; VRAMにテキストボックスの2bppデータをコピーする関数
; テキストボックスの2bppデータをVRAMにロードする関数
LoadTextBoxTilePatterns::
; LCDが有効 -> .on 無効 -> .off
ld a, [rLCDC]
Expand Down
1 change: 1 addition & 0 deletions text.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1565,6 +1565,7 @@ _PickUpPayDayMoneyText::
text "!"
prompt

; "Clear all saved data?"
_ClearSaveDataText::
text "Clear all saved"
line "data?"
Expand Down

0 comments on commit 6628a7c

Please sign in to comment.