| 286 | } |
| 287 | |
| 288 | void FCEU_SaveGameCheats(FILE* fp, int release) |
| 289 | { |
| 290 | struct CHEATF *next = cheats; |
| 291 | while (next) |
| 292 | { |
| 293 | if (next->type) |
| 294 | fputc('S', fp); |
| 295 | if (next->compare >= 0) |
| 296 | fputc('C', fp); |
| 297 | |
| 298 | if (!next->status) |
| 299 | fputc(':', fp); |
| 300 | |
| 301 | if (next->compare >= 0) |
| 302 | fprintf(fp, "%04x:%02x:%02x:%s\n", next->addr, next->val, next->compare, next->name.c_str()); |
| 303 | else |
| 304 | fprintf(fp, "%04x:%02x:%s\n", next->addr, next->val, next->name.c_str()); |
| 305 | |
| 306 | struct CHEATF *t = next; |
| 307 | next = next->next; |
| 308 | if (release) delete t; |
| 309 | } |
| 310 | } |
| 311 | |
| 312 | void FCEU_FlushGameCheats(FILE *override, int nosave) |
| 313 | { |
no outgoing calls
no test coverage detected