2
0
mirror of https://github.com/rehlds/metamod-r.git synced 2024-12-27 07:05:34 +03:00

Fixed compilation

This commit is contained in:
asmodai 2017-01-06 22:55:16 +03:00
parent 8a996d4027
commit 0087accffc
5 changed files with 8 additions and 13 deletions

View File

@ -24,13 +24,10 @@
* you do not wish to do so, delete this exception statement from your
* version.
*
*/#ifndef ARCHTYPES_H
*/
#ifndef ARCHTYPES_H
#define ARCHTYPES_H
#ifdef __x86_64__
#define X64BITS
#endif
#if defined( _WIN32 ) && (! defined( __MINGW32__ ))
typedef __int8 int8;

View File

@ -1,4 +1,4 @@
LIBRARY metamod_mm
LIBRARY metamod
EXPORTS
GiveFnptrsToDll @1
SECTIONS

View File

@ -25,7 +25,7 @@ class CForwardCallbackJIT : public jitasm::function<int, CForwardCallbackJIT, in
{
public:
CForwardCallbackJIT(jitdata_t *jitdata);
void naked_main() override;
void naked_main();
void call_func(jitasm::Frontend::Reg32 addr);
private:

View File

@ -11,11 +11,10 @@ void mm_QueryClientCvarValue(const edict_t* pEdict, const char* cvarName)
g_players.set_player_cvar_query(pEdict, cvarName);
}
// int -> void
void mm_RegUserMsg(const char* pszName, int iSize)
{
/*__asm int 3;
// Add the msgid, name, and size to our saved list, if we haven't
// already.
// Add the msgid, name, and size to our saved list, if we haven't already.
auto imsgid = *(int *)(g_metaGlobals.status == MRES_OVERRIDE ? g_metaGlobals.override_ret : g_metaGlobals.orig_ret);
auto nmsg = g_regMsgs->find(imsgid);
@ -28,7 +27,7 @@ void mm_RegUserMsg(const char* pszName, int iSize)
META_ERROR("user message id reused: msgid=%d, oldname=%s, newname=%s", imsgid, nmsg->name, pszName);
}
else
g_regMsgs->add(pszName, imsgid, iSize);*/
g_regMsgs->add(pszName, imsgid, iSize);
}
compile_data_t g_engfuncs_cdata[] =

View File

@ -8887,8 +8887,7 @@ struct function_cdecl<R, Derived, A1, detail::ArgNone, detail::ArgNone, detail::
typename detail::ResultTraits<R>::ResultPtr result_ptr;
operator FuncPtr() { return (FuncPtr)GetCode(); }
void InternalMain() {static_cast<Derived *>(this)->naked_main();}
virtual void naked_main() {
void naked_main() {
using namespace detail::calling_convention_cdecl;
Prolog();
detail::ResultDest result_dst(*this, ResultInfo<R>());