clean up code, fix one memory leak

This commit is contained in:
Shpuld Shpuldson 2023-09-26 22:44:11 +03:00
parent 1b1b7e9564
commit 05e611b7f2
3 changed files with 3 additions and 7 deletions

View file

@ -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

View file

@ -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

View file

@ -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];