Esempio n. 1
0
sint32 OzoneDatabase::ParseOzoneDatabase(char *filename, C3DIR dir)
	{
	Token	*uvToken = new Token(filename, TOKEN_UV_POLLUTION_MAX_VAL - TOKEN_MAX, g_UVDB_token_data, dir) ;

	ParseAnOzone(uvToken) ;
	uvToken->Next() ;

	delete uvToken ;

	if (g_parse_uv_abort)
		return (FALSE) ;

	return (TRUE) ;
	}
Esempio n. 2
0
sint32 FilenameDB::Parse(char *filename)

{

    Token *token = new Token(filename, C3DIR_GAMEDATA);
	Assert(token);

   	if (token->GetType() != TOKEN_NUMBER) {
		c3errors_ErrorDialog  (token->ErrStr(), "Missing number of filenames");
        g_abort_parse = TRUE;
		delete token;
		return FALSE;
	} else {
        sint32 n;
		token->GetNumber(n);
		token->Next();
		if (n <0) {
			c3errors_ErrorDialog(token->ErrStr(), "Number of filename is negative");
            g_abort_parse = TRUE;
			delete token;
			return FALSE;
		}
		SetSize(n);
	}

    int count = 0;
    while (ParseAFilename(token, count)) {
        count++;
    }
    if (g_abort_parse) {
		delete token;
		return FALSE;
	}

	delete token;

    return TRUE;
}