(svn r9050) -Codechange: Foo(void) -> Foo()
This commit is contained in:
@@ -41,8 +41,8 @@ extern "C" OSErr CPSEnableForegroundOperation(CPSProcessSerNum* psn, UInt32 _arg
|
||||
extern "C" OSErr CPSSetFrontProcess(CPSProcessSerNum* psn);
|
||||
|
||||
/* From Menus.h (according to Xcode Developer Documentation) */
|
||||
extern "C" void ShowMenuBar(void);
|
||||
extern "C" void HideMenuBar(void);
|
||||
extern "C" void ShowMenuBar();
|
||||
extern "C" void HideMenuBar();
|
||||
|
||||
/* Disables a warning. This is needed since the method exists but has been dropped from the header, supposedly as of 10.4. */
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
|
||||
@@ -126,12 +126,12 @@ typedef struct {
|
||||
@end
|
||||
|
||||
|
||||
static void QZ_Draw(void);
|
||||
static void QZ_UnsetVideoMode(void);
|
||||
static void QZ_Draw();
|
||||
static void QZ_UnsetVideoMode();
|
||||
static void QZ_UpdatePalette(uint start, uint count);
|
||||
static void QZ_WarpCursor(int x, int y);
|
||||
static void QZ_ShowMouse(void);
|
||||
static void QZ_HideMouse(void);
|
||||
static void QZ_ShowMouse();
|
||||
static void QZ_HideMouse();
|
||||
static void CocoaVideoFullScreen(bool full_screen);
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ static bool _cocoa_video_dialog = false;
|
||||
* Game loop and accessories *
|
||||
******************************************************************************/
|
||||
|
||||
static uint32 GetTick(void)
|
||||
static uint32 GetTick()
|
||||
{
|
||||
struct timeval tim;
|
||||
|
||||
@@ -200,7 +200,7 @@ static uint32 GetTick(void)
|
||||
return tim.tv_usec / 1000 + tim.tv_sec * 1000;
|
||||
}
|
||||
|
||||
static void QZ_CheckPaletteAnim(void)
|
||||
static void QZ_CheckPaletteAnim()
|
||||
{
|
||||
if (_pal_last_dirty != -1) {
|
||||
QZ_UpdatePalette(_pal_first_dirty, _pal_last_dirty - _pal_first_dirty + 1);
|
||||
@@ -469,7 +469,7 @@ static bool QZ_MouseIsInsideView(NSPoint *pt)
|
||||
}
|
||||
|
||||
|
||||
static bool QZ_PollEvent(void)
|
||||
static bool QZ_PollEvent()
|
||||
{
|
||||
NSEvent *event;
|
||||
NSPoint pt;
|
||||
@@ -663,7 +663,7 @@ static bool QZ_PollEvent(void)
|
||||
}
|
||||
|
||||
|
||||
static void QZ_GameLoop(void)
|
||||
static void QZ_GameLoop()
|
||||
{
|
||||
uint32 cur_ticks = GetTick();
|
||||
uint32 next_tick = cur_ticks + 30;
|
||||
@@ -764,7 +764,7 @@ static void QZ_GameLoop(void)
|
||||
* The genie effect uses the alpha component. Otherwise,
|
||||
* it doesn't seem to matter what value it has.
|
||||
*/
|
||||
static void QZ_SetPortAlphaOpaque(void)
|
||||
static void QZ_SetPortAlphaOpaque()
|
||||
{
|
||||
if (_cocoa_video_data.device_bpp == 32) {
|
||||
uint32* pixels = (uint32*)_cocoa_video_data.realpixels;
|
||||
@@ -1032,7 +1032,7 @@ static bool _resize_icon[] = {
|
||||
1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0
|
||||
};
|
||||
|
||||
static void QZ_DrawResizeIcon(void)
|
||||
static void QZ_DrawResizeIcon()
|
||||
{
|
||||
int xoff = _cocoa_video_data.width - 16;
|
||||
int yoff = _cocoa_video_data.height - 16;
|
||||
@@ -1054,7 +1054,7 @@ static void QZ_DrawResizeIcon(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void QZ_DrawWindow(void)
|
||||
static void QZ_DrawWindow()
|
||||
{
|
||||
int i;
|
||||
RgnHandle dirty, temp;
|
||||
@@ -1421,7 +1421,7 @@ static void QZ_UpdateFullscreenPalette(uint first_color, uint num_colors)
|
||||
}
|
||||
|
||||
/* Wait for the VBL to occur (estimated since we don't have a hardware interrupt) */
|
||||
static void QZ_WaitForVerticalBlank(void)
|
||||
static void QZ_WaitForVerticalBlank()
|
||||
{
|
||||
/* The VBL delay is based on Ian Ollmann's RezLib <iano@cco.caltech.edu> */
|
||||
double refreshRate;
|
||||
@@ -1452,7 +1452,7 @@ static void QZ_WaitForVerticalBlank(void)
|
||||
}
|
||||
|
||||
|
||||
static void QZ_DrawScreen(void)
|
||||
static void QZ_DrawScreen()
|
||||
{
|
||||
const uint8* src = _cocoa_video_data.pixels;
|
||||
uint8* dst = (uint8*)_cocoa_video_data.realpixels;
|
||||
@@ -1579,12 +1579,12 @@ static void QZ_UpdatePalette(uint start, uint count)
|
||||
}
|
||||
}
|
||||
|
||||
static void QZ_InitPalette(void)
|
||||
static void QZ_InitPalette()
|
||||
{
|
||||
QZ_UpdatePalette(0, 256);
|
||||
}
|
||||
|
||||
static void QZ_Draw(void)
|
||||
static void QZ_Draw()
|
||||
{
|
||||
if (_cocoa_video_data.fullscreen) {
|
||||
QZ_DrawScreen();
|
||||
@@ -1608,7 +1608,7 @@ static const OTTDPoint _default_resolutions[] = {
|
||||
{1920, 1200}
|
||||
};
|
||||
|
||||
static void QZ_UpdateVideoModes(void)
|
||||
static void QZ_UpdateVideoModes()
|
||||
{
|
||||
uint i, j, count;
|
||||
OTTDPoint modes[32];
|
||||
@@ -1636,7 +1636,7 @@ static void QZ_UpdateVideoModes(void)
|
||||
_num_resolutions = j;
|
||||
}
|
||||
|
||||
static void QZ_UnsetVideoMode(void)
|
||||
static void QZ_UnsetVideoMode()
|
||||
{
|
||||
if (_cocoa_video_data.fullscreen) {
|
||||
/* Release fullscreen resources */
|
||||
@@ -1719,7 +1719,7 @@ static const char* QZ_SetVideoModeAndRestoreOnFailure(uint width, uint height, b
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void QZ_VideoInit(void)
|
||||
static void QZ_VideoInit()
|
||||
{
|
||||
memset(&_cocoa_video_data, 0, sizeof(_cocoa_video_data));
|
||||
|
||||
@@ -1789,7 +1789,7 @@ static void QZ_WarpCursor(int x, int y)
|
||||
/* Generate the mouse moved event */
|
||||
}
|
||||
|
||||
static void QZ_ShowMouse(void)
|
||||
static void QZ_ShowMouse()
|
||||
{
|
||||
if (!_cocoa_video_data.cursor_visible) {
|
||||
[ NSCursor unhide ];
|
||||
@@ -1802,7 +1802,7 @@ static void QZ_ShowMouse(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void QZ_HideMouse(void)
|
||||
static void QZ_HideMouse()
|
||||
{
|
||||
if (_cocoa_video_data.cursor_visible) {
|
||||
#ifndef _DEBUG
|
||||
@@ -1842,7 +1842,7 @@ static void QZ_HideMouse(void)
|
||||
}
|
||||
@end
|
||||
|
||||
static void setApplicationMenu(void)
|
||||
static void setApplicationMenu()
|
||||
{
|
||||
/* warning: this code is very odd */
|
||||
NSMenu *appleMenu;
|
||||
@@ -1887,7 +1887,7 @@ static void setApplicationMenu(void)
|
||||
}
|
||||
|
||||
/* Create a window menu */
|
||||
static void setupWindowMenu(void)
|
||||
static void setupWindowMenu()
|
||||
{
|
||||
NSMenu* windowMenu;
|
||||
NSMenuItem* windowMenuItem;
|
||||
@@ -1913,7 +1913,7 @@ static void setupWindowMenu(void)
|
||||
[windowMenuItem release];
|
||||
}
|
||||
|
||||
static void setupApplication(void)
|
||||
static void setupApplication()
|
||||
{
|
||||
CPSProcessSerNum PSN;
|
||||
|
||||
@@ -1942,7 +1942,7 @@ static void setupApplication(void)
|
||||
* Video driver interface *
|
||||
******************************************************************************/
|
||||
|
||||
static void CocoaVideoStop(void)
|
||||
static void CocoaVideoStop()
|
||||
{
|
||||
if (!_cocoa_video_started) return;
|
||||
|
||||
@@ -1986,7 +1986,7 @@ static void CocoaVideoMakeDirty(int left, int top, int width, int height)
|
||||
_cocoa_video_data.num_dirty_rects++;
|
||||
}
|
||||
|
||||
static void CocoaVideoMainLoop(void)
|
||||
static void CocoaVideoMainLoop()
|
||||
{
|
||||
/* Start the main event loop */
|
||||
[NSApp run];
|
||||
@@ -2044,7 +2044,7 @@ void CocoaDialog(const char* title, const char* message, const char* buttonLabel
|
||||
|
||||
|
||||
/* This is needed since OS X applications are started with the working dir set to / when double-clicked */
|
||||
void cocoaSetWorkingDirectory(void)
|
||||
void cocoaSetWorkingDirectory()
|
||||
{
|
||||
char parentdir[MAXPATHLEN];
|
||||
int chdir_ret;
|
||||
@@ -2061,12 +2061,12 @@ void cocoaSetWorkingDirectory(void)
|
||||
/* These are called from main() to prevent a _NSAutoreleaseNoPool error when
|
||||
* exiting before the cocoa video driver has been loaded
|
||||
*/
|
||||
void cocoaSetupAutoreleasePool(void)
|
||||
void cocoaSetupAutoreleasePool()
|
||||
{
|
||||
_ottd_autorelease_pool = [[NSAutoreleasePool alloc] init];
|
||||
}
|
||||
|
||||
void cocoaReleaseAutoreleasePool(void)
|
||||
void cocoaReleaseAutoreleasePool()
|
||||
{
|
||||
[_ottd_autorelease_pool release];
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
/**
|
||||
* Switches OpenTTD to a console app at run-time, instead of a PM app
|
||||
* Necessary to see stdout, etc. */
|
||||
static void OS2_SwitchToConsoleMode(void)
|
||||
static void OS2_SwitchToConsoleMode()
|
||||
{
|
||||
PPIB pib;
|
||||
PTIB tib;
|
||||
@@ -74,7 +74,7 @@ static HANDLE _hThread; // Thread to close
|
||||
static char _win_console_thread_buffer[200];
|
||||
|
||||
/* Windows Console thread. Just loop and signal when input has been received */
|
||||
static void WINAPI CheckForConsoleInput(void)
|
||||
static void WINAPI CheckForConsoleInput()
|
||||
{
|
||||
while (true) {
|
||||
fgets(_win_console_thread_buffer, lengthof(_win_console_thread_buffer), stdin);
|
||||
@@ -85,7 +85,7 @@ static void WINAPI CheckForConsoleInput(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void CreateWindowsConsoleThread(void)
|
||||
static void CreateWindowsConsoleThread()
|
||||
{
|
||||
DWORD dwThreadId;
|
||||
/* Create event to signal when console input is ready */
|
||||
@@ -99,7 +99,7 @@ static void CreateWindowsConsoleThread(void)
|
||||
DEBUG(driver, 2, "Windows console thread started");
|
||||
}
|
||||
|
||||
static void CloseWindowsConsoleThread(void)
|
||||
static void CloseWindowsConsoleThread()
|
||||
{
|
||||
CloseHandle(_hThread);
|
||||
CloseHandle(_hInputReady);
|
||||
@@ -140,7 +140,7 @@ static const char *DedicatedVideoStart(const char * const *parm)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void DedicatedVideoStop(void)
|
||||
static void DedicatedVideoStop()
|
||||
{
|
||||
#ifdef WIN32
|
||||
CloseWindowsConsoleThread();
|
||||
@@ -153,7 +153,7 @@ static bool DedicatedVideoChangeRes(int w, int h) { return false; }
|
||||
static void DedicatedVideoFullScreen(bool fs) {}
|
||||
|
||||
#if defined(UNIX) || defined(__OS2__) || defined(PSP)
|
||||
static bool InputWaiting(void)
|
||||
static bool InputWaiting()
|
||||
{
|
||||
struct timeval tv;
|
||||
fd_set readfds;
|
||||
@@ -168,7 +168,7 @@ static bool InputWaiting(void)
|
||||
return select(STDIN + 1, &readfds, NULL, NULL, &tv) > 0;
|
||||
}
|
||||
|
||||
static uint32 GetTime(void)
|
||||
static uint32 GetTime()
|
||||
{
|
||||
struct timeval tim;
|
||||
|
||||
@@ -178,19 +178,19 @@ static uint32 GetTime(void)
|
||||
|
||||
#else
|
||||
|
||||
static bool InputWaiting(void)
|
||||
static bool InputWaiting()
|
||||
{
|
||||
return WaitForSingleObject(_hInputReady, 1) == WAIT_OBJECT_0;
|
||||
}
|
||||
|
||||
static uint32 GetTime(void)
|
||||
static uint32 GetTime()
|
||||
{
|
||||
return GetTickCount();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void DedicatedHandleKeyInput(void)
|
||||
static void DedicatedHandleKeyInput()
|
||||
{
|
||||
static char input_line[200] = "";
|
||||
|
||||
@@ -225,7 +225,7 @@ static void DedicatedHandleKeyInput(void)
|
||||
IConsoleCmdExec(input_line); // execute command
|
||||
}
|
||||
|
||||
static void DedicatedVideoMainLoop(void)
|
||||
static void DedicatedVideoMainLoop()
|
||||
{
|
||||
uint32 cur_ticks = GetTime();
|
||||
uint32 next_tick = cur_ticks + 30;
|
||||
|
@@ -17,11 +17,11 @@ static const char* NullVideoStart(const char* const* parm)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void NullVideoStop(void) { free(_null_video_mem); }
|
||||
static void NullVideoStop() { free(_null_video_mem); }
|
||||
|
||||
static void NullVideoMakeDirty(int left, int top, int width, int height) {}
|
||||
|
||||
static void NullVideoMainLoop(void)
|
||||
static void NullVideoMainLoop()
|
||||
{
|
||||
uint i;
|
||||
|
||||
|
@@ -49,12 +49,12 @@ static void UpdatePalette(uint start, uint count)
|
||||
SDL_CALL SDL_SetColors(_sdl_screen, pal, start, count);
|
||||
}
|
||||
|
||||
static void InitPalette(void)
|
||||
static void InitPalette()
|
||||
{
|
||||
UpdatePalette(0, 256);
|
||||
}
|
||||
|
||||
static void CheckPaletteAnim(void)
|
||||
static void CheckPaletteAnim()
|
||||
{
|
||||
if (_pal_last_dirty != -1) {
|
||||
UpdatePalette(_pal_first_dirty, _pal_last_dirty - _pal_first_dirty + 1);
|
||||
@@ -62,7 +62,7 @@ static void CheckPaletteAnim(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void DrawSurfaceToScreen(void)
|
||||
static void DrawSurfaceToScreen()
|
||||
{
|
||||
int n = _num_dirty_rects;
|
||||
if (n != 0) {
|
||||
@@ -88,7 +88,7 @@ static const uint16 default_resolutions[][2] = {
|
||||
{1920, 1200}
|
||||
};
|
||||
|
||||
static void GetVideoModes(void)
|
||||
static void GetVideoModes()
|
||||
{
|
||||
int i;
|
||||
SDL_Rect **modes;
|
||||
@@ -301,7 +301,7 @@ static uint32 ConvertSdlKeyIntoMy(SDL_keysym *sym)
|
||||
return (key << 16) + sym->unicode;
|
||||
}
|
||||
|
||||
static int PollEvent(void)
|
||||
static int PollEvent()
|
||||
{
|
||||
SDL_Event ev;
|
||||
|
||||
@@ -415,12 +415,12 @@ static const char *SdlVideoStart(const char * const *parm)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void SdlVideoStop(void)
|
||||
static void SdlVideoStop()
|
||||
{
|
||||
SdlClose(SDL_INIT_VIDEO);
|
||||
}
|
||||
|
||||
static void SdlVideoMainLoop(void)
|
||||
static void SdlVideoMainLoop()
|
||||
{
|
||||
uint32 cur_ticks = SDL_CALL SDL_GetTicks();
|
||||
uint32 next_tick = cur_ticks + 30;
|
||||
|
@@ -37,7 +37,7 @@ uint _display_hz;
|
||||
uint _fullscreen_bpp;
|
||||
static uint16 _bck_resolution[2];
|
||||
|
||||
static void MakePalette(void)
|
||||
static void MakePalette()
|
||||
{
|
||||
LOGPALETTE *pal;
|
||||
uint i;
|
||||
@@ -156,7 +156,7 @@ static void ClientSizeChanged(int w, int h)
|
||||
#ifdef _DEBUG
|
||||
// Keep this function here..
|
||||
// It allows you to redraw the screen from within the MSVC debugger
|
||||
int RedrawScreenDebug(void)
|
||||
int RedrawScreenDebug()
|
||||
{
|
||||
HDC dc,dc2;
|
||||
static int _fooctr;
|
||||
@@ -511,7 +511,7 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
|
||||
return DefWindowProc(hwnd, msg, wParam, lParam);
|
||||
}
|
||||
|
||||
static void RegisterWndClass(void)
|
||||
static void RegisterWndClass()
|
||||
{
|
||||
static bool registered = false;
|
||||
|
||||
@@ -681,7 +681,7 @@ static const uint16 default_resolutions[][2] = {
|
||||
{ 1920, 1200 }
|
||||
};
|
||||
|
||||
static void FindResolutions(void)
|
||||
static void FindResolutions()
|
||||
{
|
||||
uint n = 0;
|
||||
#if defined(WINCE)
|
||||
@@ -749,7 +749,7 @@ static const char *Win32GdiStart(const char * const *parm)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void Win32GdiStop(void)
|
||||
static void Win32GdiStop()
|
||||
{
|
||||
DeleteObject(_wnd.gdi_palette);
|
||||
DeleteObject(_wnd.dib_sect);
|
||||
@@ -798,14 +798,14 @@ static void Win32GdiMakeDirty(int left, int top, int width, int height)
|
||||
InvalidateRect(_wnd.main_wnd, &r, FALSE);
|
||||
}
|
||||
|
||||
static void CheckPaletteAnim(void)
|
||||
static void CheckPaletteAnim()
|
||||
{
|
||||
if (_pal_last_dirty == -1)
|
||||
return;
|
||||
InvalidateRect(_wnd.main_wnd, NULL, FALSE);
|
||||
}
|
||||
|
||||
static void Win32GdiMainLoop(void)
|
||||
static void Win32GdiMainLoop()
|
||||
{
|
||||
MSG mesg;
|
||||
uint32 cur_ticks = GetTickCount();
|
||||
|
Reference in New Issue
Block a user