| 589 | /* same goes for a, v, and s(except the values of each one must be <0) */ |
| 590 | |
| 591 | int 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. */ |
| 624 | int FCEUI_ToggleCheat(uint32 which) |
no test coverage detected