Permalink
Browse files

Revert hardcoded enable code treatment.

  • Loading branch information...
1 parent e43b4c4 commit 835572c65ab95b9bb2ab04f652943890715cdc90 @root670 committed Jun 16, 2016
Showing with 4 additions and 17 deletions.
  1. +0 −1 cheats.h
  2. +3 −9 database.c
  3. +1 −7 textcheats.c
View
@@ -35,7 +35,6 @@ typedef struct cheatsGame {
char title[81];
unsigned int numCheats;
cheatsCheat_t *cheats;
- cheatsCheat_t *enableCheat;
struct cheatsGame *next;
} cheatsGame_t;
View
@@ -133,15 +133,9 @@ int dbOpenBuffer(unsigned char *buff)
cheat = cheat->next;
}
- // Use first cheat as enable cheat.
- game->enableCheat = cheatsHead;
- game->cheats = cheatsHead->next;
- game->enableCheat->next = NULL;
- game->enableCheat->enabled = 1;
-
- if(numCheats > 0)
- game->numCheats = numCheats - 1; // don't count the enable cheat
-
+ game->cheats = cheatsHead;
+ game->numCheats = numCheats;
+
if(i+1 < dbHeader->numTitles)
{
game->next = game + 1;
View
@@ -227,13 +227,7 @@ int parseLine(const char *line)
if(!game)
return 0;
- if(game->enableCheat == NULL)
- {
- game->enableCheat = &cheatsHead[usedCheats++];
- game->enableCheat->enabled = 1;
- cheat = game->enableCheat;
- }
- else if(game->cheats == NULL)
+ if(game->cheats == NULL)
{
// Game's first cheat following enable cheat
game->cheats = &cheatsHead[usedCheats++];

0 comments on commit 835572c

Please sign in to comment.