MULTILINGUAL - ALL BUGS FIXED
Reversed Makefile Changed memreport file names
This commit is contained in:
parent
1bd7ab3a95
commit
5ecd986d9b
|
@ -42,18 +42,6 @@
|
|||
#define INSERT_STRING 3
|
||||
#define INSERT_NEWLINE 4
|
||||
|
||||
void qdbg(const char *s, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
FILE *dbg = fopen("c:\\beta.txt", "at");
|
||||
va_start(argptr, s);
|
||||
char buf[2048];
|
||||
vsprintf(buf, s, argptr);
|
||||
va_end(argptr);
|
||||
fprintf(dbg, "%s", buf);
|
||||
fclose(dbg);
|
||||
}
|
||||
|
||||
// dictionary format is Fast-Format-Hash-Lookup, v4
|
||||
#define MAGIC_HDR 0x4646484C
|
||||
#define FFHL_VERSION 4
|
||||
|
@ -384,7 +372,6 @@ bool CLangMngr::CLang::Save(FILE *fp, int &defOffset, uint32_t &curOffset)
|
|||
{
|
||||
uint32_t keynum = 0;
|
||||
uint32_t defhash = 0;
|
||||
uint32_t defoff = defOffset;
|
||||
uint32_t size = m_LookUpTable.size();
|
||||
|
||||
fwrite((void*)&size, sizeof(uint32_t), 1, fp);
|
||||
|
@ -398,7 +385,7 @@ bool CLangMngr::CLang::Save(FILE *fp, int &defOffset, uint32_t &curOffset)
|
|||
curOffset += sizeof(uint32_t);
|
||||
fwrite((void *)&defhash, sizeof(uint32_t), 1, fp);
|
||||
curOffset += sizeof(uint32_t);
|
||||
fwrite((void *)&defoff, sizeof(uint32_t), 1, fp);
|
||||
fwrite((void *)&defOffset, sizeof(uint32_t), 1, fp);
|
||||
curOffset += sizeof(uint32_t);
|
||||
defOffset += sizeof(short);
|
||||
defOffset += m_LookUpTable[i]->GetDefLength();
|
||||
|
@ -1122,6 +1109,7 @@ bool CLangMngr::Load(const char *filename)
|
|||
if (version > FFHL_VERSION || version < FFHL_MIN_VERSION)
|
||||
return false;
|
||||
|
||||
fread((void*)&keycount, sizeof(uint32_t), 1, fp);
|
||||
fread((void*)&langCount, sizeof(uint32_t), 1, fp);
|
||||
|
||||
uint32_t *LangOffsets = new uint32_t[langCount];
|
||||
|
@ -1165,7 +1153,7 @@ bool CLangMngr::Load(const char *filename)
|
|||
for (unsigned int i=0; i<langCount; i++)
|
||||
{
|
||||
fread((void*)&numentries, sizeof(uint32_t), 1, fp);
|
||||
for (unsigned int j=0; i<numentries; j++)
|
||||
for (unsigned int j=0; j<numentries; j++)
|
||||
{
|
||||
fread((void *)&keynum, sizeof(uint32_t), 1, fp);
|
||||
fread((void *)&defhash, sizeof(uint32_t), 1, fp);
|
||||
|
@ -1183,6 +1171,8 @@ bool CLangMngr::Load(const char *filename)
|
|||
}
|
||||
|
||||
fclose(fp);
|
||||
|
||||
delete [] LangOffsets;
|
||||
|
||||
//we're done!
|
||||
return true;
|
||||
|
|
|
@ -4,8 +4,10 @@ float.cpp file.cpp modules.cpp CMisc.cpp CTask.cpp string.cpp\
|
|||
amxmodx.cpp CEvent.cpp CCmd.cpp CLogEvent.cpp srvcmd.cpp strptime.cpp\
|
||||
CForward.cpp CPlugin.cpp CModule.cpp CMenu.cpp emsg.cpp util.cpp \
|
||||
amxcore.cpp amxtime.cpp power.cpp amxxlog.cpp fakemeta.cpp mmgr/mmgr.cpp \
|
||||
amxxfile.cpp CLang.cpp
|
||||
CSRCFILES = amx.c minilzo/minilzo.c
|
||||
amxxfile.cpp CLang.cpp md5.cpp amx.cpp
|
||||
#use this for amd64, remove the above amx.cpp, and rename amx.cpp to amx.c
|
||||
#CSRCFILES = amx.c minilzo/minilzo.c
|
||||
CSRCFILES = minilzo/minilzo.c
|
||||
|
||||
EXTRA_LIBS_LINUX =
|
||||
EXTRA_LIBS_WIN32 =
|
||||
|
@ -45,8 +47,9 @@ else
|
|||
endif
|
||||
|
||||
|
||||
|
||||
LIBFILE_LINUX = $(MODNAME)_amd64.so
|
||||
#use this for AMD64
|
||||
#LIBFILE_LINUX = $(MODNAME)_amd64.so
|
||||
LIBFILE_LINUX = $(MODNAME)_i386.so
|
||||
LIBFILE_WIN32 = $(MODNAME).dll
|
||||
TARGET_LINUX = $(OBJDIR_LINUX)/$(LIBFILE_LINUX)
|
||||
TARGET_WIN32 = $(OBJDIR_WIN32)/$(LIBFILE_WIN32)
|
||||
|
@ -62,8 +65,9 @@ OBJC_LINUX := $(CSRCFILES:%.c=$(OBJDIR_LINUX)/%.o)
|
|||
OBJ_WIN32 := $(SRCFILES:%.cpp=$(OBJDIR_WIN32)/%.o)
|
||||
OBJC_WIN32 := $(CSRCFILES:%.c=$(OBJDIR_WIN32)/%.o)
|
||||
|
||||
|
||||
CCOPT = -m64 -g -ggdb3 -DHAVE_I64 -DSMALL_CELL_SIZE=64
|
||||
#use this for amd64
|
||||
#CCOPT = -m64 -g -ggdb3 -DHAVE_I64 -DSMALL_CELL_SIZE=64
|
||||
CCOPT = -march=i386 -s -DNDEBUG -O2 -fomit-frame-pointer -fno-exceptions -fno-rtti -ffast math
|
||||
|
||||
INCLUDEDIRS=-I../curl/include -I$(SRCDIR) -I$(METADIR) -I$(SDKSRC)/engine -I$(SDKSRC)/common -I$(SDKSRC)/pm_shared -I$(SDKSRC)/dlls -I$(SDKSRC) $(EXTRA_INCLUDEDIRS)
|
||||
CFLAGS=-Wall -Wno-unknown-pragmas
|
||||
|
|
|
@ -219,7 +219,7 @@ int C_Spawn( edict_t *pent ) {
|
|||
|
||||
// ###### Load lang
|
||||
g_langMngr.LoadCache(build_pathname("%s/dictionary.cache", get_localinfo("amxx_datadir", "addons/amxx/data")));
|
||||
// g_langMngr.Load(build_pathname("%s/languages.dat", get_localinfo("amxx_datadir", "addons/amxx/data")));
|
||||
g_langMngr.Load(build_pathname("%s/languages.dat", get_localinfo("amxx_datadir", "addons/amxx/data")));
|
||||
// ###### Initialize commands prefixes
|
||||
g_commands.registerPrefix( "amx" );
|
||||
g_commands.registerPrefix( "amxx" );
|
||||
|
@ -402,8 +402,8 @@ void C_ServerActivate_Post( edict_t *pEdictList, int edictCount, int clientMax )
|
|||
executeForwards(FF_PluginCfg);
|
||||
|
||||
// ###### Save lang
|
||||
g_langMngr.SaveCache(build_pathname("%s/dictionary.cache", get_localinfo("amxx_datadir", "addons/amxx/data")));
|
||||
g_langMngr.Save(build_pathname("%s/languages.dat", get_localinfo("amxx_datadir", "addons/amxx/data")));
|
||||
g_langMngr.SaveCache(build_pathname("%s/dictionary.cache", get_localinfo("amxx_datadir", "addons/amxx/data")));
|
||||
|
||||
// Correct time in Counter-Strike and other mods (except DOD)
|
||||
if ( !g_bmod_dod) g_game_timeleft = 0;
|
||||
|
@ -462,8 +462,8 @@ void C_ServerDeactivate_Post() {
|
|||
g_vault.clear();
|
||||
g_xvars.clear();
|
||||
g_plugins.clear();
|
||||
g_langMngr.SaveCache(build_pathname("%s/dictionary.cache", get_localinfo("amxx_datadir", "addons/amxx/data")));
|
||||
g_langMngr.Save(build_pathname("%s/languages.dat", get_localinfo("amxx_datadir", "addons/amxx/data")));
|
||||
g_langMngr.SaveCache(build_pathname("%s/dictionary.cache", get_localinfo("amxx_datadir", "addons/amxx/data")));
|
||||
g_langMngr.Clear();
|
||||
// last memreport
|
||||
#ifdef MEMORY_TEST
|
||||
|
@ -512,8 +512,8 @@ void C_ServerDeactivate_Post() {
|
|||
break;
|
||||
}
|
||||
}
|
||||
m_dumpMemoryReport(build_pathname("%s/r%03d", g_memreport_dir.c_str(), g_memreport_count));
|
||||
AMXXLOG_Log("Memreport #%d created (file \"%s/r%03d\") (interval %f)", g_memreport_count + 1, g_memreport_dir.c_str(), g_memreport_count, MEMREPORT_INTERVAL);
|
||||
m_dumpMemoryReport(build_pathname("%s/r%03d.txt", g_memreport_dir.c_str(), g_memreport_count));
|
||||
AMXXLOG_Log("Memreport #%d created (file \"%s/r%03d.txt\") (interval %f)", g_memreport_count + 1, g_memreport_dir.c_str(), g_memreport_count, MEMREPORT_INTERVAL);
|
||||
g_memreport_count++;
|
||||
}
|
||||
#endif // MEMORY_TEST
|
||||
|
@ -777,8 +777,8 @@ void C_StartFrame_Post( void ) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
m_dumpMemoryReport(build_pathname("%s/r%03d", g_memreport_dir.c_str(), g_memreport_count));
|
||||
AMXXLOG_Log("Memreport #%d created (file \"%s/r%03d\") (interval %f)", g_memreport_count + 1, g_memreport_dir.c_str(), g_memreport_count, MEMREPORT_INTERVAL);
|
||||
m_dumpMemoryReport(build_pathname("%s/r%03d.txt", g_memreport_dir.c_str(), g_memreport_count));
|
||||
AMXXLOG_Log("Memreport #%d created (file \"%s/r%03d.txt\") (interval %f)", g_memreport_count + 1, g_memreport_dir.c_str(), g_memreport_count, MEMREPORT_INTERVAL);
|
||||
g_memreport_count++;
|
||||
}
|
||||
#endif // MEMORY_TEST
|
||||
|
|
Loading…
Reference in New Issue
Block a user