mirror of
https://github.com/pret/pokegold.git
synced 2024-11-26 23:10:41 +00:00
Updates to more closely sync with pokecrystal
This commit is contained in:
parent
15ad69e0c6
commit
b89636769c
37
INSTALL.md
37
INSTALL.md
@ -4,6 +4,7 @@ These instructions explain how to set up the tools required to build **pokegold*
|
||||
|
||||
If you run into trouble, ask for help on IRC or Discord (see [README.md](README.md)).
|
||||
|
||||
|
||||
## Windows 10
|
||||
|
||||
Download and install [**Windows Subsystem for Linux**](https://docs.microsoft.com/en-us/windows/wsl/install-win10). Then open the **WSL terminal**.
|
||||
@ -18,9 +19,10 @@ cd /mnt/c/Users/<user>/Desktop
|
||||
|
||||
(The Windows `C:\` drive is called `/mnt/c/` in WSL. Replace *\<user>* in the example path with your username.)
|
||||
|
||||
If successful, follow [the regular Linux instructions](#linux) below for whatever distribution you installed for WSL.
|
||||
If this works, then follow [the instructions for **Linux**](#linux) below for whatever distribution you installed for WSL.
|
||||
|
||||
Otherwise, continue reading below for [the older Windows instructions](#windows).
|
||||
|
||||
Otherwise, continue reading below for [the regular Windows instructions](#windows).
|
||||
|
||||
## Windows
|
||||
|
||||
@ -102,6 +104,36 @@ git clone -b v0.4.1 --depth=1 https://github.com/gbdev/rgbds
|
||||
sudo make -C rgbds install
|
||||
```
|
||||
|
||||
### Arch Linux
|
||||
|
||||
To install the software required for **pokegold**:
|
||||
|
||||
```bash
|
||||
sudo pacman -S make gcc git rgbds
|
||||
```
|
||||
|
||||
If you want to compile and install **rgbds** manually instead of using the Arch package:
|
||||
|
||||
```bash
|
||||
sudo pacman -S pkg-config flex bison libpng
|
||||
git clone -b v0.4.1 --depth=1 https://github.com/gbdev/rgbds
|
||||
sudo make -C rgbds install
|
||||
```
|
||||
|
||||
### Termux
|
||||
|
||||
To install the software required for **pokegold**:
|
||||
|
||||
```bash
|
||||
sudo apt install make clang git sed
|
||||
```
|
||||
|
||||
To install **rgbds**:
|
||||
|
||||
```bash
|
||||
sudo apt install rgbds
|
||||
```
|
||||
|
||||
### Other distros
|
||||
|
||||
If your distro is not listed here, try to find the required software in its repositories:
|
||||
@ -127,6 +159,7 @@ sudo make -C rgbds install
|
||||
|
||||
Now you're ready to [build **pokegold**](#build-pokegold).
|
||||
|
||||
|
||||
## Build pokegold
|
||||
|
||||
To download the **pokegold** source files:
|
||||
|
@ -15,7 +15,7 @@
|
||||
const ENGINE_MOM_SAVING_MONEY
|
||||
const ENGINE_MOM_ACTIVE
|
||||
; wUnusedTwoDayTimerOn
|
||||
const ENGINE_0A
|
||||
const ENGINE_UNUSED_TWO_DAY_TIMER_ON
|
||||
; wStatusFlags
|
||||
const ENGINE_POKEDEX
|
||||
const ENGINE_UNOWN_DEX
|
||||
|
@ -21,6 +21,7 @@ SCREEN_META_WIDTH EQU 6 ; metatiles
|
||||
SCREEN_META_HEIGHT EQU 5 ; metatiles
|
||||
SURROUNDING_WIDTH EQU SCREEN_META_WIDTH * METATILE_WIDTH ; tiles
|
||||
SURROUNDING_HEIGHT EQU SCREEN_META_HEIGHT * METATILE_WIDTH ; tiles
|
||||
MAP_CONNECTION_PADDING_WIDTH EQU 3 ; metatiles
|
||||
|
||||
HP_BAR_LENGTH EQU 6 ; tiles
|
||||
EXP_BAR_LENGTH EQU 8 ; tiles
|
||||
|
@ -12,6 +12,7 @@
|
||||
; - AlphabeticalPokedexOrder (see data/pokemon/dex_order_alpha.asm)
|
||||
; - NewPokedexOrder (see data/pokemon/dex_order_new.asm)
|
||||
; - Pokered_MonIndices (see data/pokemon/gen1_order.asm)
|
||||
; - Footprints (see gfx/footprints.asm)
|
||||
const_def 1
|
||||
const BULBASAUR ; 01
|
||||
const IVYSAUR ; 02
|
||||
|
@ -83,11 +83,12 @@ LEFT_MASK EQU 1 << LEFT
|
||||
RIGHT_MASK EQU 1 << RIGHT
|
||||
|
||||
; wFacingDirection::
|
||||
const_def NUM_DIRECTIONS - 1, -1
|
||||
shift_const FACE_DOWN ; 8
|
||||
shift_const FACE_UP ; 4
|
||||
shift_const FACE_LEFT ; 2
|
||||
shift_const FACE_RIGHT ; 1
|
||||
FACE_CURRENT EQU 0
|
||||
FACE_DOWN EQU 8
|
||||
FACE_UP EQU 4
|
||||
FACE_LEFT EQU 2
|
||||
FACE_RIGHT EQU 1
|
||||
|
||||
; wPokemonWithdrawDepositParameter::
|
||||
PC_WITHDRAW EQU 0
|
||||
|
@ -32,6 +32,7 @@ endr
|
||||
|
||||
db 0 ; end
|
||||
|
||||
; unused
|
||||
db 0
|
||||
db 0
|
||||
db 0
|
||||
|
@ -1,8 +1,8 @@
|
||||
NameMenuHeader:
|
||||
db STATICMENU_NO_TOP_SPACING
|
||||
db STATICMENU_NO_TOP_SPACING ; flags
|
||||
menu_coords 0, 0, 10, TEXTBOX_Y - 1
|
||||
dw .Names
|
||||
db 1
|
||||
db 1 ; default option
|
||||
|
||||
.Names:
|
||||
db STATICMENU_CURSOR | STATICMENU_PLACE_TITLE | STATICMENU_DISABLE_B ; flags
|
||||
@ -21,5 +21,5 @@ ELIF DEF(_SILVER)
|
||||
db "OSCAR@"
|
||||
db "MAX@"
|
||||
ENDC
|
||||
db 2
|
||||
db 2 ; ????
|
||||
db "NAME@" ; title
|
||||
|
@ -3,6 +3,7 @@ PokemonPalettes:
|
||||
|
||||
; Each back.gbcpal is generated from the corresponding .png, and
|
||||
; only the middle two colors are included, not black or white.
|
||||
; (Back sprites are used since they are the same in Gold and Silver.)
|
||||
; Shiny palettes are defined directly, not generated.
|
||||
|
||||
; 000
|
||||
|
@ -1,6 +1,7 @@
|
||||
; Oak's Pokémon Talk will list wild Pokémon on these maps.
|
||||
|
||||
OaksPKMNTalkRoutes:; there are NUM_OAKS_POKEMON_TALK_ROUTES entries
|
||||
OaksPKMNTalkRoutes:
|
||||
; there are NUM_OAKS_POKEMON_TALK_ROUTES entries
|
||||
map_id ROUTE_29
|
||||
map_id ROUTE_46
|
||||
map_id ROUTE_30
|
||||
|
@ -340,7 +340,7 @@ BattleText_StringBuffer1GrewToLevel:
|
||||
text_decimal wCurPartyLevel, 1, 3
|
||||
text "!@"
|
||||
sound_dex_fanfare_50_79
|
||||
db "@"
|
||||
text_end
|
||||
|
||||
BattleText_WildMonIsEating:
|
||||
text "Wild @"
|
||||
@ -1073,7 +1073,7 @@ BeatUpAttackText:
|
||||
|
||||
; BUG: Pokémon names 8-10 characters long can overflow the textbox,
|
||||
; printing as "Enemy 1234567890 can't": up to 21 characters, over 18.
|
||||
CantReceiveGiftText:
|
||||
PresentFailedText:
|
||||
text "<TARGET> can't"
|
||||
line "receive the gift!"
|
||||
prompt
|
||||
|
@ -70,12 +70,12 @@ All the bugs documented here were fixed in Pokémon Crystal. Any that weren't ar
|
||||
|
||||
## Present's text overflows when it fails to heal an enemy Pokémon with a long name
|
||||
|
||||
**Fix:** Edit `CantReceiveGiftText` in [data/text/battle.asm](https://github.com/pret/pokegold/blob/master/data/text/battle.asm):
|
||||
**Fix:** Edit `PresentFailedText` in [data/text/battle.asm](https://github.com/pret/pokegold/blob/master/data/text/battle.asm):
|
||||
|
||||
```diff
|
||||
-; BUG: Pokémon names 8-10 characters long can overflow the textbox,
|
||||
-; printing as "Enemy 1234567890 can't": up to 21 characters, over 18.
|
||||
CantReceiveGiftText:
|
||||
PresentFailedText:
|
||||
- text "<TARGET> can't"
|
||||
- line "receive the gift!"
|
||||
+ text "<TARGET>"
|
||||
|
@ -67,7 +67,7 @@ BattleCommand_Present:
|
||||
add a
|
||||
jr nc, .do_animation
|
||||
call AnimateFailedMove
|
||||
ld hl, CantReceiveGiftText
|
||||
ld hl, PresentFailedText
|
||||
call StdBattleTextbox
|
||||
.do_animation
|
||||
jp EndMoveEffect
|
||||
|
46
home/map.asm
46
home/map.asm
@ -124,12 +124,12 @@ LoadMetatiles::
|
||||
ld a, [wOverworldMapAnchor + 1]
|
||||
ld d, a
|
||||
ld hl, wSurroundingTiles
|
||||
ld b, SURROUNDING_HEIGHT / METATILE_WIDTH ; 5
|
||||
ld b, SCREEN_META_HEIGHT
|
||||
|
||||
.row
|
||||
push de
|
||||
push hl
|
||||
ld c, SURROUNDING_WIDTH / METATILE_WIDTH ; 6
|
||||
ld c, SCREEN_META_WIDTH
|
||||
|
||||
.col
|
||||
push de
|
||||
@ -195,7 +195,7 @@ endr
|
||||
add hl, de
|
||||
pop de
|
||||
ld a, [wMapWidth]
|
||||
add 6
|
||||
add MAP_CONNECTION_PADDING_WIDTH * 2
|
||||
add e
|
||||
ld e, a
|
||||
jr nc, .ok2
|
||||
@ -562,45 +562,43 @@ GetMapScreenCoords::
|
||||
ld hl, wOverworldMapBlocks
|
||||
ld a, [wXCoord]
|
||||
bit 0, a
|
||||
jr nz, .increment_then_halve1
|
||||
jr nz, .odd_x
|
||||
; even x
|
||||
srl a
|
||||
add $1
|
||||
jr .resume
|
||||
|
||||
.increment_then_halve1
|
||||
add $1
|
||||
add 1
|
||||
jr .got_block_x
|
||||
.odd_x
|
||||
add 1
|
||||
srl a
|
||||
|
||||
.resume
|
||||
.got_block_x
|
||||
ld c, a
|
||||
ld b, $0
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
ld a, [wMapWidth]
|
||||
add $6
|
||||
add MAP_CONNECTION_PADDING_WIDTH * 2
|
||||
ld c, a
|
||||
ld b, $0
|
||||
ld b, 0
|
||||
ld a, [wYCoord]
|
||||
bit 0, a
|
||||
jr nz, .increment_then_halve2
|
||||
jr nz, .odd_y
|
||||
; even y
|
||||
srl a
|
||||
add $1
|
||||
jr .resume2
|
||||
|
||||
.increment_then_halve2
|
||||
add $1
|
||||
add 1
|
||||
jr .got_block_y
|
||||
.odd_y
|
||||
add 1
|
||||
srl a
|
||||
|
||||
.resume2
|
||||
.got_block_y
|
||||
call AddNTimes
|
||||
ld a, l
|
||||
ld [wOverworldMapAnchor], a
|
||||
ld a, h
|
||||
ld [wOverworldMapAnchor + 1], a
|
||||
ld a, [wYCoord]
|
||||
and $1
|
||||
and 1
|
||||
ld [wMetatileStandingY], a
|
||||
ld a, [wXCoord]
|
||||
and $1
|
||||
and 1
|
||||
ld [wMetatileStandingX], a
|
||||
ret
|
||||
|
||||
|
@ -251,6 +251,7 @@ MenuBoxCoord2Tile::
|
||||
ld c, a
|
||||
ld a, [wMenuBorderTopCoord]
|
||||
ld b, a
|
||||
; fallthrough
|
||||
|
||||
Coord2Tile::
|
||||
; Return the address of wTilemap(c, b) in hl.
|
||||
|
2
hram.asm
2
hram.asm
@ -7,6 +7,7 @@ hRTCDayLo:: db
|
||||
hRTCHours:: db
|
||||
hRTCMinutes:: db
|
||||
hRTCSeconds:: db
|
||||
|
||||
ds 2
|
||||
|
||||
hHours:: db
|
||||
@ -49,7 +50,6 @@ hMoveMon:: db
|
||||
UNION
|
||||
hMapObjectIndexBuffer:: db
|
||||
hObjectStructIndexBuffer:: db
|
||||
|
||||
NEXTU
|
||||
hConnectionStripLength:: db
|
||||
hConnectedMapWidth:: db
|
||||
|
@ -77,7 +77,6 @@ battle_struct: MACRO
|
||||
\1Species:: db
|
||||
\1Item:: db
|
||||
\1Moves:: ds NUM_MOVES
|
||||
\1MovesEnd::
|
||||
\1DVs:: dw
|
||||
\1PP:: ds NUM_MOVES
|
||||
\1Happiness:: db
|
||||
|
Loading…
Reference in New Issue
Block a user