mirror of
https://github.com/AntonioND/palib.git
synced 2025-06-18 14:45:43 -04:00
template: Restore original template
This commit is contained in:
parent
3a8fb35cde
commit
6571dc8629
46
template/Makefile
Normal file
46
template/Makefile
Normal file
@ -0,0 +1,46 @@
|
||||
#---------------------------------------------------------------------------------
|
||||
# PAlib Project Makefile by Scognito, Tom, crash and fincs
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# Please uncomment (i.e. delete the '#') only one "ARM7_SELECTED" line. If unsure,
|
||||
# leave it as is (with ARM7_MP3 uncommented).
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
ARM7_SELECTED := ARM7_MP3
|
||||
#ARM7_SELECTED := ARM7_MP3_DSWIFI
|
||||
#ARM7_SELECTED := ARM7_MAXMOD_DSWIFI
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# Be sure to change these default banner TEXTs. This is the name your project will
|
||||
# display in the DS menu (including some flash cards). Create a custom logo.bmp
|
||||
# icon for your project too!
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
TEXT1 := PAlib Project
|
||||
TEXT2 := Change this text
|
||||
TEXT3 := for your project!
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# TARGET is the name of the file to output
|
||||
# BUILD is the directory where object files and intermediate files will be placed
|
||||
# SOURCES is a list of directories containing source code
|
||||
# INCLUDES is a list of directories containing extra header files
|
||||
# AUDIO is a list of directories containing audio files for use with Maxmod
|
||||
# RELEASEPATH is the output directory (Optional)
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
TARGET := $(shell basename $(CURDIR))
|
||||
BUILD := build
|
||||
SOURCES := source data gfx/bin
|
||||
INCLUDES := include build data gfx
|
||||
AUDIO := audio
|
||||
RELEASEPATH :=
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# If you need to change other parts of the make process, see the PA_Makefile:
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
MAKEFILE_VER := ver2
|
||||
|
||||
include $(DEVKITPRO)/PAlib/lib/PA_Makefile
|
76
template/ReadMe.txt
Normal file
76
template/ReadMe.txt
Normal file
@ -0,0 +1,76 @@
|
||||
/-----------------------------------------\
|
||||
|/---------------------------------------\|
|
||||
|| Welcome to the PAlib Project Template ||
|
||||
|\---------------------------------------/|
|
||||
\-----------------------------------------/
|
||||
|
||||
Using this template you can get a PAlib Nintendo DS application running in almost no time.
|
||||
You must get familiar with the structure of a PAlib project:
|
||||
|
||||
Folders:
|
||||
data - Contains data files that you want to include in your project.
|
||||
include - Contains header files (.h).
|
||||
source - Contains source files (.c, .cpp and .s). Those are your program.
|
||||
gfx - Contains PAGfx (a graphics converter) and the graphics for your program.
|
||||
audio - Contains module files (mod, s3m, xm and it) and sound effects (wav) for use with Maxmod.
|
||||
filesystem - Contains files which will be embedded in the .nds file. Use libfilesystem to read them.
|
||||
|
||||
Files:
|
||||
build.bat and clean.bat - These are used to compile and clean your project (on Windows), respectively.
|
||||
Makefile - This is a special file that tells your system how to convert your project files into a .nds file (how to compile your project).
|
||||
(Optional) logo.bmp - This is a custom logo that will be shown in the application loader of your Nintendo DS instead of the default PAlib one.
|
||||
ReadMe.txt - The file you are reading! :P
|
||||
source/main.c - This contains your program.
|
||||
|
||||
=================================
|
||||
| Quick start guide for newbies |
|
||||
=================================
|
||||
|
||||
- When you want to compile your project launch build.bat. A command prompt should open and you will see
|
||||
the status of the compiling process.
|
||||
/------------------------------------------------------------------------------------------------------------------------\
|
||||
| TIP: Watch out for the warnings and errors! If you don't know what they mean, ask in the PAlib forums (palib-dev.com). |
|
||||
\------------------------------------------------------------------------------------------------------------------------/
|
||||
- When you want to run your project, launch your favorite emulator (for example: PAlib/emulators/no$gba/no$gba.exe) and open the
|
||||
.nds file that has been generated.
|
||||
- If you're using libfilesystem and your program doesn't work on your card use HomebrewMenu by devkitPro (go to devkitPro.org/hbmenu).
|
||||
|
||||
============================================
|
||||
| Linux/Mac/Other users, please read this! |
|
||||
============================================
|
||||
|
||||
If you want to use PAGfx copy the Mono-ready PAGfx binaries from PAlib\tools\PAGfx\Mono to the gfx folder.
|
||||
|
||||
======================================
|
||||
| Preparing your program for release |
|
||||
======================================
|
||||
|
||||
You should replace the project description in the Makefile with something more appropriate. The default is:
|
||||
TEXT1 := PAlib Project
|
||||
TEXT2 := Change this text
|
||||
TEXT3 := for your project!
|
||||
|
||||
As the last step, consider creating a custom logo.bmp for your project even if your card doesn't show this icon.
|
||||
Its size has to be 32x32 and it can have up to 16 colors (color index 0 is transparent).
|
||||
If your card doesn't show the internal logo of .nds files, you can use DSOrganize to view it on the DS and confirm that it looks OK.
|
||||
|
||||
==============================
|
||||
| Section for advanced users |
|
||||
==============================
|
||||
|
||||
To use special features like Maxmod you have to select an ARM7 core for your project.
|
||||
You can do this in the Makefile - open it with an editor and read the first few lines.
|
||||
|
||||
The following features are available:
|
||||
|
||||
Sound/Music:
|
||||
ASlib - RAW and MP3 file playback using Noda's ASlib (examples\Sound\ASlib\ASlib_General) - this is the default
|
||||
Maxmod - module playback (mod, s3m, xm and it) using eKid's Maxmod (it comes with libnds)
|
||||
|
||||
Networking:
|
||||
dswifi - dswifi for DS<->AccessPoint connections (examples\Wifi\dswifi)
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------\
|
||||
| IMPORTANT: Your project will only work on the G6 and M3 Real cards if you choose an ARM7 core which is smaller than 64 KBs. |
|
||||
| Currently the only cores that can be used on those cards are the ARM7_MP3 and ARM7_MAXMOD_DSWIFI cores. |
|
||||
\-----------------------------------------------------------------------------------------------------------------------------/
|
3
template/build.bat
Normal file
3
template/build.bat
Normal file
@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
make
|
||||
pause
|
2
template/clean.bat
Normal file
2
template/clean.bat
Normal file
@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
make clean
|
BIN
template/gfx/PAGfx.exe
Normal file
BIN
template/gfx/PAGfx.exe
Normal file
Binary file not shown.
BIN
template/gfx/PAGfxFrontend.exe
Normal file
BIN
template/gfx/PAGfxFrontend.exe
Normal file
Binary file not shown.
1
template/gfx/README.txt
Normal file
1
template/gfx/README.txt
Normal file
@ -0,0 +1 @@
|
||||
If you're using a non-Windows operating system, copy the alternative Mono binaries here from PAlib\tools\PAGfx\Mono.
|
26
template/source/main.c
Normal file
26
template/source/main.c
Normal file
@ -0,0 +1,26 @@
|
||||
////////////////////////////
|
||||
// PAlib project template //
|
||||
////////////////////////////
|
||||
|
||||
// Lines starting with two slashes are ignored by the compiler
|
||||
// Basically you can use them to comment what are you doing
|
||||
// In fact, this kind of lines are called comments :P
|
||||
|
||||
// Include PAlib so that you can use it
|
||||
#include <PA9.h>
|
||||
|
||||
int main(){
|
||||
// Initialize PAlib
|
||||
PA_Init();
|
||||
|
||||
// Put your initialization code here
|
||||
|
||||
// Infinite loop to keep the program running
|
||||
while(true){
|
||||
// Put your game logic here
|
||||
|
||||
// Wait until the next frame.
|
||||
// The DS runs at 60 frames per second.
|
||||
PA_WaitForVBL();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user