hell I dont even know wat the GC runs on
I've got an idea. There'll be be function probably(ie. you can't write loadobject["obj"] you'll have to load everything directyly into memory.
You can't put a file alongside with your game (on the GBA, you had to get aspecial program that writes out the code to fill an array with your image, then you have to fill the screen array with this image).
It'll be very hard. And very tedious.
Here's a short example program that draws a picture to the screen. Inside ppic.h is a big c eqivalent on
data definitions ["data 1,1,1 etc].
This is modified from an exmaple preogram from a web site I can't remember:
typedef unsigned short u16; // two type definitions
typedef unsigned long u32;
#include "keypad.h" //keypad definitions
#include "ppic.h"
#include "pdt.h"
#define REG_DISPCNT *(u32*)0x4000000
#define MODE_4 0x4
#define BG2_ENABLE 0x400
#define RGB16(r,g,b) ((r)+(g<<5)+(b<<10))
u16* paletteMem = (u16*)0x5000000; //PalMemory is 256 16 bit BGR values
u16* videoBuffer = (u16*)0x6000000; // video memory
void PlotPixel(int x,int y, unsigned short int c)
{
videoBuffer[(y) *120 + (x)] = (c);
}
int main(void)
{
int x, y, blockX, blockY, loop, intro; // variables
REG_DISPCNT = MODE_4 | BG2_ENABLE; // switch to mode4
for(loop = 0; loop < 256; loop++) // copy palette to memory
paletteMem[loop] = dtPalette[loop];
for(intro = 0; intro < 120; loop++) // run for a a few secs at 50fps
{
// draw the picture
for(y = 0; y < 160; y++)
{
for(x = 0; x < 120; x++)
{
PlotPixel(x,y,dtData[y*120+x]);
}
}
PlotPixel(intro,1,RGB16(y,31,0));
}
for(loop = 0; loop < 256; loop++) // copy palette (main menu) to memory
paletteMem[loop] = picPalette[loop];
while (1) // run forever
{
// draw the picture
for(y = 0; y < 160; y++)
{
for(x = 0; x < 120; x++)
{
PlotPixel(x,y,picData[y*120+x]);
}
}
}
return 0;
}
You are the
th person to view this signature.
GRAVITY: I fought the law but the law won