Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 09-28-2010, 08:37 PM
Shadows91
Fire Beetle
 
Join Date: Jun 2009
Location: ..nosey!
Posts: 7
Default Windows tweaks

Changes:
  • The ShellExecute function requires #include <ShellAPI.h>
  • #include <windows.h> must come before #include <winsock2.h>


Index: worldserver.cpp
================================================== =================
--- worldserver.cpp (revision 1673)
+++ worldserver.cpp (working copy)
@@ -21,7 +21,7 @@
#include <string.h>
#include <stdio.h>
#include <iomanip>
-using namespace std;
+#include <ShellAPI.h>
#include <time.h>
#include <stdlib.h>
#include <stdarg.h>

Index: Items.cpp
================================================== =================
--- Items.cpp (revision 1673)
+++ Items.cpp (working copy)
@@ -8,8 +8,8 @@
*/

#ifdef WIN32
+#include <windows.h>
#include <winsock2.h>
-#include <windows.h>
#else
#include "../common/unix.h"
#endif
Reply With Quote
  #2  
Old 09-28-2010, 08:41 PM
Shadows91
Fire Beetle
 
Join Date: Jun 2009
Location: ..nosey!
Posts: 7
Default Another fix

The hash function is ambiguous on windows. use ::hash instead.


Index: MiscFunctions.cpp
================================================== =================
--- MiscFunctions.cpp (revision 1673)
+++ MiscFunctions.cpp (working copy)
@@ -396,7 +396,7 @@
//return (rand()%(high-low+1) + (low));
if(!WELLRNG_init) {
WELLRNG_init = true;
- oneseed( hash( time(NULL), clock() ) );
+ oneseed( ::hash( time(NULL), clock() ) );
WELLRNG19937 = case_1;
}
unsigned int randomnum = ((WELLRNG19937)());
@@ -414,7 +414,7 @@
//return (rand() / (double)RAND_MAX * (high - low) + low);
if(!WELLRNG_init) {
WELLRNG_init = true;
- oneseed( hash( time(NULL), clock() ) );
+ oneseed( ::hash( time(NULL), clock() ) );
WELLRNG19937 = case_1;
}
return ((WELLRNG19937)() / (double)0xffffffffUL * (high - low) + low);
Reply With Quote
  #3  
Old 10-03-2010, 09:08 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

These functions work fine currently on windows machines.
Reply With Quote
  #4  
Old 10-04-2010, 01:45 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,447
Default

Quote:
Originally Posted by joligario View Post
These functions work fine currently on windows machines.
this. I've been running it fine on a windows machine (unless they changed something in vs2010, I think it works just fine.)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:31 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3