lil' more armor shit, attempting to put music into ROMFS
This commit is contained in:
parent
22fdd7acc7
commit
e54122951d
19 changed files with 40 additions and 29 deletions
7
Makefile
7
Makefile
|
@ -33,6 +33,7 @@ BUILD := build
|
|||
SOURCES := source source/minizip
|
||||
DATA := data
|
||||
INCLUDES := include
|
||||
ROMFS := romfs
|
||||
|
||||
APP_TITLE := Minicraft 3DS
|
||||
APP_DESCRIPTION := Minicraft was originally created by Markus "Notch" Perrson. Ported to the 3DS by Davideesk.
|
||||
|
@ -117,6 +118,10 @@ ifeq ($(strip $(NO_SMDH)),)
|
|||
export _3DSXFLAGS += --smdh=$(CURDIR)/$(TARGET).smdh
|
||||
endif
|
||||
|
||||
ifneq ($(ROMFS),)
|
||||
export _3DSXFLAGS += --romfs=$(CURDIR)/$(ROMFS)
|
||||
endif
|
||||
|
||||
.PHONY: $(BUILD) clean all
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
|
@ -140,7 +145,7 @@ cci: $(TARGET)-strip.elf
|
|||
@echo "built ... Minicraft3DS.3ds"
|
||||
#---------------------------------------------------------------------------------
|
||||
cia: $(TARGET)-strip.elf
|
||||
@makerom -f cia -o $(TARGET).cia -elf $(TARGET)-strip.elf -rsf resources/$(TARGET).rsf -exefslogo -target t
|
||||
@makerom -f cia -o $(TARGET).cia -elf $(TARGET)-strip.elf -rsf icons-banners/$(TARGET).rsf -exefslogo -target t
|
||||
@echo "built ... Minicraft3DS.cia"
|
||||
#---------------------------------------------------------------------------------
|
||||
send: $(BUILD)
|
||||
|
|
0
resources/bossdeath.raw → romfs/resources/bossdeath.raw
Executable file → Normal file
0
resources/bossdeath.raw → romfs/resources/bossdeath.raw
Executable file → Normal file
0
resources/craft.raw → romfs/resources/craft.raw
Executable file → Normal file
0
resources/craft.raw → romfs/resources/craft.raw
Executable file → Normal file
0
resources/death.raw → romfs/resources/death.raw
Executable file → Normal file
0
resources/death.raw → romfs/resources/death.raw
Executable file → Normal file
0
resources/monsterhurt.raw → romfs/resources/monsterhurt.raw
Executable file → Normal file
0
resources/monsterhurt.raw → romfs/resources/monsterhurt.raw
Executable file → Normal file
0
resources/music/floor0.raw → romfs/resources/music/floor0.raw
Executable file → Normal file
0
resources/music/floor0.raw → romfs/resources/music/floor0.raw
Executable file → Normal file
0
resources/music/floor1.raw → romfs/resources/music/floor1.raw
Executable file → Normal file
0
resources/music/floor1.raw → romfs/resources/music/floor1.raw
Executable file → Normal file
0
resources/music/floor1_night.raw → romfs/resources/music/floor1_night.raw
Executable file → Normal file
0
resources/music/floor1_night.raw → romfs/resources/music/floor1_night.raw
Executable file → Normal file
0
resources/music/floor2_3.raw → romfs/resources/music/floor2_3.raw
Executable file → Normal file
0
resources/music/floor2_3.raw → romfs/resources/music/floor2_3.raw
Executable file → Normal file
0
resources/music/floor4.raw → romfs/resources/music/floor4.raw
Executable file → Normal file
0
resources/music/floor4.raw → romfs/resources/music/floor4.raw
Executable file → Normal file
0
resources/music/menu.raw → romfs/resources/music/menu.raw
Executable file → Normal file
0
resources/music/menu.raw → romfs/resources/music/menu.raw
Executable file → Normal file
0
resources/pickup.raw → romfs/resources/pickup.raw
Executable file → Normal file
0
resources/pickup.raw → romfs/resources/pickup.raw
Executable file → Normal file
0
resources/playerhurt.raw → romfs/resources/playerhurt.raw
Executable file → Normal file
0
resources/playerhurt.raw → romfs/resources/playerhurt.raw
Executable file → Normal file
0
resources/test.raw → romfs/resources/test.raw
Executable file → Normal file
0
resources/test.raw → romfs/resources/test.raw
Executable file → Normal file
|
@ -2,4 +2,4 @@
|
|||
echo Building 3DSX/ELF/SMDH...
|
||||
make
|
||||
echo Running in citra
|
||||
C:/Users/computer/AppData/Local/Citra/canary-mingw/citra-qt.exe result/Minicraft3DS.3dsx
|
||||
%localappdata%/Citra/canary-mingw/citra-qt.exe result/Minicraft3DS.3dsx
|
|
@ -1208,7 +1208,7 @@ void renderMenu(int menu,int xscr,int yscr){
|
|||
renderFrame(1,1,24,14,0xFFFF1010);
|
||||
drawTextColor("Armor",24+1,14+1,0xFF000000);
|
||||
drawTextColor("Armor",24,14,0xFF6FE2E2);
|
||||
renderArmorList(player.p.inv, 1,1,24,14, curInvSel);
|
||||
renderArmorList(player.p.inv, 1,1,24,14, 1);
|
||||
sf2d_end_frame();
|
||||
break;
|
||||
case MENU_CRAFTING:
|
||||
|
|
|
@ -1342,22 +1342,27 @@ void renderArmorList(Inventory * inv, int xo, int yo, int x1, int y1,
|
|||
int selected) {
|
||||
// If lastSlot is 0, then there are no items are in the inventory.
|
||||
bool drawCursor = true;
|
||||
if (selected < 0) {
|
||||
drawCursor = false;
|
||||
selected = 0;
|
||||
}
|
||||
int w = x1 - xo;
|
||||
int h = y1 - yo - 2;
|
||||
int i1 = inv->lastSlot;
|
||||
if (i1 > h)
|
||||
i1 = h;
|
||||
int io = selected - h / 2;
|
||||
if (io > inv->lastSlot - h)
|
||||
io = inv->lastSlot - h;
|
||||
if (io < 0)
|
||||
io = 0;
|
||||
|
||||
int i;
|
||||
int io = selected - h / 2;
|
||||
int armorcount;
|
||||
for (i = 0; i < i1; ++i) {
|
||||
if(inv->items[i + io].id > 119 && inv->items[i + io].id < 141) {
|
||||
armorcount = armorcount + 1;
|
||||
}
|
||||
}
|
||||
if (selected < 0) {
|
||||
drawCursor = false;
|
||||
selected = 0;
|
||||
}
|
||||
if (io > inv->lastSlot - h)
|
||||
io = armorcount;
|
||||
if (io < 0)
|
||||
io = 1;
|
||||
for (i = 0; i < i1; ++i) {
|
||||
if(inv->items[i + io].id > 119 && inv->items[i + io].id < 141) {
|
||||
renderItemWithText(&inv->items[i + io], (1 + xo) << 4,
|
||||
|
|
|
@ -58,6 +58,7 @@ void renderEntities(int x, int y, EntityManager* em);
|
|||
|
||||
void renderRecipes(RecipeManager * r, int xo, int yo, int x1, int y1, int selected);
|
||||
void renderItemList(Inventory * inv, int xo, int yo, int x1, int y1, int selected);
|
||||
void renderArmorList(Inventory * inv, int xo, int yo, int x1, int y1, int selected);
|
||||
void renderItemWithText(Item* item, int x, int y);
|
||||
void renderItemStuffWithText(int itemID, int itemCL, bool onlyOne, int x, int y);
|
||||
void renderItemWithTextCentered(Item* item, int width, int y);
|
||||
|
|
|
@ -47,20 +47,20 @@ void updateMusic(int lvl, int time) {
|
|||
}
|
||||
|
||||
void loadSounds() {
|
||||
loadSound(&snd_playerHurt, "/resources/playerhurt.raw");
|
||||
loadSound(&snd_playerDeath, "/resources/playerdeath.raw");
|
||||
loadSound(&snd_monsterHurt, "/resources/monsterhurt.raw");
|
||||
loadSound(&snd_test, "/resources/test.raw");
|
||||
loadSound(&snd_pickup, "/resources/pickup.raw");
|
||||
loadSound(&snd_bossdeath, "/resources/bossdeath.raw");
|
||||
loadSound(&snd_craft, "/resources/craft.raw");
|
||||
loadSound(&snd_playerHurt, "romfs:/resources/playerhurt.raw");
|
||||
loadSound(&snd_playerDeath, "romfs:/resources/playerdeath.raw");
|
||||
loadSound(&snd_monsterHurt, "romsfs:/resources/monsterhurt.raw");
|
||||
loadSound(&snd_test, "romfs:/resources/test.raw");
|
||||
loadSound(&snd_pickup, "romfs:/resources/pickup.raw");
|
||||
loadSound(&snd_bossdeath, "romfs:/resources/bossdeath.raw");
|
||||
loadSound(&snd_craft, "romfs:/resources/craft.raw");
|
||||
|
||||
loadSound(&music_menu, "/resources/music/menu.raw");
|
||||
loadSound(&music_floor0, "/resources/music/floor0.raw");
|
||||
loadSound(&music_floor1, "/resources/music/floor1.raw");
|
||||
loadSound(&music_floor1_night, "/resources/music/floor1_night.raw");
|
||||
loadSound(&music_floor23, "/resources/music/floor2_3.raw");
|
||||
loadSound(&music_floor4, "/resources/music/floor4.raw");
|
||||
loadSound(&music_menu, "romfs:/resources/music/menu.raw");
|
||||
loadSound(&music_floor0, "romfs:/resources/music/floor0.raw");
|
||||
loadSound(&music_floor1, "romfs:/resources/music/floor1.raw");
|
||||
loadSound(&music_floor1_night, "romfs:/resources/music/floor1_night.raw");
|
||||
loadSound(&music_floor23, "romfs:/resources/music/floor2_3.raw");
|
||||
loadSound(&music_floor4, "romfs:/resources/music/floor4.raw");
|
||||
}
|
||||
|
||||
void freeSounds(){
|
||||
|
|
Loading…
Add table
Reference in a new issue