diff options
Diffstat (limited to 'src/video')
-rw-r--r-- | src/video/cocoa/cocoa_v.h | 8 | ||||
-rw-r--r-- | src/video/cocoa/cocoa_v.mm | 16 | ||||
-rw-r--r-- | src/video/cocoa/event.mm | 4 | ||||
-rw-r--r-- | src/video/cocoa/fullscreen.mm | 18 | ||||
-rw-r--r-- | src/video/cocoa/wnd_quartz.mm | 26 | ||||
-rw-r--r-- | src/video/cocoa/wnd_quickdraw.mm | 30 | ||||
-rw-r--r-- | src/video/null_v.cpp | 2 | ||||
-rw-r--r-- | src/video/win32_v.cpp | 2 |
8 files changed, 53 insertions, 53 deletions
diff --git a/src/video/cocoa/cocoa_v.h b/src/video/cocoa/cocoa_v.h index cfc63147d..0b742f4cd 100644 --- a/src/video/cocoa/cocoa_v.h +++ b/src/video/cocoa/cocoa_v.h @@ -42,7 +42,7 @@ public: virtual void MakeDirty(int left, int top, int width, int height) = 0; virtual void UpdatePalette(uint first_color, uint num_colors) = 0; - virtual uint ListModes(OTTD_Point* modes, uint max_modes) = 0; + virtual uint ListModes(OTTD_Point *modes, uint max_modes) = 0; virtual bool ChangeResolution(int w, int h) = 0; @@ -52,7 +52,7 @@ public: virtual void *GetPixelBuffer() = 0; /* Convert local coordinate to window server (CoreGraphics) coordinate */ - virtual CGPoint PrivateLocalToCG(NSPoint* p) = 0; + virtual CGPoint PrivateLocalToCG(NSPoint *p) = 0; virtual NSPoint GetMouseLocation(NSEvent *event) = 0; virtual bool MouseIsInsideView(NSPoint *pt) = 0; @@ -60,7 +60,7 @@ public: virtual bool IsActive() = 0; }; -extern CocoaSubdriver* _cocoa_subdriver; +extern CocoaSubdriver *_cocoa_subdriver; CocoaSubdriver *QZ_CreateFullscreenSubdriver(int width, int height, int bpp); @@ -81,6 +81,6 @@ void QZ_GameLoop(); void QZ_ShowMouse(); void QZ_HideMouse(); -uint QZ_ListModes(OTTD_Point* modes, uint max_modes, CGDirectDisplayID display_id, int display_depth); +uint QZ_ListModes(OTTD_Point *modes, uint max_modes, CGDirectDisplayID display_id, int display_depth); #endif /* VIDEO_COCOA_H */ diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index 516910509..f04ae8a63 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -31,9 +31,9 @@ struct CPSProcessSerNum { UInt32 hi; }; -extern "C" OSErr CPSGetCurrentProcess(CPSProcessSerNum* psn); -extern "C" OSErr CPSEnableForegroundOperation(CPSProcessSerNum* psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5); -extern "C" OSErr CPSSetFrontProcess(CPSProcessSerNum* psn); +extern "C" OSErr CPSGetCurrentProcess(CPSProcessSerNum *psn); +extern "C" OSErr CPSEnableForegroundOperation(CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5); +extern "C" OSErr CPSSetFrontProcess(CPSProcessSerNum *psn); /* 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) @@ -74,7 +74,7 @@ static OTTDMain *_ottd_main; static bool _cocoa_video_started = false; static bool _cocoa_video_dialog = false; -CocoaSubdriver* _cocoa_subdriver = NULL; +CocoaSubdriver *_cocoa_subdriver = NULL; @@ -147,9 +147,9 @@ static void setApplicationMenu() /* Create a window menu */ static void setupWindowMenu() { - NSMenu* windowMenu; - NSMenuItem* windowMenuItem; - NSMenuItem* menuItem; + NSMenu *windowMenu; + NSMenuItem *windowMenuItem; + NSMenuItem *menuItem; windowMenu = [[NSMenu alloc] initWithTitle:@"Window"]; @@ -392,7 +392,7 @@ bool VideoDriver_Cocoa::ToggleFullscreen(bool full_screen) /* This is needed since sometimes assert is called before the videodriver is initialized */ -void CocoaDialog(const char* title, const char* message, const char* buttonLabel) +void CocoaDialog(const char *title, const char *message, const char *buttonLabel) { bool wasstarted; diff --git a/src/video/cocoa/event.mm b/src/video/cocoa/event.mm index a9273deb7..ca90009db 100644 --- a/src/video/cocoa/event.mm +++ b/src/video/cocoa/event.mm @@ -602,8 +602,8 @@ static bool QZ_PollEvent() } /* else: deltaY was 0.0 and we don't want to do anything */ /* Set the scroll count for scrollwheel scrolling */ - _cursor.h_wheel -= (int)([ event deltaX ]* 5 * _settings_client.gui.scrollwheel_multiplier); - _cursor.v_wheel -= (int)([ event deltaY ]* 5 * _settings_client.gui.scrollwheel_multiplier); + _cursor.h_wheel -= (int)([ event deltaX ] * 5 * _settings_client.gui.scrollwheel_multiplier); + _cursor.v_wheel -= (int)([ event deltaY ] * 5 * _settings_client.gui.scrollwheel_multiplier); break; default: diff --git a/src/video/cocoa/fullscreen.mm b/src/video/cocoa/fullscreen.mm index d24a3704e..3d97c5263 100644 --- a/src/video/cocoa/fullscreen.mm +++ b/src/video/cocoa/fullscreen.mm @@ -77,7 +77,7 @@ struct OTTD_QuartzGammaTable { -uint QZ_ListModes(OTTD_Point* modes, uint max_modes, CGDirectDisplayID display_id, int display_depth) +uint QZ_ListModes(OTTD_Point *modes, uint max_modes, CGDirectDisplayID display_id, int display_depth) { CFArrayRef mode_list; CFIndex num_modes; @@ -170,8 +170,8 @@ class FullscreenSubdriver: public CocoaSubdriver { int display_height; int display_depth; int screen_pitch; - void* screen_buffer; - void* pixel_buffer; + void *screen_buffer; + void *pixel_buffer; CGDirectDisplayID display_id; /* 0 == main display (only support single display) */ CFDictionaryRef cur_mode; /* current mode of the display */ @@ -187,7 +187,7 @@ class FullscreenSubdriver: public CocoaSubdriver { * Fade the display from normal to black * Save gamma tables for fade back to normal */ - uint32 FadeGammaOut(OTTD_QuartzGammaTable* table) + uint32 FadeGammaOut(OTTD_QuartzGammaTable *table) { CGGammaValue redTable[QZ_GAMMA_TABLE_SIZE]; CGGammaValue greenTable[QZ_GAMMA_TABLE_SIZE]; @@ -232,7 +232,7 @@ class FullscreenSubdriver: public CocoaSubdriver { /* Fade the display from black to normal * Restore previously saved gamma values */ - uint32 FadeGammaIn(const OTTD_QuartzGammaTable* table) + uint32 FadeGammaIn(const OTTD_QuartzGammaTable *table) { CGGammaValue redTable[QZ_GAMMA_TABLE_SIZE]; CGGammaValue greenTable[QZ_GAMMA_TABLE_SIZE]; @@ -470,8 +470,8 @@ public: virtual void Draw() { - const uint8* src = (uint8*) pixel_buffer; - uint8* dst = (uint8*) screen_buffer; + const uint8 *src = (uint8*) pixel_buffer; + uint8 *dst = (uint8*) screen_buffer; uint pitch = screen_pitch; uint width = display_width; uint num_dirty = num_dirty_rects; @@ -536,7 +536,7 @@ public: CGDisplaySetPalette(display_id, palette); } - virtual uint ListModes(OTTD_Point* modes, uint max_modes) + virtual uint ListModes(OTTD_Point *modes, uint max_modes) { return QZ_ListModes(modes, max_modes, display_id, display_depth); } @@ -579,7 +579,7 @@ public: Convert local coordinate to window server (CoreGraphics) coordinate. In fullscreen mode this just means copying the coords. */ - virtual CGPoint PrivateLocalToCG(NSPoint* p) + virtual CGPoint PrivateLocalToCG(NSPoint *p) { CGPoint cgp; diff --git a/src/video/cocoa/wnd_quartz.mm b/src/video/cocoa/wnd_quartz.mm index 9538a52cb..518668022 100644 --- a/src/video/cocoa/wnd_quartz.mm +++ b/src/video/cocoa/wnd_quartz.mm @@ -98,8 +98,8 @@ class WindowQuartzSubdriver: public CocoaSubdriver { int buffer_depth; - void* pixel_buffer; - void* image_buffer; + void *pixel_buffer; + void *image_buffer; OTTD_QuartzWindow *window; @@ -113,8 +113,8 @@ public: bool active; bool setup; - OTTD_QuartzView* qzview; - CGContextRef cgcontext; + OTTD_QuartzView *qzview; + CGContextRef cgcontext; private: void GetDeviceInfo(); @@ -139,7 +139,7 @@ public: virtual void MakeDirty(int left, int top, int width, int height); virtual void UpdatePalette(uint first_color, uint num_colors); - virtual uint ListModes(OTTD_Point* modes, uint max_modes); + virtual uint ListModes(OTTD_Point *modes, uint max_modes); virtual bool ChangeResolution(int w, int h); @@ -150,7 +150,7 @@ public: virtual void *GetPixelBuffer() { return buffer_depth == 8 ? pixel_buffer : image_buffer; } /* Convert local coordinate to window server (CoreGraphics) coordinate */ - virtual CGPoint PrivateLocalToCG(NSPoint* p); + virtual CGPoint PrivateLocalToCG(NSPoint *p); virtual NSPoint GetMouseLocation(NSEvent *event); virtual bool MouseIsInsideView(NSPoint *pt); @@ -335,7 +335,7 @@ static CGColorSpaceRef QZ_GetCorrectColorSpace() CGImageRef fullImage; CGImageRef clippedImage; NSRect rect; - const NSRect* dirtyRects; + const NSRect *dirtyRects; int dirtyRectCount; int n; CGRect clipRect; @@ -537,9 +537,9 @@ bool WindowQuartzSubdriver::SetVideoMode(int width, int height) void WindowQuartzSubdriver::BlitIndexedToView32(int left, int top, int right, int bottom) { - const uint32* pal = palette; - const uint8* src = (uint8*)pixel_buffer; - uint32* dst = (uint32*)image_buffer; + const uint32 *pal = palette; + const uint8 *src = (uint8*)pixel_buffer; + uint32 *dst = (uint32*)image_buffer; uint width = window_width; uint pitch = window_width; int x; @@ -658,7 +658,7 @@ void WindowQuartzSubdriver::UpdatePalette(uint first_color, uint num_colors) num_dirty_rects = MAX_DIRTY_RECTS; } -uint WindowQuartzSubdriver::ListModes(OTTD_Point* modes, uint max_modes) +uint WindowQuartzSubdriver::ListModes(OTTD_Point *modes, uint max_modes) { return QZ_ListModes(modes, max_modes, kCGDirectMainDisplay, buffer_depth); } @@ -678,7 +678,7 @@ bool WindowQuartzSubdriver::ChangeResolution(int w, int h) } /* Convert local coordinate to window server (CoreGraphics) coordinate */ -CGPoint WindowQuartzSubdriver::PrivateLocalToCG(NSPoint* p) +CGPoint WindowQuartzSubdriver::PrivateLocalToCG(NSPoint *p) { CGPoint cgp; @@ -718,7 +718,7 @@ bool WindowQuartzSubdriver::MouseIsInsideView(NSPoint *pt) */ void WindowQuartzSubdriver::SetPortAlphaOpaque() { - uint32* pixels = (uint32*)image_buffer; + uint32 *pixels = (uint32*)image_buffer; uint32 pitch = window_width; int x, y; diff --git a/src/video/cocoa/wnd_quickdraw.mm b/src/video/cocoa/wnd_quickdraw.mm index 0d9b3ee4d..ed6a4d6df 100644 --- a/src/video/cocoa/wnd_quickdraw.mm +++ b/src/video/cocoa/wnd_quickdraw.mm @@ -154,7 +154,7 @@ public: virtual void MakeDirty(int left, int top, int width, int height); virtual void UpdatePalette(uint first_color, uint num_colors); - virtual uint ListModes(OTTD_Point* modes, uint max_modes); + virtual uint ListModes(OTTD_Point *modes, uint max_modes); virtual bool ChangeResolution(int w, int h); @@ -165,7 +165,7 @@ public: virtual void *GetPixelBuffer() { return pixel_buffer; } /* Convert local coordinate to window server (CoreGraphics) coordinate */ - virtual CGPoint PrivateLocalToCG(NSPoint* p); + virtual CGPoint PrivateLocalToCG(NSPoint *p); virtual NSPoint GetMouseLocation(NSEvent *event); virtual bool MouseIsInsideView(NSPoint *pt); @@ -462,8 +462,8 @@ bool WindowQuickdrawSubdriver::SetVideoMode(int width, int height) void WindowQuickdrawSubdriver::Blit32ToView32(int left, int top, int right, int bottom) { - const uint32* src = (uint32*)pixel_buffer; - uint32* dst = (uint32*)window_buffer; + const uint32 *src = (uint32*)pixel_buffer; + uint32 *dst = (uint32*)window_buffer; uint width = window_width; uint pitch = window_pitch / 4; int y; @@ -479,9 +479,9 @@ void WindowQuickdrawSubdriver::Blit32ToView32(int left, int top, int right, int void WindowQuickdrawSubdriver::BlitIndexedToView32(int left, int top, int right, int bottom) { - const uint32* pal = palette32; - const uint8* src = (uint8*)pixel_buffer; - uint32* dst = (uint32*)window_buffer; + const uint32 *pal = palette32; + const uint8 *src = (uint8*)pixel_buffer; + uint32 *dst = (uint32*)window_buffer; uint width = window_width; uint pitch = window_pitch / 4; int x; @@ -496,9 +496,9 @@ void WindowQuickdrawSubdriver::BlitIndexedToView32(int left, int top, int right, void WindowQuickdrawSubdriver::BlitIndexedToView16(int left, int top, int right, int bottom) { - const uint16* pal = palette16; - const uint8* src = (uint8*)pixel_buffer; - uint16* dst = (uint16*)window_buffer; + const uint16 *pal = palette16; + const uint8 *src = (uint8*)pixel_buffer; + uint16 *dst = (uint16*)window_buffer; uint width = window_width; uint pitch = window_pitch / 2; int x; @@ -541,7 +541,7 @@ void WindowQuickdrawSubdriver::DrawResizeIcon() switch (device_depth) { case 32: for (y = 0; y < _resize_icon_height; y++) { - uint32* trg = (uint32*)window_buffer + (yoff + y) * window_pitch / 4 + xoff; + uint32 *trg = (uint32*)window_buffer + (yoff + y) * window_pitch / 4 + xoff; for (x = 0; x < _resize_icon_width; x++, trg++) { if (_resize_icon[y * _resize_icon_width + x]) *trg = 0xff000000; @@ -550,7 +550,7 @@ void WindowQuickdrawSubdriver::DrawResizeIcon() break; case 16: for (y = 0; y < _resize_icon_height; y++) { - uint16* trg = (uint16*)window_buffer + (yoff + y) * window_pitch / 2 + xoff; + uint16 *trg = (uint16*)window_buffer + (yoff + y) * window_pitch / 2 + xoff; for (x = 0; x < _resize_icon_width; x++, trg++) { if (_resize_icon[y * _resize_icon_width + x]) *trg = 0x0000; @@ -681,7 +681,7 @@ void WindowQuickdrawSubdriver::UpdatePalette(uint first_color, uint num_colors) num_dirty_rects = MAX_DIRTY_RECTS; } -uint WindowQuickdrawSubdriver::ListModes(OTTD_Point* modes, uint max_modes) +uint WindowQuickdrawSubdriver::ListModes(OTTD_Point *modes, uint max_modes) { return QZ_ListModes(modes, max_modes, kCGDirectMainDisplay, buffer_depth); } @@ -701,7 +701,7 @@ bool WindowQuickdrawSubdriver::ChangeResolution(int w, int h) } /* Convert local coordinate to window server (CoreGraphics) coordinate */ -CGPoint WindowQuickdrawSubdriver::PrivateLocalToCG(NSPoint* p) +CGPoint WindowQuickdrawSubdriver::PrivateLocalToCG(NSPoint *p) { CGPoint cgp; @@ -740,7 +740,7 @@ void WindowQuickdrawSubdriver::SetPortAlphaOpaque() if (device_depth != 32) return; - uint32* pixels = (uint32*)window_buffer; + uint32 *pixels = (uint32*)window_buffer; uint32 pitch = window_pitch / 4; int x, y; diff --git a/src/video/null_v.cpp b/src/video/null_v.cpp index 77a820f59..85ea8f758 100644 --- a/src/video/null_v.cpp +++ b/src/video/null_v.cpp @@ -12,7 +12,7 @@ static FVideoDriver_Null iFVideoDriver_Null; -const char *VideoDriver_Null::Start(const char* const *parm) +const char *VideoDriver_Null::Start(const char * const *parm) { this->ticks = GetDriverParamInt(parm, "ticks", 1000); _screen.width = _screen.pitch = _cur_resolution.width; diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index 5f5f6eb6a..55cb54c3b 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -533,7 +533,7 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP #if !defined(WINCE) case WM_SIZING: { - RECT* r = (RECT*)lParam; + RECT *r = (RECT*)lParam; RECT r2; int w, h; |