Update: Check out my wiki page for the latest download of WinROTT.
I've run into an interesting problem with the WinROTT port. WinROTT using structures similar to the following to control single user enemies:
typedef struct statestruct
{
byte rotate;
short shapenum; // a shapenum of -1 means get from ob->temp1
short tictime;
void (*think) (void *);
signed char condition;
struct statestruct *next;
} statetype;
When moving to C++, you need to be aware that the following assignments are allowed in C, but not in C++:
void MyFunc1(int *)
{
//blah blah blah
}
void MyFunc2(float *)
{
//blah blah blah
}
statetype s_mine2 = {false,SPR_MINE2,3,MyFunc1,0,&s_mine3};
statetype s_mine1 = {false,SPR_MINE1,3,MyFunc2,0,&s_mine2};
The way I changed the code is to cast everything to a void pointer, and then make sure a cast exists in the function to correct the variable pointer type. There are about 160 of these functions. It turned out to be quite tedious and error prone. If you get on a roll with cut and paste, you are likely to create more problems that you solve.