Skip to content
This repository has been archived by the owner on Nov 23, 2017. It is now read-only.

Commit

Permalink
Added 3d banner and autoexit
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Taber committed Jun 17, 2016
1 parent fd8734d commit 60aa352
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 28 deletions.
15 changes: 2 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,6 @@ else
endif
endif

ifneq ("$(wildcard $(TOPDIR)/resources/banner.cgfx)","")
BANNER_IMAGE := $(TOPDIR)/resources/banner.cgfx
BANNER_IMAGE_ARG := -ci $(BANNER_IMAGE)
else
BANNER_IMAGE := $(TOPDIR)/resources/banner.png
BANNER_IMAGE_ARG := -i $(BANNER_IMAGE)
endif

#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
Expand Down Expand Up @@ -163,9 +155,6 @@ all: $(OUTPUT).zip
$(OUTPUT_D):
@[ -d $@ ] || mkdir -p $@

banner.bnr: $(BANNER_IMAGE) $(TOPDIR)/resources/audio.wav
@$(BANNERTOOL) makebanner $(BANNER_IMAGE_ARG) -a $(TOPDIR)/resources/audio.wav -o banner.bnr > /dev/null

icon.icn: $(TOPDIR)/resources/icon.png
@$(BANNERTOOL) makesmdh -s "$(APP_TITLE)" -l "$(APP_TITLE)" -p "$(APP_AUTHOR)" -i $(TOPDIR)/resources/icon.png -o icon.icn > /dev/null

Expand All @@ -176,8 +165,8 @@ stripped.elf: $(OUTPUT).elf
@$(PREFIX)strip stripped.elf


$(OUTPUT).cia: stripped.elf banner.bnr icon.icn
@$(MAKEROM) -f cia -o $(OUTPUT).cia -rsf $(RSF_CIA) -target t -exefslogo -elf stripped.elf -icon icon.icn -banner banner.bnr -DAPP_TITLE="$(APP_TITLE)" -DAPP_PRODUCT_CODE="$(APP_PRODUCT_CODE)" -DAPP_UNIQUE_ID="$(APP_UNIQUE_ID)"
$(OUTPUT).cia: stripped.elf icon.icn
@$(MAKEROM) -f cia -o $(OUTPUT).cia -rsf $(RSF_CIA) -target t -exefslogo -elf stripped.elf -icon icon.icn -banner $(TOPDIR)/resources/banner.bin -DAPP_TITLE="$(APP_TITLE)" -DAPP_PRODUCT_CODE="$(APP_PRODUCT_CODE)" -DAPP_UNIQUE_ID="$(APP_UNIQUE_ID)"
@echo "built ... $(notdir $@)"

$(OUTPUT).zip: $(OUTPUT_D) $(OUTPUT).elf $(OUTPUT).smdh $(OUTPUT).cia
Expand Down
Binary file removed resources/audio.wav
Binary file not shown.
Binary file added resources/banner.bin
Binary file not shown.
Binary file removed resources/banner.png
Binary file not shown.
Binary file removed resources/banner.psd
Binary file not shown.
28 changes: 13 additions & 15 deletions source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,29 +1009,27 @@ int main() {
printf("NTR CFW loaded successfully\n");
svcSleepThread(1000000000);
isSuccess = 1;
printf("Exit...\n");
} else {
printf("bnBootNTR failed\n");
}
printf("Press Home button to return to the menu.\n");
printf("Press Home Button to return to the menu.\n");

// Main loop
while (aptMainLoop())
{
hidScanInput();
while (aptMainLoop())
{
hidScanInput();

u32 kDown = hidKeysDown();

u32 kDown = hidKeysDown();
if (kDown & KEY_START) {
break;
}

if (kDown & KEY_START) {
break; // break in order to return to hbmenu
gfxFlushBuffers();
gfxSwapBuffers();
gspWaitForVBlank();
}

// Flush and swap framebuffers
gfxFlushBuffers();
gfxSwapBuffers();
gspWaitForVBlank();
}


gfxExit();
return 0;
}

0 comments on commit 60aa352

Please sign in to comment.