Assuming either native or by hacks this eventually works, you'd need to re-implement the missing map entities because Opposing Force's game.dll/client.dll is closed source. Some people reverse engineered Counter-Strike's client.dll for Xash3D, maybe OF will be done in the future
REQUEST: Port Half-Life SDK Extension DLLs CLEANLY to Windows CE
Sega Dreamcast Development and ResearchWhoa, whoa, whoa guys. Damn I am too busy working on my BF2 mod. I need to keep checking on this thread to see progress. Great work Megavolt, damn man, you are a true hero! Keep up the great work! Hope to finally see this thing compiled correctly!
that still does not work?
you're right
Code:
char *itoa(int value, char *str, int base)
{
if (!str)
return NULL;
unsigned int i, val;
if (value < 0 && base == 10)
{
i = val = -value;
*str++;
}
else
{
i = val = (unsigned int) value;
}
do
*str++;
while ((i /= base));
*str = '\0';
do
*--str = itoa_lower_digits[val % base];
while ((val /= base) != 0);
if (value < 0 && base == 10)
*--str = '-';
return str;
}
profile pic related lol
Edit: @megavolt85 I attached python.cpp instead of player.cpp, but the are from the newer branch. Attached a new zip with player.cpp
test
Cleared most of the errors in hl.dll
Winsock stuff might be a pain

Winsock stuff might be a pain
add to util.cpp
add to helper.h
Code:
int isalnum(ch)
{
if(isalpha(ch) || isdigit(ch))
return 1;
return 0;
}
Code:
extern int isalnum(int ch);
Compiler complains about the ch parameter for isalnum() for hl.dll, but that's the last one
Also complains about it in client.dll, and a few other things. I'm impressed at the rewriting of some of winsock.h, one last error
Again thanks a lot, almost done, in less than two days lol
Also complains about it in client.dll, and a few other things. I'm impressed at the rewriting of some of winsock.h, one last error
Again thanks a lot, almost done, in less than two days lol
ops
hm, JOYINFOEX is WIN32 struct
Code:
int isalnum(int ch)
{
if(isalpha(ch) || isdigit(ch))
return 1;
return 0;
}
Downloaded HL2 leaked source code from 2003 to poke around, I mentioned the compiler references eng_cdll_int.c in second post, and the strings referencing client.dll
^^ Note the double backslash in the "cl_dlls\\client.dll" string ^^
To my surprise, cdll_engine_int.cpp (for source engine but still, source engine is derived from GoldSRC). I'm just going to put a significant excerpt, because having this is pretty illegal
Same thing for cmd.c
String in HLDC binary for cmd function
The function, and again same string exists in HL2 2003 leak cmd.cpp. It's definitely a fork of the same source as HLDC
I think having these as a reference, even though obviously it's a newer version for the new engine, will help tremendously in creating the hooks/hacks we need to force load this
There's also net_ws.c, which I said awhile ago that it was all the code for the 'connect' commands and such, net_ws.cpp shows I was correct, and that possibly all the Winsock functions for networking is there, there's just no way for Half-Life to 'see' the internet connection
Having this source code from HL2 2003 leak will make re-implementing the networking 100% easier, it's essentially written already. So I don't get assemblergames a big fat C&D by attaching the source, whoever wants to take a look at the full files can get them here
http://hl2-beta.ru/download.php?view.24
---
I found very useful source code for injecting DLLs in Windows CE, called "CE API Spy". But it's for WCE 3.0+, after the above there is still hope in using command line parameters, but if it needs to be injected this will need to be partially re-written for WCE 2.12 (see attached) (it was a bitch to track these sources down, the .zip on the original site was corrupt)
http://www.drdobbs.com/cpp/spy-a-windows-ce-api-interceptor/184405459
--
@Trident6 is this not the best possible situation to be in for what is trying to be achieved? What's your opinion after the above on what we're looking at? We have reference source code for the hl1 engine itself, the engine extensions are about 90% ported, and we have Windows CE at our disposal
I think we're much more close to pulling this off then we think
---
@megavolt85 I just saw your post, typing that took awhile
^^ Note the double backslash in the "cl_dlls\\client.dll" string ^^
To my surprise, cdll_engine_int.cpp (for source engine but still, source engine is derived from GoldSRC). I'm just going to put a significant excerpt, because having this is pretty illegal
Code:
//-----------------------------------------------------------------------------
// Purpose: Loads the client .dll
//-----------------------------------------------------------------------------
void ClientDLL_Init( void )
{
char szDllName[512];
Assert ( !g_ClientDLLModule );
Q_snprintf( szDllName, sizeof( szDllName ), "bin\\client.dll" );
COM_ExpandFilename( szDllName );
COM_FixSlashes(szDllName); // Otherwise Sys_GetFactory() fails sometimes(on net drives for instance)
// clear the pic pointers
g_ClientDLLModule = FileSystem_LoadModule(szDllName);
if ( g_ClientDLLModule )
{
CreateInterfaceFn clientFactory = Sys_GetFactory( g_ClientDLLModule );
if ( clientFactory )
{
g_ClientDLL = (IBaseClientDLL *)clientFactory( CLIENT_DLL_INTERFACE_VERSION, NULL );
if ( !g_ClientDLL )
{
Sys_Error( "Could not get client.dll interface from library %s", szDllName );
}
if ( !g_ClientDLL->Init(g_AppSystemFactory, physicsFactory, &g_ClientGlobalVariables ) )
{
Sys_Error("Client.dll Init() in library %s failed.", szDllName);
}
// Load the prediction interface from the client .dll
g_pClientSidePrediction = (IPrediction *)clientFactory( VCLIENT_PREDICTION_INTERFACE_VERSION, NULL );
if ( !g_pClientSidePrediction )
{
Sys_Error( "Could not get IPrediction interface from library %s", szDllName );
}
g_pClientSidePrediction->Init();
s_pClientStats = (IClientStats *)clientFactory( INTERFACEVERSION_CLIENTSTATS, NULL );
if ( !s_pClientStats )
{
Sys_Error( "Could not get client stats interface from library %s", szDllName );
}
g_EngineStats.InstallClientStats( s_pClientStats );
entitylist = ( IClientEntityList *)clientFactory( VCLIENTENTITYLIST_INTERFACE_VERSION, NULL );
if ( !entitylist )
{
Sys_Error( "Could not get client entity list interface from library %s", szDllName );
}
centerprint = ( ICenterPrint * )clientFactory( VCENTERPRINT_INTERFACE_VERSION, NULL );
if ( !centerprint )
{
Sys_Error( "Could not get centerprint interface from library %s", szDllName );
}
clientleafsystem = ( IClientLeafSystemEngine *)clientFactory( CLIENTLEAFSYSTEM_INTERFACE_VERSION, NULL );
if ( !clientleafsystem )
{
Sys_Error( "Could not get client leaf system interface from library %s", szDllName );
}
}
else
{
Sys_Error( "Could not find factory interface in library %s", szDllName );
}
}
else
{
// library failed to load
Sys_Error( "Could not load library %s", szDllName );
}
if ( CommandLine()->FindParm( "-showlogo" ) )
{
// Enable Logo
int i = 1;
DispatchDirectUserMsg("Logo", 1, (void *)&i);
}
ClientDLL_InitRecvTableMgr();
}
String in HLDC binary for cmd function
The function, and again same string exists in HL2 2003 leak cmd.cpp. It's definitely a fork of the same source as HLDC
Code:
/*
================
Cmd_CheckParm
Returns the position (1 to argc-1) in the command's argument list
where the given parameter apears, or 0 if not present
================
*/
int Cmd_CheckParm (char *parm)
{
int i;
if (!parm)
Sys_Error ("Cmd_CheckParm: NULL");
for (i = 1; i < Cmd_Argc (); i++)
if (! Q_strcasecmp (parm, Cmd_Argv (i)))
return i;
return 0;
}
There's also net_ws.c, which I said awhile ago that it was all the code for the 'connect' commands and such, net_ws.cpp shows I was correct, and that possibly all the Winsock functions for networking is there, there's just no way for Half-Life to 'see' the internet connection
Having this source code from HL2 2003 leak will make re-implementing the networking 100% easier, it's essentially written already. So I don't get assemblergames a big fat C&D by attaching the source, whoever wants to take a look at the full files can get them here
http://hl2-beta.ru/download.php?view.24
---
I found very useful source code for injecting DLLs in Windows CE, called "CE API Spy". But it's for WCE 3.0+, after the above there is still hope in using command line parameters, but if it needs to be injected this will need to be partially re-written for WCE 2.12 (see attached) (it was a bitch to track these sources down, the .zip on the original site was corrupt)
http://www.drdobbs.com/cpp/spy-a-windows-ce-api-interceptor/184405459
--
@Trident6 is this not the best possible situation to be in for what is trying to be achieved? What's your opinion after the above on what we're looking at? We have reference source code for the hl1 engine itself, the engine extensions are about 90% ported, and we have Windows CE at our disposal
I think we're much more close to pulling this off then we think
---
@megavolt85 I just saw your post, typing that took awhile
Unfortunately hl.dll spits a whole bunch of unresolved symbol errors
Client.dll is almost there, again I'm impressed with eliminating the Winsock errors
I say finish client.dll and worry about the linking of both after. Again thanks a ton @megavolt85
You might have some luck with the input stuff by taking a look at the direct input headers, I attached the headers and the WCE\DC help file for directinput
Client.dll is almost there, again I'm impressed with eliminating the Winsock errors
I say finish client.dll and worry about the linking of both after. Again thanks a ton @megavolt85
You might have some luck with the input stuff by taking a look at the direct input headers, I attached the headers and the WCE\DC help file for directinput
hm, remove in helper.h all words extern
No change
Should I add 'extern' again?
Should I add 'extern' again?
Code:
// Helper.h by MegaVolt85 // Reimplements functions not supported by Windows CE extern const void *calloc(size_t nmemb, size_t size); extern const char *itoa(int value, char *str, int base); extern const int isspace(int character); extern const int isprint(int ch); extern const int isalpha(int ch); extern const int isdigit(int ch); extern const int isalnum(int ch); extern const int stricmp(const char *a, const char *b); extern const int strnicmp(const char *a, const char *b, int n);
I had to remove the definition of isalnum in util.cpp after
Edit: Do you have WCE Dreamcast SDK?
Edit: Do you have WCE Dreamcast SDK?
upload util.cpp
Attached for client and hl
both files don't have my function
Original thread: https://assemblergames.com/threads/request-port-half-life-sdk-extension-dlls-cleanly-to-windows-ce.64408/