|
|
| couple questions... |
|
MickyD
Member #2,409
June 2002
|
how can I use scancode_to_ascii and check if the user is holding shift and if so enter a capitol letter (for high score name entry). I have the function done, but no caps. when I build the static version of allegroMp3 and link it using almp3.lib and try to compile using MSVC6 I get: error LNK2001: unresolved external symbol __imp__play_audio_stream and also, jpgAlleg 2.1 still wont compile for me (need MSVC6 version). I tried over and over with MingW32, but to no avail. I've been trying using MSVC's NMAKE program, but I only assumed that it would work. If anyone can help me out and tell me exactly how to compile the lib OR send me the files I need via email, that would be great: typosoft@hotmail.com |
|
X-G
Member #856
December 2000
|
If (key[KEY_SHIFT]) isn't good enough? -- |
|
Derezo
Member #1,666
April 2001
|
For the first question, you could do something like this. char k = scancode_to_ascii(scancode); if(key[KEY_RSHIFT] || key[KEY_LSHIFT) k = toupper(k); // then deal with k. [edit: beaten by the cookie, and toupper is in ctype.h btw] "He who controls the stuffing controls the Universe" |
|
MickyD
Member #2,409
June 2002
|
Okay, got the highscores thing working, and for the most part the jpglib. I just included the files in my program. But because I included the jpeg.c and jpgalleg.h files all my calls to sin and cos are very jumpy now instead of smooth. Maybe I should use fixsin & fixcos? If so, how do you use them (because when I tried I didn't get the same results as sin and cos using a float for the value). |
|
X-G
Member #856
December 2000
|
Quote: But because I included the jpeg.c and jpgalleg.h files Aigh! Never include .c files! -- |
|
MickyD
Member #2,409
June 2002
|
then how should I do it? |
|
X-G
Member #856
December 2000
|
Compile them and link with them, perhaps? -- |
|
MickyD
Member #2,409
June 2002
|
screw the jpglib. I have it working now and if I compress an image to the point where it makes a difference I lost my transparency for my game (because it makes the image lossy). But when I use the lowest compression for a jpg (which decreases the file size by half) and then run the allegro grabber, it saves the datafile to 130% the original file size! So I'll just use the bitmaps instead. I still am having problems with allegroMp3. Anybody know what I need to do? I ran and compiled the static version and copied the lib to my vc98\lib\ directory. Then I included the .h file and added almp3.lib to my link tab. It doesn't spit out any errors when I don't use any functions from the lib, but when I add in the functions from the example program I get: almp3.lib(almp3.obj) : error LNK2001: unresolved external symbol __imp__play_audio_stream |
|
Mae Mutts
Member #3,766
August 2003
|
sounds like the mp3 library is referencing another library that you don't have. Just my 2 pennies. Mae |
|
Tobias Dammers
Member #2,604
August 2002
|
Why put jpg's into a datafile? Wanna keep others from using them? --- |
|
Fladimir da Gorf
Member #1,565
October 2001
|
Use PNGs. Good non-lossy compression and a higher bit-depth support. OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
|
Derezo
Member #1,666
April 2001
|
PNG's are the way to go. Quote: Why put jpg's into a datafile? Wanna keep others from using them?
You can also load the jpgs from a single datafile instead of having hundreds of jpg's... and it also offers more compression (although I don't know if jpgs would compress well with datafiles). Datafiles are excellent organizers. "He who controls the stuffing controls the Universe" |
|
MickyD
Member #2,409
June 2002
|
I'm just not going to worry about anything other than bitmaps. I've been working on this game for about a month and it is pretty much done. The only thing I don't like about it is that it's a 6 meg download. Anyways, here's a question: how can I change an executable's icon using an icon stored in the exe using MSVC? and I think the mp3 library is trying to access the mp3123 lib or something? |
|
|