Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

[GBDK] GAMEBOY [C]

Name: !MILKRIBS4k 2009-06-16 17:13

Anyone on here use the gameboy c compiler gbdk? http://gbdk.sourceforge.net/ There doesn't seem to be much documentation on it! Most of the code I find on google is designed for an older version of the compiler! How would I go about displaying a simple sprite! Someone help MILKRIBS4k!

Name: Anonymous 2009-06-16 17:42

This is open-source: write the documentation instead of bitching about the lack of it.

Name: Anonymous 2009-06-16 17:45

just buy a gameboy advance for $10 and use gcc.

Name: !MILKRIBS4k 2009-06-16 17:47

>>3
But 8-bit consoles are cooler!
>>2
I am not smart enough! I only have a limited knowledge of C!

Name: Anonymous 2009-06-16 17:47

>>1
28th Feburary, 2001
It seems dead, dead projects make me want to cry. :(

Name: Anonymous 2009-06-16 17:48

MILKRIBS4k? Programming? last news 2001? ITIHBT

Name: !MILKRIBS4k 2009-06-16 17:51

>>5
No one likes gameboy! :(

Name: Anonymous 2009-06-16 17:52

>>1
Aren't you an anus? Or, even worse, FV?

Name: !MILKRIBS4k 2009-06-16 17:53

>>8
I can insure you I am no anus, now help me display sprites!

Name: Anonymous 2009-06-16 17:57

>>9
Show me the code.

Name: !MILKRIBS4k 2009-06-16 18:01

>>10
Well it is standard ANSI/ISO C! I compiled a little text adventure! But I have no idea how to use the graphic librarys!

Name: Anonymous 2009-06-16 18:03

>>4
But 8-bit consoles are cooler!
only if you use assembly.

Name: Anonymous 2009-06-16 18:06

>>11
Show me the code.

Name: !MILKRIBS4k 2009-06-16 18:12

>>12
Assembly a little to complicated for me!
>>13
I don't know what code you want? Here is an example that comes with it, which I don't really get! I just want to know how to display a sprite! http://pastebin.com/m10dd649

Name: Anonymous 2009-06-16 18:42

>>1,4,7,9,11,14
Back to /lounge/, MILKRIBS

Name: !MILKRIBS4k 2009-06-16 19:04

>>15
/lounge/ can't help me with my question though!

Name: Anonymous 2009-06-16 19:52

>>16
Back to /lounge/, MILKRIBS

Name: !MILKRIBS4k 2009-06-16 19:56

>>17
NO THANK YOU

Name: Anonymous 2009-06-17 6:33

Please help the anus!

Name: !MILKRIBS4k 2009-06-17 8:50

>>19
I can insure you I am no anus!

Name: Anonymous 2009-06-17 8:55

Back to /lounge/, MILKRIBS.

Name: Anonymous 2009-06-17 9:02

>>14
Why the hell are you using 16 bit colour maps? Seriously what the hell... When I code even for the NDS I use at maximum 8 bit.

Displaying a sprite on the GBC/GB...
set_sprite_palette(sprite,n,&spritemap);
SPRITES_8x8;
set_sprite_data(sprite, n, tiledata);
set_sprite_tile(sprite,tile);
set_sprite_prop(sprite,prop);
move_sprite(sprite,x,y);
SHOW_SPRITES;   
Enjoy.

Name: !MILKRIBS4k 2009-06-17 9:07

>>22
Thanks this information will come in useful!

Name: !MILKRIBS4k 2009-06-17 9:14

saging this fucking thread

Name: Anonymous 2009-06-17 12:01

>>24
Not an anus ( ≖‿≖)

Name: Anonymous 2009-06-17 12:07

MILKRIBS, it seems that C is your first codan (no offence), so here are some beginner tips!

1. Use fprintf (``fast printf'') instead of printf.
2. ++i is faster than both i++ and i = i + 1. I won't get into detail why, because it goes down to ASM.
3. void main(void) is faster than int main(void) or int main(int, char **) since no value needs to be returned to the OS. It's also safer (no errors) and more portable.
4. Swapping with exclusive-or (a^=b^=a^=b swaps a and b) is faster than using a temporary. This works for all types (including structures), but not on all compilers. Some compilers may also give you a harmless warning.
5.Avoid indentation, the whitespace makes the program bigger. It also makes it slower, because the compiler has to remove all whitespace anyway before parsing.
6. Static storage duration objects are faster than automatic storage duration objects because the CPU doesn't have to set aside storage on the stack every time a function is called. Make your loop indexes global so that you can use them everywhere:
    int i;
    void func(void) { for (i = 0; i < 10; i++) ; /* ... */ }
    void func2(void) { for (i = 0; i < 20; i++) ; /* ... */ }
    /* ... */

7. Compilers often give more memory to arrays than you asked for. Here's how to check how big an array actually is (memset returns a null pointer if the size you passed to it is bigger than the size of the array you passed to it):
    int arr[256];
    size_t realsize;
    for (realsize = 0; realsize <= SIZE_MAX; ++realsize)
            if (!memset(arr, 0, realsize)) break;
    /* now you know that arr actually has realsize / sizeof (int) elements */

If you combine this with #6, your program will be faster in the long run (but this usually doesn't work for short programs).

Name: Anonymous 2009-06-17 12:25

I fucking lol'd at 6

Name: !MILKRIBS4k 2009-06-17 12:26

>>24
NOT ME!
>>25
NO ONLINE IS AN ANUS!
>>26
This will come in useful!

Name: !MILKRIBS4k 2009-06-17 12:28

>>26
Wait a minute, a lot of this is wrong! Nice try DOCTOR FAIL!

Name: Anonymous 2009-06-17 12:31

>>29
How about *YOU* are full of bullshit? Even thought of that? This is taken straight from K&R, which, in case you don't know, is a de facto standard of C.

Name: Anonymous 2009-06-17 12:33

Okay, maybe point 1 seems dubious, so I gotta clarify; just use a pointer to stdout where you would use a pointer to the file.

Name: (≖‿≖) 2009-06-17 12:33

>>26
( ≖‿≖)

Name: !MILKRIBS4k 2009-06-17 12:48

>>30
I can insure you I am no anus! I am MILKRIBS4k, I will not fall for your trolling DOCTOR FAIL! Now back to /b/, plz

Name: Anonymous 2009-06-17 13:14

>>33
Where did I claim that you are an anus? That's retarded.
Also read K&R before you try to do *anything* with C. It's the most natural thing to do. I've given you the most useful excerpts from the book, but no, you must enter with your bullshit and claim that you're smarter than Dennis Motherfucking Ritchie. Good luck in programming with that attitude, faggot, at least have some humility, because there are people smarter than you out there. Like, you know, the dude that designed the fucking language you use. Go on, try to logically show that *any* of these points is wrong, I'll be more than happy to disprove whatever nonsensical bullshit you utter.
Finally, I have not been in /b/ for two years, but seeing your attitude, I guess it's a place more suitable for you rather than me to go to. You go back to /b/, please, and come back when you've learned your place. And learned to fucking type, because ``plz'' is not a word in any language known to man.

Name: Anonymous 2009-06-17 13:16

Also, I have admitted, in >>31​, that one point might seem dubious for novice C programmers, but it's a common practice in real world, but hey, you know better.

Name: Anonymous 2009-06-17 13:17

>>34
!Milkribs4k status: TOLD

Name: Anonymous 2009-06-17 13:19

ALSO, the word you're looking for is ``assure'', not ``insure''.

http://www.wsu.edu/~brians/errors/assure.html

Name: Anonymous 2009-06-17 13:25

>>37
ensure

Name: Anonymous 2009-06-17 13:30

>>38
Whoops, sorry, you're obviously correct, I was blinded with anger.

Name: !MILKRIBS4k 2009-06-17 13:44

>>34
Give me a reference(link) to back up what you are saying and I will believe you! Stuff like 5. makes no sense! Also I haven't been to /b/ in over 3 years so please step down!
>>36
NO THANK YOU
>>37
I know what I am saying!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List