From 2e78211acd84ce4d3e9ffb228fbb1beb7ffbf67f Mon Sep 17 00:00:00 2001 From: Allanis Date: Thu, 7 Feb 2013 22:48:31 +0000 Subject: [PATCH] [Fix] Pack file was using logical operator instead of asignment. :/ --- bin/conf.example | 10 +++++++--- dat/faction.xml | 27 +++++++++------------------ src/pack.c | 14 +++++++------- 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/bin/conf.example b/bin/conf.example index 91d8b19..e936dca 100644 --- a/bin/conf.example +++ b/bin/conf.example @@ -16,7 +16,11 @@ joystick = "Precision" -- If left is an axis, it will automatically set right to the same axis. -- setting both to the same axis (key). -- You can use reverse = 1 option to reverse them. -accel = { type = "jbutton", key = 0 } -left = { type = "jaxis", key = 0 } -right = { type = "jaxis", key = 0 } +accel = { type = "jbutton", key = 0 } +left = { type = "jaxis", key = 0 } +right = { type = "jaxis", key = 0 } +primary = { type = "jbutton", key = 1 } +target = { type = "jbutton", key = 4 } +mapzoomin = { type = "jbutton", key = 7 } +mapzoomout = { type = "jbuton", key = 6 } diff --git a/dat/faction.xml b/dat/faction.xml index 77c3ea9..836ff5a 100644 --- a/dat/faction.xml +++ b/dat/faction.xml @@ -1,22 +1,13 @@ - - Player - - - Noob Merchant - - '3' - - - - - - Pirate - - 2 - - - + + + + + + + + + diff --git a/src/pack.c b/src/pack.c index a9869af..f9be300 100644 --- a/src/pack.c +++ b/src/pack.c @@ -291,12 +291,6 @@ void* pack_readfile(const char* packfile, const char* filename, uint32_t* filesi return buf; } -// Close the packfile. -int pack_close(Packfile* file) { - int i = close(file->fd); - return (i) ? -1 : 0; -} - // Load the filenames int the packfile to filenames. // filenames should be freed after use // On error if filenames is (char**)-1. @@ -332,8 +326,14 @@ void pack_listfiles(const char* packfile, char** filenames, uint32_t* nfiles) { while(filenames[i][j++] != '\0') READ(fd, &filenames[i][j], 1); } - filenames[i] == NULL; + filenames[i] = NULL; close(fd); } #undef READ +// Close the packfile. +int pack_close(Packfile* file) { + int i = close(file->fd); + return (i) ? -1 : 0; +} +