X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=babel%2Ftads3.c;fp=babel%2Ftads3.c;h=0000000000000000000000000000000000000000;hb=3c59ba5eef5cb4d39c06eb7f523b9c3b026bdc9b;hp=23d8fb5c58cf5398999e4ec99c8e1564c41527b5;hpb=ed91d840318ed6ebfe3a5a77fa17114ddbf56640;p=projects%2Fchimara%2Fchimara.git diff --git a/babel/tads3.c b/babel/tads3.c deleted file mode 100644 index 23d8fb5..0000000 --- a/babel/tads3.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * tads3.c - Treaty of Babel module for Tads 3 files - * - * This file depends on treaty_builder.h - * - * This file is public domain, but note that any changes to this file may - * render it noncompliant with the Treaty of Babel - * - * Modified - *. 04/15/2006 LRRaszewski - Separated tads2.c and tads3.c - *. 04/08/2006 LRRaszewski - changed babel API calls to threadsafe versions - *. 04/08/2006 MJRoberts - initial implementation - */ - -#define FORMAT tads3 -#define HOME_PAGE "http://www.tads.org" -#define FORMAT_EXT ".t3" - - -#include "treaty_builder.h" -#include "tads.h" - -#define T3_SIGNATURE "T3-image\015\012\032" - -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef TRUE -#define TRUE 1 -#endif - -/* - * get a story file's IFID - */ -static int32 get_story_file_IFID(void *story_file, int32 extent, - char *output, int32 output_extent) -{ - /* use the common tads IFID extractor/generator */ - return tads_get_story_file_IFID(story_file, extent, - output, output_extent); -} - -/* - * determine if a given story file is one of ours - */ -static int32 claim_story_file(void *story_file, int32 extent) -{ - /* check our signature */ - if (tads_match_sig(story_file, extent, T3_SIGNATURE)) - return VALID_STORY_FILE_RV; - - /* not one of ours */ - return INVALID_STORY_FILE_RV; -} - -/* - * Get the size of the iFiction metadata for the game - */ -static int32 get_story_file_metadata_extent(void *story_file, int32 extent) -{ - /* use the common tads iFiction synthesizer */ - return tads_get_story_file_metadata_extent(story_file, extent); -} - -/* - * Get the iFiction metadata for the game - */ -static int32 get_story_file_metadata(void *story_file, int32 extent, - char *buf, int32 bufsize) -{ - /* use the common tads iFiction synthesizer */ - return tads_get_story_file_metadata(story_file, extent, buf, bufsize); -} - -static int32 get_story_file_cover_extent(void *story_file, int32 story_len) -{ - /* use the common tads cover file extractor */ - return tads_get_story_file_cover_extent(story_file, story_len); -} - -/* - * Get the format of the cover art - */ -static int32 get_story_file_cover_format(void *story_file, int32 story_len) -{ - /* use the common tads cover file extractor */ - return tads_get_story_file_cover_format(story_file, story_len); -} - -/* - * Get the cover art data - */ -static int32 get_story_file_cover(void *story_file, int32 story_len, - void *outbuf, int32 output_extent) -{ - /* use the common tads cover file extractor */ - return tads_get_story_file_cover(story_file, story_len, - outbuf, output_extent); -} -