Merge branch 'master' into fix-toolchain
This commit is contained in:
@@ -4,5 +4,5 @@
|
|||||||
<!--- Describe your changes in detail -->
|
<!--- Describe your changes in detail -->
|
||||||
|
|
||||||
## **Discord contact info**
|
## **Discord contact info**
|
||||||
<!--- formatted as name#numbers, e.g. PikalaxALT#5823 -->
|
<!--- Formatted as username (e.g. pikalaxalt) or username#numbers (e.g. PikalaxALT#5823) -->
|
||||||
<!--- Contributors must join https://discord.gg/d5dubZ3 -->
|
<!--- Contributors must join https://discord.gg/d5dubZ3 -->
|
||||||
+1
-1
@@ -24,7 +24,7 @@ Unscientific benchmarks suggest **msys2 is 2x slower** than WSL1, and **Cygwin i
|
|||||||
|
|
||||||
All of the Windows instructions assume that the default drive is C:\\. If this differs to your actual drive letter, then replace C with the correct drive letter when reading the instructions.
|
All of the Windows instructions assume that the default drive is C:\\. If this differs to your actual drive letter, then replace C with the correct drive letter when reading the instructions.
|
||||||
|
|
||||||
**A note of caution**: As Windows 7 is officially unsupported by Microsoft and Windows 8 has very little usage, some maintainers are unwilling to maintain the Windows 7/8 instructions. Thus, these instructions may break in the future with fixes taking longer than fixes to the Windows 10 instructions.
|
**A note of caution**: As Windows 7 and Windows 8 are officially unsupported by Microsoft, some maintainers are unwilling to maintain the Windows 7/8 instructions. Thus, these instructions may break in the future with fixes taking longer than fixes to the Windows 10/11 instructions.
|
||||||
|
|
||||||
## Windows 10/11 (WSL1)
|
## Windows 10/11 (WSL1)
|
||||||
WSL1 is the preferred terminal to build **pokeemerald**. The following instructions will explain how to install WSL1 (referred to interchangeably as WSL).
|
WSL1 is the preferred terminal to build **pokeemerald**. The following instructions will explain how to install WSL1 (referred to interchangeably as WSL).
|
||||||
|
|||||||
@@ -91,7 +91,6 @@ SYM := $(ROM:.gba=.sym)
|
|||||||
|
|
||||||
# Commonly used directories
|
# Commonly used directories
|
||||||
C_SUBDIR = src
|
C_SUBDIR = src
|
||||||
GFLIB_SUBDIR = gflib
|
|
||||||
ASM_SUBDIR = asm
|
ASM_SUBDIR = asm
|
||||||
DATA_SRC_SUBDIR = src/data
|
DATA_SRC_SUBDIR = src/data
|
||||||
DATA_ASM_SUBDIR = data
|
DATA_ASM_SUBDIR = data
|
||||||
@@ -99,7 +98,6 @@ SONG_SUBDIR = sound/songs
|
|||||||
MID_SUBDIR = sound/songs/midi
|
MID_SUBDIR = sound/songs/midi
|
||||||
|
|
||||||
C_BUILDDIR = $(OBJ_DIR)/$(C_SUBDIR)
|
C_BUILDDIR = $(OBJ_DIR)/$(C_SUBDIR)
|
||||||
GFLIB_BUILDDIR = $(OBJ_DIR)/$(GFLIB_SUBDIR)
|
|
||||||
ASM_BUILDDIR = $(OBJ_DIR)/$(ASM_SUBDIR)
|
ASM_BUILDDIR = $(OBJ_DIR)/$(ASM_SUBDIR)
|
||||||
DATA_ASM_BUILDDIR = $(OBJ_DIR)/$(DATA_ASM_SUBDIR)
|
DATA_ASM_BUILDDIR = $(OBJ_DIR)/$(DATA_ASM_SUBDIR)
|
||||||
SONG_BUILDDIR = $(OBJ_DIR)/$(SONG_SUBDIR)
|
SONG_BUILDDIR = $(OBJ_DIR)/$(SONG_SUBDIR)
|
||||||
@@ -115,7 +113,7 @@ INCLUDE_CPP_ARGS := $(INCLUDE_DIRS:%=-iquote %)
|
|||||||
INCLUDE_SCANINC_ARGS := $(INCLUDE_DIRS:%=-I %)
|
INCLUDE_SCANINC_ARGS := $(INCLUDE_DIRS:%=-I %)
|
||||||
|
|
||||||
O_LEVEL ?= 2
|
O_LEVEL ?= 2
|
||||||
CPPFLAGS := $(INCLUDE_CPP_ARGS) -iquote $(GFLIB_SUBDIR) -Wno-trigraphs -DMODERN=$(MODERN)
|
CPPFLAGS := $(INCLUDE_CPP_ARGS) -Wno-trigraphs -DMODERN=$(MODERN)
|
||||||
ifeq ($(MODERN),0)
|
ifeq ($(MODERN),0)
|
||||||
CPPFLAGS += -I tools/agbcc/include -I tools/agbcc -nostdinc -undef
|
CPPFLAGS += -I tools/agbcc/include -I tools/agbcc -nostdinc -undef
|
||||||
CC1 := tools/agbcc/bin/agbcc$(EXE)
|
CC1 := tools/agbcc/bin/agbcc$(EXE)
|
||||||
@@ -193,9 +191,6 @@ C_SRCS_IN := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c)
|
|||||||
C_SRCS := $(foreach src,$(C_SRCS_IN),$(if $(findstring .inc.c,$(src)),,$(src)))
|
C_SRCS := $(foreach src,$(C_SRCS_IN),$(if $(findstring .inc.c,$(src)),,$(src)))
|
||||||
C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS))
|
C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS))
|
||||||
|
|
||||||
GFLIB_SRCS := $(wildcard $(GFLIB_SUBDIR)/*.c)
|
|
||||||
GFLIB_OBJS := $(patsubst $(GFLIB_SUBDIR)/%.c,$(GFLIB_BUILDDIR)/%.o,$(GFLIB_SRCS))
|
|
||||||
|
|
||||||
C_ASM_SRCS := $(wildcard $(C_SUBDIR)/*.s $(C_SUBDIR)/*/*.s $(C_SUBDIR)/*/*/*.s)
|
C_ASM_SRCS := $(wildcard $(C_SUBDIR)/*.s $(C_SUBDIR)/*/*.s $(C_SUBDIR)/*/*/*.s)
|
||||||
C_ASM_OBJS := $(patsubst $(C_SUBDIR)/%.s,$(C_BUILDDIR)/%.o,$(C_ASM_SRCS))
|
C_ASM_OBJS := $(patsubst $(C_SUBDIR)/%.s,$(C_BUILDDIR)/%.o,$(C_ASM_SRCS))
|
||||||
|
|
||||||
@@ -214,7 +209,7 @@ SONG_OBJS := $(patsubst $(SONG_SUBDIR)/%.s,$(SONG_BUILDDIR)/%.o,$(SONG_SRCS))
|
|||||||
MID_SRCS := $(wildcard $(MID_SUBDIR)/*.mid)
|
MID_SRCS := $(wildcard $(MID_SUBDIR)/*.mid)
|
||||||
MID_OBJS := $(patsubst $(MID_SUBDIR)/%.mid,$(MID_BUILDDIR)/%.o,$(MID_SRCS))
|
MID_OBJS := $(patsubst $(MID_SUBDIR)/%.mid,$(MID_BUILDDIR)/%.o,$(MID_SRCS))
|
||||||
|
|
||||||
OBJS := $(C_OBJS) $(GFLIB_OBJS) $(C_ASM_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) $(MID_OBJS)
|
OBJS := $(C_OBJS) $(C_ASM_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) $(MID_OBJS)
|
||||||
OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS))
|
OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS))
|
||||||
|
|
||||||
SUBDIRS := $(sort $(dir $(OBJS)))
|
SUBDIRS := $(sort $(dir $(OBJS)))
|
||||||
@@ -321,7 +316,7 @@ else
|
|||||||
$$(AS) $$(ASFLAGS) -o $$@ $3.s
|
$$(AS) $$(ASFLAGS) -o $$@ $3.s
|
||||||
endif
|
endif
|
||||||
$1.d: $2
|
$1.d: $2
|
||||||
$(SCANINC) -M $1.d $(INCLUDE_SCANINC_ARGS) -I tools/agbcc/include -I gflib $2
|
$(SCANINC) -M $1.d $(INCLUDE_SCANINC_ARGS) -I tools/agbcc/include $2
|
||||||
ifneq ($(NODEP),1)
|
ifneq ($(NODEP),1)
|
||||||
$1.o: $1.d
|
$1.o: $1.d
|
||||||
-include $1.d
|
-include $1.d
|
||||||
@@ -331,10 +326,8 @@ endef
|
|||||||
# Create generic rules if no dependency scanning, else create the real rules
|
# Create generic rules if no dependency scanning, else create the real rules
|
||||||
ifeq ($(NODEP),1)
|
ifeq ($(NODEP),1)
|
||||||
$(eval $(call C_DEP,$(C_BUILDDIR)/%,$(C_SUBDIR)/%.c))
|
$(eval $(call C_DEP,$(C_BUILDDIR)/%,$(C_SUBDIR)/%.c))
|
||||||
$(eval $(call C_DEP,$(GFLIB_BUILDDIR)/%,$(GFLIB_SUBDIR)/%.c))
|
|
||||||
else
|
else
|
||||||
$(foreach src,$(C_SRCS),$(eval $(call C_DEP,$(OBJ_DIR)/$(basename $(src)),$(src))))
|
$(foreach src,$(C_SRCS),$(eval $(call C_DEP,$(OBJ_DIR)/$(basename $(src)),$(src))))
|
||||||
$(foreach src,$(GFLIB_SRCS),$(eval $(call C_DEP,$(OBJ_DIR)/$(basename $(src)),$(src))))
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Similar methodology for Assembly files
|
# Similar methodology for Assembly files
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ void SetCurSecretBaseIdFromPosition(const struct MapPosition *position, const st
|
|||||||
void TrySetCurSecretBaseIndex(void);
|
void TrySetCurSecretBaseIndex(void);
|
||||||
void CheckPlayerHasSecretBase(void);
|
void CheckPlayerHasSecretBase(void);
|
||||||
void ToggleSecretBaseEntranceMetatile(void);
|
void ToggleSecretBaseEntranceMetatile(void);
|
||||||
void ScriptContext_Enable(void);
|
|
||||||
void ReceiveSecretBasesData(void *records, size_t recordSize, u8 linkIdx);
|
void ReceiveSecretBasesData(void *records, size_t recordSize, u8 linkIdx);
|
||||||
|
|
||||||
#endif //GUARD_SECRET_BASE_H
|
#endif //GUARD_SECRET_BASE_H
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef GUARD_TEXT_H
|
#ifndef GUARD_TEXT_H
|
||||||
#define GUARD_TEXT_H
|
#define GUARD_TEXT_H
|
||||||
|
|
||||||
#include "characters.h"
|
#include "constants/characters.h"
|
||||||
|
|
||||||
// Given as a text speed when all the text should be
|
// Given as a text speed when all the text should be
|
||||||
// loaded at once but not copied to vram yet.
|
// loaded at once but not copied to vram yet.
|
||||||
+15
-19
@@ -23,7 +23,6 @@ SECTIONS {
|
|||||||
{
|
{
|
||||||
INCLUDE "sym_ewram.ld"
|
INCLUDE "sym_ewram.ld"
|
||||||
src/*.o(ewram_data);
|
src/*.o(ewram_data);
|
||||||
gflib/*.o(ewram_data);
|
|
||||||
|
|
||||||
*libc.a:impure.o(.data);
|
*libc.a:impure.o(.data);
|
||||||
*libc.a:locale.o(.data);
|
*libc.a:locale.o(.data);
|
||||||
@@ -36,7 +35,6 @@ SECTIONS {
|
|||||||
/* .bss starts at 0x3000000 */
|
/* .bss starts at 0x3000000 */
|
||||||
INCLUDE "sym_bss.ld"
|
INCLUDE "sym_bss.ld"
|
||||||
src/*.o(.bss);
|
src/*.o(.bss);
|
||||||
gflib/*.o(.bss);
|
|
||||||
data/*.o(.bss);
|
data/*.o(.bss);
|
||||||
|
|
||||||
/* .bss.code starts at 0x3001AA8 */
|
/* .bss.code starts at 0x3001AA8 */
|
||||||
@@ -57,15 +55,15 @@ SECTIONS {
|
|||||||
src/rom_header_gf.o(.text.*);
|
src/rom_header_gf.o(.text.*);
|
||||||
src/crt0.o(.text);
|
src/crt0.o(.text);
|
||||||
src/main.o(.text);
|
src/main.o(.text);
|
||||||
gflib/malloc.o(.text);
|
src/malloc.o(.text);
|
||||||
gflib/dma3_manager.o(.text);
|
src/dma3_manager.o(.text);
|
||||||
gflib/gpu_regs.o(.text);
|
src/gpu_regs.o(.text);
|
||||||
gflib/bg.o(.text);
|
src/bg.o(.text);
|
||||||
gflib/blit.o(.text);
|
src/blit.o(.text);
|
||||||
gflib/window.o(.text);
|
src/window.o(.text);
|
||||||
gflib/text.o(.text);
|
src/text.o(.text);
|
||||||
gflib/sprite.o(.text);
|
src/sprite.o(.text);
|
||||||
gflib/string_util.o(.text);
|
src/string_util.o(.text);
|
||||||
src/link.o(.text);
|
src/link.o(.text);
|
||||||
src/AgbRfu_LinkManager.o(.text);
|
src/AgbRfu_LinkManager.o(.text);
|
||||||
src/link_rfu_3.o(.text);
|
src/link_rfu_3.o(.text);
|
||||||
@@ -446,12 +444,12 @@ SECTIONS {
|
|||||||
src/rom_header.o(.rodata);
|
src/rom_header.o(.rodata);
|
||||||
src/rom_header_gf.o(.rodata);
|
src/rom_header_gf.o(.rodata);
|
||||||
src/main.o(.rodata);
|
src/main.o(.rodata);
|
||||||
gflib/bg.o(.rodata);
|
src/bg.o(.rodata);
|
||||||
gflib/window.o(.rodata);
|
src/window.o(.rodata);
|
||||||
gflib/text.o(.rodata);
|
src/text.o(.rodata);
|
||||||
gflib/sprite.o(.rodata);
|
src/sprite.o(.rodata);
|
||||||
gflib/io_reg.o(.rodata);
|
src/io_reg.o(.rodata);
|
||||||
gflib/string_util.o(.rodata);
|
src/string_util.o(.rodata);
|
||||||
src/link.o(.rodata);
|
src/link.o(.rodata);
|
||||||
src/link.o(.rodata.str1.4);
|
src/link.o(.rodata.str1.4);
|
||||||
src/AgbRfu_LinkManager.o(.rodata);
|
src/AgbRfu_LinkManager.o(.rodata);
|
||||||
@@ -1317,9 +1315,7 @@ SECTIONS {
|
|||||||
ALIGN(4)
|
ALIGN(4)
|
||||||
{
|
{
|
||||||
src/*.o(.text);
|
src/*.o(.text);
|
||||||
gflib/*.o(.text);
|
|
||||||
src/*.o(.rodata);
|
src/*.o(.rodata);
|
||||||
gflib/*.o(.rodata);
|
|
||||||
data/*.o(.rodata);
|
data/*.o(.rodata);
|
||||||
} > ROM = 0
|
} > ROM = 0
|
||||||
|
|
||||||
|
|||||||
@@ -16,14 +16,12 @@ SECTIONS {
|
|||||||
ALIGN(4)
|
ALIGN(4)
|
||||||
{
|
{
|
||||||
src/*.o(ewram_data);
|
src/*.o(ewram_data);
|
||||||
gflib/*.o(ewram_data);
|
|
||||||
} > EWRAM
|
} > EWRAM
|
||||||
|
|
||||||
iwram 0x3000000 (NOLOAD) :
|
iwram 0x3000000 (NOLOAD) :
|
||||||
ALIGN(4)
|
ALIGN(4)
|
||||||
{
|
{
|
||||||
src/*.o(.bss);
|
src/*.o(.bss);
|
||||||
gflib/*.o(.bss);
|
|
||||||
data/*.o(.bss);
|
data/*.o(.bss);
|
||||||
*libc.a:*.o(.bss*);
|
*libc.a:*.o(.bss*);
|
||||||
*libnosys.a:*.o(.bss*);
|
*libnosys.a:*.o(.bss*);
|
||||||
@@ -31,7 +29,6 @@ SECTIONS {
|
|||||||
src/m4a.o(.bss.code);
|
src/m4a.o(.bss.code);
|
||||||
|
|
||||||
src/*.o(COMMON);
|
src/*.o(COMMON);
|
||||||
gflib/*.o(COMMON);
|
|
||||||
*libc.a:*.o(COMMON);
|
*libc.a:*.o(COMMON);
|
||||||
*libnosys.a:*.o(COMMON);
|
*libnosys.a:*.o(COMMON);
|
||||||
} > IWRAM
|
} > IWRAM
|
||||||
@@ -46,7 +43,6 @@ SECTIONS {
|
|||||||
src/rom_header_gf.o(.text.*);
|
src/rom_header_gf.o(.text.*);
|
||||||
src/crt0.o(.text);
|
src/crt0.o(.text);
|
||||||
src/main.o(.text);
|
src/main.o(.text);
|
||||||
gflib/*.o(.text*);
|
|
||||||
src/*.o(.text*);
|
src/*.o(.text*);
|
||||||
asm/*.o(.text*);
|
asm/*.o(.text*);
|
||||||
} > ROM =0
|
} > ROM =0
|
||||||
@@ -82,7 +78,6 @@ SECTIONS {
|
|||||||
ALIGN(4)
|
ALIGN(4)
|
||||||
{
|
{
|
||||||
src/*.o(.rodata*);
|
src/*.o(.rodata*);
|
||||||
gflib/*.o(.rodata*);
|
|
||||||
data/*.o(.rodata*);
|
data/*.o(.rodata*);
|
||||||
} > ROM =0
|
} > ROM =0
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@
|
|||||||
#include "gba/types.h"
|
#include "gba/types.h"
|
||||||
#include "gba/defines.h"
|
#include "gba/defines.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "characters.h"
|
#include "constants/characters.h"
|
||||||
#include "string_util.h"
|
#include "string_util.h"
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
|||||||
+6
-6
@@ -1,10 +1,10 @@
|
|||||||
.include "src/main.o"
|
.include "src/main.o"
|
||||||
.include "gflib/malloc.o"
|
.include "src/malloc.o"
|
||||||
.include "gflib/dma3_manager.o"
|
.include "src/dma3_manager.o"
|
||||||
.include "gflib/gpu_regs.o"
|
.include "src/gpu_regs.o"
|
||||||
.include "gflib/bg.o"
|
.include "src/bg.o"
|
||||||
.include "gflib/text.o"
|
.include "src/text.o"
|
||||||
.include "gflib/sprite.o"
|
.include "src/sprite.o"
|
||||||
.include "src/link.o"
|
.include "src/link.o"
|
||||||
.include "src/AgbRfu_LinkManager.o"
|
.include "src/AgbRfu_LinkManager.o"
|
||||||
.include "src/link_rfu_3.o"
|
.include "src/link_rfu_3.o"
|
||||||
|
|||||||
+4
-4
@@ -1,17 +1,17 @@
|
|||||||
.space 0x8
|
.space 0x8
|
||||||
.include "main.o"
|
.include "main.o"
|
||||||
@ ../gflib/bg.o
|
@ ../src/bg.o
|
||||||
.align 2
|
.align 2
|
||||||
gWindowTileAutoAllocEnabled:
|
gWindowTileAutoAllocEnabled:
|
||||||
.space 4
|
.space 4
|
||||||
@ ../gflib/window.o
|
@ ../src/window.o
|
||||||
.align 4
|
.align 4
|
||||||
gTransparentTileNumber:
|
gTransparentTileNumber:
|
||||||
.space 1
|
.space 1
|
||||||
.align 4
|
.align 4
|
||||||
gWindowBgTilemapBuffers:
|
gWindowBgTilemapBuffers:
|
||||||
.space 16
|
.space 16
|
||||||
@ ../gflib/text.o
|
@ ../src/text.o
|
||||||
.align 4
|
.align 4
|
||||||
gFonts:
|
gFonts:
|
||||||
.space 4
|
.space 4
|
||||||
@@ -24,7 +24,7 @@ gCurGlyph:
|
|||||||
.align 2
|
.align 2
|
||||||
gTextFlags:
|
gTextFlags:
|
||||||
.space 4
|
.space 4
|
||||||
@ ../gflib/sprite.o
|
@ ../src/sprite.o
|
||||||
.align 2
|
.align 2
|
||||||
gOamMatrixAllocBitmap:
|
gOamMatrixAllocBitmap:
|
||||||
.space 4
|
.space 4
|
||||||
|
|||||||
+5
-5
@@ -1,10 +1,10 @@
|
|||||||
.include "gflib/malloc.o"
|
.include "src/malloc.o"
|
||||||
.include "src/decompress.o"
|
.include "src/decompress.o"
|
||||||
.include "src/main.o"
|
.include "src/main.o"
|
||||||
.include "gflib/window.o"
|
.include "src/window.o"
|
||||||
.include "gflib/text.o"
|
.include "src/text.o"
|
||||||
.include "gflib/sprite.o"
|
.include "src/sprite.o"
|
||||||
.include "gflib/string_util.o"
|
.include "src/string_util.o"
|
||||||
.include "src/link.o"
|
.include "src/link.o"
|
||||||
.include "src/AgbRfu_LinkManager.o"
|
.include "src/AgbRfu_LinkManager.o"
|
||||||
.include "src/link_rfu_3.o"
|
.include "src/link_rfu_3.o"
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include "char_util.h"
|
#include "char_util.h"
|
||||||
#include "utf8.h"
|
#include "utf8.h"
|
||||||
#include "string_parser.h"
|
#include "string_parser.h"
|
||||||
#include "../../gflib/characters.h"
|
#include "../../include/constants/characters.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
|
|
||||||
AsmFile::AsmFile(std::string filename, bool isStdin, bool doEnum) : m_filename(filename)
|
AsmFile::AsmFile(std::string filename, bool isStdin, bool doEnum) : m_filename(filename)
|
||||||
|
|||||||
Reference in New Issue
Block a user