[Fix] Pack file was using logical operator instead of asignment. :/
This commit is contained in:
parent
c15699606b
commit
2e78211acd
@ -16,7 +16,11 @@ joystick = "Precision"
|
|||||||
-- If left is an axis, it will automatically set right to the same axis.
|
-- If left is an axis, it will automatically set right to the same axis.
|
||||||
-- setting both to the same axis (key).
|
-- setting both to the same axis (key).
|
||||||
-- You can use reverse = 1 option to reverse them.
|
-- You can use reverse = 1 option to reverse them.
|
||||||
accel = { type = "jbutton", key = 0 }
|
accel = { type = "jbutton", key = 0 }
|
||||||
left = { type = "jaxis", key = 0 }
|
left = { type = "jaxis", key = 0 }
|
||||||
right = { 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 }
|
||||||
|
|
||||||
|
@ -1,22 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Factions>
|
<Factions>
|
||||||
<faction id='1'>
|
<faction name = "Player">
|
||||||
<name>Player</name>
|
|
||||||
</faction>
|
|
||||||
<faction id='2'>
|
|
||||||
<name>Noob Merchant</name>
|
|
||||||
<enemies>
|
|
||||||
<enemy>'3'</enemy>
|
|
||||||
</enemies>
|
|
||||||
<allies>
|
|
||||||
</allies>
|
|
||||||
</faction>
|
|
||||||
<faction id='3'>
|
|
||||||
<name>Pirate</name>
|
|
||||||
<enemies>
|
|
||||||
<enemy>2</enemy>
|
|
||||||
</enemies>
|
|
||||||
<allies>
|
|
||||||
</allies>
|
|
||||||
</faction>
|
</faction>
|
||||||
|
<faction name = "Merchant">
|
||||||
|
</faction>
|
||||||
|
<faction name = "Pirate">
|
||||||
|
</faction>
|
||||||
|
<alliances>
|
||||||
|
</alliances>
|
||||||
|
<enemies>
|
||||||
|
</enemies>
|
||||||
</Factions>
|
</Factions>
|
||||||
|
14
src/pack.c
14
src/pack.c
@ -291,12 +291,6 @@ void* pack_readfile(const char* packfile, const char* filename, uint32_t* filesi
|
|||||||
return buf;
|
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.
|
// Load the filenames int the packfile to filenames.
|
||||||
// filenames should be freed after use
|
// filenames should be freed after use
|
||||||
// On error if filenames is (char**)-1.
|
// 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')
|
while(filenames[i][j++] != '\0')
|
||||||
READ(fd, &filenames[i][j], 1);
|
READ(fd, &filenames[i][j], 1);
|
||||||
}
|
}
|
||||||
filenames[i] == NULL;
|
filenames[i] = NULL;
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
#undef READ
|
#undef READ
|
||||||
|
|
||||||
|
// Close the packfile.
|
||||||
|
int pack_close(Packfile* file) {
|
||||||
|
int i = close(file->fd);
|
||||||
|
return (i) ? -1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user