diff --git a/source/lib/res/tex.h b/source/lib/res/tex.h index 34b4005ffa..cf15cc5d68 100755 --- a/source/lib/res/tex.h +++ b/source/lib/res/tex.h @@ -43,17 +43,17 @@ struct TexInfo { Handle hm; // H_Mem handle to loaded file size_t ofs; // offset to image data in file - u32 w : 16; - u32 h : 16; - u32 bpp : 16; - u32 flags : 16; + uint w : 16; + uint h : 16; + uint bpp : 16; + uint flags : 16; }; extern int tex_load(const char* fn, TexInfo* ti); extern int tex_load_mem(Handle hm, const char* fn, TexInfo* t); extern int tex_free(TexInfo* ti); -extern int tex_write(const char* fn, int w, int h, int bpp, int flags, void* img); +extern int tex_write(const char* fn, uint w, uint h, uint bpp, uint flags, void* img); extern int tex_is_known_fmt(void* p, size_t size_t); diff --git a/source/lib/res/vfs.h b/source/lib/res/vfs.h index d77b2905ce..89ff698956 100755 --- a/source/lib/res/vfs.h +++ b/source/lib/res/vfs.h @@ -69,7 +69,7 @@ extern int vfs_mount(const char* v_mount_point, const char* p_real_dir, int flag // dir_watch reports changes; can also be called from the console after a // rebuild command. there is no provision for updating single VFS dirs - // it's not worth the trouble. -extern int vfs_rebuild(); +extern int vfs_rebuild(void); // unmount a previously mounted item, and rebuild the VFS afterwards. extern int vfs_unmount(const char* name); @@ -80,7 +80,7 @@ extern int vfs_unmount(const char* name); extern int vfs_make_vfs_path(const char* path, char* vfs_path); // write a representation of the VFS tree to stdout. -extern void vfs_display(); +extern void vfs_display(void); // @@ -236,6 +236,6 @@ extern int vfs_unmap(Handle hf); extern void vfs_enable_file_listing(bool want_enabled); -extern void vfs_shutdown(); +extern void vfs_shutdown(void); #endif // #ifndef __VFS_H__ diff --git a/source/lib/sysdep/gfx.h b/source/lib/sysdep/gfx.h index df939f422f..d271a1a7d3 100755 --- a/source/lib/sysdep/gfx.h +++ b/source/lib/sysdep/gfx.h @@ -1,3 +1,6 @@ +#ifndef GFX_H__ +#define GFX_H__ + // useful for choosing a video mode. // if we fail, outputs are unchanged (assumed initialized to defaults) @@ -15,4 +18,6 @@ extern char gfx_drv_ver[GFX_DRV_VER_LEN]; // default: "" // attempt to detect graphics card without OpenGL (in case ogl init fails, // or we want more detailed info). gfx_card[] is unchanged on failure. -extern void get_gfx_info(); +extern void get_gfx_info(void); + +#endif // #ifndef GFX_H__ \ No newline at end of file diff --git a/source/lib/sysdep/ia32.h b/source/lib/sysdep/ia32.h index b6c19d2b0b..eb46bc5335 100755 --- a/source/lib/sysdep/ia32.h +++ b/source/lib/sysdep/ia32.h @@ -27,7 +27,7 @@ extern double _ceil(double); -extern u64 rdtsc(); +extern u64 rdtsc(void); #ifndef _MCW_PC @@ -39,7 +39,7 @@ extern u64 rdtsc(); extern uint _control87(uint new_cw, uint mask); -extern void ia32_debug_break(); +extern void ia32_debug_break(void); @@ -72,7 +72,7 @@ enum CpuCap extern bool ia32_cap(CpuCap cap); -extern void ia32_get_cpu_info(); +extern void ia32_get_cpu_info(void); #endif // #ifndef IA32_H diff --git a/source/lib/sysdep/os.h b/source/lib/sysdep/os.h index 15dd65880d..22056809f8 100755 --- a/source/lib/sysdep/os.h +++ b/source/lib/sysdep/os.h @@ -6,4 +6,4 @@ extern size_t tot_mem; extern size_t avl_mem; // updates *_mem above -extern void get_mem_status(); +extern void get_mem_status(void); diff --git a/source/lib/sysdep/win/wgl.h b/source/lib/sysdep/win/wgl.h index 01bc7f716f..bb922a0ee4 100755 --- a/source/lib/sysdep/win/wgl.h +++ b/source/lib/sysdep/win/wgl.h @@ -43,8 +43,8 @@ WINGDIAPI BOOL WINAPI wglCopyContext(HGLRC, HGLRC, UINT); WINGDIAPI HGLRC WINAPI wglCreateContext(HDC); WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC, int); WINGDIAPI BOOL WINAPI wglDeleteContext(HGLRC); -WINGDIAPI HGLRC WINAPI wglGetCurrentContext(); -WINGDIAPI HDC WINAPI wglGetCurrentDC(); +WINGDIAPI HGLRC WINAPI wglGetCurrentContext(void); +WINGDIAPI HDC WINAPI wglGetCurrentDC(void); WINGDIAPI PROC WINAPI wglGetProcAddress(LPCSTR); WINGDIAPI BOOL WINAPI wglMakeCurrent(HDC, HGLRC); WINGDIAPI BOOL WINAPI wglShareLists(HGLRC, HGLRC); diff --git a/source/ps/CConsole.cpp b/source/ps/CConsole.cpp index f1d705807e..84a3b25148 100755 --- a/source/ps/CConsole.cpp +++ b/source/ps/CConsole.cpp @@ -68,7 +68,7 @@ void CConsole::SetVisible( bool visible ) void CConsole::FlushBuffer(void) { - /* Clear the buffer and set the cursor and length to 0 */ + // Clear the buffer and set the cursor and length to 0 memset(m_szBuffer, '\0', sizeof(wchar_t) * CONSOLE_BUFFER_SIZE); m_iBufferPos = m_iBufferLength = 0; } @@ -97,8 +97,8 @@ void CConsole::Trim(wchar_t* szMessage, const wchar_t cChar, uint iSize) wchar_t szChar[2] = { cChar, 0 }; - /* Find the first point at which szChar does not */ - /* exist in the message */ + // Find the first point at which szChar does not + // exist in the message size_t ofs = wcsspn(szMessage, szChar); if(ofs == 0) // no leading chars - we're done return; @@ -176,13 +176,13 @@ void CConsole::Render() void CConsole::DrawWindow(void) { - /* TODO: Add texturing */ + // TODO: Add texturing glDisable(GL_TEXTURE_2D); glPushMatrix(); - /* Draw Background */ - /* Set the color to a translucent blue */ + // Draw Background + // Set the color to a translucent blue glColor4f(0.0f, 0.0f, 0.5f, 0.6f); glBegin(GL_QUADS); glVertex2f(0.0f, 0.0f); @@ -191,8 +191,8 @@ void CConsole::DrawWindow(void) glVertex2f(0.0f, m_fHeight-1.0f); glEnd(); - /* Draw Border */ - /* Set the color to a translucent yellow */ + // Draw Border + // Set the color to a translucent yellow glColor4f(0.5f, 0.5f, 0.0f, 0.6f); glBegin(GL_LINE_LOOP); glVertex2f(0.0f, 0.0f); @@ -301,7 +301,7 @@ void CConsole::InsertChar(const int szChar, const wchar_t cooked ) return; case '\t': - /* Auto Complete */ + // Auto Complete return; case '\b': @@ -364,7 +364,7 @@ void CConsole::InsertChar(const int szChar, const wchar_t cooked ) if (m_iBufferPos != m_iBufferLength) m_iBufferPos++; return; - /* BEGIN: Buffer History Lookup */ + // BEGIN: Buffer History Lookup case SDLK_UP: if (m_deqBufHistory.size() && iHistoryPos != (int)m_deqBufHistory.size() - 1) { @@ -380,9 +380,9 @@ void CConsole::InsertChar(const int szChar, const wchar_t cooked ) SetBuffer(m_deqBufHistory.at(iHistoryPos).data()); else FlushBuffer(); return; - /* END: Buffer History Lookup */ + // END: Buffer History Lookup - /* BEGIN: Message History Lookup */ + // BEGIN: Message History Lookup case SDLK_PAGEUP: if (m_iMsgHistPos != (int)m_deqMsgHistory.size()) m_iMsgHistPos++; return; @@ -390,7 +390,7 @@ void CConsole::InsertChar(const int szChar, const wchar_t cooked ) case SDLK_PAGEDOWN: if (m_iMsgHistPos != 1) m_iMsgHistPos--; return; - /* END: Message History Lookup */ + // END: Message History Lookup default: //Insert a character if (IsFull()) return; diff --git a/source/ps/Network/Server.cpp b/source/ps/Network/Server.cpp index 760880369a..168c01be93 100755 --- a/source/ps/Network/Server.cpp +++ b/source/ps/Network/Server.cpp @@ -127,7 +127,7 @@ bool CNetServer::AddNewPlayer(CNetServerSession *pSession) { // First two players are Gaia and Server player, so assign new player // ID's starting from 2 - uint newPlayerID=2+m_PlayerSessions.size(); + uint newPlayerID=2+(uint)m_PlayerSessions.size(); m_PlayerSessions.push_back(pSession); pSession->m_pPlayer=m_pGame->GetPlayer(newPlayerID); pSession->m_pPlayer->SetName(pSession->GetName());