X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame_sp%2Fvb_lib.c;h=c4df2cf3d853ce0493659bcec7a4623251287b6b;hp=6cdfdec1e2504ce73eb7823d97eb392ee5199d79;hb=e63e92923fa0196ba7d538d4c8f5a16994e3bee8;hpb=8d3d7d213a9691455a49544624bf380e85f43461 diff --git a/src/game_sp/vb_lib.c b/src/game_sp/vb_lib.c index 6cdfdec1..c4df2cf3 100644 --- a/src/game_sp/vb_lib.c +++ b/src/game_sp/vb_lib.c @@ -7,11 +7,13 @@ #include "vb_vars.h" #include "vb_lib.h" +#include "main_sp.h" + /* helper functions for constructs not supported by C */ void *REDIM_1D(int a, int b, int c) { - return 0; + return checked_calloc(a * (c - b + 1)); } void *REDIM_2D(int a, int b, int c, int d, int e) @@ -57,9 +59,12 @@ boolean STRING_IS_LIKE(char *a, char *b) } -int FILE_GET(FILE *a, int b, void *c, int d) +void FILE_GET(FILE *a, int b, void *c, int d) { - return 0; + fseek(a, b, SEEK_SET); + + while (d--) + *(byte *)c++ = fgetc(a); } int FILE_PUT(FILE *a, int b, void *c, int d)