Browse Source

First commit, 1.0 RC1

master
asciikierka 10 years ago
commit
3fd21ee002

+ 0
- 0
README.txt View File


BIN
data/DSding.raw View File


BIN
data/DSkill.raw View File


BIN
data/DSload.raw View File


BIN
data/DSnew.raw View File


+ 3
- 0
include/DSding_raw.h View File

@@ -0,0 +1,3 @@
extern const u8 DSding_raw_end[];
extern const u8 DSding_raw[];
extern const u32 DSding_raw_size;

+ 3
- 0
include/DSkill_raw.h View File

@@ -0,0 +1,3 @@
extern const u8 DSkill_raw_end[];
extern const u8 DSkill_raw[];
extern const u32 DSkill_raw_size;

+ 3
- 0
include/DSload_raw.h View File

@@ -0,0 +1,3 @@
extern const u8 DSload_raw_end[];
extern const u8 DSload_raw[];
extern const u32 DSload_raw_size;

+ 3
- 0
include/DSnew_raw.h View File

@@ -0,0 +1,3 @@
extern const u8 DSnew_raw_end[];
extern const u8 DSnew_raw[];
extern const u32 DSnew_raw_size;

+ 28
- 0
include/tileedit.h View File

@@ -0,0 +1,28 @@

//{{BLOCK(tileedit)

//======================================================================
//
// tileedit, 216x8@4,
// + palette 16 entries, not compressed
// + 27 tiles not compressed
// Total size: 32 + 864 = 896
//
// Time-stamp: 2007-09-19, 10:12:11
// Exported by Cearn's GBA Image Transmogrifier
// ( http://www.coranac.com )
//
//======================================================================

#ifndef __TILEEDIT__
#define __TILEEDIT__

#define tileeditPalLen 32
extern const unsigned short tileeditPal[16];

#define tileeditTilesLen 864
extern const unsigned short tileeditTiles[432];

#endif // __TILEEDIT__

//}}BLOCK(tileedit)

+ 2
- 0
include/tonc_memfunc.h View File

@@ -0,0 +1,2 @@
extern "C" void memcpy32(void *dst, const void *src, u32 wdcount);
extern "C" void memset32(void *dst, u32 src, u32 wdn);

+ 32
- 0
include/wireworldTS.h View File

@@ -0,0 +1,32 @@

//{{BLOCK(wireworldTS)

//======================================================================
//
// wireworldTS, 256x192@4,
// + palette 16 entries, not compressed
// + 109 tiles (t|f|p reduced) not compressed
// + regular map (flat), not compressed, 32x24
// Total size: 32 + 3488 + 1536 = 5056
//
// Time-stamp: 2008-05-02, 18:58:34
// Exported by Cearn's GBA Image Transmogrifier
// ( http://www.coranac.com )
//
//======================================================================

#ifndef __WIREWORLDTS__
#define __WIREWORLDTS__

#define wireworldTSPalLen 32
extern const unsigned int wireworldTSPal[8];

#define wireworldTSTilesLen 3488
extern const unsigned int wireworldTSTiles[872];

#define wireworldTSMapLen 1536
extern const unsigned int wireworldTSMap[384];

#endif // __WIREWORLDTS__

//}}BLOCK(wireworldTS)

+ 32
- 0
include/wireworld_controls.h View File

@@ -0,0 +1,32 @@

//{{BLOCK(wireworld_controls)

//======================================================================
//
// wireworld_controls, 256x192@4,
// + palette 16 entries, not compressed
// + 99 tiles (t|f|p reduced) not compressed
// + regular map (flat), not compressed, 32x24
// Total size: 32 + 3168 + 1536 = 4736
//
// Time-stamp: 2007-09-19, 18:14:40
// Exported by Cearn's GBA Image Transmogrifier
// ( http://www.coranac.com )
//
//======================================================================

#ifndef __WIREWORLD_CONTROLS__
#define __WIREWORLD_CONTROLS__

#define wireworld_controlsPalLen 32
extern const unsigned short wireworld_controlsPal[16];

#define wireworld_controlsTilesLen 3168
extern const unsigned short wireworld_controlsTiles[1584];

#define wireworld_controlsMapLen 1536
extern const unsigned short wireworld_controlsMap[768];

#endif // __WIREWORLD_CONTROLS__

//}}BLOCK(wireworld_controls)

BIN
old/0.6.zip View File


+ 87
- 0
source/tileedit.c View File

@@ -0,0 +1,87 @@

//{{BLOCK(tileedit)

//======================================================================
//
// tileedit, 216x8@4,
// + palette 16 entries, not compressed
// + 27 tiles not compressed
// Total size: 32 + 864 = 896
//
// Time-stamp: 2007-09-19, 10:12:11
// Exported by Cearn's GBA Image Transmogrifier
// ( http://www.coranac.com )
//
//======================================================================

const unsigned short tileeditPal[16]=
{
0x0000,0x26C4,0x2108,0x7D4A,0x3DEF,0x5AD6,0x107D,0x001F,
0x233F,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,
};

const unsigned short tileeditTiles[432]=
{
0x3333,0x0333,0x3333,0x0333,0x3333,0x0333,0x3333,0x0333,
0x3333,0x0333,0x3333,0x0333,0x3333,0x0333,0x0000,0x0000,
0x7777,0x0777,0x7777,0x0777,0x7777,0x0777,0x7777,0x0777,
0x7777,0x0777,0x7777,0x0777,0x7777,0x0777,0x0000,0x0000,
0x8888,0x0888,0x8888,0x0888,0x8888,0x0888,0x8888,0x0888,
0x8888,0x0888,0x8888,0x0888,0x8888,0x0888,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,

0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2226,0x2422,0x2262,0x2422,0x2622,0x2422,0x6222,0x2422,
0x2222,0x2426,0x2222,0x2422,0x4444,0x2444,0x2222,0x2222,
0x3333,0x2433,0x3333,0x2433,0x3333,0x2433,0x3333,0x2433,
0x3333,0x2433,0x3333,0x2433,0x4444,0x2444,0x2222,0x2222,
0x0000,0x2400,0x0000,0x2400,0x0000,0x2400,0x0000,0x2400,
0x0000,0x2400,0x0000,0x2400,0x4444,0x2444,0x2222,0x2222,

0x7777,0x2477,0x7777,0x2477,0x7777,0x2477,0x7777,0x2477,
0x7777,0x2477,0x7777,0x2477,0x4444,0x2444,0x2222,0x2222,
0x8888,0x2488,0x8888,0x2488,0x8888,0x2488,0x8888,0x2488,
0x8888,0x2488,0x8888,0x2488,0x4444,0x2444,0x2222,0x2222,
0x2222,0x2222,0x4442,0x4444,0x2242,0x2222,0x2242,0x2222,
0x2242,0x2222,0x2242,0x2222,0x2242,0x2222,0x2242,0x2222,
0x2222,0x2222,0x4444,0x2444,0x2222,0x2411,0x2222,0x2411,
0x2222,0x2411,0x1222,0x2421,0x1222,0x2421,0x1122,0x2422,

0x1142,0x2222,0x1142,0x2222,0x1242,0x2221,0x2242,0x2211,
0x2242,0x1112,0x2242,0x1122,0x4442,0x4444,0x2222,0x2222,
0x2112,0x2422,0x2112,0x2422,0x2211,0x2422,0x2211,0x2422,
0x2221,0x2422,0x2222,0x2422,0x4444,0x2444,0x2222,0x2222,
0x2222,0x2222,0x4442,0x4444,0x2242,0x2222,0x0242,0x0000,
0x0242,0x9999,0x0242,0x9999,0x0242,0x9999,0x0242,0x9999,
0x2222,0x2222,0x4444,0x2444,0x2222,0x2422,0x2200,0x2422,
0x2099,0x2422,0x0999,0x2422,0x9999,0x2420,0x9999,0x2420,

0x2222,0x2222,0x4442,0x4444,0x2242,0x2222,0x2242,0x2222,
0x2242,0x0022,0x2242,0x5502,0x2242,0x5550,0x2242,0x0550,
0x0242,0x2055,0x0242,0x2055,0x0242,0x2066,0x0242,0x2066,
0x0242,0x2000,0x2242,0x2222,0x4442,0x4444,0x2222,0x2222,
0x5502,0x2420,0x5502,0x2420,0x3302,0x2420,0x3302,0x2420,
0x0002,0x2420,0x2222,0x2422,0x4444,0x2444,0x2222,0x2222,
0x3333,0x2933,0x3333,0x2933,0x3333,0x2933,0x3333,0x2933,
0x3333,0x2933,0x3333,0x2933,0x9999,0x2999,0x2222,0x2222,

0x0000,0x2900,0x0000,0x2900,0x0000,0x2900,0x0000,0x2900,
0x0000,0x2900,0x0000,0x2900,0x9999,0x2999,0x2222,0x2222,
0x7777,0x2977,0x7777,0x2977,0x7777,0x2977,0x7777,0x2977,
0x7777,0x2977,0x7777,0x2977,0x9999,0x2999,0x2222,0x2222,
0x8888,0x2988,0x8888,0x2988,0x8888,0x2988,0x8888,0x2988,
0x8888,0x2988,0x8888,0x2988,0x9999,0x2999,0x2222,0x2222,
0x2222,0x2222,0x4442,0x4444,0x2242,0x2222,0x2242,0x2222,
0x2242,0x2952,0x2242,0x9522,0x2242,0x5222,0x2242,0x2222,

0x2222,0x2222,0x4444,0x2444,0x2222,0x2422,0x2222,0x2422,
0x2222,0x2422,0x2222,0x2422,0x2229,0x2422,0x2295,0x2422,
0x2222,0x2222,0x4442,0x4444,0x2242,0x2222,0x2242,0x2222,
0x2242,0x2229,0x2242,0x2292,0x2242,0x2922,0x2242,0x9222,
0x2222,0x2222,0x4444,0x2444,0x2222,0x2422,0x2222,0x2422,
0x2292,0x2422,0x2922,0x2422,0x9222,0x2422,0x2222,0x2429,
};

//}}BLOCK(tileedit)

+ 58
- 0
source/tonc_memfunc.s View File

@@ -0,0 +1,58 @@
@ === void memcpy32(void *dst, const void *src, u32 wdcount) CODE_IN_IWRAM; =============
@ r0, r1: dst, src
@ r2: wdcount, then wdcount>>3
@ r3-r10: data buffer
@ r12: wdn&7
.align 2
.code 32
.global memcpy32
memcpy32:
and r12, r2, #7 @ r12= residual word count
movs r2, r2, lsr #3 @ r2=block count
beq .Lres_cpy32
push {r4-r10}
@ Copy 32byte chunks with 8fold xxmia
@ r2 in [1,inf>
.Lmain_cpy32:
ldmia r1!, {r3-r10}
stmia r0!, {r3-r10}
subs r2, #1
bne .Lmain_cpy32
pop {r4-r10}
@ And the residual 0-7 words. r12 in [0,7]
.Lres_cpy32:
subs r12, #1
ldrcs r3, [r1], #4
strcs r3, [r0], #4
bcs .Lres_cpy32
bx lr

@ === void memset32(void *dst, u32 src, u32 wdn); =====================
.align 2
.code 32
.global memset32
memset32:
and r12, r2, #7
movs r2, r2, lsr #3
beq .Lres_set32
push {r4-r10}
@ set 32byte chunks with 8fold xxmia
mov r3, r1
mov r4, r1
mov r5, r1
mov r6, r1
mov r7, r1
mov r8, r1
mov r9, r1
mov r10, r1
.Lmain_set32:
stmia r0!, {r3-r10}
subs r2, r2, #1
bhi .Lmain_set32
pop {r4-r10}
@ residual 0-7 words
.Lres_set32:
subs r12, r12, #1
stmcsia r0!, {r1}
bhi .Lres_set32
bx lr

+ 616
- 0
source/wireC.cpp View File

@@ -0,0 +1,616 @@
#include "nds.h"
#include <nds/arm9/sound.h> // sound functions
#include <nds/timers.h> // timer functions
#include <tileedit.h>
#include <stdio.h>
#include <string.h>
#include <fat.h>
#include <wireworldTS.h>
#include <wireworld_controls.h>
#include "DSding_raw.h"
#include "DSload_raw.h"
#include "DSkill_raw.h"
#include "DSnew_raw.h"
#include "tonc_memfunc.h"
#define DLDI_BUILD
#define wm_x 128
#define wm_y 128
#define wm_size2 4096
#define wm_size 16384
char maparr[wm_x*wm_y];
char maparr_bk[wm_x*wm_y];
char maparr_sav[wm_x*wm_y];
#define bg0map ((u16*)BG_TILE_RAM_SUB(0))
char charcol;
int dospd,issavst,ison,arrx,arry,edwx,edwy,refscr;
int FATresult,oldtx,oldty;
FILE *testfile;
touchPosition tp;
/* edwx and edwy are the 32x20 editor window's position */
#define TILE_FLIP_X (1<<10)
#define TILE_FLIP_Y (2<<10)
#define TILE_FLIP_XY (3<<10)
#define StylusInBox(x,y,w,h,tp) (tp.x >= x && tp.x < x+w && tp.y >= y && tp.y < y+h)
#define POS2IDX(x, y) ((x) + ((y)*32))
#define XY2FB(x,y) ((x) + ((y)*(SCREEN_WIDTH)))
#define TIL_SPACE (RGB15(0,0,0))
#define TIL_TAIL (RGB15(10,10,31))
#define TIL_SPARK (RGB15(31,0,0))
#define TIL_WIRE (RGB15(31,25,9))
#define abs(x) ((x)>0?(x):-(x))
#define xy2m(x,y) ((x) + ((y)*128))

// eKid's profiling functions
inline void startProfile()
{
// disable timers
TIMER0_CR = 0;
TIMER1_CR = 0;
// reset counters
TIMER0_DATA = 0;
TIMER1_DATA = 0;
// enable timers
TIMER1_CR = TIMER_ENABLE | TIMER_CASCADE;
TIMER0_CR = TIMER_ENABLE;
}
inline u32 endProfile()
{
// read cycle count
u32 cycles;
cycles = (TIMER1_DATA<<16) + TIMER0_DATA;
// disable timers
TIMER0_CR = 0;
TIMER0_CR = 0;
// return cycle count
return cycles;
}

inline void VBLwait(int vblm)
{
for (int vblw=0; vblw<vblm; vblw++)
swiWaitForVBlank();
}

inline void ShowDec(int wah)
{
lcdSwap();
BG_PALETTE_SUB[255] = RGB15(31,31,31);
consoleInitDefault((u16*)SCREEN_BASE_BLOCK_SUB(0), (u16*)CHAR_BASE_BLOCK_SUB(1), 16);
iprintf("%d cycles",wah);
while(1)
{
swiWaitForVBlank();
}
}

inline void ShowErr(char errshow[])
{
lcdSwap();
BG_PALETTE_SUB[255] = RGB15(31,31,31);
consoleInitDefault((u16*)SCREEN_BASE_BLOCK_SUB(0), (u16*)CHAR_BASE_BLOCK_SUB(1), 16);
iprintf("ERROR! ");
iprintf(errshow);
while(1)
{
swiWaitForVBlank();
}
}

inline void WriteEditStSo(void)
{
if (dospd == 15)
{
bg0map[POS2IDX(20,21)] = 23;
bg0map[POS2IDX(21,21)] = 24;
bg0map[POS2IDX(20,22)] = 23 | TILE_FLIP_Y;
bg0map[POS2IDX(21,22)] = 24 | TILE_FLIP_Y;
}
else if (dospd == 5)
{
bg0map[POS2IDX(20,21)] = 25;
bg0map[POS2IDX(21,21)] = 26;
bg0map[POS2IDX(20,22)] = 25 | TILE_FLIP_Y;
bg0map[POS2IDX(21,22)] = 26 | TILE_FLIP_Y;
}

if (ison == 0)
{
bg0map[POS2IDX(29,21)] = 10;
bg0map[POS2IDX(30,21)] = 11;
bg0map[POS2IDX(29,22)] = 12;
bg0map[POS2IDX(30,22)] = 13;
}
else
{
bg0map[POS2IDX(29,21)] = 5 | TILE_FLIP_XY;
bg0map[POS2IDX(30,21)] = 5 | TILE_FLIP_Y;
bg0map[POS2IDX(29,22)] = 5 | TILE_FLIP_X;
bg0map[POS2IDX(30,22)] = 5;
}
}

inline void ClearMap(int plsnd)
{
refscr = 1;
memset32((void*)maparr, ' ', wm_size2);
if (plsnd == 1)
{
playGenericSound(DSnew_raw, DSnew_raw_size);
VBLwait(7);
}
}

inline void ReadWWMap(int plsnd)
{
if (FATresult == 0)
ShowErr("DLDI couldn't load.");
else if( (testfile = fopen("/wireworld.txt", "r")) == NULL)
ShowErr("Can't open wireworld.txt.");
else
ClearMap(0);
u32 readp;
readp = 0;
char rdchr;
rdchr = ' ';
while (feof(testfile) == false)
{
maparr[readp] = fgetc(testfile);
readp++;
}
if (fclose(testfile) == EOF)
ShowErr("Can't close wireworld.txt.");
if (plsnd == 1)
{
playGenericSound(DSload_raw, DSload_raw_size);
VBLwait(6);
}
}

inline void SaveWWMap(void)
{
if( (testfile = fopen("/wireworld.txt", "w")) == NULL)
ShowErr("Can't open wireworld.txt.");
for (u32 wrp = 0; wrp < wm_size; wrp++)
{
fputc(maparr[wrp],testfile);
}
if (fclose(testfile) == EOF)
ShowErr("Can't close wireworld.txt.");
}

inline void drawBresLine(u32 x1, u32 y1, u32 x2, u32 y2, char drawchar)
{
// Guarantees that all lines go from left to right
if ( x2 < x1 )
{
x1 ^= x2; x2 ^= x1; x1 ^= x2;
y1 ^= y2; y2 ^= y1; y1 ^= y2;
}
s32 dy,dx;
dy = y2 - y1;
dx = x2 - x1;
// If the gradient is greater than one we have to flip the axes
if ( abs(dy) < dx )
{
u32 xp,yp;
s32 d;
s32 add = 1;
xp = x1;
yp = y1;
if(dy < 0)
{
dy = -dy;
add =- 1;
}
d = 2*dy - dx;
for(; xp<=x2; xp++)
{
if(d > 0)
{
yp += add;
d -= 2 * dx;
}
maparr[xy2m(xp,yp)] = drawchar;
d += 2 * dy;
}
}
else
{
x1 ^= y1; y1 ^= x1; x1 ^= y1;
x2 ^= y2; y2 ^= x2; x2 ^= y2;
if ( x2 < x1 )
{
x1 ^= x2; x2 ^= x1; x1 ^= x2;
y1 ^= y2; y2 ^= y1; y1 ^= y2;
}
u32 xp,yp;
s32 d;
dy = y2 - y1;
dx = x2 - x1;
s32 add = 1;
if(dy < 0)
{
dy = -dy;
add=-1;
}
xp = x1;
yp = y1;
d = 2 * dy - dx;
for(xp=x1; xp<=x2; xp++) {
if(d > 0)
{
yp += add;
d -= 2 * dx;
}
maparr[xy2m(yp,xp)] = drawchar;
d += 2 * dy;
}
}
}

inline void KillElectrons(void)
{
refscr = 1;
for (int dp=0; dp<wm_size; dp++)
{
if (maparr[dp] == '#')
maparr[dp] = '=';
else if (maparr[dp] == '-')
maparr[dp] = '=';
}
playGenericSound(DSkill_raw, DSkill_raw_size);
VBLwait(7);
}


inline void GenWindow(void)
{
int mapSpot = (3 || (3 << 8) || (3 << 16) || (3 << 24));
memset((void*)bg0map, mapSpot, 1280);
mapSpot = 0;
char arrSpot = ' ';
for (int dy =0; dy < 20; dy++)
for (int dx=0; dx < 32; dx++)
{
mapSpot = POS2IDX((dx),(dy));
arrSpot = maparr[((dx+edwx) + ((dy+edwy)*(wm_x)))];
if (arrSpot == ' ') bg0map[mapSpot] = 3;
else if (arrSpot == '#') bg0map[mapSpot] = 1;
else if (arrSpot == '=') bg0map[mapSpot] = 2;
else if (arrSpot == '-') bg0map[mapSpot] = 0;

}
/* Fix of rewriting the 640th tile */
bg0map[640] = 4;
}

inline void WriteTop(void)
{
u32 arry, arrx;
for (arry=0; arry <wm_y; arry++)
for (arrx=0; arrx <wm_x; arrx+=4)
{
u32 i = arrx+arry*128;
((u32*)BG_GFX)[(arrx>>2)+arry*64]= maparr[i] |
(maparr[i+1]<<8) |
(maparr[i+2]<<16) |
(maparr[i+3]<<24);
}
}

inline void WriteMap(void)
{
WriteTop();
GenWindow();
}

inline void toggleOn(void)
{
if (ison == 1)
{
if (issavst == 1)
{
memcpy32((void*)maparr, (void*)maparr_sav, wm_size2);
}
ison = 0;
}
else
{
ison = 1;
if (issavst == 1)
{
memcpy32((void*)maparr_sav, (void*)maparr, wm_size2);
}
}
VBLwait(2);
}

inline void key_setSpeed(void)
{
if (dospd == 15)
dospd = 5;
else dospd = 15;
WriteEditStSo();
VBLwait(6);
}
inline void KeyCheck(void)
{
uint16 tx,ty,tx2,ty2;
/* checking for zoom keys */
scanKeys();
uint16 keys_pressed = ~(REG_KEYINPUT);
if(keys_pressed & KEY_UP)
if (edwy > 0)
edwy--;
if(keys_pressed & KEY_DOWN)
if (edwy < (wm_y-20))
edwy++;
if(keys_pressed & KEY_LEFT)
if (edwx > 0)
edwx--;
if(keys_pressed & KEY_RIGHT)
if (edwx < (wm_x-32))
edwx++;
if(keysDown() & KEY_A)
toggleOn();
if(keysDown() & KEY_X)
{
if (issavst == 1)
issavst = 0;
else issavst = 1;
swiWaitForVBlank();
swiWaitForVBlank();
}
if(keysDown() & KEY_Y)
key_setSpeed();
if(keysDown() & KEY_L)
ReadWWMap(1);
if(keysDown() & KEY_R)
SaveWWMap();
/* checking for editor touch */
oldtx = tp.px;
oldty = tp.py;
tp = touchReadXY();
if ((oldtx == 0) && (oldty == 0))
{
oldtx = tp.px;
oldty = tp.py;
}
if ((tp.px >= 15 && tp.px < 31 && tp.py >= 167 && tp.py < 183) == true)
charcol = ' ';
else if ((tp.px >= 39 && tp.px < 62-7 && tp.py >= 167 && tp.py < 183) == true)
charcol = '=';
else if ((tp.px >= 63 && tp.px < 86-7 && tp.py >= 167 && tp.py < 183) == true)
charcol = '#';
else if ((tp.px >= 87 && tp.px < 103 && tp.py >= 167 && tp.py < 183) == true)
charcol = '-';
else if ((tp.px >= 159 && tp.px < 175 && tp.py >= 167 && tp.py < 183) == true)
key_setSpeed();
else if ((tp.px >= 183 && tp.px < 199 && tp.py >= 167 && tp.py < 183) == true)
ClearMap(1);
else if ((tp.px >= 207 && tp.px < 223 && tp.py >= 167 && tp.py < 183) == true)
KillElectrons();
else if ((tp.px >= 231 && tp.px < 247 && tp.py >= 167 && tp.py < 183) == true
&&
keysDown() & KEY_TOUCH)
toggleOn();
else if ((tp.px >= 2 && tp.px < 254 && tp.py >= 2 && tp.py < 160) == true)
{
tx = (tp.px >> 3) + edwx;
ty = (tp.py >> 3) + edwy;
tx2 = (oldtx >> 3) + edwx;
ty2 = (oldty >> 3) + edwy;
if ((tx == tx2) && (ty == ty2))
maparr[xy2m(tx,ty)] = charcol;
else
{
drawBresLine(tx2,ty2,tx,ty,charcol);
}
refscr = 1;
}
}

inline void GenMake(void)
{
refscr = 1;
int temp = 0;
memcpy32((void*)maparr_bk, (void*)maparr, wm_size2);
for (int dp=0; dp<wm_size; dp++)
if (maparr_bk[dp] == '#')
maparr[dp] = '-';

else if (maparr_bk[dp] == '-')
maparr[dp] = '=';
else if (maparr_bk[dp] == '=')
{
temp = 0;
/* oh god i hate this part */
for (int ddy=-1; ddy<=1; ddy++)
for (int ddx=-1; ddx<=1; ddx++)
if (maparr_bk[(dp+xy2m(ddx,ddy))] == '#')
temp++;

/* Ok, now count it */
if ((temp < 3) && (temp > 0))
maparr[dp] = '#';
}
}


inline int sethl(char zz)
{
if (charcol == zz)
return 13;
else
return 0;
}

inline void WriteEditorMenu(void)
{
u8 lol;
/* space */
lol = sethl(' ');
bg0map[POS2IDX(2,21)] = (7+lol) | TILE_FLIP_XY;
bg0map[POS2IDX(3,21)] = (7+lol) | TILE_FLIP_Y;
bg0map[POS2IDX(2,22)] = (7+lol) | TILE_FLIP_X;
bg0map[POS2IDX(3,22)] = 7+lol;
/* wire */
lol = sethl('=');
bg0map[POS2IDX(5,21)] = (9+lol) | TILE_FLIP_XY;
bg0map[POS2IDX(6,21)] = (9+lol) | TILE_FLIP_Y;
bg0map[POS2IDX(5,22)] = (9+lol) | TILE_FLIP_X;
bg0map[POS2IDX(6,22)] = 9+lol;
/* spark */
lol = sethl('#');
bg0map[POS2IDX(8,21)] = (8+lol) | TILE_FLIP_XY;
bg0map[POS2IDX(9,21)] = (8+lol) | TILE_FLIP_Y;
bg0map[POS2IDX(8,22)] = (8+lol) | TILE_FLIP_X;
bg0map[POS2IDX(9,22)] = 8+lol;
/* tail */
lol = sethl('-');
bg0map[POS2IDX(11,21)] = (6+lol) | TILE_FLIP_XY;
bg0map[POS2IDX(12,21)] = (6+lol) | TILE_FLIP_Y;
bg0map[POS2IDX(11,22)] = (6+lol) | TILE_FLIP_X;
bg0map[POS2IDX(12,22)] = 6+lol;
/* new */
bg0map[POS2IDX(23,21)] = 14;
bg0map[POS2IDX(24,21)] = 15;
bg0map[POS2IDX(23,22)] = 14 | TILE_FLIP_Y;
bg0map[POS2IDX(24,22)] = 14 | TILE_FLIP_XY;
/* electron clear */
bg0map[POS2IDX(26,21)] = 16;
bg0map[POS2IDX(27,21)] = 16 | TILE_FLIP_X;
bg0map[POS2IDX(26,22)] = 17;
bg0map[POS2IDX(27,22)] = 18;
/* start or stop, motion */
WriteEditStSo();
}

inline void loadMainData(void)
{
dmaCopy(tileeditTiles, (void*)BG_TILE_RAM_SUB(1), tileeditTilesLen);
dmaCopy(tileeditPal, BG_PALETTE_SUB, 32);
}

inline void loadTitleData(void)
{
memcpy32((void*)BG_MAP_RAM_SUB(0), wireworldTSMap, (wireworldTSMapLen / 4));
memcpy32((void*)BG_TILE_RAM_SUB(1), wireworldTSTiles, (wireworldTSTilesLen / 4));
memcpy32(BG_PALETTE_SUB, wireworldTSPal, 8);
memcpy32((void*)BG_MAP_RAM(2), wireworld_controlsMap, (wireworld_controlsMapLen/4));
memcpy32((void*)BG_TILE_RAM(3), wireworld_controlsTiles, (wireworld_controlsTilesLen/4));
memcpy32(BG_PALETTE, wireworld_controlsPal, 8);
}

inline void setScrPos(void)
{
s32 ScrTmp = (((edwy + 20) - 64) / 2);
if (ScrTmp < 0)
BG3_CY = 0;
else
BG3_CY = (ScrTmp << 8);
}

int main(void)
{
// irqs are nice
irqInit();
irqSet(IRQ_VBLANK, 0);
irqEnable(IRQ_VBLANK);
videoSetMode(MODE_0_2D | DISPLAY_BG0_ACTIVE);
videoSetModeSub(MODE_0_2D | DISPLAY_BG0_ACTIVE);
vramSetBankA(VRAM_A_MAIN_BG);
vramSetBankC(VRAM_C_SUB_BG);
SUB_BG0_CR = BG_32x32 | BG_COLOR_16 | BG_MAP_BASE(0) | BG_TILE_BASE(1);
BG0_CR = BG_32x32 | BG_COLOR_16 | BG_MAP_BASE(2) | BG_TILE_BASE(3);
lcdSwap();
loadTitleData();
bool wasSTART = false;
dospd = 5;
setGenericSound( 22050,
127,
64,
1 );
do
{
scanKeys();
tp = touchReadXY();
if (keysDown() & KEY_START) wasSTART = true;
else if ((keysDown() & KEY_TOUCH) && (tp.px > 3) && (tp.px < 254) && (tp.py < 190) && (tp.py > 3))
wasSTART = true;
swiWaitForVBlank();
}
while (wasSTART == false);
playGenericSound(DSding_raw, DSding_raw_size);
memset32((void*)VRAM_A, 0, 32768);
BG0_CR = 0;
videoSetMode(MODE_5_2D | DISPLAY_BG3_ACTIVE);
lcdSwap();
loadMainData();
#ifdef DLDI_BUILD
FATresult = fatInitDefault();
ReadWWMap(0);
#endif
BG3_CR = BG_BMP8_256x256;
BG_PALETTE[' '] = 0;
BG_PALETTE['#'] = TIL_SPARK;
BG_PALETTE['='] = TIL_WIRE;
BG_PALETTE['-'] = TIL_TAIL;
BG3_XDX = 1 << 7;
BG3_YDY = 1 << 7;
BG3_XDY = 0;
BG3_YDX = 0;
BG3_CX = 0;
BG3_CY = 0;
for (int t=0; t<640; t++)
bg0map[t] = 3;
for (int t=640; t<768; t++)
bg0map[t] = 4;
refscr = 1;
while(1)
{
for (int t=0; t<dospd; t++)
{
swiWaitForVBlank();
KeyCheck();
if (refscr == 1)
{
WriteEditorMenu();
WriteMap();
setScrPos();
}
}
if (ison == 1) GenMake();
}
return 0;
}

+ 206
- 0
source/wireworldTS.c View File

@@ -0,0 +1,206 @@

//{{BLOCK(wireworldTS)

//======================================================================
//
// wireworldTS, 256x192@4,
// + palette 16 entries, not compressed
// + 109 tiles (t|f|p reduced) not compressed
// + regular map (flat), not compressed, 32x24
// Total size: 32 + 3488 + 1536 = 5056
//
// Time-stamp: 2008-05-02, 18:58:34
// Exported by Cearn's GBA Image Transmogrifier
// ( http://www.coranac.com )
//
//======================================================================

const unsigned int wireworldTSPal[8]=
{
0x00150000,0x0180294A,0x18DB56B5,0x12392BEA,0x22BD7FFF,0x167A0501,0x00000000,0x00000000,
};

const unsigned int wireworldTSTiles[872]=
{
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x11111100,0x00000100,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x11111111,0x00000000,
0x00000100,0x11100100,0x00100100,0x00100100,0x00100100,0x00100100,0x11100100,0x00000100,
0x00000000,0x11100111,0x00100100,0x00100100,0x00500500,0x00500500,0x55500555,0x00000000,
0x00000000,0x55500555,0x00500500,0x00500500,0x00500500,0x00500500,0x00500555,0x00500000,
0x00000000,0x55555555,0x00000000,0x00000000,0x00222220,0x02200022,0x02220022,0x02202022,
0x00000000,0x55500555,0x00500500,0x00500500,0x00500500,0x00500500,0x00500500,0x00500500,

0x00000000,0x55555555,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x55555555,0x00000000,0x00000000,0x00022000,0x00022200,0x00022220,0x00022000,
0x00500000,0x00500555,0x00500500,0x00500500,0x00500500,0x00500500,0x00500555,0x00500000,
0x02200222,0x02200022,0x00222220,0x00000000,0x00022000,0x00022200,0x00022220,0x00022000,
0x00500500,0x00500500,0x00500500,0x00500500,0x00500500,0x00500500,0x00500500,0x00500500,
0x00022000,0x00022000,0x02222220,0x00000000,0x00222220,0x02200022,0x02220022,0x02202022,
0x00022000,0x00022000,0x02222220,0x00000000,0x00000000,0x00000000,0x55555555,0x00000000,
0x00000000,0x11111111,0x00000000,0x00000000,0x00000000,0x00000000,0x55555555,0x00000000,

0x00100000,0x00100111,0x00100100,0x00100100,0x00000000,0x00000000,0x55555555,0x00000000,
0x02200222,0x02200022,0x00222220,0x00000000,0x00000000,0x00000000,0x55555555,0x00000000,
0x00000000,0x55555555,0x00000000,0x00000000,0x00100100,0x00100100,0x00100100,0x00100100,
0x00100100,0x00100100,0x00100100,0x00100100,0x00100100,0x00100100,0x11100100,0x00000100,
0x00100100,0x00100100,0x00100100,0x00100100,0x00100100,0x00100100,0x11100111,0x00000000,
0x00000000,0x11111111,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00033333,
0x00000000,0x11111111,0x00000000,0x00000000,0x00033000,0x00033000,0x00033000,0x00033000,
0x00000000,0x11111111,0x00000000,0x00000000,0x00033000,0x00033000,0x00033000,0x33333000,

0x00000000,0x11111111,0x00000000,0x00000000,0x00033000,0x00033000,0x00000000,0x33333333,
0x00000000,0x11111111,0x00000000,0x00000000,0x000AA000,0x000AA000,0x000AA000,0x000AA000,
0x00100100,0x00100100,0x00100100,0x00100100,0x00100100,0x00100100,0x00100100,0x00100100,
0x00033333,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x33033033,
0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00000000,0x33333333,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x33333333,
0x33333000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x33333333,
0x33333333,0x00000000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x33033033,

0x000AA000,0x000AA000,0x000AA000,0x000AA000,0x00033000,0x00033000,0x00000000,0x33333333,
0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x33033333,
0x33333000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x33333033,
0x33333000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x33333333,
0x33333333,0x00000000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033333,
0x33333333,0x00000000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x33333333,
0x33333333,0x00000000,0x00033000,0x00033000,0x00033000,0x00033000,0x00000000,0x33333333,
0x33333333,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x04400044,0x04400044,

0x33333333,0x00000000,0x00000000,0x00000000,0x00044000,0x00000000,0x00044000,0x00044000,
0x33033033,0x00033000,0x00033000,0x00033000,0x00000000,0x00000000,0x00444444,0x04400044,
0x33333333,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00444440,0x04400044,
0x33333333,0x00000000,0x00033000,0x00033000,0x00000000,0x00000000,0x00444444,0x04400044,
0x33333333,0x00000000,0x00000000,0x00000000,0x00044400,0x00044000,0x00044000,0x00044000,
0x33333333,0x00000000,0x00000000,0x00000000,0x04400000,0x04400000,0x04444400,0x04400440,
0x33033333,0x00033000,0x00033000,0x00033000,0x00BB9999,0x0BB00099,0x0BB00099,0x0BB00099,
0x33333033,0x00000000,0x00000000,0x00000000,0x00BB9990,0x0BB00099,0x00000990,0x000B9900,

0x00033333,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x44444444,0x00000000,0x00000000,0x00000000,0x00033000,0x00033000,0x00033000,0x00033000,
0x04400044,0x04404044,0x00444440,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00044000,0x00044000,0x00044000,0x00000000,0x00033000,0x00033000,0x00033000,0x33333000,
0x00000044,0x00000044,0x00000044,0x00000000,0x00033000,0x00033000,0x00033000,0x33033033,
0x00444444,0x00000044,0x04444440,0x00000000,0x00033000,0x00033000,0x00000000,0x33333333,
0x04400044,0x04404044,0x00444440,0x00000000,0x00000000,0x00000000,0x00000000,0x00033333,
0x04400044,0x04400044,0x00444440,0x00000000,0x00000000,0x00000000,0x00000000,0x33333000,

0x00000044,0x00000044,0x00000044,0x00000000,0x00033000,0x00033000,0x00000000,0x33333333,
0x00044000,0x00044000,0x00044000,0x00000000,0x00000000,0x00000000,0x00000000,0x33333333,
0x04400440,0x04400440,0x04444400,0x00000000,0x00000000,0x00000000,0x00000000,0x33333333,
0x077000BB,0x077000BB,0x0077BBBB,0x00000000,0x00033000,0x00033000,0x00033000,0x33033033,
0x00770000,0x077000BB,0x0077BBB0,0x00000000,0x00033000,0x00033000,0x00033000,0x00033333,
0x04444444,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x33333333,
0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033333,

0x33333333,0x00000000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x33033333,
0x00033333,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033333,
0x00033333,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00033333,
0x33033333,0x00033000,0x00033000,0x00033000,0x00000000,0x00000000,0x00666666,0x06600066,
0x00033333,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00666666,0x06600066,
0x00033000,0x00033000,0x00033000,0x00033000,0x00000000,0x00000000,0x00666660,0x06600066,
0x000AA000,0x000AA000,0x000AA000,0x000AA000,0x00000000,0x00000000,0x06666660,0x00000066,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x06666660,0x00000066,

0x33333333,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x33333333,
0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x33033033,
0x00666666,0x00000066,0x00000066,0x00000000,0x00033000,0x00033000,0x00033000,0x00033000,
0x00000066,0x00000066,0x00000066,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00666666,0x00000066,0x06666660,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00666660,0x06600000,0x00666666,0x00000000,0x000AA000,0x000AA000,0x000AA000,0x000AA000,
0x00666660,0x06600000,0x00666666,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x33333000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033333,

0x33333333,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x33033033,
0x33333000,0x00033000,0x00033000,0x00033000,0x00000000,0x00000000,0x07777770,0x00000000,
0x00033000,0x00033000,0x00033000,0x00033000,0x00888880,0x08800088,0x00000880,0x00088800,
0x00000000,0x00000000,0x00000000,0x00000000,0x08888880,0x00088000,0x00088000,0x00088000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00088800,0x00880880,0x08800088,0x08800088,
0x000AA000,0x000AA000,0x000AA000,0x000AA000,0x00888888,0x08800088,0x08800088,0x00888888,
0x00033333,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x07777770,0x00000000,
0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00033000,0x00000000,

0x0BBBBBBB,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x33333333,
0x00000000,0x0BBBBBB0,0x00000000,0x00000000,0x00033000,0x00033000,0x00000000,0x33333333,
0x00880000,0x08800088,0x00888880,0x00000000,0x00000000,0x00000000,0x00000000,0x33333333,
0x00088000,0x00088000,0x00088000,0x00000000,0x00000000,0x00000000,0x00000000,0x33333333,
0x08888888,0x08800088,0x08800088,0x00000000,0x00033000,0x00033000,0x00033000,0x00033333,
0x08800088,0x08800088,0x08800088,0x00000000,0x000AA000,0x000AA000,0x000AA000,0x000AA000,
0x00088000,0x00088000,0x00088000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x0BBBBBB0,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,

0xBBBBBBBB,0x00000000,0x00000000,0x00000000,0x00033000,0x00033000,0x00033000,0x00033000,
0x33333333,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x11111111,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00099000,0x00099900,0x00099990,0x00099000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00BBBBB0,0x0BB000BB,0x0BBB00BB,0x0BB0B0BB,
0x00000000,0x00000000,0x00000000,0x00000000,0x00BBBBBB,0x0BB000BB,0x0BB000BB,0x00BBBBBB,
0x00000100,0x11111100,0x00000000,0x00000000,0x00777770,0x07700077,0x00000077,0x00000077,
0x00000000,0x11111111,0x00000000,0x00000000,0x00077000,0x00077700,0x00077770,0x00077000,
0x00099000,0x00099000,0x09999990,0x00000000,0x00000000,0x00000000,0x55555555,0x00000000,

0x00000000,0x00099000,0x00099000,0x00000000,0x00000000,0x00000000,0x55555555,0x00000000,
0x0BB00BBB,0x0BB000BB,0x00BBBBB0,0x00000000,0x00000000,0x00000000,0x55555555,0x00000000,
0x0BB000BB,0x0BB000BB,0x0BB000BB,0x00000000,0x00000000,0x00000000,0x55555555,0x00000000,
0x00000077,0x07700077,0x00777770,0x00000000,0x00000000,0x00000000,0x55555555,0x00000000,
0x00077000,0x00077000,0x07777770,0x00000000,0x00000000,0x00000000,0x55555555,0x00000000,
};

const unsigned int wireworldTSMap[384]=
{
0x00020001,0x00020002,0x00020002,0x00020002,0x00020002,0x00020002,0x00020002,0x00020002,
0x00020002,0x00020002,0x00020002,0x00020002,0x00020002,0x00020002,0x00020002,0x04010002,
0x00040003,0x00040004,0x00040004,0x00040004,0x00040004,0x00040004,0x00040004,0x00040004,
0x00040004,0x00040004,0x00040004,0x00040004,0x00040004,0x00040004,0x00040004,0x04030004,
0x00050003,0x00060006,0x00080007,0x00080008,0x00080008,0x00080008,0x00080008,0x00080008,
0x00080008,0x00080008,0x00080008,0x00080008,0x00080008,0x00070008,0x00090006,0x04030405,
0x000A0003,0x000B000B,0x0002000C,0x00000401,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00010000,0x000C0002,0x000D000B,0x0403040A,

0x08050003,0x000E000E,0x000F0807,0x08080010,0x08080808,0x08080808,0x08080808,0x08080808,
0x08080808,0x08080808,0x08080808,0x08080808,0x04100808,0x0807000F,0x0011000E,0x04030C05,
0x00050003,0x00120008,0x00080007,0x00080012,0x00080008,0x00080008,0x00080008,0x00080008,
0x00080008,0x00080008,0x00080008,0x00080008,0x00120008,0x00070008,0x00080012,0x04030405,
0x000A0003,0x00130000,0x0002000C,0x00020014,0x00020002,0x00020002,0x00020002,0x00020002,
0x00020002,0x00020002,0x00020002,0x00020002,0x00140002,0x000C0002,0x00000413,0x0403040A,
0x000A0003,0x08010000,0x0802000C,0x00150814,0x08020016,0x00170802,0x04170018,0x08020802,
0x08020019,0x08020802,0x00170016,0x04150417,0x08140018,0x000C0802,0x00000C01,0x0403040A,

0x000A0003,0x00000000,0x0000000C,0x001B001A,0x001D001C,0x001E001D,0x041E001F,0x001D001D,
0x001D0020,0x001D001D,0x00220021,0x0023041E,0x001A0024,0x000C0000,0x00000000,0x0403040A,
0x000A0003,0x00000000,0x0000000C,0x0C1B001A,0x00260025,0x00280027,0x002A0029,0x002A0027,
0x002C002B,0x081D002D,0x002F002E,0x081D081D,0x001A0030,0x000C0000,0x00000000,0x0403040A,
0x000A0003,0x00000000,0x0000000C,0x0430001A,0x081C0031,0x00330032,0x00350034,0x00370036,
0x00390038,0x001D003A,0x003C003B,0x003D0000,0x001A0000,0x000C0000,0x00000000,0x0403040A,
0x000A0003,0x00000000,0x0000000C,0x001D001A,0x003F003E,0x04300000,0x00400C1B,0x0C3F0041,
0x081D0820,0x081E081D,0x0042081F,0x00000000,0x001A0000,0x000C0000,0x00000000,0x0403040A,

0x000A0003,0x00000000,0x0000000C,0x081D001A,0x083F083E,0x00000000,0x00430430,0x00450044,
0x00470046,0x0C24001D,0x04230048,0x0C300830,0x001A001D,0x000C0000,0x00000000,0x0403040A,
0x000A0003,0x00000000,0x0000000C,0x001D001A,0x003F0049,0x0C300000,0x004A0830,0x004C004B,
0x004E004D,0x00240823,0x081E081C,0x004F001B,0x001A081D,0x000C0000,0x00000000,0x0403040A,
0x000A0003,0x00000000,0x0000000C,0x0050001A,0x083F081B,0x00510000,0x00520041,0x00540053,
0x00530055,0x00560430,0x04410057,0x0030081B,0x001A0000,0x000C0000,0x00000000,0x0403040A,
0x000A0003,0x00000000,0x0000000C,0x0849001A,0x043F0030,0x00590058,0x005A041E,0x005C005B,
0x005E005D,0x005F0000,0x04300060,0x00000030,0x001A0C30,0x000C0000,0x00000000,0x0403040A,

0x000A0003,0x00010000,0x0002000C,0x08160014,0x08170002,0x08180061,0x00610061,0x08150061,
0x00020819,0x00020002,0x00020816,0x00020002,0x00140817,0x000C0002,0x00000401,0x0403040A,
0x000A0003,0x08130000,0x0802000C,0x08020814,0x08020802,0x08020802,0x08020802,0x08020802,
0x08020802,0x08020802,0x08020802,0x08020802,0x08140802,0x000C0802,0x00000C13,0x0403040A,
0x08050003,0x08120808,0x08080807,0x08080812,0x08080808,0x08080808,0x08080808,0x08080808,
0x08080808,0x08080808,0x08080808,0x08080808,0x08120808,0x08070808,0x08080812,0x04030C05,
0x00050003,0x00060009,0x080F0007,0x00080810,0x00080008,0x00080008,0x00080008,0x00080008,
0x00080008,0x00080008,0x00080008,0x00080008,0x0C100008,0x0007080F,0x00090009,0x04030405,

0x000A0003,0x000B000D,0x0802000C,0x00000C01,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000062,0x00000063,0x00650064,0x000C0066,0x000D000D,0x0403040A,
0x08050003,0x000E0011,0x08080807,0x08080808,0x08080808,0x08080808,0x08080808,0x08080808,
0x08080808,0x08080808,0x00680067,0x08080069,0x006B006A,0x0807006C,0x00110011,0x04030C05,
0x08040003,0x08040804,0x08040804,0x08040804,0x08040804,0x08040804,0x08040804,0x08040804,
0x08040804,0x08040804,0x08040804,0x08040804,0x08040804,0x08040804,0x08040804,0x04030804,
0x08020801,0x08020802,0x08020802,0x08020802,0x08020802,0x08020802,0x08020802,0x08020802,
0x08020802,0x08020802,0x08020802,0x08020802,0x08020802,0x08020802,0x08020802,0x0C010802,
};

//}}BLOCK(wireworldTS)

+ 361
- 0
source/wireworld_controls.c View File

@@ -0,0 +1,361 @@

//{{BLOCK(wireworld_controls)

//======================================================================
//
// wireworld_controls, 256x192@4,
// + palette 16 entries, not compressed
// + 99 tiles (t|f|p reduced) not compressed
// + regular map (flat), not compressed, 32x24
// Total size: 32 + 3168 + 1536 = 4736
//
// Time-stamp: 2007-09-19, 18:14:40
// Exported by Cearn's GBA Image Transmogrifier
// ( http://www.coranac.com )
//
//======================================================================

const unsigned short wireworld_controlsPal[16]=
{
0x0000,0x56A0,0x56B5,0x294A,0x1239,0x2BEA,0x22BD,0x167A,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
};

const unsigned short wireworld_controlsTiles[1584]=
{
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x4440,0x0044,0x0044,0x0440,0x0044,0x0000,0x0044,0x0000,
0x0044,0x0000,0x0044,0x0440,0x4440,0x0044,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x4440,0x0044,0x0044,0x0440,
0x0044,0x0440,0x0044,0x0440,0x4440,0x0044,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x4444,0x0044,0x0044,0x0440,
0x0044,0x0440,0x0044,0x0440,0x0044,0x0440,0x0000,0x0000,

0x0044,0x0000,0x0044,0x0000,0x4444,0x0444,0x0044,0x0000,
0x0044,0x0000,0x0044,0x0000,0x4440,0x0444,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x4444,0x0044,0x0044,0x0440,
0x0044,0x0000,0x0044,0x0000,0x0044,0x0000,0x0000,0x0000,
0x4400,0x0004,0x4000,0x0004,0x4000,0x0004,0x4000,0x0004,
0x4000,0x0004,0x4000,0x0004,0x4000,0x0004,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x4440,0x0444,0x0044,0x0000,
0x4440,0x0044,0x0000,0x0440,0x4444,0x0044,0x0000,0x0000,

0x0000,0x0044,0x4000,0x0004,0x4400,0x0000,0x4400,0x0000,
0x4400,0x0000,0x4000,0x0004,0x0000,0x0044,0x0000,0x0000,
0x4000,0x0004,0x0000,0x0000,0x4000,0x0004,0x4000,0x0004,
0x4000,0x0004,0x4000,0x0004,0x4000,0x0004,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x4440,0x0044,0x0044,0x0440,
0x0044,0x0000,0x0044,0x0440,0x4440,0x0044,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x4440,0x0044,0x0044,0x0440,
0x0044,0x0444,0x4044,0x0444,0x4440,0x0440,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x4440,0x0044,0x0044,0x0440,
0x4444,0x0044,0x0044,0x0000,0x4440,0x0444,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0044,0x0440,0x0044,0x0440,
0x4440,0x0444,0x0000,0x0440,0x4444,0x0044,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0044,0x0440,0x0044,0x0440,
0x0044,0x0440,0x0044,0x0440,0x4440,0x0044,0x0000,0x0000,
0x4400,0x0444,0x0440,0x0000,0x4440,0x0044,0x0440,0x0000,
0x0440,0x0000,0x0440,0x0000,0x0440,0x0000,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x4440,0x0044,0x0044,0x0440,
0x4440,0x0444,0x0000,0x0440,0x4444,0x0044,0x0000,0x0000,
0x4000,0x0004,0x4000,0x0004,0x0000,0x0000,0x0000,0x0000,
0x4000,0x0004,0x4000,0x0004,0x0000,0x0000,0x0000,0x0000,
0x0022,0x0000,0x0022,0x0000,0x0022,0x0000,0x0022,0x0000,
0x0022,0x0000,0x0022,0x0000,0x2222,0x0222,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x2222,0x0222,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,

0x1100,0x0001,0x1000,0x0001,0x1000,0x0001,0x1000,0x0001,
0x1000,0x0001,0x1000,0x0001,0x1000,0x0001,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x1110,0x0011,0x0011,0x0110,
0x0011,0x0110,0x0011,0x0110,0x1110,0x0011,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x1110,0x0011,0x0011,0x0110,
0x0011,0x0111,0x1011,0x0111,0x1110,0x0110,0x0000,0x0000,
0x0000,0x0110,0x0000,0x0110,0x1100,0x0111,0x0110,0x0110,
0x0110,0x0110,0x0110,0x0110,0x1100,0x0111,0x0000,0x0000,

0x1100,0x0111,0x0110,0x0000,0x1110,0x0011,0x0110,0x0000,
0x0110,0x0000,0x0110,0x0000,0x0110,0x0000,0x0000,0x0000,
0x1000,0x0001,0x0000,0x0000,0x1000,0x0001,0x1000,0x0001,
0x1000,0x0001,0x1000,0x0001,0x1000,0x0001,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x1110,0x0011,0x0011,0x0110,
0x1111,0x0011,0x0011,0x0000,0x1110,0x0111,0x0000,0x0000,
0x2222,0x0022,0x0022,0x0220,0x0022,0x0220,0x2222,0x0022,
0x0022,0x0220,0x0022,0x0220,0x0022,0x0220,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x1110,0x0111,0x0011,0x0000,
0x1110,0x0011,0x0000,0x0110,0x1111,0x0011,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0011,0x0110,0x0011,0x0110,
0x0110,0x0011,0x1100,0x0001,0x1000,0x0000,0x0000,0x0000,
0x0022,0x0220,0x0220,0x0022,0x2200,0x0002,0x2200,0x0002,
0x2200,0x0002,0x0220,0x0022,0x0022,0x0220,0x0000,0x0000,
0x0011,0x0000,0x0011,0x0000,0x1111,0x0111,0x0011,0x0000,
0x0011,0x0000,0x0011,0x0000,0x1110,0x0111,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x1110,0x0011,0x0011,0x0110,
0x1110,0x0111,0x0000,0x0110,0x1111,0x0011,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0011,0x0110,0x0011,0x0110,
0x0011,0x0110,0x1011,0x0110,0x1110,0x0011,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x1111,0x0011,0x0011,0x0110,
0x0011,0x0110,0x0011,0x0110,0x0011,0x0110,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x1111,0x0011,0x0011,0x0110,
0x0011,0x0000,0x0011,0x0000,0x0011,0x0000,0x0000,0x0000,

0x0110,0x0000,0x0110,0x0000,0x1110,0x0011,0x0110,0x0110,
0x0110,0x0110,0x0110,0x0110,0x0110,0x0110,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x1111,0x0011,0x0011,0x0110,
0x1111,0x0011,0x0011,0x0000,0x0011,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0011,0x0110,0x0011,0x0110,
0x0011,0x0110,0x0011,0x0110,0x1110,0x0011,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1000,0x0001,
0x1000,0x0001,0x1000,0x0001,0x1100,0x0000,0x0000,0x0000,

0x7770,0x0777,0x7000,0x0007,0x7000,0x0007,0x7000,0x0007,
0x7000,0x0007,0x7000,0x0007,0x7000,0x0007,0x0000,0x0000,
0x0770,0x0000,0x0770,0x0000,0x7770,0x0077,0x0770,0x0770,
0x0770,0x0770,0x0770,0x0770,0x0770,0x0770,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x7770,0x0077,0x0077,0x0770,
0x7777,0x0077,0x0077,0x0000,0x7770,0x0777,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x7770,0x0777,0x0077,0x0000,
0x7770,0x0077,0x0000,0x0770,0x7777,0x0077,0x0000,0x0000,

0x0770,0x0000,0x0770,0x0000,0x7770,0x0077,0x0770,0x0770,
0x0770,0x0770,0x0770,0x0770,0x7770,0x0077,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0077,0x0770,0x0077,0x0770,
0x0077,0x0770,0x0077,0x0770,0x7770,0x0077,0x0000,0x0000,
0x0077,0x0000,0x0077,0x0000,0x7777,0x0777,0x0077,0x0000,
0x0077,0x0000,0x0077,0x0000,0x7770,0x0777,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x7770,0x0077,0x0077,0x0770,
0x0077,0x0770,0x0077,0x0770,0x7770,0x0077,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x7777,0x0077,0x0077,0x0770,
0x0077,0x0770,0x0077,0x0770,0x0077,0x0770,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x7770,0x0077,0x0077,0x0770,
0x0077,0x0777,0x7077,0x0777,0x7770,0x0770,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0077,0x0770,0x0077,0x0770,
0x0770,0x0077,0x7700,0x0007,0x7000,0x0000,0x0000,0x0000,
0x7000,0x0007,0x0000,0x0000,0x7000,0x0007,0x7000,0x0007,
0x7000,0x0007,0x7000,0x0007,0x7000,0x0007,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x7777,0x0077,0x0077,0x0770,
0x0077,0x0000,0x0077,0x0000,0x0077,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x7770,0x0777,0x0077,0x0770,
0x7770,0x0777,0x0000,0x0770,0x0000,0x0770,0x0000,0x0000,
0x7700,0x0007,0x7000,0x0007,0x7000,0x0007,0x7000,0x0007,
0x7000,0x0007,0x7000,0x0007,0x7000,0x0007,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x7770,0x0077,0x7077,0x0770,
0x0077,0x0770,0x0077,0x0770,0x0077,0x0770,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x7770,0x0077,0x0077,0x0770,
0x0077,0x0000,0x0077,0x0770,0x7770,0x0077,0x0000,0x0000,
0x7000,0x0007,0x7000,0x0007,0x0000,0x0000,0x0000,0x0000,
0x7000,0x0007,0x7000,0x0007,0x0000,0x0000,0x0000,0x0000,
0x0022,0x0220,0x0022,0x0220,0x0022,0x0220,0x2220,0x0222,
0x0000,0x0220,0x0000,0x0220,0x2222,0x0022,0x0000,0x0000,
0x0000,0x0100,0x0000,0x0110,0x0000,0x0011,0x1000,0x0001,
0x1100,0x0000,0x0110,0x0000,0x0011,0x0000,0x0001,0x0000,

0x2200,0x0002,0x0220,0x0022,0x0022,0x0220,0x0022,0x0220,
0x2222,0x0222,0x0022,0x0220,0x0022,0x0220,0x0000,0x0000,
0x5550,0x0555,0x5000,0x0005,0x5000,0x0005,0x5000,0x0005,
0x5000,0x0005,0x5000,0x0005,0x5000,0x0005,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x5550,0x0055,0x0055,0x0550,
0x0055,0x0550,0x0055,0x0550,0x5550,0x0055,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0055,0x0550,0x0055,0x0550,
0x0055,0x0550,0x0055,0x0550,0x5550,0x0055,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x5550,0x0055,0x0055,0x0550,
0x0055,0x0000,0x0055,0x0550,0x5550,0x0055,0x0000,0x0000,
0x0550,0x0000,0x0550,0x0000,0x5550,0x0055,0x0550,0x0550,
0x0550,0x0550,0x0550,0x0550,0x0550,0x0550,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x5550,0x0555,0x0055,0x0000,
0x5550,0x0055,0x0000,0x0550,0x5555,0x0055,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x5555,0x0055,0x0055,0x0550,
0x0055,0x0000,0x0055,0x0000,0x0055,0x0000,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x5550,0x0055,0x0055,0x0550,
0x5555,0x0055,0x0055,0x0000,0x5550,0x0555,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x5555,0x0055,0x0055,0x0550,
0x0055,0x0550,0x0055,0x0550,0x0055,0x0550,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x6660,0x0066,0x0066,0x0660,
0x0066,0x0000,0x0066,0x0660,0x6660,0x0066,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x6660,0x0066,0x0066,0x0660,
0x0066,0x0666,0x6066,0x0666,0x6660,0x0660,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x6666,0x0066,0x0066,0x0660,
0x0066,0x0660,0x0066,0x0660,0x0066,0x0660,0x0000,0x0000,
0x6600,0x0006,0x6000,0x0006,0x6000,0x0006,0x6000,0x0006,
0x6000,0x0006,0x6000,0x0006,0x6000,0x0006,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x6660,0x0666,0x0066,0x0000,
0x6660,0x0066,0x0000,0x0660,0x6666,0x0066,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x6660,0x0066,0x0066,0x0660,
0x0066,0x0660,0x0066,0x0660,0x6660,0x0066,0x0000,0x0000,

0x0660,0x0000,0x0660,0x0000,0x6660,0x0066,0x0660,0x0660,
0x0660,0x0660,0x0660,0x0660,0x6660,0x0066,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x6660,0x0066,0x0066,0x0660,
0x6666,0x0066,0x0066,0x0000,0x6660,0x0666,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0066,0x0660,0x0066,0x0660,
0x0066,0x0660,0x0066,0x0660,0x6660,0x0066,0x0000,0x0000,
0x6600,0x0666,0x0660,0x0000,0x6660,0x0066,0x0660,0x0000,
0x0660,0x0000,0x0660,0x0000,0x0660,0x0000,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x6666,0x0066,0x0066,0x0660,
0x0066,0x0000,0x0066,0x0000,0x0066,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0066,0x0660,0x0066,0x0660,
0x0066,0x0660,0x6066,0x0660,0x6660,0x0066,0x0000,0x0000,
0x6000,0x0006,0x0000,0x0000,0x6000,0x0006,0x6000,0x0006,
0x6000,0x0006,0x6000,0x0006,0x6000,0x0006,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x6660,0x0066,0x0066,0x0660,
0x6660,0x0666,0x0000,0x0660,0x6666,0x0066,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6000,0x0006,
0x6000,0x0006,0x6000,0x0006,0x6600,0x0000,0x0000,0x0000,
0x0066,0x0000,0x0066,0x0000,0x6666,0x0666,0x0066,0x0000,
0x0066,0x0000,0x0066,0x0000,0x6660,0x0666,0x0000,0x0000,
0x0660,0x0000,0x0660,0x0000,0x6660,0x0066,0x0660,0x0660,
0x0660,0x0660,0x0660,0x0660,0x0660,0x0660,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x6660,0x0066,0x6066,0x0660,
0x0066,0x0660,0x0066,0x0660,0x0066,0x0660,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x0066,0x0660,0x0066,0x0660,
0x0660,0x0066,0x6600,0x0006,0x6000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x6000,0x0006,0x6000,0x0006,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x3330,0x0033,0x0033,0x0330,
0x0033,0x0333,0x3033,0x0333,0x3330,0x0330,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x3330,0x0333,0x0033,0x0000,
0x3330,0x0033,0x0000,0x0330,0x3333,0x0033,0x0000,0x0000,

0x3000,0x0003,0x0000,0x0000,0x3000,0x0003,0x3000,0x0003,
0x3000,0x0003,0x3000,0x0003,0x3000,0x0003,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x3330,0x0033,0x0033,0x0330,
0x3333,0x0033,0x0033,0x0000,0x3330,0x0333,0x0000,0x0000,
0x0330,0x0000,0x0330,0x0000,0x0330,0x0330,0x0330,0x0033,
0x3330,0x0003,0x0330,0x0033,0x0330,0x0330,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x3333,0x0033,0x0033,0x0330,
0x0033,0x0000,0x0033,0x0000,0x0033,0x0000,0x0000,0x0000,

0x3330,0x0033,0x0033,0x0330,0x0000,0x0033,0x3000,0x0003,
0x3300,0x0000,0x0330,0x0000,0x3333,0x0333,0x0000,0x0000,
0x3330,0x0033,0x0033,0x0330,0x0033,0x0333,0x3033,0x0330,
0x0333,0x0330,0x0033,0x0330,0x3330,0x0033,0x0000,0x0000,
0x3330,0x0033,0x0033,0x0330,0x0033,0x0330,0x3330,0x0033,
0x0033,0x0330,0x0033,0x0330,0x3330,0x0033,0x0000,0x0000,
};

const unsigned short wireworld_controlsMap[768]=
{
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,

0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0002,0x0006,
0x0007,0x0000,0x0008,0x0009,0x0003,0x0000,0x000A,0x000B,
0x0007,0x000C,0x0000,0x000D,0x0002,0x000E,0x0000,0x000F,
0x0002,0x0005,0x0010,0x000C,0x0004,0x0408,0x0011,0x0000,
0x0000,0x0012,0x0000,0x0013,0x0000,0x0014,0x0015,0x0016,
0x0017,0x0000,0x0018,0x0019,0x0014,0x001A,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,

0x0000,0x001B,0x0000,0x0013,0x0000,0x001C,0x0016,0x001D,
0x001A,0x0000,0x0018,0x0019,0x0014,0x001A,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x001E,0x0000,0x0013,0x0000,0x001F,0x0015,0x0020,
0x0020,0x0014,0x001A,0x0000,0x0417,0x001A,0x001F,0x0021,
0x001A,0x001A,0x0022,0x0000,0x001C,0x0016,0x001D,0x0019,
0x0022,0x0020,0x0000,0x0016,0x0022,0x0017,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x0000,0x0023,0x001A,0x001C,
0x001F,0x0015,0x0023,0x0019,0x0022,0x0020,0x0000,0x001F,
0x0024,0x001A,0x0000,0x0025,0x0023,0x001A,0x001D,0x0019,
0x0015,0x0026,0x001C,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x001C,0x001F,0x0016,
0x001F,0x001A,0x0027,0x0000,0x0015,0x0023,0x0000,0x0022,
0x0015,0x001F,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0028,0x0029,0x002A,0x002B,0x002A,0x0000,0x002C,
0x002D,0x002E,0x002E,0x002F,0x0030,0x002B,0x0000,0x0029,
0x0031,0x0032,0x002A,0x0000,0x002E,0x0029,0x002A,0x0033,
0x0034,0x0000,0x002A,0x0035,0x002D,0x0031,0x0036,0x0000,

0x0000,0x0033,0x0037,0x0032,0x002A,0x0030,0x002E,0x002B,
0x0000,0x002F,0x0030,0x0000,0x002E,0x0029,0x002A,0x0000,
0x002E,0x002F,0x002D,0x0038,0x0029,0x002B,0x0038,0x0034,
0x002A,0x002A,0x0030,0x0039,0x0000,0x0000,0x0000,0x0000,
0x0000,0x003A,0x0000,0x0013,0x0000,0x001F,0x0015,0x0020,
0x0020,0x0014,0x001A,0x0000,0x0417,0x001A,0x001F,0x0021,
0x001A,0x001A,0x0022,0x0000,0x001C,0x0014,0x0015,0x0021,
0x003B,0x0018,0x0016,0x001C,0x001F,0x0000,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x0000,0x001C,0x0025,0x001A,
0x001A,0x0017,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x003C,0x0000,0x0013,0x0000,0x001F,0x0015,0x0020,
0x0020,0x0014,0x001A,0x0000,0x0015,0x0022,0x003B,0x0015,
0x0018,0x0018,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0040,
0x0043,0x0044,0x0044,0x0045,0x0000,0x0046,0x0047,0x0048,
0x0000,0x0047,0x0049,0x004A,0x004B,0x0000,0x004C,0x004D,
0x0000,0x004E,0x004A,0x004D,0x044C,0x0000,0x0000,0x0000,

0x0000,0x004F,0x004B,0x0050,0x0000,0x044C,0x0050,0x0047,
0x0051,0x0052,0x0048,0x0053,0x0054,0x0000,0x0046,0x0049,
0x004D,0x0047,0x0050,0x0052,0x0048,0x0053,0x0000,0x0055,
0x0056,0x004D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x004A,0x0046,0x0050,0x004D,0x004D,0x0048,0x0000,
0x0047,0x0048,0x044C,0x0000,0x0050,0x004D,0x0057,0x004B,
0x0058,0x0052,0x0048,0x0053,0x0000,0x0055,0x0056,0x004D,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,

0x0000,0x004D,0x0049,0x004D,0x0046,0x0055,0x0050,0x004B,
0x0048,0x004A,0x0059,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x005A,0x005B,0x005C,0x005D,
0x005E,0x005C,0x005D,0x005F,0x005E,0x005A,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,

0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0060,
0x0061,0x0061,0x0062,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
};

//}}BLOCK(wireworld_controls)

+ 1
- 0
template.pnproj View File

@@ -0,0 +1 @@
<Project name="template"><MagicFolder excludeFolders="CVS;.svn" filter="*.h" name="include" path="include\"><File path="DSding_raw.h"></File><File path="DSkill_raw.h"></File><File path="DSload_raw.h"></File><File path="DSnew_raw.h"></File><File path="tileedit.h"></File><File path="tonc_memfunc.h"></File><File path="wireworldTS.h"></File><File path="wireworld_controls.h"></File></MagicFolder><MagicFolder excludeFolders="CVS;.svn" filter="*.c;*.cpp" name="source" path="source\"><File path="tileedit.c"></File><File path="wireC.cpp"></File><File path="wireworldTS.c"></File><File path="wireworld_controls.c"></File></MagicFolder><File path="Makefile"></File></Project>

+ 1
- 0
template.pnps View File

@@ -0,0 +1 @@
<pd><ViewState><e p="template" x="true"></e><e p="template\include" x="false"></e><e p="template\source" x="true"></e></ViewState></pd>

+ 32
- 0
template.prj View File

@@ -0,0 +1,32 @@
[Project ID]
Signature=UE Proj: v.1
[Project Information]
Filter=*.*
Project Directory=C:\projects\devkitPro\test\nds_template\arm9\
Use Relative Directory=1
Relative to Project File=1
Project Wordfile=
Project Tagfile=
Create Tagfile=0
Include Sub Directories=0
[Files]
0=include\
1=Makefile
2=source\
[Group]
0=
[Open Files]
Open File0=C:\projects\devkitPro\examples\nds\templates\arm9\source\main.c
Active File Display Mode=3
Open File Pos0=751
Open File Line0=0
Active File Index=0
Open File Window Pos0=2,3,-1,-1,-4,-23,0,0,918,359
Open File1=C:\projects\devkitPro\examples\nds\templates\arm9\build\arm9.map
Open File Pos1=9864
Open File Line1=15129
Open File Window Pos1=0,1,-1,-1,-4,-23,22,22,944,385
Open File2=
[File View]
Current Select=Project Files\source\main.c
Scroll Position=0

+ 20
- 0
template.sln View File

@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "arm9 template", "template.vcproj", "{03F9E3EC-1341-41FF-816A-F53050EDB21A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{03F9E3EC-1341-41FF-816A-F53050EDB21A}.Debug|Win32.ActiveCfg = Debug|Win32
{03F9E3EC-1341-41FF-816A-F53050EDB21A}.Debug|Win32.Build.0 = Debug|Win32
{03F9E3EC-1341-41FF-816A-F53050EDB21A}.Release|Win32.ActiveCfg = Release|Win32
{03F9E3EC-1341-41FF-816A-F53050EDB21A}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

BIN
template.suo View File


+ 86
- 0
template.vcproj View File

@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="arm9 template"
ProjectGUID="{03F9E3EC-1341-41FF-816A-F53050EDB21A}"
Keyword="MakeFileProj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="0"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="make -r 2&gt;&amp;1 | sed -e ’s/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/’"
ReBuildCommandLine=""
CleanCommandLine="make clean"
Output="arm9.nds"
PreprocessorDefinitions="ARM9"
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="0"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="make -r 2&gt;&amp;1 | sed -e ’s/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/’"
ReBuildCommandLine=""
CleanCommandLine="make clean"
Output="arm9.nds"
PreprocessorDefinitions="ARM9"
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\source\main.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

+ 65
- 0
template.vcproj.NEUROMANCER.davem.user View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="8.00"
ShowAllFiles="false"
>
<Configurations>
<Configuration
Name="Debug|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="NEUROMANCER"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="NEUROMANCER"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

BIN
tileedit.bmp View File


BIN
wireworld_controls.bmp View File


BIN
wireworld_title.bmp View File


BIN
wireworld_title_1.0.bmp View File


Loading…
Cancel
Save