MCPcopy Create free account
hub / github.com/TASEmulators/fceux / FCEUI_DelCheat

Function FCEUI_DelCheat

src/cheat.cpp:380–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378}
379
380int FCEUI_DelCheat(uint32 which)
381{
382 struct CHEATF *prev;
383 struct CHEATF *cur;
384 uint32 x=0;
385
386 for(prev=0,cur=cheats;;)
387 {
388 if(x==which) // Remove this cheat.
389 {
390 if(prev) // Update pointer to this cheat.
391 {
392 if(cur->next) // More cheats.
393 prev->next=cur->next;
394 else // No more.
395 {
396 prev->next=0;
397 cheatsl=prev; // Set the previous cheat as the last cheat.
398 }
399 }
400 else // This is the first cheat.
401 {
402 if(cur->next) // More cheats
403 cheats=cur->next;
404 else
405 cheats=cheatsl=0; // No (more) cheats.
406 }
407 delete cur; // free the memory.
408 break;
409 } // *END REMOVE THIS CHEAT*
410
411
412 if(!cur->next) // No more cheats to go through(this shouldn't ever happen...)
413 return(0);
414 prev=cur;
415 cur=prev->next;
416 x++;
417 }
418
419 savecheats=1;
420 RebuildSubCheats();
421 return(1);
422}
423
424void FCEU_ApplyPeriodicCheats(void)
425{

Callers 7

emu_delgamegenieFunction · 0.85
DeleteCheatCallBFunction · 0.85
CheatConsoleCallBFunction · 0.85
FreezeRamMethod · 0.85
deleteActvCheatMethod · 0.85
removeCheatFromActiveFunction · 0.85
ListCheatsFunction · 0.85

Calls 1

RebuildSubCheatsFunction · 0.85

Tested by

no test coverage detected