- Online Community Forums » Programming Questions » rotate_sprite - "Isufficient context" ?

Credits go to CGamesPlay for helping out!
This thread is locked; no one can reply to it. rss feed Print
rotate_sprite - "Isufficient context" ?
Member #7,814
September 2006


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?

Member #2,559
July 2002

You need to pass a "fixed" to the function. You don't pass radians, either. Look up these:

Well, you already don't pass radians.

Tomasu: Every time you read this: hugging!

Ryan Patterson - <>

Dustin Dettmer
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

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

Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

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...

Member #7,814
September 2006

Well, converting my angle with ftofix is making everything run smoothly.

This shoulnd't be a problem any more. :)

Go to: