formatting

This commit is contained in:
Dave Schuyler 2002-02-16 02:52:44 +00:00
parent 172c8ee508
commit ada521b4c2

View File

@ -1,4 +1,4 @@
// Filename: wcrGraphicsWindow.cxx
// Created by: // Created by:
// //
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -180,7 +180,7 @@ void wglGraphicsWindow::do_close_window() {
// Access: // Access:
// Description: // Description:
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
wglGraphicsWindow::~wglGraphicsWindow(void) { wglGraphicsWindow::~wglGraphicsWindow() {
close_window(); close_window();
} }
@ -215,7 +215,7 @@ MY_DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0
// Function: GetAvailVidMem // Function: GetAvailVidMem
// Description: Uses DDraw to get available video memory // Description: Uses DDraw to get available video memory
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
static DWORD GetAvailVidMem(void) { static DWORD GetAvailVidMem() {
LPDIRECTDRAW2 pDD2; LPDIRECTDRAW2 pDD2;
LPDIRECTDRAW pDD; LPDIRECTDRAW pDD;
@ -319,7 +319,7 @@ bool find_acceptable_display_mode(DWORD dwWidth,DWORD dwHeight,DWORD bpp,DEVMODE
// Access: // Access:
// Description: // Description:
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void wglGraphicsWindow::config(void) { void wglGraphicsWindow::config() {
GraphicsWindow::config(); GraphicsWindow::config();
@ -655,7 +655,7 @@ void wglGraphicsWindow::config(void) {
} }
void wglGraphicsWindow:: void wglGraphicsWindow::
check_for_color_cursor_support(void) { check_for_color_cursor_support() {
// card support for non-black/white GDI cursors varies greatly. if the cursor is not supported, // card support for non-black/white GDI cursors varies greatly. if the cursor is not supported,
// it is rendered in software by GDI, which causes a flickering effect (because it's not synced // it is rendered in software by GDI, which causes a flickering effect (because it's not synced
// with flip?). GDI transparently masks what's happening so there is no easy way for app to detect // with flip?). GDI transparently masks what's happening so there is no easy way for app to detect
@ -779,7 +779,7 @@ void PrintPFD(PIXELFORMATDESCRIPTOR *pfd,char *msg) {
// Access: // Access:
// Description: // Description:
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
int wglGraphicsWindow::choose_visual(void) { int wglGraphicsWindow::choose_visual() {
int mask = _props._mask; int mask = _props._mask;
int want_depth_bits = _props._want_depth_bits; int want_depth_bits = _props._want_depth_bits;
@ -930,7 +930,7 @@ int wglGraphicsWindow::choose_visual(void) {
// Access: // Access:
// Description: // Description:
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void wglGraphicsWindow::setup_colormap(void) { void wglGraphicsWindow::setup_colormap() {
PIXELFORMATDESCRIPTOR pfd; PIXELFORMATDESCRIPTOR pfd;
LOGPALETTE *logical; LOGPALETTE *logical;
@ -990,7 +990,7 @@ void wglGraphicsWindow::setup_colormap(void) {
// Access: // Access:
// Description: Swaps the front and back buffers. // Description: Swaps the front and back buffers.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void wglGraphicsWindow::end_frame(void) { void wglGraphicsWindow::end_frame() {
if (gl_show_fps_meter) { if (gl_show_fps_meter) {
DO_PSTATS_STUFF(PStatTimer timer(_show_fps_pcollector);) DO_PSTATS_STUFF(PStatTimer timer(_show_fps_pcollector);)
DWORD now = timeGetTime(); // this is win32 fn DWORD now = timeGetTime(); // this is win32 fn
@ -1067,7 +1067,7 @@ void wglGraphicsWindow::end_frame(void) {
// Access: // Access:
// Description: Swaps the front and back buffers explicitly. // Description: Swaps the front and back buffers explicitly.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void wglGraphicsWindow::swap(void) { void wglGraphicsWindow::swap() {
if (_is_synced) if (_is_synced)
SwapBuffers(_hdc); SwapBuffers(_hdc);
} }
@ -1238,7 +1238,7 @@ handle_keyrelease(ButtonHandle key) {
} }
} }
void INLINE process_1_event(void) { void INLINE process_1_event() {
MSG msg; MSG msg;
if (!GetMessage(&msg, NULL, 0, 0)) { if (!GetMessage(&msg, NULL, 0, 0)) {
@ -1253,7 +1253,7 @@ void INLINE process_1_event(void) {
DispatchMessage(&msg); DispatchMessage(&msg);
} }
void INLINE wglGraphicsWindow::process_events(void) { void INLINE wglGraphicsWindow::process_events() {
if (_window_inactive) { if (_window_inactive) {
// Get 1 msg at a time until no more are left and we block and sleep, // Get 1 msg at a time until no more are left and we block and sleep,
// or message changes _return_control_to_app or _window_inactive status // or message changes _return_control_to_app or _window_inactive status
@ -1293,7 +1293,7 @@ supports_update() const {
// Access: // Access:
// Description: // Description:
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void wglGraphicsWindow::update(void) { void wglGraphicsWindow::update() {
#ifdef DO_PSTATS #ifdef DO_PSTATS
_show_code_pcollector.stop(); _show_code_pcollector.stop();
@ -1353,7 +1353,7 @@ void wglGraphicsWindow::enable_mouse_passive_motion(bool val) {
// Access: Public // Access: Public
// Description: // Description:
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void wglGraphicsWindow::make_current(void) { void wglGraphicsWindow::make_current() {
if ((_hdc==NULL)||(_context==NULL)||(_window_inactive)) { if ((_hdc==NULL)||(_context==NULL)||(_window_inactive)) {
return; // we're only allow unmake_current() to set this to NULL return; // we're only allow unmake_current() to set this to NULL
} }
@ -1376,7 +1376,7 @@ void wglGraphicsWindow::make_current(void) {
// Access: Public // Access: Public
// Description: // Description:
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void wglGraphicsWindow::unmake_current(void) { void wglGraphicsWindow::unmake_current() {
report_errors(); report_errors();
if (!wglMakeCurrent(NULL, NULL)) { if (!wglMakeCurrent(NULL, NULL)) {
@ -1384,7 +1384,7 @@ void wglGraphicsWindow::unmake_current(void) {
} }
} }
int wglGraphicsWindow::get_depth_bitwidth(void) { int wglGraphicsWindow::get_depth_bitwidth() {
return _pixelformat.cDepthBits; return _pixelformat.cDepthBits;
} }
@ -1418,17 +1418,17 @@ make_wglGraphicsWindow(const FactoryParams &params) {
} }
} }
TypeHandle wglGraphicsWindow::get_class_type(void) { TypeHandle wglGraphicsWindow::get_class_type() {
return _type_handle; return _type_handle;
} }
void wglGraphicsWindow::init_type(void) { void wglGraphicsWindow::init_type() {
GraphicsWindow::init_type(); GraphicsWindow::init_type();
register_type(_type_handle, "wglGraphicsWindow", register_type(_type_handle, "wglGraphicsWindow",
GraphicsWindow::get_class_type()); GraphicsWindow::get_class_type());
} }
TypeHandle wglGraphicsWindow::get_type(void) const { TypeHandle wglGraphicsWindow::get_type() const {
return get_class_type(); return get_class_type();
} }
@ -1453,7 +1453,7 @@ LONG WINAPI static_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam
} }
} }
void wglGraphicsWindow::deactivate_window(void) { void wglGraphicsWindow::deactivate_window() {
// current policy is to suspend minimized or deactivated fullscreen windows, but leave // current policy is to suspend minimized or deactivated fullscreen windows, but leave
// regular windows running normally // regular windows running normally
@ -1510,7 +1510,7 @@ void wglGraphicsWindow::deactivate_window(void) {
} }
} }
void wglGraphicsWindow::reactivate_window(void) { void wglGraphicsWindow::reactivate_window() {
if (_window_inactive) { if (_window_inactive) {
if (wgldisplay_cat.is_spam()) if (wgldisplay_cat.is_spam())
wgldisplay_cat.spam() << "WGL window re-activated...\n"; wgldisplay_cat.spam() << "WGL window re-activated...\n";
@ -3443,7 +3443,7 @@ extern char *ConvDDErrorToString(const HRESULT &error) {
static int iMouseTrails; static int iMouseTrails;
static bool bCursorShadowOn,bMouseVanish; static bool bCursorShadowOn,bMouseVanish;
void set_global_parameters(void) { void set_global_parameters() {
// turn off mousetrails and cursor shadow and mouse cursor vanish // turn off mousetrails and cursor shadow and mouse cursor vanish
// cursor shadow causes cursor blink and reduced frame rate due to lack of driver support for // cursor shadow causes cursor blink and reduced frame rate due to lack of driver support for
// cursor alpha blending // cursor alpha blending
@ -3462,7 +3462,7 @@ void set_global_parameters(void) {
SystemParametersInfo(SPI_SETMOUSEVANISH,NULL,(PVOID)false,NULL); SystemParametersInfo(SPI_SETMOUSEVANISH,NULL,(PVOID)false,NULL);
} }
void restore_global_parameters(void) { void restore_global_parameters() {
SystemParametersInfo(SPI_SETCURSORSHADOW,NULL,(PVOID)bCursorShadowOn,NULL); SystemParametersInfo(SPI_SETCURSORSHADOW,NULL,(PVOID)bCursorShadowOn,NULL);
SystemParametersInfo(SPI_SETMOUSETRAILS,NULL,(PVOID)iMouseTrails,NULL); SystemParametersInfo(SPI_SETMOUSETRAILS,NULL,(PVOID)iMouseTrails,NULL);
SystemParametersInfo(SPI_SETMOUSEVANISH,NULL,(PVOID)bMouseVanish,NULL); SystemParametersInfo(SPI_SETMOUSEVANISH,NULL,(PVOID)bMouseVanish,NULL);