summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2009-03-23 18:34:54 +0100
committerTomas Chvatal <scarabeus@gentoo.org>2009-03-23 18:34:54 +0100
commit4c553db8e1519fc24277d890c169a59751dd14c0 (patch)
tree2ea0d0ab4326bcbfa245d07b8957c05756e88610
parent6763baff401bb712bc883dc1597e54e926607221 (diff)
Where the crap this file blob out...
-rw-r--r--src/idget_image.h widget_picture.h89
1 files changed, 0 insertions, 89 deletions
diff --git a/src/idget_image.h widget_picture.h b/src/idget_image.h widget_picture.h
deleted file mode 100644
index 89476ff..0000000
--- a/src/idget_image.h widget_picture.h
+++ /dev/null
@@ -1,89 +0,0 @@
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#include "main.h"
-#include "list.h"
-#include "textFile.h"
-#include "highScore.h"
-
-static textFile_t *textFile;
-
-void initHighScore(char *file)
-{
- int i;
-
- textFile = loadTextFile(file);
-
- if (textFile == NULL) {
- fprintf(stderr, _("I am unable to load: \"%s\"!\n"), file);
- fprintf(stderr, _("Creating: \"%s\"\n"), file);
- textFile = newTextFile(file);
- } else {
-
- DEBUG_MSG(_("Scorefile: \"%s\"\n"), file);
- return;
- }
-
- if (textFile == NULL) {
- fprintf(stderr, _("I was unable to create: \"%s\"!\n"), file);
- return;
- }
-
- for (i = 0; i < HIGHSCORE_MAX_PLAYERS; i++) {
- addList(textFile->text, strdup("no_name 0"));
- }
-
- saveTextFile(textFile);
-}
-
-int addPlayerInHighScore(char *name, int score)
-{
- int i;
-
- if (score <= 0) {
- return -1; // Ha ha ha
- }
-
- for (i = 0; i < HIGHSCORE_MAX_PLAYERS; i++) {
- char *line;
- char thisName[STR_NAME_SIZE];
- int thisCore;
-
- line = (char *) textFile->text->list[i];
- sscanf(line, "%s %d", thisName, &thisCore);
-
- if (score >= thisCore) {
- char new[STR_SIZE];
-
- sprintf(new, "%s %d", name, score);
- insList(textFile->text, i, strdup(new));
- delListItem(textFile->text, HIGHSCORE_MAX_PLAYERS, free);
- //printTextFile(textFile);
- saveTextFile(textFile);
-
- return 0;
- }
- }
-
- return -1;
-}
-
-char *getTableItem(int index)
-{
- if (textFile != NULL && index >= 0 && index < textFile->text->count) {
- return (char *) textFile->text->list[index];
- }
-
- return NULL;
-}
-
-void quitHighScore()
-{
- if (textFile != NULL) {
- saveTextFile(textFile);
- destroyTextFile(textFile);
- }
-}