Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pret/pokered
Browse files Browse the repository at this point in the history
  • Loading branch information
dannye committed May 10, 2024
2 parents 9a848bd + 5f7b444 commit 546d43f
Show file tree
Hide file tree
Showing 24 changed files with 139 additions and 133 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@master
with:
path: rgbds
ref: v0.6.1
ref: v0.7.0
repository: gbdev/rgbds

- name: Install rgbds
Expand Down
20 changes: 10 additions & 10 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ Run setup and leave the default settings. At the "**Select Packages**" step, cho

Double click on the text that says "**Skip**" next to each package to select the most recent version to install.

Then follow the [**rgbds** install instructions](https://rgbds.gbdev.io/install#pre-built) for Windows with Cygwin to install **rgbds 0.6.1**.
Then follow the [**rgbds** install instructions](https://rgbds.gbdev.io/install#pre-built) for Windows with Cygwin to install **rgbds 0.7.0**.

**Note:** If you already have an installed rgbds older than 0.6.0, you will need to update to 0.6.0 or 0.6.1. Ignore this if you have never installed rgbds before. If a version newer than 0.6.1 does not work, try downloading 0.6.1.
**Note:** If you already have an installed rgbds older than 0.7.0, you will need to update to 0.7.0. Ignore this if you have never installed rgbds before. If a version newer than 0.7.0 does not work, try downloading 0.7.0.

Now open the **Cygwin terminal** and enter the following commands.

Expand All @@ -67,7 +67,7 @@ Install [**Homebrew**](https://brew.sh/). Follow the official instructions.

Open **Terminal** and prepare to enter commands.

Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for macOS to install **rgbds 0.6.1**.
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for macOS to install **rgbds 0.7.0**.

Now you're ready to [build **pokered**](#build-pokered).

Expand All @@ -84,7 +84,7 @@ To install the software required for **pokered**:
sudo apt-get install make gcc git
```

Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.6.1** from source.
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.7.0** from source.

### OpenSUSE

Expand All @@ -94,7 +94,7 @@ To install the software required for **pokered**:
sudo zypper install make gcc git
```

Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.6.1** from source.
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.7.0** from source.

### Arch Linux

Expand All @@ -104,7 +104,7 @@ To install the software required for **pokered**:
sudo pacman -S make gcc git rgbds
```

If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.6.1** from source.
If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.7.0** from source.

### Termux

Expand All @@ -120,7 +120,7 @@ To install **rgbds**:
sudo apt install rgbds
```

If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.6.1** from source.
If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.7.0** from source.

### Other distros

Expand All @@ -131,7 +131,7 @@ If your distro is not listed here, try to find the required software in its repo
- `git`
- `rgbds`

If `rgbds` is not available, you'll need to follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.6.1** from source.
If `rgbds` is not available, you'll need to follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.7.0** from source.

Now you're ready to [build **pokered**](#build-pokered).

Expand All @@ -153,8 +153,8 @@ make

### Build with a local rgbds version

If you have different projects that require different versions of `rgbds`, it might not be convenient to install rgbds 0.6.1 globally. Instead, you can put its files in a directory within pokered, such as `pokered/rgbds-0.6.1/`. Then specify it when you run `make`:
If you have different projects that require different versions of `rgbds`, it might not be convenient to install rgbds 0.7.0 globally. Instead, you can put its files in a directory within pokered, such as `pokered/rgbds-0.7.0/`. Then specify it when you run `make`:

```bash
make RGBDS=rgbds-0.6.1/
make RGBDS=rgbds-0.7.0/
```
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ tools:
$(MAKE) -C tools/


RGBASMFLAGS = -hL -Q8 -P includes.asm -Weverything -Wnumeric-string=2 -Wtruncation=1
RGBASMFLAGS = -Q8 -P includes.asm -Weverything -Wnumeric-string=2 -Wtruncation=1
# Create a sym/map for debug purposes if `make` run with `DEBUG=1`
ifeq ($(DEBUG),1)
RGBASMFLAGS += -E
Expand Down
13 changes: 0 additions & 13 deletions constants/hardware_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@

DEF GBC EQU $11

; memory map
DEF VRAM_Begin EQU $8000
DEF VRAM_End EQU $a000
DEF SRAM_Begin EQU $a000
DEF SRAM_End EQU $c000
DEF WRAM0_Begin EQU $c000
DEF WRAM0_End EQU $d000
DEF WRAM1_Begin EQU $d000
DEF WRAM1_End EQU $e000
; hardware registers $ff00-$ff80 (see below)
DEF HRAM_Begin EQU $ff80
DEF HRAM_End EQU $ffff

; MBC1
DEF MBC1SRamEnable EQU $0000
DEF MBC1RomBank EQU $2000
Expand Down
7 changes: 5 additions & 2 deletions constants/item_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ DEF SAFARI_ROCK EQU CASCADEBADGE ; overload
const DOME_FOSSIL ; $29
const HELIX_FOSSIL ; $2A
const SECRET_KEY ; $2B
const ITEM_2C ; $2C
const ITEM_2C ; $2C ; unused
const BIKE_VOUCHER ; $2D
const X_ACCURACY ; $2E
const LEAF_STONE ; $2F
const CARD_KEY ; $30
const NUGGET ; $31
const ITEM_32 ; $32
const ITEM_32 ; $32 ; unused
const POKE_DOLL ; $33
const FULL_HEAL ; $34
const REVIVE ; $35
Expand Down Expand Up @@ -215,3 +215,6 @@ DEF NUM_TM_HM EQU NUM_TMS + NUM_HMS
; These fit in 7 bytes, with one unused bit left over.
DEF __tmhm_value__ = NUM_TM_HM + 1
DEF UNUSED_TMNUM EQU __tmhm_value__

DEF MAX_HIDDEN_ITEMS EQU 112
DEF MAX_HIDDEN_COINS EQU 16
126 changes: 63 additions & 63 deletions crysaudio/audio_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -21,64 +21,64 @@
const CHAN2 ; 1
const CHAN3 ; 2
const CHAN4 ; 3
NUM_MUSIC_CHANS EQU const_value
DEF NUM_MUSIC_CHANS EQU const_value
const CHAN5 ; 4
const CHAN6 ; 5
const CHAN7 ; 6
const CHAN8 ; 7
NUM_NOISE_CHANS EQU const_value - NUM_MUSIC_CHANS
NUM_CHANNELS EQU const_value
DEF NUM_NOISE_CHANS EQU const_value - NUM_MUSIC_CHANS
DEF NUM_CHANNELS EQU const_value

Ch1 EQU CHAN1
Ch2 EQU CHAN2
Ch3 EQU CHAN3
Ch4 EQU CHAN4
Ch5 EQU CHAN5
Ch6 EQU CHAN6
Ch7 EQU CHAN7
Ch8 EQU CHAN8
DEF Ch1 EQU CHAN1
DEF Ch2 EQU CHAN2
DEF Ch3 EQU CHAN3
DEF Ch4 EQU CHAN4
DEF Ch5 EQU CHAN5
DEF Ch6 EQU CHAN6
DEF Ch7 EQU CHAN7
DEF Ch8 EQU CHAN8

; channel_struct members (see macros/wram.asm)
CHANNEL_MUSIC_ID EQUS "(wChannel1MusicID - wChannel1)"
CHANNEL_MUSIC_BANK EQUS "(wChannel1MusicBank - wChannel1)"
CHANNEL_FLAGS1 EQUS "(wChannel1Flags1 - wChannel1)"
CHANNEL_FLAGS2 EQUS "(wChannel1Flags2 - wChannel1)"
CHANNEL_FLAGS3 EQUS "(wChannel1Flags3 - wChannel1)"
CHANNEL_MUSIC_ADDRESS EQUS "(wChannel1MusicAddress - wChannel1)"
CHANNEL_LAST_MUSIC_ADDRESS EQUS "(wChannel1LastMusicAddress - wChannel1)"
CHANNEL_NOTE_FLAGS EQUS "(wChannel1NoteFlags - wChannel1)"
CHANNEL_CONDITION EQUS "(wChannel1Condition - wChannel1)"
CHANNEL_DUTY_CYCLE EQUS "(wChannel1DutyCycle - wChannel1)"
CHANNEL_VOLUME_ENVELOPE EQUS "(wChannel1VolumeEnvelope - wChannel1)"
CHANNEL_FREQUENCY EQUS "(wChannel1Frequency - wChannel1)"
CHANNEL_PITCH EQUS "(wChannel1Pitch - wChannel1)"
CHANNEL_OCTAVE EQUS "(wChannel1Octave - wChannel1)"
CHANNEL_TRANSPOSITION EQUS "(wChannel1Transposition - wChannel1)"
CHANNEL_NOTE_DURATION EQUS "(wChannel1NoteDuration - wChannel1)"
CHANNEL_FIELD16 EQUS "(wChannel1Field16 - wChannel1)"
CHANNEL_LOOP_COUNT EQUS "(wChannel1LoopCount - wChannel1)"
CHANNEL_TEMPO EQUS "(wChannel1Tempo - wChannel1)"
CHANNEL_TRACKS EQUS "(wChannel1Tracks - wChannel1)"
CHANNEL_DUTY_CYCLE_PATTERN EQUS "(wChannel1DutyCyclePattern - wChannel1)"
CHANNEL_VIBRATO_DELAY_COUNT EQUS "(wChannel1VibratoDelayCount - wChannel1)"
CHANNEL_VIBRATO_DELAY EQUS "(wChannel1VibratoDelay - wChannel1)"
CHANNEL_VIBRATO_EXTENT EQUS "(wChannel1VibratoExtent - wChannel1)"
CHANNEL_VIBRATO_RATE EQUS "(wChannel1VibratoRate - wChannel1)"
CHANNEL_PITCH_SLIDE_TARGET EQUS "(wChannel1PitchSlideTarget - wChannel1)"
CHANNEL_PITCH_SLIDE_AMOUNT EQUS "(wChannel1PitchSlideAmount - wChannel1)"
CHANNEL_PITCH_SLIDE_AMOUNT_FRACTION EQUS "(wChannel1PitchSlideAmountFraction - wChannel1)"
CHANNEL_FIELD25 EQUS "(wChannel1Field25 - wChannel1)"
CHANNEL_PITCH_OFFSET EQUS "(wChannel1PitchOffset - wChannel1)"
CHANNEL_FIELD29 EQUS "(wChannel1Field29 - wChannel1)"
CHANNEL_FIELD2A EQUS "(wChannel1Field2a - wChannel1)"
CHANNEL_FIELD2C EQUS "(wChannel1Field2c - wChannel1)"
CHANNEL_NOTE_LENGTH EQUS "(wChannel1NoteLength - wChannel1)"
CHANNEL_FIELD2E EQUS "(wChannel1Field2e - wChannel1)"
CHANNEL_FIELD2F EQUS "(wChannel1Field2f - wChannel1)"
CHANNEL_FIELD30 EQUS "(wChannel1Field30 - wChannel1)"
CHANNEL_STRUCT_LENGTH EQUS "(wChannel2 - wChannel1)"
DEF CHANNEL_MUSIC_ID EQUS "(wChannel1MusicID - wChannel1)"
DEF CHANNEL_MUSIC_BANK EQUS "(wChannel1MusicBank - wChannel1)"
DEF CHANNEL_FLAGS1 EQUS "(wChannel1Flags1 - wChannel1)"
DEF CHANNEL_FLAGS2 EQUS "(wChannel1Flags2 - wChannel1)"
DEF CHANNEL_FLAGS3 EQUS "(wChannel1Flags3 - wChannel1)"
DEF CHANNEL_MUSIC_ADDRESS EQUS "(wChannel1MusicAddress - wChannel1)"
DEF CHANNEL_LAST_MUSIC_ADDRESS EQUS "(wChannel1LastMusicAddress - wChannel1)"
DEF CHANNEL_NOTE_FLAGS EQUS "(wChannel1NoteFlags - wChannel1)"
DEF CHANNEL_CONDITION EQUS "(wChannel1Condition - wChannel1)"
DEF CHANNEL_DUTY_CYCLE EQUS "(wChannel1DutyCycle - wChannel1)"
DEF CHANNEL_VOLUME_ENVELOPE EQUS "(wChannel1VolumeEnvelope - wChannel1)"
DEF CHANNEL_FREQUENCY EQUS "(wChannel1Frequency - wChannel1)"
DEF CHANNEL_PITCH EQUS "(wChannel1Pitch - wChannel1)"
DEF CHANNEL_OCTAVE EQUS "(wChannel1Octave - wChannel1)"
DEF CHANNEL_TRANSPOSITION EQUS "(wChannel1Transposition - wChannel1)"
DEF CHANNEL_NOTE_DURATION EQUS "(wChannel1NoteDuration - wChannel1)"
DEF CHANNEL_FIELD16 EQUS "(wChannel1Field16 - wChannel1)"
DEF CHANNEL_LOOP_COUNT EQUS "(wChannel1LoopCount - wChannel1)"
DEF CHANNEL_TEMPO EQUS "(wChannel1Tempo - wChannel1)"
DEF CHANNEL_TRACKS EQUS "(wChannel1Tracks - wChannel1)"
DEF CHANNEL_DUTY_CYCLE_PATTERN EQUS "(wChannel1DutyCyclePattern - wChannel1)"
DEF CHANNEL_VIBRATO_DELAY_COUNT EQUS "(wChannel1VibratoDelayCount - wChannel1)"
DEF CHANNEL_VIBRATO_DELAY EQUS "(wChannel1VibratoDelay - wChannel1)"
DEF CHANNEL_VIBRATO_EXTENT EQUS "(wChannel1VibratoExtent - wChannel1)"
DEF CHANNEL_VIBRATO_RATE EQUS "(wChannel1VibratoRate - wChannel1)"
DEF CHANNEL_PITCH_SLIDE_TARGET EQUS "(wChannel1PitchSlideTarget - wChannel1)"
DEF CHANNEL_PITCH_SLIDE_AMOUNT EQUS "(wChannel1PitchSlideAmount - wChannel1)"
DEF CHANNEL_PITCH_SLIDE_AMOUNT_FRACTION EQUS "(wChannel1PitchSlideAmountFraction - wChannel1)"
DEF CHANNEL_FIELD25 EQUS "(wChannel1Field25 - wChannel1)"
DEF CHANNEL_PITCH_OFFSET EQUS "(wChannel1PitchOffset - wChannel1)"
DEF CHANNEL_FIELD29 EQUS "(wChannel1Field29 - wChannel1)"
DEF CHANNEL_FIELD2A EQUS "(wChannel1Field2a - wChannel1)"
DEF CHANNEL_FIELD2C EQUS "(wChannel1Field2c - wChannel1)"
DEF CHANNEL_NOTE_LENGTH EQUS "(wChannel1NoteLength - wChannel1)"
DEF CHANNEL_FIELD2E EQUS "(wChannel1Field2e - wChannel1)"
DEF CHANNEL_FIELD2F EQUS "(wChannel1Field2f - wChannel1)"
DEF CHANNEL_FIELD30 EQUS "(wChannel1Field30 - wChannel1)"
DEF CHANNEL_STRUCT_LENGTH EQUS "(wChannel2 - wChannel1)"

NOISE_CHAN_F EQU 2 ; bit set in CHAN5-CHAN7
DEF NOISE_CHAN_F EQU 2 ; bit set in CHAN5-CHAN7

; Flags1
const_def
Expand Down Expand Up @@ -116,22 +116,22 @@ NOISE_CHAN_F EQU 2 ; bit set in CHAN5-CHAN7
const NOTE_VIBRATO_OVERRIDE ; 6

; wVolume
VOLUME_SO1_F EQU 3
VOLUME_SO2_F EQU 7
VOLUME_SO1_LEVEL EQU %00000111
VOLUME_SO2_LEVEL EQU %01110000
MAX_VOLUME EQU $77
DEF VOLUME_SO1_F EQU 3
DEF VOLUME_SO2_F EQU 7
DEF VOLUME_SO1_LEVEL EQU %00000111
DEF VOLUME_SO2_LEVEL EQU %01110000
DEF MAX_VOLUME EQU $77

; wSoundInput
SOUND_INPUT_CH1_F EQU 0
SOUND_INPUT_CH2_F EQU 1
SOUND_INPUT_CH3_F EQU 2
SOUND_INPUT_CH4_F EQU 3
SOUND_INPUT_GLOBAL_F EQU 7
DEF SOUND_INPUT_CH1_F EQU 0
DEF SOUND_INPUT_CH2_F EQU 1
DEF SOUND_INPUT_CH3_F EQU 2
DEF SOUND_INPUT_CH4_F EQU 3
DEF SOUND_INPUT_GLOBAL_F EQU 7

; wLowHealthAlarm
DANGER_PITCH_F EQU 4
DANGER_ON_F EQU 7
DEF DANGER_PITCH_F EQU 4
DEF DANGER_ON_F EQU 7

; wMusicFade
MUSIC_FADE_IN_F EQU 7
DEF MUSIC_FADE_IN_F EQU 7
4 changes: 2 additions & 2 deletions crysaudio/macros.asm
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ ENDM
MACRO toggle_sfx
db toggle_sfx_cmd
ENDM
execute_music EQUS "toggle_sfx"
DEF execute_music EQUS "toggle_sfx"

const pitch_slide_cmd ; $e0
MACRO pitch_slide
Expand Down Expand Up @@ -202,7 +202,7 @@ MACRO pitch_offset
db pitch_offset_cmd
bigdw \1 ; pitch offset
ENDM
toggle_perfect_pitch EQUS "pitch_offset 1"
DEF toggle_perfect_pitch EQUS "pitch_offset 1"

const unknownmusic0xe7_cmd ; $e7
MACRO unknownmusic0xe7
Expand Down
2 changes: 2 additions & 0 deletions data/events/hidden_coins.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ MACRO hidden_coin
ENDM

HiddenCoinCoords:
table_width 3, HiddenCoinCoords
; map id, x, y
hidden_coin GAME_CORNER, 0, 8
hidden_coin GAME_CORNER, 1, 16
Expand All @@ -16,4 +17,5 @@ HiddenCoinCoords:
hidden_coin GAME_CORNER, 11, 7
hidden_coin GAME_CORNER, 15, 8
hidden_coin GAME_CORNER, 12, 15
assert_max_table_length MAX_HIDDEN_COINS
db -1 ; end
2 changes: 2 additions & 0 deletions data/events/hidden_item_coords.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ MACRO hidden_item
ENDM

HiddenItemCoords:
table_width 3, HiddenItemCoords
; map id, x, y
hidden_item VIRIDIAN_FOREST, 1, 18
hidden_item VIRIDIAN_FOREST, 16, 42
Expand Down Expand Up @@ -58,4 +59,5 @@ HiddenItemCoords:
hidden_item VERMILION_CITY, 14, 11
hidden_item CERULEAN_CITY, 15, 8
hidden_item ROUTE_4, 40, 3
assert_max_table_length MAX_HIDDEN_ITEMS
db -1 ; end
4 changes: 2 additions & 2 deletions data/moves/animations.asm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ AttackAnimationPointers:
dw JumpKickAnim
dw RollingKickAnim
dw SandAttackAnim
dw HeadButtAnim
dw HeadbuttAnim
dw HornAttackAnim
dw FuryAttackAnim
dw HornDrillAnim
Expand Down Expand Up @@ -363,7 +363,7 @@ SandAttackAnim:
battle_anim SAND_ATTACK, SUBANIM_1_SAND, 1, 6
db -1 ; end

HeadButtAnim:
HeadbuttAnim:
battle_anim HEADBUTT, SUBANIM_1_STAR_BIG, 1, 6
db -1 ; end

Expand Down
2 changes: 1 addition & 1 deletion engine/events/starter_dex.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; this function temporarily makes the starters (and Ivysaur) seen
; this function temporarily makes the starters (and Ivysaur) owned
; so that the full Pokedex information gets displayed in Oak's lab
StarterDex:
ld a, 1 << (DEX_BULBASAUR - 1) | 1 << (DEX_IVYSAUR - 1) | 1 << (DEX_CHARMANDER - 1) | 1 << (DEX_SQUIRTLE - 1)
Expand Down
4 changes: 2 additions & 2 deletions engine/gfx/oam_dma.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ WriteDMACodeToHRAM::
; Since no other memory is available during OAM DMA,
; DMARoutine is copied to HRAM and executed there.
ld c, LOW(hDMARoutine)
ld b, DMARoutineEnd - DMARoutine
ld b, DMARoutine.End - DMARoutine
ld hl, DMARoutine
.copy
ld a, [hli]
Expand All @@ -25,4 +25,4 @@ hDMARoutine::
jr nz, .wait
ret
ENDL
DMARoutineEnd:
.End:
Loading

0 comments on commit 546d43f

Please sign in to comment.