mirror of
https://github.com/nzp-team/dquakeplus.git
synced 2024-11-25 21:31:49 +00:00
clean up code, fix one memory leak
This commit is contained in:
parent
1b1b7e9564
commit
05e611b7f2
3 changed files with 3 additions and 7 deletions
|
@ -704,7 +704,8 @@ void _Host_Frame (float time)
|
|||
pass1+pass2+pass3, pass1, pass2, pass3);
|
||||
}
|
||||
|
||||
// if ((host_framecount % 120) == 0) Con_Printf ("%dkB free \n", pspSdkTotalFreeUserMemSize()/1024);
|
||||
// Debug log free memory
|
||||
// if ((host_framecount % 120) == 0) Con_Printf ("%.2fkB free \n", pspSdkTotalFreeUserMemSize()/1024.f);
|
||||
|
||||
//frame speed counter
|
||||
fps_count++;//muff
|
||||
|
|
|
@ -31,8 +31,6 @@ extern"C"
|
|||
#include <pspgum.h>
|
||||
#include <list>
|
||||
|
||||
extern std::list<int> mapTextureNameList;
|
||||
|
||||
extern model_t *loadmodel;
|
||||
|
||||
extern vec3_t lightcolor; // LordHavoc: .lit support
|
||||
|
@ -157,9 +155,7 @@ qboolean Mod_LoadHLModel (model_t *mod, void *buffer)
|
|||
|
||||
for(i = 0; i < header->numtextures; i++)
|
||||
{
|
||||
|
||||
tex[i].i = GL_LoadPalTex (tex[i].name, tex[i].w, tex[i].h, (byte *) header + tex[i].i, qtrue, GU_LINEAR, 0, (byte *) header + tex[i].w * tex[i].h + tex[i].i, PAL_RGB);
|
||||
mapTextureNameList.push_back(tex[i].i); // for unload textures
|
||||
}
|
||||
//
|
||||
// move the complete, relocatable alias model to the cache
|
||||
|
|
|
@ -1189,7 +1189,6 @@ void Mod_LoadFaces (lump_t *l)
|
|||
if (l->filelen % sizeof(*in))
|
||||
Con_Printf ("MOD_LoadBmodel: funny lump size in %s",loadmodel->name);
|
||||
count = l->filelen / sizeof(*in);
|
||||
Con_Printf("Model faces %d\n", count);
|
||||
out = static_cast<msurface_t*>(Hunk_AllocName ( count*sizeof(*out), loadname));
|
||||
|
||||
loadmodel->surfaces = out;
|
||||
|
@ -2018,7 +2017,7 @@ void Mod_FloodFillSkin( byte *skin, int skinwidth, int skinheight )
|
|||
|
||||
qboolean model_is_gun(char name[MAX_QPATH])
|
||||
{
|
||||
char* wep_path = static_cast<char*>(malloc(sizeof(char)*15));
|
||||
char wep_path[15];
|
||||
|
||||
for (int i = 0; i < 15; i++) {
|
||||
wep_path[i] = name[i];
|
||||
|
|
Loading…
Reference in a new issue