Heres the code(minus the bin files, but as I said, its pretty much the exact examples given with the snes converter):
#define OPTIMIZE_ROM_CALLS
#include "genlib.h"
extern SPRITE_16 tiles[]; // Import reference
extern char map[]; // Import reference
import_binary("room2.lvl",map);
import_binary("room2.bin",tiles);
//extern SPRITE_16 tiles2[]; // Import reference
//extern char map2[]; // Import reference
//import_binary("room1.lvl",map2);
//import_binary("room1.bin",tiles2);
DSCREEN *DScr[2] = {NULL, NULL };
int ts = 0;
// Double-buffer function
void SwapBuffer()
{
gl_set_dscreen_int(DScr[ts]);
ts ^= 1;
gl_set_dscreen_function(DScr[ts]);
}
// Constant speed 30Hz function
void Wait30()
{
gl_timer = 0;
while (gl_frame_timer < 1)
idle();
gl_frame_timer = 0;
}
// Constant speed 15Hz function
void Wait15()
{
gl_timer = 0;
while (gl_frame_timer < 2)
idle();
gl_frame_timer = 0;
}
void _main(void)
{
PLANE *P1/*,*P2*/;
JOYPAD j;
HANDLE hd;
// init Genlib
gl_init();
// init dscreen
gl_init_dscreen(&DScr[0], &hd);
if (hd == 0) goto exit;
gl_push_hd(hd);
gl_init_dscreen(&DScr[1], &hd);
if (hd == 0) goto exit;
gl_push_hd(hd);
gl_set_dscreen_int(DScr[0]);
gl_set_dscreen_function(DScr[0]);
gl_cls();
gl_change_update(); /* Use real size X for the plane */
P1 = gl_init_plane(map, tiles, 16);
if (P1 == NULL) goto exit;
gl_push_hd(P1->handle);
//P2 = gl_init_plane(map2, tiles2, 16);
//if (P2 == NULL) goto exit;
//gl_push_hd(P2->handle);
P1->xs = 100;
P1->ys = 100;
//P2->xs = 100;
//P2->ys = 100;
j = gl_read_joypad();
while (j.exit_key) {
j = gl_read_joypad();
if (!j.left_key) P1->xs --/*, P2->xs --*/;
if (!j.right_key) P1->xs ++/*, P2->xs ++*/;
if (!j.up_key) P1->ys --/*, P2->ys --*/;
if (!j.down_key) P1->ys ++/*,P2->ys ++*/;
gl_update_vscreen_16(P1);
// gl_update_vscreen_16(P2);
gl_put_plane_89(P1);
// gl_put_fgrd_plane_89(P2);
SwapBuffer();
Wait30();
}
exit:
gl_cls();
gl_free_hd();
gl_quit();
}
Anywho, room was the name I used for the dat files(Im guessing by how the map looks in hex that the second file was the background).
What am I doing wrong(if you need the bin files, Ill upload them)