Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Help with keyboard and graphics.

This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
Help with keyboard and graphics.
Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

My avatar is only that simple because I'm lazy :).

You want lazy? I didn't make my avatar, or this christmas version of it, or bother changing it back to the regular one once the holidays were over.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Mark Oates
Member #1,146
March 2001
avatar

it probibly took more effor to type that. ;)

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

konedima
Member #6,241
September 2005

Could we please stay on topic?

BTW, I've created a skin based on my avatar. It sucks, but compressed it's less than 10k and decompressed it's less than 100k.

War Pong HD! Every time you don't download it, a kitten of hope dies in my heart. Please, save the imaginary kittens.
http://warpong.sourceforge.net

LennyLen
Member #5,313
December 2004
avatar

Quote:

Could we please stay on topic?

I thought the matter was resolved?

konedima
Member #6,241
September 2005

Not the graphics one - there's still debate about whether Allegro is meant to work with 16 bit bitmaps. If it isn't, I'll have to live with that. If it is, we have to figure out what's wrong.

War Pong HD! Every time you don't download it, a kitten of hope dies in my heart. Please, save the imaginary kittens.
http://warpong.sourceforge.net

LennyLen
Member #5,313
December 2004
avatar

Quote:

If it is, we have to figure out what's wrong.

What did you use to create the graphics in the first place? I have several graphics apps, and not a single one of them can create 16bit Windows BMPs, only 8, 24 or 32bit.

konedima
Member #6,241
September 2005

Photoshop, and I have to admit none of the other programs I've tried can do it. But they load fine in other programs.

War Pong HD! Every time you don't download it, a kitten of hope dies in my heart. Please, save the imaginary kittens.
http://warpong.sourceforge.net

LennyLen
Member #5,313
December 2004
avatar

Quote:

But they load fine in other programs.

I've noticed that as well. They work with all the programs I have, but not Allegro. I've also had the same problem with BMPs in the past, but after resaving them with another program they worked.

Just use 24bit BMPs. Your game isn't that graphics intensive, so they won't take up that much more space. If size is your real concern, then don't use BMPs at all, use PNGs or GIFs, both of which can be used with Allegro through the use of other libraries.

konedima
Member #6,241
September 2005

I might use another image format but I have absolutely no idea how to load the extra libraries and stuff. As Homer Simpson would say, "It's my first day".

Close enough, anyway.

War Pong HD! Every time you don't download it, a kitten of hope dies in my heart. Please, save the imaginary kittens.
http://warpong.sourceforge.net

LennyLen
Member #5,313
December 2004
avatar

It's no different from using the Allegro library. You either build the library, or copy the library files to your compilers lib directory, then include the libraries header into your code and use the functions.

All the ones I've used have come with documentation and examples as well.

konedima
Member #6,241
September 2005

This is probably a stupid question but if I add those libraries do I have to include any extra files with the end product?

On that note, what Allegro files do I have to include in the installer, if any?

War Pong HD! Every time you don't download it, a kitten of hope dies in my heart. Please, save the imaginary kittens.
http://warpong.sourceforge.net

Evert
Member #794
November 2000
avatar

Quote:

there's still debate about whether Allegro is meant to work with 16 bit bitmaps.

No debate.

I said:

It should. I vaguely recall that there used to be a bug that prevented it from working sometime pre 4.2, but that should be fixed.
Haven't tested it recently though.

EDIT: tested it with your paddle2.bmp, works fine.

konedima
Member #6,241
September 2005

I think the debate is that you say it should, everyone else says it doesn't. Anyway, I'm trying using PNGs, but not having much luck.

Whenever I try to compile, I get lots of linker errors, like
[Linker error] undefined reference to `crc32'
[Linker error] undefined reference to `inflateReset'
And such.

War Pong HD! Every time you don't download it, a kitten of hope dies in my heart. Please, save the imaginary kittens.
http://warpong.sourceforge.net

Evert
Member #794
November 2000
avatar

See above edit. What version of Allegro are you using?

Anyway, if I say it should work and it doesn't, it's a bug and should be reported as such.

konedima
Member #6,241
September 2005

Version 4.2.1

As I said though, I'm trying PNGs, and having problems, could you stop arguing and help me with that?

War Pong HD! Every time you don't download it, a kitten of hope dies in my heart. Please, save the imaginary kittens.
http://warpong.sourceforge.net

Mark Oates
Member #1,146
March 2001
avatar

Quote:

I think the debate is that you say it should, everyone else says it doesn't.

I would still wager in favor of Evert. ;)

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

Whenever I try to compile, I get lots of linker errors, like
[Linker error] undefined reference to `crc32'
[Linker error] undefined reference to `inflateReset'

Did you link with zlib, in addition to libpng and loadpng?

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

konedima
Member #6,241
September 2005

I now consider the discussion moot, I'm using PNG.

I fixed my earlier problem with PNG, too - I forgot to put zlib in the linker.

EDIT: Posted at the same time as Kitty Kat. Good advice, just a bit late.

War Pong HD! Every time you don't download it, a kitten of hope dies in my heart. Please, save the imaginary kittens.
http://warpong.sourceforge.net

Evert
Member #794
November 2000
avatar

Quote:

could you stop arguing and help me with that?

With that attitude, no.

konedima
Member #6,241
September 2005

Sorry about my attitude. I try not to come off as sounding mean but due to the profession of someone I know I come into contact with squabbling kids far too often. Anyway, it's solved now.

War Pong HD! Every time you don't download it, a kitten of hope dies in my heart. Please, save the imaginary kittens.
http://warpong.sourceforge.net

 1   2   3 


Go to: