I know that it thinks that __cdecl is var, and I'm prototyping it because I have 2 different conio.h files and one includes the funtion I need. It has the same error with that include file, so I was just going to use the funtion that I needed. But it is still giving me the same error. Here's more code:
#define __cdecl _cdecl
/* function prototypes */
int _cdecl _inp(unsigned);
#define VGA_INPUT_STATUS_1 0x3DA
// VGA status reg1, bit 3 is the vsync
// when 1 - retrace in progress
// when 0 - no retrace
#define VGA_VSYNC_MASK 0x80 // masks off unwanted bit of the status reg.
// Function: wait_for_vsync
// Purpose: waits for the vertical retrace
//
// Input: none
// Output: none
void wait_for_vsync();
---Game Code---
void wait_for_vsync()
{
while(_inp(VGA_INPUT_STATUS_1) & VGA_VSYNC_MASK)
{
// do nothing: VGA is in retrace
}
// Now wiat for vsync and exit
while(!(_inp(VGA_INPUT_STATUS_1) & VGA_VSYNC_MASK))
{
// Do nothing: wait for the start of retrace
}
// retrace is starting so exit
}