Thread: A rather unique problem, involving the good ole gb

  1. #1
    Scourfish
    Guest

    A rather unique problem, involving the good ole gb

    YO, here's the problem. with the libraries that make up the GBDK, there is a function called set_bkg_tiles,x,y,l,w,tileindex. I have loaded a set of tiles with some 8x8 text characters in it. In the demo I have seen programmed, somebody was able to create a string of text, and simply call set_bkg_tiles and use the string of text and it will use the ascii value of the character to place the corresponding tile in the tileset. "A" in a minimum character set usually begins around the 65th tile in the standars ascii set, but in my tile set, A revolves around the 200th or so tile. Anyway, would somebody have the faintest idea how I could use set_bkg_tiles and have it reference up 140 or so tiles, because I know that "set_bkg_tiles(14,1,11,1,((unsigned char*)char_gover+140);" would be way wrong, and I've already tried it.

    I dunno, I'm once again talking out of my rear end. But, if by some change in the fabric of the universe, somebody knows, then it'd be helpful.

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Hey! Finally a question I can relate to. Could you post a little code so I can see where you may have gone wrong. I haven't done regular game boy stuff in a while but I may be able to help nonetheless.

  3. #3
    Scourfish
    Guest
    Here's the code, in a nutshell:

    void main(void){
    char Gameover[]="Game Over";
    blah blah blah blah;
    set_bkg_data(blah blah blah);
    set_bkg_tiles(x,y,l,w,(unsigned char*)Gameover;
    More crap;}

    the second to last line is my problem. I've tried "(unsigned char*)Gameover+0x8F", but that seems to get me nowhere.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Good ole Semaphores.......
    By LeeMan101 in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 04-03-2003, 04:23 PM
  2. Replies: 17
    Last Post: 12-06-2002, 03:13 PM
  3. problem with maxtor 120 GB extern HD
    By *ClownPimp* in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 07-09-2002, 05:51 AM
  4. Replies: 0
    Last Post: 02-05-2002, 07:44 PM
  5. problem with output
    By Garfield in forum C Programming
    Replies: 2
    Last Post: 11-18-2001, 08:34 PM