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

Function FCEUI_SetCheat

src/cheat.cpp:591–621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

589/* same goes for a, v, and s(except the values of each one must be <0) */
590
591int FCEUI_SetCheat(uint32 which, const std::string *name, int32 a, int32 v, int c, int s, int type)
592{
593 struct CHEATF *next = cheats;
594 uint32 x = 0;
595
596 while(next)
597 {
598 if(x == which)
599 {
600 if(name)
601 next->name = *name;
602 if(a >= 0)
603 next->addr = a;
604 if(v >= 0)
605 next->val = v;
606 if(s >= 0)
607 next->status = s;
608 if(c >= -1)
609 next->compare = c;
610 next->type = type;
611
612 savecheats = 1;
613 RebuildSubCheats();
614
615 return 1;
616 }
617 next = next->next;
618 x++;
619 }
620 return 0;
621}
622
623/* Convenience function. */
624int FCEUI_ToggleCheat(uint32 which)

Callers 8

CheatConsoleCallBFunction · 0.85
updateCheatParametersMethod · 0.85
updateCheatListFunction · 0.85
cheat_cell_edited_cb1Function · 0.85
cheat_cell_edited_cb2Function · 0.85
cheat_cell_edited_cb3Function · 0.85
cheat_cell_edited_cb4Function · 0.85
ModifyCheatFunction · 0.85

Calls 1

RebuildSubCheatsFunction · 0.85

Tested by

no test coverage detected