瀏覽代碼

added basic config file

Joshua Bicking 8 年之前
父節點
當前提交
b89e56d976
共有 3 個文件被更改,包括 22 次插入34 次删除
  1. 22 0
      src/FalloutTerminal.cfg
  2. 0 6
      src/FalloutTerminal.h
  3. 0 28
      src/fileReadTest.c

+ 22 - 0
src/FalloutTerminal.cfg

@@ -0,0 +1,22 @@
+# Lines that with # will be ignored.
+# The config file consists of two parts:
+#   The word list
+#   The ending action(s)
+# The words list starts with
+# :WORDS
+# And is followed by a list of words, one per line, all the same length, that
+# you'd like in the game.
+#
+# After the word list, there are two optional parameters
+# :LAUNCH_ON_VICTORY="X:\path\to\program.exe"
+# :LAUNCH_ON_COMPLETE="X:\path\to\program.exe"
+#
+# If declared, they will launch the program specified when the game
+# completes/is won, respectively.
+
+:WORDS
+# WORDS GO HERE
+
+:LAUNCH_ON_VICTORY="X:\path\to\program.exe"
+:LAUNCH_ON_COMPLETE="X:\path\to\program.exe"
+

+ 0 - 6
src/FalloutTerminal.h

@@ -1,6 +0,0 @@
-#ifndef FALLOUT_TERMINAL_H
-#define FALLOUT_TERMINAL_H
-
-void pass();
-
-#endif

+ 0 - 28
src/fileReadTest.c

@@ -1,28 +0,0 @@
-#define _GNU_SOURCE
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(){
-    FILE *fp = fopen("wordList", "r");
-    //int wordCount = 3; //TODO remove temp declaration
-    int wordCount =0;
-    int c;
-    while ( (c=fgetc(fp)) != EOF)
-        if (c == '\n')
-            wordCount++;
-
-    rewind(fp);
-
-    printf("%d newlines\n", wordCount);
-
-
-    char words[wordCount][15];
-
-    int j=0;
-    while (fgets(words[j], sizeof(words[j]), fp))
-            j++;
-    
-    for(int i=0; i<wordCount; i++)
-        printf("%d: %s",i,words[i]);
-
-}