1 #pragma once 2 3 //******************************************************************************************** 4 //* 5 //* This file is part of Egoboo. 6 //* 7 //* Egoboo is free software: you can redistribute it and/or modify it 8 //* under the terms of the GNU General Public License as published by 9 //* the Free Software Foundation, either version 3 of the License, or 10 //* (at your option) any later version. 11 //* 12 //* Egoboo is distributed in the hope that it will be useful, but 13 //* WITHOUT ANY WARRANTY; without even the implied warranty of 14 //* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 //* General Public License for more details. 16 //* 17 //* You should have received a copy of the GNU General Public License 18 //* along with Egoboo. If not, see <http://www.gnu.org/licenses/>. 19 //* 20 //******************************************************************************************** 21 22 /// @file quest.h 23 /// @brief read/write/modify the quest.txt file 24 25 #include "egoboo_typedef.h" 26 #include "file_formats/configfile.h" 27 28 //-------------------------------------------------------------------------------------------- 29 //-------------------------------------------------------------------------------------------- 30 /// @note BB@> use this forward declaration of the "struct s_IDSZ_node" instead of including 31 /// "IDSZ_map.h" to remove possible circular dependencies 32 33 struct s_IDSZ_node; 34 35 //-------------------------------------------------------------------------------------------- 36 //-------------------------------------------------------------------------------------------- 37 /// Quest system values 38 enum e_quest_values 39 { 40 QUEST_BEATEN = -2, 41 QUEST_NONE = -1, 42 43 QUEST_MINVAL = QUEST_BEATEN, 44 QUEST_MAXVAL = 0x7FFFFFFF // maximum positive signed integer 45 }; 46 47 // Public functions 48 egoboo_rv quest_log_download_vfs( struct s_IDSZ_node quest_log[], size_t quest_log_len, const char* player_directory ); 49 egoboo_rv quest_log_upload_vfs( struct s_IDSZ_node quest_log[], size_t quest_log_len, const char *player_directory ); 50 int quest_set_level( struct s_IDSZ_node quest_log[], size_t quest_log_len, IDSZ idsz, int level ); 51 int quest_adjust_level( struct s_IDSZ_node quest_log[], size_t quest_log_len, IDSZ idsz, int adjustment ); 52 int quest_get_level( struct s_IDSZ_node quest_log[], size_t quest_log_len, IDSZ idsz ); 53 egoboo_rv quest_add( struct s_IDSZ_node quest_log[], size_t quest_log_len, IDSZ idsz, int level ); 54 55 ConfigFilePtr_t quest_file_open( const char *player_directory ); 56 egoboo_rv quest_file_export( ConfigFilePtr_t pfile ); 57 egoboo_rv quest_file_close( ConfigFilePtr_t * ppfile, bool_t export ); 58