mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Enable rgbds warnings and remove CFLAGS=-O2 (default is now -O3)
This commit is contained in:
parent
95e48ef992
commit
3144b54bd1
5
FAQ.md
5
FAQ.md
@ -8,6 +8,7 @@
|
|||||||
- [I can't build the ROM, `make` just prints an error!](#i-cant-build-the-rom-make-just-prints-an-error)
|
- [I can't build the ROM, `make` just prints an error!](#i-cant-build-the-rom-make-just-prints-an-error)
|
||||||
- [`gcc`: command not found](#gcc-command-not-found)
|
- [`gcc`: command not found](#gcc-command-not-found)
|
||||||
- ["ERROR: `UNION` already defined"](#error-union-already-defined)
|
- ["ERROR: `UNION` already defined"](#error-union-already-defined)
|
||||||
|
- ["ERROR: Macro not defined"](#error-macro-not-defined)
|
||||||
- ["Expression must be 8-bit"](#expression-must-be-8-bit)
|
- ["Expression must be 8-bit"](#expression-must-be-8-bit)
|
||||||
- ["Segmentation fault" from `rgbgfx`](#segmentation-fault-from-rgbgfx)
|
- ["Segmentation fault" from `rgbgfx`](#segmentation-fault-from-rgbgfx)
|
||||||
- ["Section is too big" or "Unable to place section in bank"](#section-is-too-big-or-unable-to-place-section-in-bank)
|
- ["Section is too big" or "Unable to place section in bank"](#section-is-too-big-or-unable-to-place-section-in-bank)
|
||||||
@ -41,6 +42,10 @@ You need to install `gcc`. If you're using Cygwin, re-run its setup, and at "Sel
|
|||||||
|
|
||||||
Download [**rgbds 0.4.0**][rgbds] or newer. Older versions will not work.
|
Download [**rgbds 0.4.0**][rgbds] or newer. Older versions will not work.
|
||||||
|
|
||||||
|
### "ERROR: Macro not defined"
|
||||||
|
|
||||||
|
Download [**rgbds 0.4.0**][rgbds] or newer. Older versions will not work.
|
||||||
|
|
||||||
### "Expression must be 8-bit"
|
### "Expression must be 8-bit"
|
||||||
|
|
||||||
Download [**rgbds 0.4.0**][rgbds] or newer. Older versions will not work.
|
Download [**rgbds 0.4.0**][rgbds] or newer. Older versions will not work.
|
||||||
|
@ -87,7 +87,7 @@ To install **rgbds**:
|
|||||||
```bash
|
```bash
|
||||||
sudo apt-get install pkg-config flex bison libpng-dev
|
sudo apt-get install pkg-config flex bison libpng-dev
|
||||||
git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
|
git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
|
||||||
sudo make -C rgbds CFLAGS=-O2 install
|
sudo make -C rgbds install
|
||||||
```
|
```
|
||||||
|
|
||||||
### OpenSUSE
|
### OpenSUSE
|
||||||
@ -103,7 +103,7 @@ To install **rgbds**:
|
|||||||
```bash
|
```bash
|
||||||
sudo zypper install pkg-config flex bison libpng16-devel
|
sudo zypper install pkg-config flex bison libpng16-devel
|
||||||
git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
|
git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
|
||||||
sudo make -C rgbds CFLAGS=-O2 install
|
sudo make -C rgbds install
|
||||||
```
|
```
|
||||||
|
|
||||||
### Arch Linux
|
### Arch Linux
|
||||||
@ -121,7 +121,7 @@ Alternatively, to install **rgbds** manually:
|
|||||||
```bash
|
```bash
|
||||||
sudo pacman -S pkg-config flex bison libpng
|
sudo pacman -S pkg-config flex bison libpng
|
||||||
git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
|
git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
|
||||||
sudo make -C rgbds CFLAGS=-O2 install
|
sudo make -C rgbds install
|
||||||
```
|
```
|
||||||
|
|
||||||
### Termux
|
### Termux
|
||||||
@ -158,7 +158,7 @@ To install **rgbds**:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
|
git clone -b v0.4.0 --depth=1 https://github.com/rednex/rgbds
|
||||||
sudo make -C rgbds CFLAGS=-O2 install
|
sudo make -C rgbds install
|
||||||
```
|
```
|
||||||
|
|
||||||
Now you're ready to [build **pokecrystal**](#build-pokecrystal).
|
Now you're ready to [build **pokecrystal**](#build-pokecrystal).
|
||||||
|
9
Makefile
9
Makefile
@ -66,16 +66,17 @@ tools:
|
|||||||
$(MAKE) -C tools/
|
$(MAKE) -C tools/
|
||||||
|
|
||||||
|
|
||||||
$(crystal_obj): RGBASMFLAGS =
|
RGBASMFLAGS = -L -Weverything
|
||||||
$(crystal11_obj): RGBASMFLAGS = -D _CRYSTAL11
|
$(crystal_obj): RGBASMFLAGS +=
|
||||||
$(crystal_au_obj): RGBASMFLAGS = -D _CRYSTAL11 -D _CRYSTAL_AU
|
$(crystal11_obj): RGBASMFLAGS += -D _CRYSTAL11
|
||||||
|
$(crystal_au_obj): RGBASMFLAGS += -D _CRYSTAL11 -D _CRYSTAL_AU
|
||||||
|
|
||||||
# The dep rules have to be explicit or else missing files won't be reported.
|
# The dep rules have to be explicit or else missing files won't be reported.
|
||||||
# As a side effect, they're evaluated immediately instead of when the rule is invoked.
|
# As a side effect, they're evaluated immediately instead of when the rule is invoked.
|
||||||
# It doesn't look like $(shell) can be deferred so there might not be a better way.
|
# It doesn't look like $(shell) can be deferred so there might not be a better way.
|
||||||
define DEP
|
define DEP
|
||||||
$1: $2 $$(shell tools/scan_includes $2)
|
$1: $2 $$(shell tools/scan_includes $2)
|
||||||
$$(RGBASM) $$(RGBASMFLAGS) -L -o $$@ $$<
|
$$(RGBASM) $$(RGBASMFLAGS) -o $$@ $$<
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Build tools when building the rom.
|
# Build tools when building the rom.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
if __RGBDS_MINOR__ < 4
|
if __RGBDS_MAJOR__ <= 0 && __RGBDS_MINOR__ < 4
|
||||||
fail "pokecrystal requires rgbds 0.4.0 or newer."
|
fail "pokecrystal requires rgbds 0.4.0 or newer."
|
||||||
endc
|
endc
|
||||||
|
|
||||||
|
@ -750,13 +750,13 @@ Script_AskWaterfall:
|
|||||||
EscapeRopeFunction:
|
EscapeRopeFunction:
|
||||||
call FieldMoveJumptableReset
|
call FieldMoveJumptableReset
|
||||||
ld a, $1
|
ld a, $1
|
||||||
jr dig_incave
|
jr EscapeRopeOrDig
|
||||||
|
|
||||||
DigFunction:
|
DigFunction:
|
||||||
call FieldMoveJumptableReset
|
call FieldMoveJumptableReset
|
||||||
ld a, $2
|
ld a, $2
|
||||||
|
|
||||||
dig_incave
|
EscapeRopeOrDig:
|
||||||
ld [wBuffer2], a
|
ld [wBuffer2], a
|
||||||
.loop
|
.loop
|
||||||
ld hl, .DigTable
|
ld hl, .DigTable
|
||||||
|
@ -241,21 +241,21 @@ LoadTrainerClassPaletteAsNthBGPal:
|
|||||||
ld a, [wTrainerClass]
|
ld a, [wTrainerClass]
|
||||||
call GetTrainerPalettePointer
|
call GetTrainerPalettePointer
|
||||||
ld a, e
|
ld a, e
|
||||||
jr got_palette_pointer_8bd7
|
jr LoadNthMiddleBGPal
|
||||||
|
|
||||||
LoadMonPaletteAsNthBGPal:
|
LoadMonPaletteAsNthBGPal:
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
call _GetMonPalettePointer
|
call _GetMonPalettePointer
|
||||||
ld a, e
|
ld a, e
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr z, got_palette_pointer_8bd7
|
jr z, LoadNthMiddleBGPal
|
||||||
and $7f
|
and $7f
|
||||||
inc hl
|
inc hl
|
||||||
inc hl
|
inc hl
|
||||||
inc hl
|
inc hl
|
||||||
inc hl
|
inc hl
|
||||||
|
|
||||||
got_palette_pointer_8bd7
|
LoadNthMiddleBGPal:
|
||||||
push hl
|
push hl
|
||||||
ld hl, wBGPals1
|
ld hl, wBGPals1
|
||||||
ld de, 1 palettes
|
ld de, 1 palettes
|
||||||
|
@ -247,7 +247,7 @@ FixPicBank:
|
|||||||
; This is a thing for some reason.
|
; This is a thing for some reason.
|
||||||
|
|
||||||
PICS_FIX EQU $36
|
PICS_FIX EQU $36
|
||||||
GLOBAL PICS_FIX
|
EXPORT PICS_FIX
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
const DEXSTATE_EXIT
|
const DEXSTATE_EXIT
|
||||||
|
|
||||||
POKEDEX_SCX EQU 5
|
POKEDEX_SCX EQU 5
|
||||||
GLOBAL POKEDEX_SCX
|
EXPORT POKEDEX_SCX
|
||||||
|
|
||||||
Pokedex:
|
Pokedex:
|
||||||
ldh a, [hWX]
|
ldh a, [hWX]
|
||||||
|
Loading…
Reference in New Issue
Block a user