chore: Use UNIX line endings

This commit is contained in:
Antonio Niño Díaz 2025-01-06 22:43:23 +00:00
parent af225bd7e0
commit 59700b44de
699 changed files with 46881 additions and 46881 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +1,34 @@
PAlib documentation folder
==========================
Instructions for normal users
-----------------------------
This directory contains the PAlib documentation in two languages,
English and French. Just go to the subfolder of your choice to
pick a language.
Each language subfolder has three versions of the documentation:
- PAlib.chm - The CHM version for use with Windows.
- PAlib.pdf - The printable PDF version.
- /html/ subfolder - The browsable HTML version.
Instructions for developers
---------------------------
The folder dev contains tools/scripts to generate the documentation.
By default it's set up for a Windows system with PAlib installed in
the folder C:\devkitPro\PAlib, but you can adapt it by:
- Changing the STRIP_FROM_PATH and the HHC_LOCATION variable.
- Disabling the .chm creation support (GENERATE_HTMLHELP = NO)
because it depends on a Windows executable.
To generate the documentation you need the following installed:
- Doxygen
- MikTeX on Windows or pdfTeX on other OSes
Just run the appropiate batch file on Windows or follow these steps:
- Run "doxygen Doxyfile_[Language]" where Language is the language
you want to generate the documentation for.
- Run make on the [Language]/latex folder.
PAlib documentation folder
==========================
Instructions for normal users
-----------------------------
This directory contains the PAlib documentation in two languages,
English and French. Just go to the subfolder of your choice to
pick a language.
Each language subfolder has three versions of the documentation:
- PAlib.chm - The CHM version for use with Windows.
- PAlib.pdf - The printable PDF version.
- /html/ subfolder - The browsable HTML version.
Instructions for developers
---------------------------
The folder dev contains tools/scripts to generate the documentation.
By default it's set up for a Windows system with PAlib installed in
the folder C:\devkitPro\PAlib, but you can adapt it by:
- Changing the STRIP_FROM_PATH and the HHC_LOCATION variable.
- Disabling the .chm creation support (GENERATE_HTMLHELP = NO)
because it depends on a Windows executable.
To generate the documentation you need the following installed:
- Doxygen
- MikTeX on Windows or pdfTeX on other OSes
Just run the appropiate batch file on Windows or follow these steps:
- Run "doxygen Doxyfile_[Language]" where Language is the language
you want to generate the documentation for.
- Run make on the [Language]/latex folder.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,17 +1,17 @@
//Gfx converted using Mollusk's PAGfx Converter
//This file contains all the .h, for easier inclusion in a project
#ifndef ALL_GFX_H
#define ALL_GFX_H
// Sprite files :
extern const unsigned char ropes_Sprite[192] __attribute__ ((aligned (4))) ; // Pal : ropes_Pal
// Palette files :
extern const unsigned short ropes_Pal[7] __attribute__ ((aligned (4))) ;
#endif
//Gfx converted using Mollusk's PAGfx Converter
//This file contains all the .h, for easier inclusion in a project
#ifndef ALL_GFX_H
#define ALL_GFX_H
// Sprite files :
extern const unsigned char ropes_Sprite[192] __attribute__ ((aligned (4))) ; // Pal : ropes_Pal
// Palette files :
extern const unsigned short ropes_Pal[7] __attribute__ ((aligned (4))) ;
#endif

View File

@ -1,18 +1,18 @@
//Sprite created using PAGfx
//This sprite uses ropes_Pal
const unsigned char ropes_Sprite[192] __attribute__ ((aligned (4))) = {
0, 33, 3, 0, 0, 32, 84, 0, 0, 0, 81, 2, 0, 0, 66, 5,
0, 0, 81, 2, 0, 0, 97, 3, 0, 16, 33, 0, 0, 19, 2, 0,
48, 19, 0, 0, 53, 3, 0, 0, 35, 3, 0, 0, 85, 3, 0, 0,
35, 1, 0, 0, 101, 2, 0, 0, 48, 18, 0, 0, 0, 101, 2, 0,
0, 0, 81, 2, 0, 16, 33, 0, 0, 19, 2, 0, 48, 19, 0, 0,
80, 3, 0, 0, 35, 3, 0, 0, 85, 3, 0, 0, 35, 1, 0, 0,
101, 2, 0, 0, 48, 18, 0, 0, 0, 101, 2, 0, 0, 33, 3, 0,
0, 32, 84, 0, 0, 0, 50, 3, 0, 0, 65, 5, 0, 0, 49, 2,
50, 1, 0, 0, 53, 3, 0, 0, 35, 3, 0, 0, 66, 2, 0, 0,
32, 50, 0, 0, 32, 86, 0, 0, 0, 33, 2, 0, 0, 48, 86, 0,
0, 0, 33, 2, 0, 0, 98, 5, 0, 0, 49, 2, 0, 0, 33, 5,
0, 16, 33, 0, 0, 51, 1, 0, 48, 19, 0, 0, 50, 3, 0, 0
};
//Sprite created using PAGfx
//This sprite uses ropes_Pal
const unsigned char ropes_Sprite[192] __attribute__ ((aligned (4))) = {
0, 33, 3, 0, 0, 32, 84, 0, 0, 0, 81, 2, 0, 0, 66, 5,
0, 0, 81, 2, 0, 0, 97, 3, 0, 16, 33, 0, 0, 19, 2, 0,
48, 19, 0, 0, 53, 3, 0, 0, 35, 3, 0, 0, 85, 3, 0, 0,
35, 1, 0, 0, 101, 2, 0, 0, 48, 18, 0, 0, 0, 101, 2, 0,
0, 0, 81, 2, 0, 16, 33, 0, 0, 19, 2, 0, 48, 19, 0, 0,
80, 3, 0, 0, 35, 3, 0, 0, 85, 3, 0, 0, 35, 1, 0, 0,
101, 2, 0, 0, 48, 18, 0, 0, 0, 101, 2, 0, 0, 33, 3, 0,
0, 32, 84, 0, 0, 0, 50, 3, 0, 0, 65, 5, 0, 0, 49, 2,
50, 1, 0, 0, 53, 3, 0, 0, 35, 3, 0, 0, 66, 2, 0, 0,
32, 50, 0, 0, 32, 86, 0, 0, 0, 33, 2, 0, 0, 48, 86, 0,
0, 0, 33, 2, 0, 0, 98, 5, 0, 0, 49, 2, 0, 0, 33, 5,
0, 16, 33, 0, 0, 51, 1, 0, 48, 19, 0, 0, 50, 3, 0, 0
};

View File

@ -1,4 +1,4 @@
//Palette created using Mollusk's PAGfxConverter
const unsigned short ropes_Pal[7] __attribute__ ((aligned (4))) = {
000000, 52488, 58929, 54668, 65535, 63157, 65403};
//Palette created using Mollusk's PAGfxConverter
const unsigned short ropes_Pal[7] __attribute__ ((aligned (4))) = {
000000, 52488, 58929, 54668, 65535, 63157, 65403};

View File

@ -1,39 +1,39 @@
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init16cBg(0, 2); //Initializes a 16 color bg
PA_LoadPal16c(PAL_BG0, ropes_Pal); //And loads its palette
PA_16cErase(0); //Clear bg before start drawing
u8 i=0; // position of our rope, from bottom
u8 j=0; // step of our animation
u8 frames=0; //frames rendered, usefull to do animation timing
// Infinite loop to keep the program running
while (1)
{
i+=1; //Move the rope up 1 pixels
if (i>192) i=0; //If the rope has hit the top of the screen, start again from bottom
if (++frames==20) //If we have render 20 consecutive frames
{
j=j+64; //Change animation to next frame
// ropes_Sprite has three 8x16 pixels frames, so each frame is (8x16)/2 = 64 bytes (since each pixels is 4bits)
// so our stride on the animation image is 64.
if (j>128) j=0;//Check frame limit (only 3 frames on this animation)
frames=0; //Reset frame counter
}
PA_WaitForVBL(); //Typical wait for vertical blank...
PA_16cErase(0); //Erase background (if there is only one row like in this example, you should erase only the space ocupped by the row).
PA_16c8Xi(0,125,192-i,(u32*)(ropes_Sprite+j),i); //Draw the row.
}
return 0;
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init16cBg(0, 2); //Initializes a 16 color bg
PA_LoadPal16c(PAL_BG0, ropes_Pal); //And loads its palette
PA_16cErase(0); //Clear bg before start drawing
u8 i=0; // position of our rope, from bottom
u8 j=0; // step of our animation
u8 frames=0; //frames rendered, usefull to do animation timing
// Infinite loop to keep the program running
while (1)
{
i+=1; //Move the rope up 1 pixels
if (i>192) i=0; //If the rope has hit the top of the screen, start again from bottom
if (++frames==20) //If we have render 20 consecutive frames
{
j=j+64; //Change animation to next frame
// ropes_Sprite has three 8x16 pixels frames, so each frame is (8x16)/2 = 64 bytes (since each pixels is 4bits)
// so our stride on the animation image is 64.
if (j>128) j=0;//Check frame limit (only 3 frames on this animation)
frames=0; //Reset frame counter
}
PA_WaitForVBL(); //Typical wait for vertical blank...
PA_16cErase(0); //Erase background (if there is only one row like in this example, you should erase only the space ocupped by the row).
PA_16c8Xi(0,125,192-i,(u32*)(ropes_Sprite+j),i); //Draw the row.
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,19 +1,19 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char shot_Sprite[32] _GFX_ALIGN; // Palette: shot_Pal
// Palettes:
extern const unsigned short shot_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char shot_Sprite[32] _GFX_ALIGN; // Palette: shot_Pal
// Palettes:
extern const unsigned short shot_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif

View File

@ -1,73 +1,73 @@
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
#define N_SHOTS 400 // number of shots
typedef struct{
u8 screen;
s16 screenx, screeny;
s32 x, y, vx, vy;
} shottype;
shottype shots[N_SHOTS]; // Have 200 shots...
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
// Init a 16c background for both screens
PA_InitComplete16c(1, // background number to use
(void*)shot_Pal); // palette to use...
s32 i;
// Fill shots with random postions and directions...
for (i = 0; i < N_SHOTS; i++){
shots[i].x = 8+PA_Rand()%240; shots[i].x = shots[i].x << 8; // 8 bit fixed point
shots[i].y = 8+PA_Rand()%366; shots[i].y = shots[i].y << 8;
shots[i].screen = 0; shots[i].screenx = 256; shots[i].screeny = 0; // hide sprite at first
s16 angle = PA_Rand()%512;
shots[i].vx = PA_Cos(angle);
shots[i].vy = -PA_Sin(angle);
}
// Infinite loop to keep the program running
while (1)
{
// Move shots
for (i = 0; i < N_SHOTS; i++) {
// Add speed...
shots[i].x += shots[i].vx;
shots[i].y += shots[i].vy;
// Screen positions
shots[i].screenx = (shots[i].x >> 8); // screen position...
shots[i].screeny = (shots[i].y >> 8); // same here...
// Adjust speed to avoid moving out of screen...
if((shots[i].screenx < 4)||(shots[i].screenx > 256-4)) shots[i].vx = -shots[i].vx;
if((shots[i].screeny < 4)||(shots[i].screeny > 387)) shots[i].vy = -shots[i].vy;
// See on which screen we'll display it...
if(shots[i].screeny < 199) shots[i].screen = 1; // top screen
else {
shots[i].screen = 0; // bottom screen
shots[i].screeny = shots[i].screeny-200; // 8pixel space between screens, just for the sake of it !
}
}
PA_WaitForVBL();
PA_Dual16cErase(); // Erase both screens right after VBL...
// Display shots... must be done RIGHT AFTER the erase...
for (i = 0; i < N_SHOTS; i++) PA_16c8X8(shots[i].screen, shots[i].screenx-4, shots[i].screeny-4, (void*)shot_Sprite);
}
return 0;
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
#define N_SHOTS 400 // number of shots
typedef struct{
u8 screen;
s16 screenx, screeny;
s32 x, y, vx, vy;
} shottype;
shottype shots[N_SHOTS]; // Have 200 shots...
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
// Init a 16c background for both screens
PA_InitComplete16c(1, // background number to use
(void*)shot_Pal); // palette to use...
s32 i;
// Fill shots with random postions and directions...
for (i = 0; i < N_SHOTS; i++){
shots[i].x = 8+PA_Rand()%240; shots[i].x = shots[i].x << 8; // 8 bit fixed point
shots[i].y = 8+PA_Rand()%366; shots[i].y = shots[i].y << 8;
shots[i].screen = 0; shots[i].screenx = 256; shots[i].screeny = 0; // hide sprite at first
s16 angle = PA_Rand()%512;
shots[i].vx = PA_Cos(angle);
shots[i].vy = -PA_Sin(angle);
}
// Infinite loop to keep the program running
while (1)
{
// Move shots
for (i = 0; i < N_SHOTS; i++) {
// Add speed...
shots[i].x += shots[i].vx;
shots[i].y += shots[i].vy;
// Screen positions
shots[i].screenx = (shots[i].x >> 8); // screen position...
shots[i].screeny = (shots[i].y >> 8); // same here...
// Adjust speed to avoid moving out of screen...
if((shots[i].screenx < 4)||(shots[i].screenx > 256-4)) shots[i].vx = -shots[i].vx;
if((shots[i].screeny < 4)||(shots[i].screeny > 387)) shots[i].vy = -shots[i].vy;
// See on which screen we'll display it...
if(shots[i].screeny < 199) shots[i].screen = 1; // top screen
else {
shots[i].screen = 0; // bottom screen
shots[i].screeny = shots[i].screeny-200; // 8pixel space between screens, just for the sake of it !
}
}
PA_WaitForVBL();
PA_Dual16cErase(); // Erase both screens right after VBL...
// Display shots... must be done RIGHT AFTER the erase...
for (i = 0; i < N_SHOTS; i++) PA_16c8X8(shots[i].screen, shots[i].screenx-4, shots[i].screeny-4, (void*)shot_Sprite);
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,42 +1,42 @@
// Includes
#include <PA9.h> // Include for PA_Lib
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init16cBg(0, 3); PA_Init16cBg(1, 3); // 16 color background init with default colors for text
PA_16cText(1, //screen
10, 10, 255, 20, //x1, y1, x2, y2 position
"Hello World", //text
1, //color (1-10)
0, // text size (0-4)
100); // maximum number of characters (use like 10000 if you don't know)
PA_16cText(1, 10, 25, 255, 40, "Hello World", 1, 1, 100);
PA_16cText(1, 10, 40, 255, 60, "Hello World", 1, 2, 100);
PA_16cText(1, 10, 60, 255, 80, "Hello World", 1, 3, 100);
PA_16cText(1, 10, 80, 255, 100, "Hello World", 1, 4, 100);
u8 i;
// Different colors on the bottom sreen...
for (i = 0; i < 10; i++){
PA_16cText(0, 10, i*20, 255, i*20 + 20, "Hello World", i+1, 3, 100);
}
// Infinite loop to keep the program running
while (1)
{
PA_WaitForVBL();
}
return 0;
// Includes
#include <PA9.h> // Include for PA_Lib
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init16cBg(0, 3); PA_Init16cBg(1, 3); // 16 color background init with default colors for text
PA_16cText(1, //screen
10, 10, 255, 20, //x1, y1, x2, y2 position
"Hello World", //text
1, //color (1-10)
0, // text size (0-4)
100); // maximum number of characters (use like 10000 if you don't know)
PA_16cText(1, 10, 25, 255, 40, "Hello World", 1, 1, 100);
PA_16cText(1, 10, 40, 255, 60, "Hello World", 1, 2, 100);
PA_16cText(1, 10, 60, 255, 80, "Hello World", 1, 3, 100);
PA_16cText(1, 10, 80, 255, 100, "Hello World", 1, 4, 100);
u8 i;
// Different colors on the bottom sreen...
for (i = 0; i < 10; i++){
PA_16cText(0, 10, i*20, 255, i*20 + 20, "Hello World", i+1, 3, 100);
}
// Infinite loop to keep the program running
while (1)
{
PA_WaitForVBL();
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,36 +1,36 @@
// Includes
#include <PA9.h> // Include for PA_Lib
#include <stdio.h> // standard lib for texts...
char text[200];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init16cBg(0, 3); PA_Init16cBg(1, 3); // 16 color background init with default colors for text
// Infinite loop to keep the program running
while (1)
{
sprintf(text, // string to use
"%02d/%02d/%02d", PA_RTC.Day, PA_RTC.Month, PA_RTC.Year); // String to transform
PA_16cText(0, 10, 20, 255, 40, text, 1, 3, 100); // Display the text transformed :)
// And the time...
sprintf(text, "%02d:%02d %02d seconds", PA_RTC.Hour, PA_RTC.Minutes, PA_RTC.Seconds);
PA_16cText(0, 10, 40, 255, 60, text, 1, 3, 100); // Display the text transformed :)
PA_WaitForVBL();
PA_16cErase(0);
}
return 0;
// Includes
#include <PA9.h> // Include for PA_Lib
#include <stdio.h> // standard lib for texts...
char text[200];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init16cBg(0, 3); PA_Init16cBg(1, 3); // 16 color background init with default colors for text
// Infinite loop to keep the program running
while (1)
{
sprintf(text, // string to use
"%02d/%02d/%02d", PA_RTC.Day, PA_RTC.Month, PA_RTC.Year); // String to transform
PA_16cText(0, 10, 20, 255, 40, text, 1, 3, 100); // Display the text transformed :)
// And the time...
sprintf(text, "%02d:%02d %02d seconds", PA_RTC.Hour, PA_RTC.Minutes, PA_RTC.Seconds);
PA_16cText(0, 10, 40, 255, 60, text, 1, 3, 100); // Display the text transformed :)
PA_WaitForVBL();
PA_16cErase(0);
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,34 +1,34 @@
// Includes
#include <PA9.h> // Include for PA_Lib
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_LoadDefaultText(0, 0);
PA_Init16cBg(0, 3); PA_Init16cBg(1, 3); // 16 color background init with default colors for text
PA_16cTextAlign(ALIGN_LEFT);
PA_16cText(1, 0, 10, 255, 50, "Left aligned text, blabla, blabla, life is life, and if you don't like PAlib, just don't use it and stop ditching... More blabla to make the text long enough to test the text system.", 1, 2, 1000);
PA_16cTextAlign(ALIGN_RIGHT);
PA_16cText(1, 0, 50, 255, 90, "Right aligned text, blabla, blabla, life is life, and if you don't like PAlib, just don't use it and stop ditching... More blabla to make the text long enough to test the text system.", 1, 2, 1000);
PA_16cTextAlign(ALIGN_CENTER);
PA_16cText(1, 0, 90, 255, 130, "Centered text, blabla, blabla, life is life, and if you don't like PAlib, just don't use it and stop ditching... More blabla to make the text long enough to test the text system.", 1, 2, 1000);
PA_16cTextAlign(ALIGN_JUSTIFY);
PA_16cText(1, 0, 130, 255, 180, "Justified text, blabla, blabla, life is life, and if you don't like PAlib, just don't use it and stop ditching... More blabla to make the text long enough to test the text system.", 1, 2, 1000);
// Infinite loop to keep the program running
while (1)
{
PA_WaitForVBL();
}
return 0;
// Includes
#include <PA9.h> // Include for PA_Lib
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_LoadDefaultText(0, 0);
PA_Init16cBg(0, 3); PA_Init16cBg(1, 3); // 16 color background init with default colors for text
PA_16cTextAlign(ALIGN_LEFT);
PA_16cText(1, 0, 10, 255, 50, "Left aligned text, blabla, blabla, life is life, and if you don't like PAlib, just don't use it and stop ditching... More blabla to make the text long enough to test the text system.", 1, 2, 1000);
PA_16cTextAlign(ALIGN_RIGHT);
PA_16cText(1, 0, 50, 255, 90, "Right aligned text, blabla, blabla, life is life, and if you don't like PAlib, just don't use it and stop ditching... More blabla to make the text long enough to test the text system.", 1, 2, 1000);
PA_16cTextAlign(ALIGN_CENTER);
PA_16cText(1, 0, 90, 255, 130, "Centered text, blabla, blabla, life is life, and if you don't like PAlib, just don't use it and stop ditching... More blabla to make the text long enough to test the text system.", 1, 2, 1000);
PA_16cTextAlign(ALIGN_JUSTIFY);
PA_16cText(1, 0, 130, 255, 180, "Justified text, blabla, blabla, life is life, and if you don't like PAlib, just don't use it and stop ditching... More blabla to make the text long enough to test the text system.", 1, 2, 1000);
// Infinite loop to keep the program running
while (1)
{
PA_WaitForVBL();
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,19 +1,19 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Backgrounds:
extern const PA_BgStruct bigfont;
extern const PA_BgStruct smallfont;
// Palettes:
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Backgrounds:
extern const PA_BgStruct bigfont;
extern const PA_BgStruct smallfont;
// Palettes:
#ifdef __cplusplus
}
#endif

View File

@ -1,17 +1,17 @@
#include <PA_BgStruct.h>
extern const char bigfont_Tiles[];
extern const char bigfont_Map[];
extern const char bigfont_Sizes[];
const PA_BgStruct bigfont = {
PA_Font4bit,
512, 128,
bigfont_Tiles,
bigfont_Map,
{bigfont_Sizes},
8256,
{14}
};
#include <PA_BgStruct.h>
extern const char bigfont_Tiles[];
extern const char bigfont_Map[];
extern const char bigfont_Sizes[];
const PA_BgStruct bigfont = {
PA_Font4bit,
512, 128,
bigfont_Tiles,
bigfont_Map,
{bigfont_Sizes},
8256,
{14}
};

View File

@ -1,17 +1,17 @@
#include <PA_BgStruct.h>
extern const char smallfont_Tiles[];
extern const char smallfont_Map[];
extern const char smallfont_Sizes[];
const PA_BgStruct smallfont = {
PA_Font4bit,
256, 64,
smallfont_Tiles,
smallfont_Map,
{smallfont_Sizes},
3168,
{6}
};
#include <PA_BgStruct.h>
extern const char smallfont_Tiles[];
extern const char smallfont_Map[];
extern const char smallfont_Sizes[];
const PA_BgStruct smallfont = {
PA_Font4bit,
256, 64,
smallfont_Tiles,
smallfont_Map,
{smallfont_Sizes},
3168,
{6}
};

View File

@ -1,31 +1,31 @@
#include <PA9.h>
// Include the newly converted fonts...
#include "all_gfx.h"
int main(){
int i;
PA_Init();
// 16 color background init with default colors for text
PA_Init16cBg(0, 3);
PA_Init16cBg(1, 3);
// Slots 0-4 are already used by default PAlib fonts, so we'll load on slots 5 and 6.
// Available slots : 5-9. You can overwrite a PAlib font though if you want to use slot 0 for example...
PA_Add16cFont(5, &smallfont);
PA_Add16cFont(6, &bigfont);
PA_16cText(1, 10, 25, 255, 40, "Small custom font...", 1, 5, 100);
PA_16cText(1, 10, 40, 255, 60, "Big custom font...", 1, 6, 100);
// Different colors on the bottom sreen...
for (i = 0; i < 10; i++)
PA_16cText(0, 10, i*20, 255, i*20 + 20, "Hello World", i+1, 6, 100);
// Infinite loop to keep the program running
while(true){
PA_WaitForVBL();
}
#include <PA9.h>
// Include the newly converted fonts...
#include "all_gfx.h"
int main(){
int i;
PA_Init();
// 16 color background init with default colors for text
PA_Init16cBg(0, 3);
PA_Init16cBg(1, 3);
// Slots 0-4 are already used by default PAlib fonts, so we'll load on slots 5 and 6.
// Available slots : 5-9. You can overwrite a PAlib font though if you want to use slot 0 for example...
PA_Add16cFont(5, &smallfont);
PA_Add16cFont(6, &bigfont);
PA_16cText(1, 10, 25, 255, 40, "Small custom font...", 1, 5, 100);
PA_16cText(1, 10, 40, 255, 60, "Big custom font...", 1, 6, 100);
// Different colors on the bottom sreen...
for (i = 0; i < 10; i++)
PA_16cText(0, 10, i*20, 255, i*20 + 20, "Hello World", i+1, 6, 100);
// Infinite loop to keep the program running
while(true){
PA_WaitForVBL();
}
}

View File

@ -1 +1 @@
include ../../Makefile_example
include ../../Makefile_example

View File

@ -1,20 +1,20 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif

View File

@ -1,79 +1,79 @@
/*
// 3D Sprite Moving example...
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
#define N_SPRITES 1024 // Number of sprites in the example
u16 gfx[3];
typedef struct{
s32 x, y, vx, vy;
} spritepos;
spritepos sprites[1024]; // Let's manage the sprite positions ^^
// Function: main()
int main(void)
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 6, " 3d Sprite Example, 1024 64x64sprites resized to 16x16 and moving around !");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_16BITS ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_16BITS);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_16BITS);
s32 i;
u16 angle;
for(i = 0; i < N_SPRITES; i++) {
sprites[i].x = 16+(PA_Rand()%224);
sprites[i].y = 16+(PA_Rand()%160);
PA_3DCreateSpriteFromTex(i, // Sprite number
gfx[PA_Rand()%3], // Gfx, random one :p
64, 64, // Width, Height
0, // Palette
sprites[i].x, sprites[i].y); // X, Y
PA_3DSetSpriteWidthHeight(i, 16, 16); // Resize to way smaller ^^
angle = PA_Rand()&511; // random angle
sprites[i].vx = PA_Cos(angle)>>7;
sprites[i].vy = -PA_Sin(angle)>>7;
}
while(1) {
for(i = 0; i < N_SPRITES; i++){ // Move them around and change speed if touches screen
sprites[i].x += sprites[i].vx;
if(((sprites[i].x <= 8)&&(sprites[i].vx < 0))||((sprites[i].x>=255-8)&&(sprites[i].vx > 0))) sprites[i].vx = -sprites[i].vx;
sprites[i].y += sprites[i].vy;
if(((sprites[i].y <= 8)&&(sprites[i].vy < 0))||((sprites[i].y>=191-8)&&(sprites[i].vy > 0))) sprites[i].vy = -sprites[i].vy;
PA_3DSetSpriteXY(i, sprites[i].x, sprites[i].y); // Set new position
}
PA_WaitForVBL();
PA_3DProcess(); // Update 3DSprites
}
return 0;
/*
// 3D Sprite Moving example...
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
#define N_SPRITES 1024 // Number of sprites in the example
u16 gfx[3];
typedef struct{
s32 x, y, vx, vy;
} spritepos;
spritepos sprites[1024]; // Let's manage the sprite positions ^^
// Function: main()
int main(void)
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 6, " 3d Sprite Example, 1024 64x64sprites resized to 16x16 and moving around !");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_16BITS ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_16BITS);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_16BITS);
s32 i;
u16 angle;
for(i = 0; i < N_SPRITES; i++) {
sprites[i].x = 16+(PA_Rand()%224);
sprites[i].y = 16+(PA_Rand()%160);
PA_3DCreateSpriteFromTex(i, // Sprite number
gfx[PA_Rand()%3], // Gfx, random one :p
64, 64, // Width, Height
0, // Palette
sprites[i].x, sprites[i].y); // X, Y
PA_3DSetSpriteWidthHeight(i, 16, 16); // Resize to way smaller ^^
angle = PA_Rand()&511; // random angle
sprites[i].vx = PA_Cos(angle)>>7;
sprites[i].vy = -PA_Sin(angle)>>7;
}
while(1) {
for(i = 0; i < N_SPRITES; i++){ // Move them around and change speed if touches screen
sprites[i].x += sprites[i].vx;
if(((sprites[i].x <= 8)&&(sprites[i].vx < 0))||((sprites[i].x>=255-8)&&(sprites[i].vx > 0))) sprites[i].vx = -sprites[i].vx;
sprites[i].y += sprites[i].vy;
if(((sprites[i].y <= 8)&&(sprites[i].vy < 0))||((sprites[i].y>=191-8)&&(sprites[i].vy > 0))) sprites[i].vy = -sprites[i].vy;
PA_3DSetSpriteXY(i, sprites[i].x, sprites[i].y); // Set new position
}
PA_WaitForVBL();
PA_3DProcess(); // Update 3DSprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,20 +1,20 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif

View File

@ -1,57 +1,57 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 6, " 3DSprites Example : 16bits");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_16BITS ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_16BITS);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_16BITS);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette, unused in 16bit...
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 0, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 0, 160, 96+64);
while(1) {
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 6, " 3DSprites Example : 16bits");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_16BITS ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_16BITS);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_16BITS);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette, unused in 16bit...
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 0, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 0, 160, 96+64);
while(1) {
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,23 +1,23 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[2048] _GFX_ALIGN; // Palette: mollusk_Pal
extern const unsigned char AnarX_Texture[2048] _GFX_ALIGN; // Palette: AnarX_Pal
extern const unsigned char Abrexxes_Texture[2048] _GFX_ALIGN; // Palette: Abrexxes_Pal
// Palettes:
extern const unsigned short mollusk_Pal[256] _GFX_ALIGN;
extern const unsigned short AnarX_Pal[256] _GFX_ALIGN;
extern const unsigned short Abrexxes_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[2048] _GFX_ALIGN; // Palette: mollusk_Pal
extern const unsigned char AnarX_Texture[2048] _GFX_ALIGN; // Palette: AnarX_Pal
extern const unsigned char Abrexxes_Texture[2048] _GFX_ALIGN; // Palette: Abrexxes_Pal
// Palettes:
extern const unsigned short mollusk_Pal[256] _GFX_ALIGN;
extern const unsigned short AnarX_Pal[256] _GFX_ALIGN;
extern const unsigned short Abrexxes_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif

View File

@ -1,63 +1,63 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 2, "3DSprites Example : 16colors");
// First, create the gfx with the corresponding images and sizes. Images converted as 16colors textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_16COL ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_16COL);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_16COL);
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)mollusk_Pal); // Palette
PA_Load3DSpritePal(1, (void*)AnarX_Pal);
PA_Load3DSpritePal(2, (void*)Abrexxes_Pal);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette, unused in 16bit...
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 1, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 2, 160, 96+64);
while(1) {
PA_3DProcess(); // Update sprites
PA_WaitForVBL();
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 2, "3DSprites Example : 16colors");
// First, create the gfx with the corresponding images and sizes. Images converted as 16colors textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_16COL ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_16COL);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_16COL);
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)mollusk_Pal); // Palette
PA_Load3DSpritePal(1, (void*)AnarX_Pal);
PA_Load3DSpritePal(2, (void*)Abrexxes_Pal);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette, unused in 16bit...
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 1, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 2, 160, 96+64);
while(1) {
PA_3DProcess(); // Update sprites
PA_WaitForVBL();
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,23 +1,23 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // Palette: mollusk_Pal
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // Palette: AnarX_Pal
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // Palette: Abrexxes_Pal
// Palettes:
extern const unsigned short mollusk_Pal[256] _GFX_ALIGN;
extern const unsigned short AnarX_Pal[256] _GFX_ALIGN;
extern const unsigned short Abrexxes_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // Palette: mollusk_Pal
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // Palette: AnarX_Pal
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // Palette: Abrexxes_Pal
// Palettes:
extern const unsigned short mollusk_Pal[256] _GFX_ALIGN;
extern const unsigned short AnarX_Pal[256] _GFX_ALIGN;
extern const unsigned short Abrexxes_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif

View File

@ -1,62 +1,62 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 2, "3DSprites Example : 256colors");
// First, create the gfx with the corresponding images and sizes. Images converted as 256colors textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_256COL ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_256COL);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_256COL);
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)mollusk_Pal); // Palette
PA_Load3DSpritePal(1, (void*)AnarX_Pal);
PA_Load3DSpritePal(2, (void*)Abrexxes_Pal);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette, unused in 16bit...
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 1, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 2, 160, 96+64);
while(1) {
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 2, "3DSprites Example : 256colors");
// First, create the gfx with the corresponding images and sizes. Images converted as 256colors textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_256COL ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_256COL);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_256COL);
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)mollusk_Pal); // Palette
PA_Load3DSpritePal(1, (void*)AnarX_Pal);
PA_Load3DSpritePal(2, (void*)Abrexxes_Pal);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette, unused in 16bit...
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 1, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 2, 160, 96+64);
while(1) {
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,23 +1,23 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[1024] _GFX_ALIGN; // Palette: mollusk_Pal
extern const unsigned char AnarX_Texture[1024] _GFX_ALIGN; // Palette: AnarX_Pal
extern const unsigned char Abrexxes_Texture[1024] _GFX_ALIGN; // Palette: Abrexxes_Pal
// Palettes:
extern const unsigned short mollusk_Pal[256] _GFX_ALIGN;
extern const unsigned short AnarX_Pal[256] _GFX_ALIGN;
extern const unsigned short Abrexxes_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[1024] _GFX_ALIGN; // Palette: mollusk_Pal
extern const unsigned char AnarX_Texture[1024] _GFX_ALIGN; // Palette: AnarX_Pal
extern const unsigned char Abrexxes_Texture[1024] _GFX_ALIGN; // Palette: Abrexxes_Pal
// Palettes:
extern const unsigned short mollusk_Pal[256] _GFX_ALIGN;
extern const unsigned short AnarX_Pal[256] _GFX_ALIGN;
extern const unsigned short Abrexxes_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif

View File

@ -1,62 +1,62 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 2, "3DSprites Example : 16colors");
// First, create the gfx with the corresponding images and sizes. Images converted as 16colors textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_4COL ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_4COL);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_4COL);
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)mollusk_Pal); // Palette
PA_Load3DSpritePal(1, (void*)AnarX_Pal);
PA_Load3DSpritePal(2, (void*)Abrexxes_Pal);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette, unused in 16bit...
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 1, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 2, 160, 96+64);
while(1) {
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 2, "3DSprites Example : 16colors");
// First, create the gfx with the corresponding images and sizes. Images converted as 16colors textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_4COL ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_4COL);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_4COL);
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)mollusk_Pal); // Palette
PA_Load3DSpritePal(1, (void*)AnarX_Pal);
PA_Load3DSpritePal(2, (void*)Abrexxes_Pal);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette, unused in 16bit...
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 1, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 2, 160, 96+64);
while(1) {
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,19 +1,19 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char bar_Texture[8192] _GFX_ALIGN; // Palette: bar_Pal
// Palettes:
extern const unsigned short bar_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char bar_Texture[8192] _GFX_ALIGN; // Palette: bar_Pal
// Palettes:
extern const unsigned short bar_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif

View File

@ -1,52 +1,52 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 2, "3DSprites Example : 256colors");
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)bar_Pal); // Palette
// Create 3 sprites...
PA_3DCreateSprite(0, // Sprite number
(void*)bar_Texture, // Texture
256, 32, // Width, Height
TEX_256COL, // Type
0, // Palette, unused in 16bit...
128, 96); // X, Y SPRITE CENTER !
while(1) {
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 2, "3DSprites Example : 256colors");
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)bar_Pal); // Palette
// Create 3 sprites...
PA_3DCreateSprite(0, // Sprite number
(void*)bar_Texture, // Texture
256, 32, // Width, Height
TEX_256COL, // Type
0, // Palette, unused in 16bit...
128, 96); // X, Y SPRITE CENTER !
while(1) {
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../Makefile_example
include ../../Makefile_example

View File

@ -1,18 +1,18 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif

View File

@ -1,50 +1,50 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 0, 6, "Move the Sprite with the stylus");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit sprites in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, 64, 64, TEX_16BITS);
// Create sprite...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette
128, 96); // X, Y SPRITE CENTER !
while(1) {
if(Stylus.Held) PA_3DSetSpriteXY(0, Stylus.X, Stylus.Y); // Move sprite 0 to Stylus Position... This is the sprite's center !
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 0, 6, "Move the Sprite with the stylus");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit sprites in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, 64, 64, TEX_16BITS);
// Create sprite...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette
128, 96); // X, Y SPRITE CENTER !
while(1) {
if(Stylus.Held) PA_3DSetSpriteXY(0, Stylus.X, Stylus.Y); // Move sprite 0 to Stylus Position... This is the sprite's center !
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../Makefile_example
include ../../Makefile_example

View File

@ -1,23 +1,23 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // Palette: mollusk_Pal
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // Palette: AnarX_Pal
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // Palette: Abrexxes_Pal
// Palettes:
extern const unsigned short mollusk_Pal[256] _GFX_ALIGN;
extern const unsigned short AnarX_Pal[256] _GFX_ALIGN;
extern const unsigned short Abrexxes_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // Palette: mollusk_Pal
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // Palette: AnarX_Pal
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // Palette: Abrexxes_Pal
// Palettes:
extern const unsigned short mollusk_Pal[256] _GFX_ALIGN;
extern const unsigned short AnarX_Pal[256] _GFX_ALIGN;
extern const unsigned short Abrexxes_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif

View File

@ -1,64 +1,64 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 0, 8, "Move 3DSprite to change priority");
// First, create the gfx with the corresponding images and sizes. Images converted as 256colors textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_256COL ); // Texture Format
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)mollusk_Pal); // Palette
// Create a few sprites
PA_3DCreateSpriteFromTex(0, gfx[0], 64, 64, 0, 128, 96);
u8 i;
for(i = 0; i < 24; i++){
PA_3DCreateSpriteFromTex(i+1, gfx[0], 64, 64, 0, 32, i*8);
PA_3DSetSpritePrio(i+1, 1024 + i*8); // Priority... (default is 1024)
}
while(1) {
if(Stylus.Held) {
PA_3DSetSpriteXY(0, Stylus.X, Stylus.Y);
PA_3DSetSpritePrio(0, 1024 + Stylus.Y); // Priority depending on Y position...
}
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 0, 8, "Move 3DSprite to change priority");
// First, create the gfx with the corresponding images and sizes. Images converted as 256colors textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_256COL ); // Texture Format
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)mollusk_Pal); // Palette
// Create a few sprites
PA_3DCreateSpriteFromTex(0, gfx[0], 64, 64, 0, 128, 96);
u8 i;
for(i = 0; i < 24; i++){
PA_3DCreateSpriteFromTex(i+1, gfx[0], 64, 64, 0, 32, i*8);
PA_3DSetSpritePrio(i+1, 1024 + i*8); // Priority... (default is 1024)
}
while(1) {
if(Stylus.Held) {
PA_3DSetSpriteXY(0, Stylus.X, Stylus.Y);
PA_3DSetSpritePrio(0, 1024 + Stylus.Y); // Priority depending on Y position...
}
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../Makefile_example
include ../../Makefile_example

View File

@ -1,23 +1,23 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // Palette: mollusk_Pal
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // Palette: AnarX_Pal
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // Palette: Abrexxes_Pal
// Palettes:
extern const unsigned short mollusk_Pal[256] _GFX_ALIGN;
extern const unsigned short AnarX_Pal[256] _GFX_ALIGN;
extern const unsigned short Abrexxes_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // Palette: mollusk_Pal
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // Palette: AnarX_Pal
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // Palette: Abrexxes_Pal
// Palettes:
extern const unsigned short mollusk_Pal[256] _GFX_ALIGN;
extern const unsigned short AnarX_Pal[256] _GFX_ALIGN;
extern const unsigned short Abrexxes_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif

View File

@ -1,72 +1,72 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 6, "Click to set random texture");
// First, create the gfx with the corresponding images and sizes. Images converted as 256colors textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_256COL ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_256COL);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_256COL);
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)mollusk_Pal); // Palette
PA_Load3DSpritePal(1, (void*)AnarX_Pal);
PA_Load3DSpritePal(2, (void*)Abrexxes_Pal);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette, unused in 16bit...
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 1, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 2, 160, 96+64);
s32 i;
while(1) {
if(Stylus.Newpress){
for(i = 0; i < 3; i++){
if(PA_3DSpriteTouched(i)){ // If sprite touched
u8 random = PA_Rand()%3;
PA_3DSetSpriteTex(i, gfx[random]); // Change to random texture...
PA_3DSetSpritePal(i, random); // Don't forget to change palette too ^^
}
}
}
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 6, "Click to set random texture");
// First, create the gfx with the corresponding images and sizes. Images converted as 256colors textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_256COL ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_256COL);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_256COL);
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)mollusk_Pal); // Palette
PA_Load3DSpritePal(1, (void*)AnarX_Pal);
PA_Load3DSpritePal(2, (void*)Abrexxes_Pal);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette, unused in 16bit...
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 1, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 2, 160, 96+64);
s32 i;
while(1) {
if(Stylus.Newpress){
for(i = 0; i < 3; i++){
if(PA_3DSpriteTouched(i)){ // If sprite touched
u8 random = PA_Rand()%3;
PA_3DSetSpriteTex(i, gfx[random]); // Change to random texture...
PA_3DSetSpritePal(i, random); // Don't forget to change palette too ^^
}
}
}
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../Makefile_example
include ../../Makefile_example

View File

@ -1,23 +1,23 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // Palette: mollusk_Pal
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // Palette: AnarX_Pal
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // Palette: Abrexxes_Pal
// Palettes:
extern const unsigned short mollusk_Pal[256] _GFX_ALIGN;
extern const unsigned short AnarX_Pal[256] _GFX_ALIGN;
extern const unsigned short Abrexxes_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // Palette: mollusk_Pal
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // Palette: AnarX_Pal
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // Palette: Abrexxes_Pal
// Palettes:
extern const unsigned short mollusk_Pal[256] _GFX_ALIGN;
extern const unsigned short AnarX_Pal[256] _GFX_ALIGN;
extern const unsigned short Abrexxes_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif

View File

@ -1,71 +1,71 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_OutputSimpleText(1, 2, 2, "3DSprites Example : 256colors");
// First, create the gfx with the corresponding images and sizes. Images converted as 256colors textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_256COL ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_256COL);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_256COL);
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)mollusk_Pal); // Palette
PA_Load3DSpritePal(1, (void*)AnarX_Pal);
PA_Load3DSpritePal(2, (void*)Abrexxes_Pal);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette, unused in 16bit...
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 1, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 2, 160, 96+64);
while(1) {
// Check if you touch one of them...
if(Stylus.Held){
if(PA_3DSpriteTouched(0)) PA_OutputSimpleText(0, 10, 2, "Mollusk is touched ! ");
else if(PA_3DSpriteTouched(1)) PA_OutputSimpleText(0, 10, 2, "AnarX is touched ! ");
else if(PA_3DSpriteTouched(2)) PA_OutputSimpleText(0, 10, 2, "Abrexxes is touched !");
else PA_OutputSimpleText(0, 10, 2, " "); // If not, erase ^^
}
else PA_OutputSimpleText(0, 10, 2, " "); // If not, erase ^^
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_OutputSimpleText(1, 2, 2, "3DSprites Example : 256colors");
// First, create the gfx with the corresponding images and sizes. Images converted as 256colors textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_256COL ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_256COL);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_256COL);
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)mollusk_Pal); // Palette
PA_Load3DSpritePal(1, (void*)AnarX_Pal);
PA_Load3DSpritePal(2, (void*)Abrexxes_Pal);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette, unused in 16bit...
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 1, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 2, 160, 96+64);
while(1) {
// Check if you touch one of them...
if(Stylus.Held){
if(PA_3DSpriteTouched(0)) PA_OutputSimpleText(0, 10, 2, "Mollusk is touched ! ");
else if(PA_3DSpriteTouched(1)) PA_OutputSimpleText(0, 10, 2, "AnarX is touched ! ");
else if(PA_3DSpriteTouched(2)) PA_OutputSimpleText(0, 10, 2, "Abrexxes is touched !");
else PA_OutputSimpleText(0, 10, 2, " "); // If not, erase ^^
}
else PA_OutputSimpleText(0, 10, 2, " "); // If not, erase ^^
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,19 +1,19 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char frames_Texture[4096] _GFX_ALIGN; // Palette: frames_Pal
// Palettes:
extern const unsigned short frames_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char frames_Texture[4096] _GFX_ALIGN; // Palette: frames_Pal
// Palettes:
extern const unsigned short frames_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif

View File

@ -1,53 +1,53 @@
/* Sprite Frames...
*/
// Includes, only one sprite
#include <PA9.h>
// PAGfxConverter Include
#include "all_gfx.h"
s16 framecount; //Frame count...
u16 gfx[3];
// Main function
int main(void) {
// PAlib init
PA_Init();
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
PA_LoadDefaultText(1, 0);
PA_OutputText(1, 0, 10, "Press Pad to change frame");
// Load the sprite palette,
PA_Load3DSpritePal(0, // Palette number
(void*)frames_Pal); // Palette name
gfx[0] = PA_3DCreateTex((void*)frames_Texture, 32, 32, TEX_256COL);
PA_3DCreateSpriteFromTex(0, gfx[0], 32, 32, 0, 128, 96);
while(1)
{
if (Pad.Held.Up) PA_3DSetSpriteFrame(0, 0); // screen, sprite, frame
if (Pad.Held.Down) PA_3DSetSpriteFrame(0, 2); // screen, sprite, frame
if (Pad.Held.Left) PA_3DSetSpriteFrame(0, 3); // screen, sprite, frame
if (Pad.Held.Right) PA_3DSetSpriteFrame(0, 1); // screen, sprite, frame
PA_WaitForVBL();
PA_3DProcess();
}
return 0;
/* Sprite Frames...
*/
// Includes, only one sprite
#include <PA9.h>
// PAGfxConverter Include
#include "all_gfx.h"
s16 framecount; //Frame count...
u16 gfx[3];
// Main function
int main(void) {
// PAlib init
PA_Init();
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
PA_LoadDefaultText(1, 0);
PA_OutputText(1, 0, 10, "Press Pad to change frame");
// Load the sprite palette,
PA_Load3DSpritePal(0, // Palette number
(void*)frames_Pal); // Palette name
gfx[0] = PA_3DCreateTex((void*)frames_Texture, 32, 32, TEX_256COL);
PA_3DCreateSpriteFromTex(0, gfx[0], 32, 32, 0, 128, 96);
while(1)
{
if (Pad.Held.Up) PA_3DSetSpriteFrame(0, 0); // screen, sprite, frame
if (Pad.Held.Down) PA_3DSetSpriteFrame(0, 2); // screen, sprite, frame
if (Pad.Held.Left) PA_3DSetSpriteFrame(0, 3); // screen, sprite, frame
if (Pad.Held.Right) PA_3DSetSpriteFrame(0, 1); // screen, sprite, frame
PA_WaitForVBL();
PA_3DProcess();
}
return 0;
}

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,22 +1,22 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Backgrounds:
extern const PA_BgStruct mariobg;
// Sprites:
extern const unsigned char mario_Texture[16384] _GFX_ALIGN; // Palette: mario_Pal
// Palettes:
extern const unsigned short mario_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Backgrounds:
extern const PA_BgStruct mariobg;
// Sprites:
extern const unsigned char mario_Texture[16384] _GFX_ALIGN; // Palette: mario_Pal
// Palettes:
extern const unsigned short mario_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif

View File

@ -1,17 +1,17 @@
#include <PA_BgStruct.h>
extern const char mariobg_Tiles[];
extern const char mariobg_Map[];
extern const char mariobg_Pal[];
const PA_BgStruct mariobg = {
PA_BgNormal,
256, 192,
mariobg_Tiles,
mariobg_Map,
{mariobg_Pal},
11840,
{1536}
};
#include <PA_BgStruct.h>
extern const char mariobg_Tiles[];
extern const char mariobg_Map[];
extern const char mariobg_Pal[];
const PA_BgStruct mariobg = {
PA_BgNormal,
256, 192,
mariobg_Tiles,
mariobg_Map,
{mariobg_Pal},
11840,
{1536}
};

View File

@ -1,86 +1,86 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 0, 6, "Move the Stylus to move Mario");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit sprites in PAGfx
gfx[0] = PA_3DCreateTex((void*)mario_Texture, 64, 64, TEX_256COL);
PA_Load3DSpritePal(0, (void*)mario_Pal);
PA_LoadBackground(0, 3, &mariobg); // Mario background
// Create sprite...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette
128, 128); // X, Y SPRITE CENTER !
PA_3DSetSpriteWidthHeight(0, 96, 96);
s16 xangle = 0;
s16 x = 128;
while(1) {
if(!Stylus.Held) {
while(PA_3DGetSpriteAnimFrame(0) != 0){ // Wait for animation to end...
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
PA_3DStopSpriteAnim(0);
}
if(Stylus.Held) {
if(sprite3danims[0].play == 0) PA_3DStartSpriteAnim(0, 0, 3, 10); // Sprite animation !
if(Stylus.X < x-12){
while(xangle < 256) {
xangle += 16; // change angle...
PA_3DSetSpriteRotateY(0, xangle);
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
x -= 2;
}
else if(Stylus.X > x+12){
while(xangle > 0) {
xangle -= 16; // change angle...
PA_3DSetSpriteRotateY(0, xangle);
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
x += 2;
}
PA_3DSetSpriteX(0, x);
}
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 0, 6, "Move the Stylus to move Mario");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit sprites in PAGfx
gfx[0] = PA_3DCreateTex((void*)mario_Texture, 64, 64, TEX_256COL);
PA_Load3DSpritePal(0, (void*)mario_Pal);
PA_LoadBackground(0, 3, &mariobg); // Mario background
// Create sprite...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette
128, 128); // X, Y SPRITE CENTER !
PA_3DSetSpriteWidthHeight(0, 96, 96);
s16 xangle = 0;
s16 x = 128;
while(1) {
if(!Stylus.Held) {
while(PA_3DGetSpriteAnimFrame(0) != 0){ // Wait for animation to end...
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
PA_3DStopSpriteAnim(0);
}
if(Stylus.Held) {
if(sprite3danims[0].play == 0) PA_3DStartSpriteAnim(0, 0, 3, 10); // Sprite animation !
if(Stylus.X < x-12){
while(xangle < 256) {
xangle += 16; // change angle...
PA_3DSetSpriteRotateY(0, xangle);
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
x -= 2;
}
else if(Stylus.X > x+12){
while(xangle > 0) {
xangle -= 16; // change angle...
PA_3DSetSpriteRotateY(0, xangle);
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
x += 2;
}
PA_3DSetSpriteX(0, x);
}
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,19 +1,19 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char explosion_Texture[28672] _GFX_ALIGN; // Palette: explosion_Pal
// Palettes:
extern const unsigned short explosion_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char explosion_Texture[28672] _GFX_ALIGN; // Palette: explosion_Pal
// Palettes:
extern const unsigned short explosion_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif

View File

@ -1,57 +1,57 @@
/* This will show the new sprite animation functions !! Yay !
Thanks to http://www.reinerstileset.4players.de:1059/englisch.htm and Arog for the sprite ;)
*/
// Includes, only one sprite
#include <PA9.h>
// PAGfxConverter Include
#include "all_gfx.h"
s16 framecount; //Frame count...
// Main function
int main(void) {
// PAlib init
PA_Init();
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
PA_LoadDefaultText(1, 0);
// Load the sprite palette,
PA_Load3DSpritePal(0, // Palette number
(void*)explosion_Pal); // Palette name
// Here, we'll load a few similar sprites sprite to animate... at different speed
PA_3DCreateSprite(0,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 32, 96);
PA_3DCreateSprite(1,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 64+32, 96);
PA_3DCreateSprite(2,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 128+32, 96);
PA_3DCreateSprite(3,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 196+32, 96);
// Start the animation. Once started, it works on its own !
PA_3DStartSpriteAnim(0, // sprite number
0, // first frame is 0
6, // last frame is 3, since we have 4 frames...
5); // Speed, set to 5 frames per second
PA_3DStartSpriteAnim(1, 0, 6, 15); // for the second one, speed of 15 fps...
PA_3DStartSpriteAnim(2, 0, 6, 30); // for the third one, speed of 30 fps...
PA_3DStartSpriteAnim(3, 0, 6, 60); // for the last one, speed of 60 fps...
while(1)
{
PA_WaitForVBL();
PA_3DProcess(); // Update...
}
return 0;
/* This will show the new sprite animation functions !! Yay !
Thanks to http://www.reinerstileset.4players.de:1059/englisch.htm and Arog for the sprite ;)
*/
// Includes, only one sprite
#include <PA9.h>
// PAGfxConverter Include
#include "all_gfx.h"
s16 framecount; //Frame count...
// Main function
int main(void) {
// PAlib init
PA_Init();
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
PA_LoadDefaultText(1, 0);
// Load the sprite palette,
PA_Load3DSpritePal(0, // Palette number
(void*)explosion_Pal); // Palette name
// Here, we'll load a few similar sprites sprite to animate... at different speed
PA_3DCreateSprite(0,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 32, 96);
PA_3DCreateSprite(1,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 64+32, 96);
PA_3DCreateSprite(2,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 128+32, 96);
PA_3DCreateSprite(3,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 196+32, 96);
// Start the animation. Once started, it works on its own !
PA_3DStartSpriteAnim(0, // sprite number
0, // first frame is 0
6, // last frame is 3, since we have 4 frames...
5); // Speed, set to 5 frames per second
PA_3DStartSpriteAnim(1, 0, 6, 15); // for the second one, speed of 15 fps...
PA_3DStartSpriteAnim(2, 0, 6, 30); // for the third one, speed of 30 fps...
PA_3DStartSpriteAnim(3, 0, 6, 60); // for the last one, speed of 60 fps...
while(1)
{
PA_WaitForVBL();
PA_3DProcess(); // Update...
}
return 0;
}

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,19 +1,19 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char som_Texture[12288] _GFX_ALIGN; // Palette: som_Pal
// Palettes:
extern const unsigned short som_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char som_Texture[12288] _GFX_ALIGN; // Palette: som_Pal
// Palettes:
extern const unsigned short som_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif

View File

@ -1,61 +1,61 @@
/* This will show the new sprite animation functions !! Yay !
Thanks to http://www.reinerstileset.4players.de:1059/englisch.htm and Arog for the sprite ;)
*/
// Includes, only one sprite
#include <PA9.h>
// PAGfxConverter Include
#include "all_gfx.h"
s16 framecount; //Frame count...
// Main function
int main(void) {
// PAlib init
PA_Init();
PA_Init3D();
PA_Reset3DSprites();
PA_LoadDefaultText(1, 0);
PA_Load3DSpritePal(0, (void*)som_Pal); // Palette....
s32 x = 128; s32 y = 96;
PA_3DCreateSprite(0,(void*)som_Texture, 32, 32, TEX_256COL, 0, x, y); // Sprite
while(1)
{
// Animation code...
if(Pad.Newpress.Up) PA_3DStartSpriteAnim(0, 0, 3, 6);
if(Pad.Newpress.Down) PA_3DStartSpriteAnim(0, 8, 11, 6);
if(Pad.Newpress.Right) {
PA_3DStartSpriteAnim(0, 4, 7, 6);
PA_3DSetSpriteHflip(0, 0);
}
if(Pad.Newpress.Left) {
PA_3DStartSpriteAnim(0, 4, 7, 6);
PA_3DSetSpriteHflip(0, 1);
}
if(!((Pad.Held.Left)||(Pad.Held.Up)||(Pad.Held.Down)||(Pad.Held.Right))) PA_3DSpriteAnimPause(0, 1);
// Moving Code
y += Pad.Held.Down - Pad.Held.Up;
x += Pad.Held.Right - Pad.Held.Left;
PA_3DSetSpriteXY(0, x, y);
PA_WaitForVBL();
PA_3DProcess(); // Update 3D...
}
return 0;
/* This will show the new sprite animation functions !! Yay !
Thanks to http://www.reinerstileset.4players.de:1059/englisch.htm and Arog for the sprite ;)
*/
// Includes, only one sprite
#include <PA9.h>
// PAGfxConverter Include
#include "all_gfx.h"
s16 framecount; //Frame count...
// Main function
int main(void) {
// PAlib init
PA_Init();
PA_Init3D();
PA_Reset3DSprites();
PA_LoadDefaultText(1, 0);
PA_Load3DSpritePal(0, (void*)som_Pal); // Palette....
s32 x = 128; s32 y = 96;
PA_3DCreateSprite(0,(void*)som_Texture, 32, 32, TEX_256COL, 0, x, y); // Sprite
while(1)
{
// Animation code...
if(Pad.Newpress.Up) PA_3DStartSpriteAnim(0, 0, 3, 6);
if(Pad.Newpress.Down) PA_3DStartSpriteAnim(0, 8, 11, 6);
if(Pad.Newpress.Right) {
PA_3DStartSpriteAnim(0, 4, 7, 6);
PA_3DSetSpriteHflip(0, 0);
}
if(Pad.Newpress.Left) {
PA_3DStartSpriteAnim(0, 4, 7, 6);
PA_3DSetSpriteHflip(0, 1);
}
if(!((Pad.Held.Left)||(Pad.Held.Up)||(Pad.Held.Down)||(Pad.Held.Right))) PA_3DSpriteAnimPause(0, 1);
// Moving Code
y += Pad.Held.Down - Pad.Held.Up;
x += Pad.Held.Right - Pad.Held.Left;
PA_3DSetSpriteXY(0, x, y);
PA_WaitForVBL();
PA_3DProcess(); // Update 3D...
}
return 0;
}

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,19 +1,19 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char explosion_Texture[28672] _GFX_ALIGN; // Palette: explosion_Pal
// Palettes:
extern const unsigned short explosion_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char explosion_Texture[28672] _GFX_ALIGN; // Palette: explosion_Pal
// Palettes:
extern const unsigned short explosion_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif

View File

@ -1,59 +1,59 @@
/* This will show the new sprite animation functions !! Yay !
Thanks to http://www.reinerstileset.4players.de:1059/englisch.htm and Arog for the sprite ;)
*/
// Includes, only one sprite
#include <PA9.h>
// PAGfxConverter Include
#include "all_gfx.h"
s16 framecount; //Frame count...
const unsigned char explosion[28672] __attribute__ ((aligned (4)));
// Main function
int main(void) {
// PAlib init
PA_Init();
PA_Init3D();
PA_Reset3DSprites();
PA_LoadDefaultText(0, 1);
// Load the sprite palette,
PA_Load3DSpritePal(0, // Palette number
(void*)explosion_Pal); // Palette name
// Here, we'll load a few similar sprites sprite to animate... at different speed
PA_3DCreateSprite(0,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 32, 96);
PA_3DCreateSprite(1,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 96, 96);
PA_3DCreateSprite(2,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 160, 96);
PA_3DCreateSprite(3,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 224, 96);
// First animation will be normal
PA_3DStartSpriteAnim(0, // sprite number
0, // first frame is 0
6, // last frame is 3, since we have 4 frames...
5); // Speed, set to 5 frames per second
// Extended animations for the rest
PA_3DStartSpriteAnimEx(1, 0, 6, 5, ANIM_ONESHOT); // just play it once...
PA_3DStartSpriteAnimEx(2, 0, 6, 5, ANIM_UPDOWN, -1); // back and forth, infinite number of times
PA_3DStartSpriteAnimEx(3, 0, 6, 5, ANIM_LOOP, 5); // Play it 5 times
PA_OutputSimpleText(0, 0, 6, "Infinite");
PA_OutputSimpleText(0, 8, 7, "OneShot");
PA_OutputSimpleText(0, 16, 6, " UpDown");
PA_OutputSimpleText(0, 24, 7, "5 Times");
while(1)
{
PA_WaitForVBL();
PA_3DProcess();
}
return 0;
/* This will show the new sprite animation functions !! Yay !
Thanks to http://www.reinerstileset.4players.de:1059/englisch.htm and Arog for the sprite ;)
*/
// Includes, only one sprite
#include <PA9.h>
// PAGfxConverter Include
#include "all_gfx.h"
s16 framecount; //Frame count...
const unsigned char explosion[28672] __attribute__ ((aligned (4)));
// Main function
int main(void) {
// PAlib init
PA_Init();
PA_Init3D();
PA_Reset3DSprites();
PA_LoadDefaultText(0, 1);
// Load the sprite palette,
PA_Load3DSpritePal(0, // Palette number
(void*)explosion_Pal); // Palette name
// Here, we'll load a few similar sprites sprite to animate... at different speed
PA_3DCreateSprite(0,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 32, 96);
PA_3DCreateSprite(1,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 96, 96);
PA_3DCreateSprite(2,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 160, 96);
PA_3DCreateSprite(3,(void*)explosion_Texture, 64, 64, TEX_256COL, 0, 224, 96);
// First animation will be normal
PA_3DStartSpriteAnim(0, // sprite number
0, // first frame is 0
6, // last frame is 3, since we have 4 frames...
5); // Speed, set to 5 frames per second
// Extended animations for the rest
PA_3DStartSpriteAnimEx(1, 0, 6, 5, ANIM_ONESHOT); // just play it once...
PA_3DStartSpriteAnimEx(2, 0, 6, 5, ANIM_UPDOWN, -1); // back and forth, infinite number of times
PA_3DStartSpriteAnimEx(3, 0, 6, 5, ANIM_LOOP, 5); // Play it 5 times
PA_OutputSimpleText(0, 0, 6, "Infinite");
PA_OutputSimpleText(0, 8, 7, "OneShot");
PA_OutputSimpleText(0, 16, 6, " UpDown");
PA_OutputSimpleText(0, 24, 7, "5 Times");
while(1)
{
PA_WaitForVBL();
PA_3DProcess();
}
return 0;
}

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,25 +1,25 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // Palette: mollusk_Pal
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // Palette: AnarX_Pal
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // Palette: Abrexxes_Pal
extern const unsigned char pasplash_Texture[65536] _GFX_ALIGN; // Palette: pasplash_Pal
// Palettes:
extern const unsigned short mollusk_Pal[256] _GFX_ALIGN;
extern const unsigned short AnarX_Pal[256] _GFX_ALIGN;
extern const unsigned short Abrexxes_Pal[256] _GFX_ALIGN;
extern const unsigned short pasplash_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // Palette: mollusk_Pal
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // Palette: AnarX_Pal
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // Palette: Abrexxes_Pal
extern const unsigned char pasplash_Texture[65536] _GFX_ALIGN; // Palette: pasplash_Pal
// Palettes:
extern const unsigned short mollusk_Pal[256] _GFX_ALIGN;
extern const unsigned short AnarX_Pal[256] _GFX_ALIGN;
extern const unsigned short Abrexxes_Pal[256] _GFX_ALIGN;
extern const unsigned short pasplash_Pal[256] _GFX_ALIGN;
#ifdef __cplusplus
}
#endif

View File

@ -1,73 +1,73 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[4];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 2, "3DSprites Example : Alpha");
// First, create the gfx with the corresponding images and sizes. Images converted as 256colors textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_256COL ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_256COL);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_256COL);
gfx[3] = PA_3DCreateTex((void*)pasplash_Texture, 256, 256, TEX_256COL);
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)mollusk_Pal); // Palette
PA_Load3DSpritePal(1, (void*)AnarX_Pal);
PA_Load3DSpritePal(2, (void*)Abrexxes_Pal);
PA_Load3DSpritePal(3, (void*)pasplash_Pal);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette, unused in 16bit...
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 1, 64, 64);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 2, 96, 96);
PA_3DCreateSpriteFromTex(3, gfx[3], 256, 256, 3, 128, 96);
PA_3DSetSpritePrio(3, 800);
// Different alpha levels for the 3 sprites
PA_3DSetSpriteAlpha(0, 15);
PA_3DSetSpriteAlpha(1, 10);
PA_3DSetSpriteAlpha(2, 5);
PA_3DSetSpriteAlpha(2, 16);
u8 i;
for(i = 0; i < 4; i++) PA_3DSetSpritePolyID(i, i); // Set a different polyID for each sprite (0-63 values)
while(1) {
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[4];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 2, "3DSprites Example : Alpha");
// First, create the gfx with the corresponding images and sizes. Images converted as 256colors textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_256COL ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_256COL);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_256COL);
gfx[3] = PA_3DCreateTex((void*)pasplash_Texture, 256, 256, TEX_256COL);
// Load the Palettes !
PA_Load3DSpritePal(0, // Slot
(void*)mollusk_Pal); // Palette
PA_Load3DSpritePal(1, (void*)AnarX_Pal);
PA_Load3DSpritePal(2, (void*)Abrexxes_Pal);
PA_Load3DSpritePal(3, (void*)pasplash_Pal);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette, unused in 16bit...
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 1, 64, 64);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 2, 96, 96);
PA_3DCreateSpriteFromTex(3, gfx[3], 256, 256, 3, 128, 96);
PA_3DSetSpritePrio(3, 800);
// Different alpha levels for the 3 sprites
PA_3DSetSpriteAlpha(0, 15);
PA_3DSetSpriteAlpha(1, 10);
PA_3DSetSpriteAlpha(2, 5);
PA_3DSetSpriteAlpha(2, 16);
u8 i;
for(i = 0; i < 4; i++) PA_3DSetSpritePolyID(i, i); // Set a different polyID for each sprite (0-63 values)
while(1) {
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,18 +1,18 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif

View File

@ -1,54 +1,54 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 0, 6, "Touch one of the screen corners to move the sprite corners...");
// Create 3 sprites...
PA_3DCreateSprite(0, // Sprite number
(void*)mollusk_Texture,
64, 64, // Width, Height
TEX_16BITS,
0, // Palette, unused in 16bit...
128, 96); // X, Y SPRITE CENTER !
while(1) {
if(Stylus.Held) {
if((Stylus.X < 128)&&(Stylus.Y < 96)) PA_3DSetSpriteTopLeft(0, Stylus.X - (128-32), Stylus.Y - (96-32)); // Top left corner change
if((Stylus.X > 128)&&(Stylus.Y < 96)) PA_3DSetSpriteTopRight(0, Stylus.X - (128+32), Stylus.Y - (96-32)); // Top left corner change
if((Stylus.X < 128)&&(Stylus.Y > 96)) PA_3DSetSpriteBottomLeft(0, Stylus.X - (128-32), Stylus.Y - (96+32)); // Top left corner change
if((Stylus.X > 128)&&(Stylus.Y > 96)) PA_3DSetSpriteBottomRight(0, Stylus.X - (128+32), Stylus.Y - (96+32)); // Top left corner change
}
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 0, 6, "Touch one of the screen corners to move the sprite corners...");
// Create 3 sprites...
PA_3DCreateSprite(0, // Sprite number
(void*)mollusk_Texture,
64, 64, // Width, Height
TEX_16BITS,
0, // Palette, unused in 16bit...
128, 96); // X, Y SPRITE CENTER !
while(1) {
if(Stylus.Held) {
if((Stylus.X < 128)&&(Stylus.Y < 96)) PA_3DSetSpriteTopLeft(0, Stylus.X - (128-32), Stylus.Y - (96-32)); // Top left corner change
if((Stylus.X > 128)&&(Stylus.Y < 96)) PA_3DSetSpriteTopRight(0, Stylus.X - (128+32), Stylus.Y - (96-32)); // Top left corner change
if((Stylus.X < 128)&&(Stylus.Y > 96)) PA_3DSetSpriteBottomLeft(0, Stylus.X - (128-32), Stylus.Y - (96+32)); // Top left corner change
if((Stylus.X > 128)&&(Stylus.Y > 96)) PA_3DSetSpriteBottomRight(0, Stylus.X - (128+32), Stylus.Y - (96+32)); // Top left corner change
}
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,21 +1,21 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk0_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char mollusk1_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char mollusk2_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char mollusk3_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk0_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char mollusk1_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char mollusk2_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char mollusk3_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif

View File

@ -1,53 +1,53 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 0, 8, "Touch to deform ^^ Doesn't look as good as expected though");
// Create 3 sprites...
PA_3DCreateSprite(0, (void*)mollusk0_Texture,64, 64, TEX_16BITS, 0, 128-32, 96-32); // X, Y SPRITE CENTER !
PA_3DCreateSprite(1, (void*)mollusk1_Texture,64, 64, TEX_16BITS, 0, 128+32, 96-32); // X, Y SPRITE CENTER !
PA_3DCreateSprite(2, (void*)mollusk2_Texture,64, 64, TEX_16BITS, 0, 128-32, 96+32); // X, Y SPRITE CENTER !
PA_3DCreateSprite(3, (void*)mollusk3_Texture,64, 64, TEX_16BITS, 0, 128+32, 96+32); // X, Y SPRITE CENTER !
while(1) {
if((Stylus.Held)) { // in the center part
PA_3DSetSpriteBottomRight(0, Stylus.X - 128, Stylus.Y - 96);
PA_3DSetSpriteBottomLeft(1, Stylus.X - 128, Stylus.Y - 96);
PA_3DSetSpriteTopRight(2, Stylus.X - 128, Stylus.Y - 96);
PA_3DSetSpriteTopLeft(3, Stylus.X - 128, Stylus.Y - 96);
}
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0, Init 3D...
PA_Reset3DSprites(); // Init or Reset 3D Sprites
// Initialise the text system on the top screen
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 0, 8, "Touch to deform ^^ Doesn't look as good as expected though");
// Create 3 sprites...
PA_3DCreateSprite(0, (void*)mollusk0_Texture,64, 64, TEX_16BITS, 0, 128-32, 96-32); // X, Y SPRITE CENTER !
PA_3DCreateSprite(1, (void*)mollusk1_Texture,64, 64, TEX_16BITS, 0, 128+32, 96-32); // X, Y SPRITE CENTER !
PA_3DCreateSprite(2, (void*)mollusk2_Texture,64, 64, TEX_16BITS, 0, 128-32, 96+32); // X, Y SPRITE CENTER !
PA_3DCreateSprite(3, (void*)mollusk3_Texture,64, 64, TEX_16BITS, 0, 128+32, 96+32); // X, Y SPRITE CENTER !
while(1) {
if((Stylus.Held)) { // in the center part
PA_3DSetSpriteBottomRight(0, Stylus.X - 128, Stylus.Y - 96);
PA_3DSetSpriteBottomLeft(1, Stylus.X - 128, Stylus.Y - 96);
PA_3DSetSpriteTopRight(2, Stylus.X - 128, Stylus.Y - 96);
PA_3DSetSpriteTopLeft(3, Stylus.X - 128, Stylus.Y - 96);
}
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,18 +1,18 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif

View File

@ -1,54 +1,54 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 0, 6, "Move the Sprite with the stylus");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit sprites in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, 64, 64, TEX_16BITS);
// Create 4 sprites for the different flips......
PA_3DCreateSpriteFromTex(0, gfx[0], 64, 64, 0, 80, 48); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[0], 64, 64, 0, 80+96, 48); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(2, gfx[0], 64, 64, 0, 80, 80+64); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(3, gfx[0], 64, 64, 0, 80+96, 80+64); // X, Y SPRITE CENTER !
// Set the flips
PA_3DSetSpriteHflip(0, 0); PA_3DSetSpriteVflip(0, 0);
PA_3DSetSpriteHflip(1, 1); PA_3DSetSpriteVflip(1, 0);
PA_3DSetSpriteHflip(2, 0); PA_3DSetSpriteVflip(2, 1);
PA_3DSetSpriteHflip(3, 1); PA_3DSetSpriteVflip(3, 1);
while(1) {
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 0, 6, "Move the Sprite with the stylus");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit sprites in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, 64, 64, TEX_16BITS);
// Create 4 sprites for the different flips......
PA_3DCreateSpriteFromTex(0, gfx[0], 64, 64, 0, 80, 48); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[0], 64, 64, 0, 80+96, 48); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(2, gfx[0], 64, 64, 0, 80, 80+64); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(3, gfx[0], 64, 64, 0, 80+96, 80+64); // X, Y SPRITE CENTER !
// Set the flips
PA_3DSetSpriteHflip(0, 0); PA_3DSetSpriteVflip(0, 0);
PA_3DSetSpriteHflip(1, 1); PA_3DSetSpriteVflip(1, 0);
PA_3DSetSpriteHflip(2, 0); PA_3DSetSpriteVflip(2, 1);
PA_3DSetSpriteHflip(3, 1); PA_3DSetSpriteVflip(3, 1);
while(1) {
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../../Makefile_example
include ../../../../Makefile_example

View File

@ -1,18 +1,18 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif

View File

@ -1,56 +1,56 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 6, "Touch the screen to resize !");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, 64, 64, TEX_16BITS);
// Create sprite...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette
128, 96); // X, Y SPRITE CENTER !
while(1) {
if(Stylus.Held){ // Resize if held...
if(Stylus.X >= 128) PA_3DSetSpriteWidth(0, (Stylus.X-128)*2);
else PA_3DSetSpriteWidth(0, (128-Stylus.X)*2);
if(Stylus.Y >= 96) PA_3DSetSpriteHeight(0, (Stylus.Y-96)*2);
else PA_3DSetSpriteHeight(0, (96-Stylus.Y)*2);
}
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 6, "Touch the screen to resize !");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, 64, 64, TEX_16BITS);
// Create sprite...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette
128, 96); // X, Y SPRITE CENTER !
while(1) {
if(Stylus.Held){ // Resize if held...
if(Stylus.X >= 128) PA_3DSetSpriteWidth(0, (Stylus.X-128)*2);
else PA_3DSetSpriteWidth(0, (128-Stylus.X)*2);
if(Stylus.Y >= 96) PA_3DSetSpriteHeight(0, (Stylus.Y-96)*2);
else PA_3DSetSpriteHeight(0, (96-Stylus.Y)*2);
}
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../../Makefile_example
include ../../../../Makefile_example

View File

@ -1,20 +1,20 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif

View File

@ -1,64 +1,64 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 6, "3D Sprite Rotation !");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, 64, 64, TEX_16BITS);
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_16BITS);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_16BITS);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 0, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 0, 160, 96+64);
u16 rot = 0;
while(1) {
rot += 4; // add to angle...
rot &= 511; // limit range to 0-511...
PA_3DSetSpriteRotate(0, rot); // Sprite, angle (0-511)
PA_3DSetSpriteRotate(1, -rot); // Other way around
PA_3DSetSpriteRotate(2, rot*2); // Twice as fast
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 6, "3D Sprite Rotation !");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, 64, 64, TEX_16BITS);
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_16BITS);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_16BITS);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 0, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 0, 160, 96+64);
u16 rot = 0;
while(1) {
rot += 4; // add to angle...
rot &= 511; // limit range to 0-511...
PA_3DSetSpriteRotate(0, rot); // Sprite, angle (0-511)
PA_3DSetSpriteRotate(1, -rot); // Other way around
PA_3DSetSpriteRotate(2, rot*2); // Twice as fast
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../../Makefile_example
include ../../../../Makefile_example

View File

@ -1,20 +1,20 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif

View File

@ -1,64 +1,64 @@
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 6, "3D Sprite Rotations Revisited ^^");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, 64, 64, TEX_16BITS);
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_16BITS);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_16BITS);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 0, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 0, 160, 96+64);
u16 rot = 0;
while(1) {
rot += 4; // add to angle...
rot &= 511; // limit range to 0-511...
// if(Stylus.Held) PA_3DSetSpriteXY(0, Stylus.X, Stylus.Y);
PA_3DSetSpriteRotateX(0, rot); // Xrot
PA_3DSetSpriteRotateY(1, rot); // Yrot
PA_3DSetSpriteRotateXYZ(2, rot, rot, rot); // Let's do triple rotation and see what it does ^^
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
/*
// 3DCreateSprite
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
u16 gfx[3];
// Function: main()
int main()
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 6, "3D Sprite Rotations Revisited ^^");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, 64, 64, TEX_16BITS);
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_16BITS);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_16BITS);
// Create 3 sprites...
PA_3DCreateSpriteFromTex(0, // Sprite number
gfx[0], // Gfx...
64, 64, // Width, Height
0, // Palette
32, 32); // X, Y SPRITE CENTER !
PA_3DCreateSpriteFromTex(1, gfx[1], 64, 64, 0, 96, 96);
PA_3DCreateSpriteFromTex(2, gfx[2], 64, 64, 0, 160, 96+64);
u16 rot = 0;
while(1) {
rot += 4; // add to angle...
rot &= 511; // limit range to 0-511...
// if(Stylus.Held) PA_3DSetSpriteXY(0, Stylus.X, Stylus.Y);
PA_3DSetSpriteRotateX(0, rot); // Xrot
PA_3DSetSpriteRotateY(1, rot); // Yrot
PA_3DSetSpriteRotateXYZ(2, rot, rot, rot); // Let's do triple rotation and see what it does ^^
PA_WaitForVBL();
PA_3DProcess(); // Update sprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../Makefile_example
include ../../Makefile_example

View File

@ -1,20 +1,20 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Sprites:
extern const unsigned char mollusk_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char AnarX_Texture[4096] _GFX_ALIGN; // 16bit texture
extern const unsigned char Abrexxes_Texture[4096] _GFX_ALIGN; // 16bit texture
// Palettes:
#ifdef __cplusplus
}
#endif

View File

@ -1,89 +1,89 @@
/*
// 3D Sprite Moving example...
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
#define N_SPRITES 128 // Number of sprites in the example
u16 gfx[3];
typedef struct{
s32 x, y, vx, vy;
} spritepos;
spritepos sprites[1024]; // Let's manage the sprite positions ^^
// Function: main()
int main(void)
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 6, " 3d Sprite Example, 1024 64x64sprites resized to 16x16 and moving around !");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_16BITS ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_16BITS);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_16BITS);
s32 i;
u16 angle;
for(i = 0; i < N_SPRITES; i++) {
sprites[i].x = ((i&31)<<4);
sprites[i].y = ((i>>5)<<4)-32;
PA_3DCreateSpriteFromTex(i, // Sprite number
gfx[PA_Rand()%3], // Gfx, random one :p
64, 64, // Width, Height
0, // Palette
sprites[i].x, sprites[i].y); // X, Y
PA_3DSetSpriteWidthHeight(i, 16, 16); // Resize to way smaller ^^
angle = PA_Rand()&511; // random angle
sprites[i].vx = PA_Cos(angle)>>7;
sprites[i].vy = -PA_Sin(angle)>>7;
}
PA_SwitchScreens(); // Put the 3D on top
PA_SetKeyboardScreen(1); // Top screen
PA_LoadDefaultKeyboard(1); // Bg 1
PA_WaitForVBL();
PA_3DProcess(); // Update 3DSprites
PA_KeyboardIn(16, 192-104); // Scroll in
while(1) {
for(i = 0; i < N_SPRITES; i++){ // Move them around and change speed if touches screen
sprites[i].x += sprites[i].vx;
if(((sprites[i].x <= 8)&&(sprites[i].vx < 0))||((sprites[i].x>=255-8)&&(sprites[i].vx > 0))) sprites[i].vx = -sprites[i].vx;
sprites[i].y += sprites[i].vy;
if(((sprites[i].y <= 8)&&(sprites[i].vy < 0))||((sprites[i].y>=191-8)&&(sprites[i].vy > 0))) sprites[i].vy = -sprites[i].vy;
PA_3DSetSpriteXY(i, sprites[i].x, sprites[i].y); // Set new position
}
PA_CheckKeyboard();
PA_WaitForVBL();
PA_3DProcess(); // Update 3DSprites
}
return 0;
} // End of main()
/*
// 3D Sprite Moving example...
*/
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
#define N_SPRITES 128 // Number of sprites in the example
u16 gfx[3];
typedef struct{
s32 x, y, vx, vy;
} spritepos;
spritepos sprites[1024]; // Let's manage the sprite positions ^^
// Function: main()
int main(void)
{
PA_Init(); // Initializes PA_Lib
PA_Init3D(); // Uses Bg0
PA_Reset3DSprites();
// Initialise the text system on the top screen
PA_LoadDefaultText(0, 1);
PA_LoadDefaultText(1, 1); // Initialise the text system on the top screen
PA_OutputSimpleText(1, 2, 6, " 3d Sprite Example, 1024 64x64sprites resized to 16x16 and moving around !");
// First, create the gfx with the corresponding images and sizes. Images converted as 16bit textures in PAGfx
gfx[0] = PA_3DCreateTex((void*)mollusk_Texture, // Texture
64, 64, // Width, Height
TEX_16BITS ); // Texture Format
gfx[1] = PA_3DCreateTex((void*)AnarX_Texture, 64, 64, TEX_16BITS);
gfx[2] = PA_3DCreateTex((void*)Abrexxes_Texture, 64, 64, TEX_16BITS);
s32 i;
u16 angle;
for(i = 0; i < N_SPRITES; i++) {
sprites[i].x = ((i&31)<<4);
sprites[i].y = ((i>>5)<<4)-32;
PA_3DCreateSpriteFromTex(i, // Sprite number
gfx[PA_Rand()%3], // Gfx, random one :p
64, 64, // Width, Height
0, // Palette
sprites[i].x, sprites[i].y); // X, Y
PA_3DSetSpriteWidthHeight(i, 16, 16); // Resize to way smaller ^^
angle = PA_Rand()&511; // random angle
sprites[i].vx = PA_Cos(angle)>>7;
sprites[i].vy = -PA_Sin(angle)>>7;
}
PA_SwitchScreens(); // Put the 3D on top
PA_SetKeyboardScreen(1); // Top screen
PA_LoadDefaultKeyboard(1); // Bg 1
PA_WaitForVBL();
PA_3DProcess(); // Update 3DSprites
PA_KeyboardIn(16, 192-104); // Scroll in
while(1) {
for(i = 0; i < N_SPRITES; i++){ // Move them around and change speed if touches screen
sprites[i].x += sprites[i].vx;
if(((sprites[i].x <= 8)&&(sprites[i].vx < 0))||((sprites[i].x>=255-8)&&(sprites[i].vx > 0))) sprites[i].vx = -sprites[i].vx;
sprites[i].y += sprites[i].vy;
if(((sprites[i].y <= 8)&&(sprites[i].vy < 0))||((sprites[i].y>=191-8)&&(sprites[i].vy > 0))) sprites[i].vy = -sprites[i].vy;
PA_3DSetSpriteXY(i, sprites[i].x, sprites[i].y); // Set new position
}
PA_CheckKeyboard();
PA_WaitForVBL();
PA_3DProcess(); // Update 3DSprites
}
return 0;
} // End of main()

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,18 +1,18 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Backgrounds:
extern const PA_BgStruct bg0;
// Palettes:
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Backgrounds:
extern const PA_BgStruct bg0;
// Palettes:
#ifdef __cplusplus
}
#endif

View File

@ -1,17 +1,17 @@
#include <PA_BgStruct.h>
extern const char bg0_Tiles[];
extern const char bg0_Map[];
extern const char bg0_Pal[];
const PA_BgStruct bg0 = {
PA_BgNormal,
256, 192,
bg0_Tiles,
bg0_Map,
{bg0_Pal},
12352,
{1536}
};
#include <PA_BgStruct.h>
extern const char bg0_Tiles[];
extern const char bg0_Map[];
extern const char bg0_Pal[];
const PA_BgStruct bg0 = {
PA_BgNormal,
256, 192,
bg0_Tiles,
bg0_Map,
{bg0_Pal},
12352,
{1536}
};

View File

@ -1,27 +1,27 @@
// Includes
#include <PA9.h>
// Converted using PAGfx
#include "all_gfx.h"
int main(){
PA_Init();
PA_LoadDefaultText(1, 0);
// Load Backgrounds with their palettes !
PA_LoadBackground(0, // screen
3, // background number (0-3)
&bg0); // Background name, used by PAGfx...
PA_OutputSimpleText(1, 2, 10, "Touch the screen to display the color on top screen");
// Infinite loop to keep the program running
while(true){
PA_OutputText(1, 2, 5, "Palette Color : %d ", PA_EasyBgGetPixel(0, 3, Stylus.X, Stylus.Y)); // Screen, Bg_number, X/Y position
// Returns the palette number (0-255)
PA_SetBgColor(1, PA_EasyBgGetPixelCol(0, 3, Stylus.X, Stylus.Y)); // Same thing, but returns Color value...
PA_WaitForVBL();
}
// Includes
#include <PA9.h>
// Converted using PAGfx
#include "all_gfx.h"
int main(){
PA_Init();
PA_LoadDefaultText(1, 0);
// Load Backgrounds with their palettes !
PA_LoadBackground(0, // screen
3, // background number (0-3)
&bg0); // Background name, used by PAGfx...
PA_OutputSimpleText(1, 2, 10, "Touch the screen to display the color on top screen");
// Infinite loop to keep the program running
while(true){
PA_OutputText(1, 2, 5, "Palette Color : %d ", PA_EasyBgGetPixel(0, 3, Stylus.X, Stylus.Y)); // Screen, Bg_number, X/Y position
// Returns the palette number (0-255)
PA_SetBgColor(1, PA_EasyBgGetPixelCol(0, 3, Stylus.X, Stylus.Y)); // Same thing, but returns Color value...
PA_WaitForVBL();
}
}

View File

@ -1 +1 @@
include ../../../Makefile_example
include ../../../Makefile_example

View File

@ -1,18 +1,18 @@
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Backgrounds:
extern const PA_BgStruct zelda;
// Palettes:
#ifdef __cplusplus
}
#endif
// Graphics converted using PAGfx by Mollusk.
#pragma once
#include <PA_BgStruct.h>
#ifdef __cplusplus
extern "C"{
#endif
// Backgrounds:
extern const PA_BgStruct zelda;
// Palettes:
#ifdef __cplusplus
}
#endif

View File

@ -1,17 +1,17 @@
#include <PA_BgStruct.h>
extern const char zelda_Tiles[];
extern const char zelda_Map[];
extern const char zelda_Pal[];
const PA_BgStruct zelda = {
PA_BgLarge,
2048, 2048,
zelda_Tiles,
zelda_Map,
{zelda_Pal},
15552,
{131072}
};
#include <PA_BgStruct.h>
extern const char zelda_Tiles[];
extern const char zelda_Map[];
extern const char zelda_Pal[];
const PA_BgStruct zelda = {
PA_BgLarge,
2048, 2048,
zelda_Tiles,
zelda_Map,
{zelda_Pal},
15552,
{131072}
};

Some files were not shown because too many files have changed in this diff Show More