|
rotate_sprite - "Isufficient context" ? |
Yuri2356
Member #7,814
September 2006
|
Hey-o! While working on a project with DevC++ and allegro, my first use of the rotate_sprite function has met with problems. rotate_sprite(PreScreen, BlipBit, int, int, (double * (128 / Pi) ) ); (I've substituted the types for the names of the variables I'm using) That 'double' is an angle in radians. There's no problem with the bitmaps or co-ordinates (I've used them in previous draw_sprite s) but the addition of rotation has prompted the error of "insufficient contextual information to determine type" on the Line where rotate_sprite is called. I've already tried converting the angle to float, int, and a few other types, all with the same problem. Just what needs to be done to get that angle recognized? |
CGamesPlay
Member #2,559
July 2002
|
You need to pass a "fixed" to the function.
[edit] -- Ryan Patterson - <http://cgamesplay.com/> |
ImLeftFooted
Member #3,935
October 2003
|
* Maybe paste some more code, copied exactly (make sure to use [code] blocks), preferably no more then 15 lines in length along with an exact copy of the error message? * deleted due to inaccuracy |
gnolam
Member #2,030
March 2002
|
Dustin Dettmer said: Shouldn't 'double' actually be a variable of some sort? Shouldn't the two 'int's also be variables instead?
Yuri2356 said: I've substituted the types for the names of the variables I'm using
-- |
bamccaig
Member #7,536
July 2006
|
My only real reply to this thread so far, since I haven't used the rotation function in question, is why would you replace variable names with data types in sample code?? It's difficult to help you if we aren't looking at the actual code. I originally thought you were trying to pass a (double *) in for the angle which had me way confused... -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Yuri2356
Member #7,814
September 2006
|
Well, converting my angle with ftofix is making everything run smoothly. This shoulnd't be a problem any more. |
|