Skip to content

Commit

Permalink
Finally got romfs working...
Browse files Browse the repository at this point in the history
  • Loading branch information
TricksterGuy committed Jun 16, 2016
1 parent e011b37 commit 860efe4
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 128 deletions.
1 change: 1 addition & 0 deletions CREDITS
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Panel Graphics are based off http://thewolfbunny.deviantart.com/art/Pokemon-Puzzle-Challenge-Panels-TA-Style-510289235 by TheWolfBunny
flarn2006 for BmpFont, I was too lazy to roll my own and he'd already done implemented BFF fonts.
17 changes: 8 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ APP_DESCRIPTION := $(shell echo "$(APP_DESCRIPTION)" | cut -c1-256)
APP_AUTHOR := $(shell echo "$(APP_AUTHOR)" | cut -c1-128)
APP_PRODUCT_CODE := $(shell echo $(APP_PRODUCT_CODE) | cut -c1-16)
APP_UNIQUE_ID := $(shell echo $(APP_UNIQUE_ID) | cut -c1-7)
APP_ICON := $(TOPDIR)/$(ICON)
APP_ROMFS := $(TOPDIR)/$(ROMFS)
ifneq ("$(wildcard $(TOPDIR)/$(BANNER_IMAGE).cgfx)","")
BANNER_IMAGE_FILE := $(TOPDIR)/$(BANNER_IMAGE).cgfx
BANNER_IMAGE_ARG := -ci $(BANNER_IMAGE_FILE)
Expand All @@ -163,23 +165,19 @@ OUTPUT_NAME := $(subst $(SPACE),,$(APP_TITLE))
OUTPUT_DIR := $(TOPDIR)/$(OUTPUT)
OUTPUT_FILE := $(OUTPUT_DIR)/$(OUTPUT_NAME)

APP_ICON := $(TOPDIR)/$(ICON)
APP_ROMFS := $(TOPDIR)/$(ROMFS)

COMMON_MAKEROM_PARAMS := -rsf $(RSF) -target t -exefslogo -elf $(OUTPUT_FILE).elf -icon icon.icn -banner banner.bnr -DAPP_TITLE="$(APP_TITLE)" -DAPP_PRODUCT_CODE="$(APP_PRODUCT_CODE)" -DAPP_UNIQUE_ID="$(APP_UNIQUE_ID)" -DAPP_ROMFS="$(APP_ROMFS)" -DAPP_SYSTEM_MODE="64MB" -DAPP_SYSTEM_MODE_EXT="Legacy"
COMMON_MAKEROM_PARAMS := -rsf $(RSF) -target t -exefslogo -elf $(OUTPUT_FILE).elf -icon icon.icn -banner banner.bnr -DAPP_TITLE="$(APP_TITLE)" -DAPP_PRODUCT_CODE="$(APP_PRODUCT_CODE)" -DAPP_UNIQUE_ID="$(APP_UNIQUE_ID)" -DAPP_SYSTEM_MODE="64MB" -DAPP_SYSTEM_MODE_EXT="Legacy" -DAPP_ROMFS="$(APP_ROMFS)"

ifeq ($(OS),Windows_NT)
MAKEROM = makerom.exe
BANNERTOOL = bannertool.exe
3DSTOOL = 3dstool.exe
else
MAKEROM = makerom
BANNERTOOL = bannertool
3DSTOOL = 3dstool
endif

_3DSXFLAGS += --smdh=$(OUTPUT_FILE).smdh
ifneq ("$(wildcard $(TOPDIR)/$(ROMFS))","")
_3DSXFLAGS += --romfs=$(TOPDIR)/$(ROMFS)
endif
_3DSXFLAGS += --smdh=$(OUTPUT_FILE).smdh --romfs=$(TOPDIR)/$(ROMFS)

#---------------------------------------------------------------------------------
# Main Targets
Expand All @@ -202,7 +200,7 @@ $(OUTPUT_FILE).3ds: $(OUTPUT_FILE).elf banner.bnr icon.icn
@echo "built ... $(notdir $@)"

$(OUTPUT_FILE).cia: $(OUTPUT_FILE).elf banner.bnr icon.icn
@$(MAKEROM) -f cia -o $(OUTPUT_FILE).cia -DAPP_ENCRYPTED=false $(COMMON_MAKEROM_PARAMS)
$(MAKEROM) -f cia -o $(OUTPUT_FILE).cia -DAPP_ENCRYPTED=false $(COMMON_MAKEROM_PARAMS)
@echo "built ... $(notdir $@)"

$(OUTPUT_FILE).zip: $(OUTPUT_FILE).smdh $(OUTPUT_FILE).3dsx
Expand Down Expand Up @@ -257,6 +255,7 @@ spunch : $(OUTPUT_FILE).cia
@echo $(notdir $<)
@nin10kit -mode=rgba8 -output_dir=../build $(basename $<) $<


-include $(DEPENDS)

#---------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ New Gameplay features
## Compiling
### Prerequisites
* Compiling cia and 3ds targets requires having [makerom](https://github.com/profi200/Project_CTR) and [bannertool](https://github.com/Steveice10/bannertool) in your $PATH
* [sf2dlib](https://github.com/xerpi/sf2dlib) is required along with devkitPro and [ctrulib](https://github.com/smealum/ctrulib)
* [sf2dlib](https://github.com/xerpi/sf2dlib) is required along with devkitPro and [ctrulib](https://github.com/smealum/ctrulib)
* Lastly [nin10kit](https://github.com/TricksterGuy/nin10kit) is required to be installed and in your $PATH

1) Once all of the above is in order simply type make and you will get .elf for citra, .3dsx for homebrew launcher, .cia for emunand, and .3ds for gateway/sky3ds.
Expand All @@ -38,4 +38,4 @@ New Gameplay features

## Credits
Panel Graphics are based off http://thewolfbunny.deviantart.com/art/Pokemon-Puzzle-Challenge-Panels-TA-Style-510289235 by TheWolfBunny
Text is generated from http://mifki.com/df/fontgen.html
Text is generated from http://www.codehead.co.uk/cbfg/, and using flarn2006's SF2DBmpFont library to render it.
5 changes: 5 additions & 0 deletions bottomless-block-barrage.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
<Option target="3ds" />
<Option target="elf" />
</Unit>
<Unit filename="resources/template.rsf" />
<Unit filename="source/animation_params.cpp">
<Option target="release" />
<Option target="citra" />
Expand All @@ -206,6 +207,8 @@
<Option target="3ds" />
<Option target="elf" />
</Unit>
<Unit filename="source/fonts.cpp" />
<Unit filename="source/fonts.hpp" />
<Unit filename="source/game_common.cpp" />
<Unit filename="source/game_common.hpp" />
<Unit filename="source/main.cpp">
Expand Down Expand Up @@ -364,6 +367,8 @@
<Option target="3ds" />
<Option target="elf" />
</Unit>
<Unit filename="source/util/BmpFont.cpp" />
<Unit filename="source/util/BmpFont.h" />
<Unit filename="source/util/bar.cpp">
<Option target="release" />
<Option target="citra" />
Expand Down
Loading

0 comments on commit 860efe4

Please sign in to comment.