forked from Ports/perfect_dark
port: purge texcache when gunmem is released as well
This commit is contained in:
1 parent
bed505fd91
commit
b1247b5eac
1 file changed
+8
@@ -53,6 +53,9 @@
|
|||||||
#include "lib/lib_317f0.h"
|
#include "lib/lib_317f0.h"
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
#ifndef PLATFORM_N64
|
||||||
|
#include "video.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define GUNLOADSTATE_FLUX 0
|
#define GUNLOADSTATE_FLUX 0
|
||||||
#define GUNLOADSTATE_MODEL 1
|
#define GUNLOADSTATE_MODEL 1
|
||||||
@@ -3640,6 +3643,11 @@ u32 bgunCalculateGunMemCapacity(void)
|
|||||||
void bgunFreeGunMem(void)
|
void bgunFreeGunMem(void)
|
||||||
{
|
{
|
||||||
g_Vars.currentplayer->gunctrl.gunmemowner = GUNMEMOWNER_FREE;
|
g_Vars.currentplayer->gunctrl.gunmemowner = GUNMEMOWNER_FREE;
|
||||||
|
#ifndef PLATFORM_N64
|
||||||
|
// gunmem is stale and so are the textures in it
|
||||||
|
// TODO: figure out how to purge only those textures
|
||||||
|
videoResetTextureCache();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void bgunSetGunMemWeapon(s32 weaponnum)
|
void bgunSetGunMemWeapon(s32 weaponnum)
|
||||||
|
|||||||
Reference in new issue
Block a user