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

Function AddCheatParam

src/drivers/common/cheat.cpp:320–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318}
319
320static void AddCheatParam(uint32 A, uint8 V)
321{
322 char name[256];
323
324 printf("Name: ");
325 GetString(name,256);
326 printf("Address [$%04x]: ",(unsigned int)A);
327 A=GetH16(A);
328 printf("Value [%03u]: ",(unsigned int)V);
329 V=Get8(V);
330 printf("Add cheat \"%s\" for address $%04x with value %03u?",name,(unsigned int)A,(unsigned int)V);
331 if(GetYN(0))
332 {
333 if(FCEUI_AddCheat(name,A,V,-1,0))
334 puts("Cheat added.");
335 else
336 puts("Error adding cheat.");
337 }
338}
339
340static void AddCheat(void)
341{

Callers 2

AddCheatFunction · 0.85
ShowResFunction · 0.85

Calls 5

GetStringFunction · 0.85
GetH16Function · 0.85
Get8Function · 0.85
GetYNFunction · 0.85
FCEUI_AddCheatFunction · 0.85

Tested by

no test coverage detected