summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-15 00:32:18 +0000
committerrubidium <rubidium@openttd.org>2009-03-15 00:32:18 +0000
commitb25a4f8231f3ded44038ea454a3d4c6a2dc9217d (patch)
tree776122508c686680b9c97f37ba3cb92ef905d67f /src/video
parentd72273d1f3b55df0e301408d630f24ef92ea8479 (diff)
downloadopenttd-b25a4f8231f3ded44038ea454a3d4c6a2dc9217d.tar.xz
(svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too
Diffstat (limited to 'src/video')
-rw-r--r--src/video/cocoa/cocoa_keys.h4
-rw-r--r--src/video/dedicated_v.cpp10
-rw-r--r--src/video/win32_v.cpp38
3 files changed, 26 insertions, 26 deletions
diff --git a/src/video/cocoa/cocoa_keys.h b/src/video/cocoa/cocoa_keys.h
index 579cd1f45..94992527d 100644
--- a/src/video/cocoa/cocoa_keys.h
+++ b/src/video/cocoa/cocoa_keys.h
@@ -5,8 +5,8 @@
#ifndef COCOA_KEYS_H
#define COCOA_KEYS_H
-/* From SDL_QuartzKeys.h */
-/* These are the Macintosh key scancode constants -- from Inside Macintosh */
+/* From SDL_QuartzKeys.h
+ * These are the Macintosh key scancode constants -- from Inside Macintosh */
#define QZ_ESCAPE 0x35
#define QZ_F1 0x7A
diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp
index 456ee7b84..93ea1c7e2 100644
--- a/src/video/dedicated_v.cpp
+++ b/src/video/dedicated_v.cpp
@@ -44,7 +44,7 @@ static void OS2_SwitchToConsoleMode()
DosGetInfoBlocks(&tib, &pib);
- // Change flag from PM to VIO
+ /* Change flag from PM to VIO */
pib->pib_ultype = 3;
}
#endif
@@ -144,14 +144,14 @@ const char *VideoDriver_Dedicated::Start(const char * const *parm)
#if defined(WINCE)
/* WinCE doesn't support console stuff */
#elif defined(WIN32)
- // For win32 we need to allocate a console (debug mode does the same)
+ /* For win32 we need to allocate a console (debug mode does the same) */
CreateConsole();
CreateWindowsConsoleThread();
SetConsoleTitle(_T("OpenTTD Dedicated Server"));
#endif
#ifdef __OS2__
- // For OS/2 we also need to switch to console mode instead of PM mode
+ /* For OS/2 we also need to switch to console mode instead of PM mode */
OS2_SwitchToConsoleMode();
#endif
@@ -252,7 +252,7 @@ void VideoDriver_Dedicated::MainLoop()
signal(SIGQUIT, DedicatedSignalHandler);
#endif
- // Load the dedicated server stuff
+ /* Load the dedicated server stuff */
_is_network_server = true;
_network_dedicated = true;
_network_playas = COMPANY_SPECTATOR;
@@ -277,7 +277,7 @@ void VideoDriver_Dedicated::MainLoop()
}
}
- // Done loading, start game!
+ /* Done loading, start game! */
if (!_networking) {
DEBUG(net, 0, "Dedicated server could not be started, aborting");
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index ce1c42585..f4d61c431 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -148,14 +148,14 @@ static bool AllocateDibSection(int w, int h);
static void ClientSizeChanged(int w, int h)
{
- // allocate new dib section of the new size
+ /* allocate new dib section of the new size */
if (AllocateDibSection(w, h)) {
- // mark all palette colors dirty
+ /* mark all palette colors dirty */
_pal_first_dirty = 0;
_pal_count_dirty = 256;
GameSizeChanged();
- // redraw screen
+ /* redraw screen */
if (_wnd.running) {
_screen.dst_ptr = _wnd.buffer_bits;
UpdateWindows();
@@ -164,8 +164,8 @@ 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
+/* Keep this function here..
+ * It allows you to redraw the screen from within the MSVC debugger */
int RedrawScreenDebug()
{
HDC dc, dc2;
@@ -220,7 +220,7 @@ static bool MakeWindow(bool full_screen)
{
_fullscreen = full_screen;
- // recreate window?
+ /* recreate window? */
if ((full_screen || _wnd.fullscreen) && _wnd.main_wnd) {
DestroyWindow(_wnd.main_wnd);
_wnd.main_wnd = 0;
@@ -252,7 +252,7 @@ static bool MakeWindow(bool full_screen)
return false; // the request failed
}
} else if (_wnd.fullscreen) {
- // restore display?
+ /* restore display? */
ChangeDisplaySettings(NULL, 0);
}
#endif
@@ -500,21 +500,21 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
return 0;
}
- case WM_SYSKEYDOWN: /* user presses F10 or Alt, both activating the title-menu */
+ case WM_SYSKEYDOWN: // user presses F10 or Alt, both activating the title-menu
switch (wParam) {
case VK_RETURN:
- case 'F': /* Full Screen on ALT + ENTER/F */
+ case 'F': // Full Screen on ALT + ENTER/F
ToggleFullScreen(!_wnd.fullscreen);
return 0;
- case VK_MENU: /* Just ALT */
+ case VK_MENU: // Just ALT
return 0; // do nothing
- case VK_F10: /* F10, ignore activation of menu */
+ case VK_F10: // F10, ignore activation of menu
HandleKeypress(MapWindowsKey(wParam) << 16);
return 0;
- default: /* ALT in combination with something else */
+ default: // ALT in combination with something else
HandleKeypress(MapWindowsKey(wParam) << 16);
break;
}
@@ -590,13 +590,13 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
}
#endif
-// needed for wheel
+/* needed for wheel */
#if !defined(WM_MOUSEWHEEL)
# define WM_MOUSEWHEEL 0x020A
-#endif //WM_MOUSEWHEEL
+#endif /* WM_MOUSEWHEEL */
#if !defined(GET_WHEEL_DELTA_WPARAM)
# define GET_WHEEL_DELTA_WPARAM(wparam) ((short)HIWORD(wparam))
-#endif //GET_WHEEL_DELTA_WPARAM
+#endif /* GET_WHEEL_DELTA_WPARAM */
case WM_MOUSEWHEEL: {
int delta = GET_WHEEL_DELTA_WPARAM(wParam);
@@ -723,8 +723,8 @@ static void FindResolutions()
{
uint n = 0;
#if defined(WINCE)
- /* EnumDisplaySettingsW is only supported in CE 4.2+ */
- /* XXX -- One might argue that we assume 4.2+ on every system. Then we can use this function safely */
+ /* EnumDisplaySettingsW is only supported in CE 4.2+
+ * XXX -- One might argue that we assume 4.2+ on every system. Then we can use this function safely */
#else
uint i;
DEVMODEA dm;
@@ -778,7 +778,7 @@ const char *VideoDriver_Win32::Start(const char * const *parm)
DEBUG(driver, 2, "Resolution for display: %dx%d", _cur_resolution.width, _cur_resolution.height);
- // fullscreen uses those
+ /* fullscreen uses those */
_wnd.width_org = _cur_resolution.width;
_wnd.height_org = _cur_resolution.height;
@@ -858,7 +858,7 @@ void VideoDriver_Win32::MainLoop()
_ctrl_pressed = _wnd.has_focus && GetAsyncKeyState(VK_CONTROL)<0;
_shift_pressed = _wnd.has_focus && GetAsyncKeyState(VK_SHIFT)<0;
- // determine which directional keys are down
+ /* determine which directional keys are down */
if (_wnd.has_focus) {
_dirkeys =
(GetAsyncKeyState(VK_LEFT) < 0 ? 1 : 0) +