summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDracoRPG <DracoRPG@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-27 05:04:10 +0000
committerDracoRPG <DracoRPG@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-27 05:04:10 +0000
commitd57579a58d5035d48fc1f7a42c833cb47ae571b9 (patch)
tree69c54095f9cfc977367b6cc3e76b7ec26bed1412 /src
parent8c819cb2129210737155474c980be5ed157d4979 (diff)
downloadhercules-d57579a58d5035d48fc1f7a42c833cb47ae571b9.tar.gz
hercules-d57579a58d5035d48fc1f7a42c833cb47ae571b9.tar.bz2
hercules-d57579a58d5035d48fc1f7a42c833cb47ae571b9.tar.xz
hercules-d57579a58d5035d48fc1f7a42c833cb47ae571b9.zip
Removed useless read-from-GRF features
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9725 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c12
-rw-r--r--src/map/battle.h6
-rw-r--r--src/map/itemdb.c159
-rw-r--r--src/map/itemdb.h1
-rw-r--r--src/map/map.c17
-rw-r--r--src/map/npc.c3
-rw-r--r--src/map/script.c18
-rw-r--r--src/map/skill.c57
8 files changed, 0 insertions, 273 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index f0e0dfb2c..fd38721aa 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3587,12 +3587,6 @@ static const struct battle_data_short {
{ "wedding_ignorepalette", &battle_config.wedding_ignorepalette }, //[Skotlex]
{ "xmas_ignorepalette", &battle_config.xmas_ignorepalette }, // [Valaris]
{ "natural_heal_weight_rate", &battle_config.natural_heal_weight_rate },
- { "item_name_override_grffile", &battle_config.item_name_override_grffile},
- { "item_equip_override_grffile", &battle_config.item_equip_override_grffile}, // [Celest]
- { "item_slots_override_grffile", &battle_config.item_slots_override_grffile}, // [Celest]
- { "indoors_override_grffile", &battle_config.indoors_override_grffile}, // [Celest]
- { "skill_sp_override_grffile", &battle_config.skill_sp_override_grffile}, // [Celest]
- { "cardillust_read_grffile", &battle_config.cardillust_read_grffile}, // [Celest]
{ "arrow_decrement", &battle_config.arrow_decrement },
{ "max_aspd", &battle_config.max_aspd },
{ "max_walk_speed", &battle_config.max_walk_speed },
@@ -4004,12 +3998,6 @@ void battle_set_defaults() {
battle_config.natural_healsp_interval=8000;
battle_config.natural_heal_skill_interval=10000;
battle_config.natural_heal_weight_rate=50;
- battle_config.item_name_override_grffile=1;
- battle_config.item_equip_override_grffile=0; // [Celest]
- battle_config.item_slots_override_grffile=0; // [Celest]
- battle_config.indoors_override_grffile=0; // [Celest]
- battle_config.skill_sp_override_grffile=0; // [Celest]
- battle_config.cardillust_read_grffile=0; // [Celest]
battle_config.arrow_decrement=1;
battle_config.max_aspd = 199;
battle_config.max_walk_speed = 300;
diff --git a/src/map/battle.h b/src/map/battle.h
index adec20e43..4fc6e545b 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -203,12 +203,6 @@ extern struct Battle_Config {
int natural_healsp_interval;
int natural_heal_skill_interval;
unsigned short natural_heal_weight_rate;
- unsigned short item_name_override_grffile;
- unsigned short indoors_override_grffile; // [Celest]
- unsigned short skill_sp_override_grffile; // [Celest]
- unsigned short cardillust_read_grffile;
- unsigned short item_equip_override_grffile;
- unsigned short item_slots_override_grffile;
unsigned short arrow_decrement;
unsigned short max_aspd;
unsigned short max_walk_speed; //Maximum walking speed after buffs [Skotlex]
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 7d27f4fd0..c2c98f42b 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -8,7 +8,6 @@
#include "../common/nullpo.h"
#include "../common/malloc.h"
#include "../common/showmsg.h"
-#include "../common/grfio.h"
#include "../common/strlib.h"
#include "map.h"
#include "battle.h"
@@ -16,10 +15,6 @@
#include "script.h"
#include "pc.h"
-// ** ITEMDB_OVERRIDE_NAME_VERBOSE **
-// 定義すると、itemdb.txtとgrfで名前が異なる場合、表示します.
-//#define ITEMDB_OVERRIDE_NAME_VERBOSE 1
-
static struct dbt* item_db;
static struct item_group itemgroup_db[MAX_ITEMGROUP];
@@ -571,152 +566,6 @@ static void itemdb_read_itemgroup(void)
}
return;
}
-/*==========================================
- * アイテムの名前テーブルを読み込む
- *------------------------------------------
- */
-static int itemdb_read_itemnametable(void)
-{
- char *buf,*p;
- int s;
-
- buf=(char *) grfio_reads("data\\idnum2itemdisplaynametable.txt",&s);
-
- if(buf==NULL)
- return -1;
-
- buf[s]=0;
- for(p=buf;p-buf<s;){
- int nameid;
- char buf2[64]; //Why 64? What's this for, other than holding an item's name? [Skotlex]
-
- if( sscanf(p,"%d#%[^#]#",&nameid,buf2)==2 ){
-
-#ifdef ITEMDB_OVERRIDE_NAME_VERBOSE
- if( itemdb_exists(nameid) &&
- strncmp(itemdb_search(nameid)->jname,buf2,ITEM_NAME_LENGTH)!=0 ){
- ShowNotice("[override] %d %s => %s\n",nameid
- ,itemdb_search(nameid)->jname,buf2);
- }
-#endif
-
- strncpy(itemdb_search(nameid)->jname,buf2,ITEM_NAME_LENGTH-1);
- }
-
- p=strchr(p,10);
- if(!p) break;
- p++;
- }
- aFree(buf);
- ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\idnum2itemdisplaynametable.txt");
-
- return 0;
-}
-
-/*==========================================
- * カードイラストのリソース名前テーブルを読み込む
- *------------------------------------------
- */
-static int itemdb_read_cardillustnametable(void)
-{
- char *buf,*p;
- int s;
-
- buf=(char *) grfio_reads("data\\num2cardillustnametable.txt",&s);
-
- if(buf==NULL)
- return -1;
-
- buf[s]=0;
- for(p=buf;p-buf<s;){
- int nameid;
- char buf2[64];
-
- if( sscanf(p,"%d#%[^#]#",&nameid,buf2)==2 ){
- strcat(buf2,".bmp");
- memcpy(itemdb_search(nameid)->cardillustname,buf2,64);
- }
-
- p=strchr(p,10);
- if(!p) break;
- p++;
- }
- aFree(buf);
- ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\num2cardillustnametable.txt");
-
- return 0;
-}
-
-//
-// 初期化
-//
-/*==========================================
- *
- *------------------------------------------
- */
-static int itemdb_read_itemslottable(void)
-{
- char *buf, *p;
- int s;
-
- buf = (char *)grfio_reads("data\\itemslottable.txt", &s);
- if (buf == NULL)
- return -1;
- buf[s] = 0;
- for (p = buf; p - buf < s; ) {
- int nameid, equip;
- struct item_data* item;
- sscanf(p, "%d#%d#", &nameid, &equip);
- item = itemdb_search(nameid);
- if (equip && item && itemdb_isequip2(item))
- item->equip = equip;
- p = strchr(p, 10);
- if(!p) break;
- p++;
- p=strchr(p, 10);
- if(!p) break;
- p++;
- }
- aFree(buf);
- ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\itemslottable.txt");
-
- return 0;
-}
-
-/*==========================================
- *
- *------------------------------------------
- */
-static int itemdb_read_itemslotcounttable(void)
-{
- char *buf, *p;
- int s;
-
- buf = (char *)grfio_reads("data\\itemslotcounttable.txt", &s);
- if (buf == NULL)
- return -1;
- buf[s] = 0;
- for (p = buf; p - buf < s;){
- int nameid, slot;
- sscanf(p, "%d#%d#", &nameid, &slot);
- if (slot > MAX_SLOTS)
- {
- ShowWarning("itemdb_read_itemslotcounttable: Item %d specifies %d slots, but the server only supports up to %d\n", nameid, slot, MAX_SLOTS);
- slot = MAX_SLOTS;
- }
- itemdb_slot(nameid) = slot;
- p = strchr(p,10);
- if(!p) break;
- p++;
- p = strchr(p,10);
- if(!p) break;
- p++;
- }
- aFree(buf);
- ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n", "data\\itemslotcounttable.txt");
-
- return 0;
-}
/*==========================================
* 装備制限ファイル読み出し
@@ -1202,14 +1051,6 @@ static void itemdb_read(void)
itemdb_read_itemavail();
itemdb_read_noequip();
itemdb_read_itemtrade();
- if (battle_config.cardillust_read_grffile)
- itemdb_read_cardillustnametable();
- if (battle_config.item_equip_override_grffile)
- itemdb_read_itemslottable();
- if (battle_config.item_slots_override_grffile)
- itemdb_read_itemslotcounttable();
- if (battle_config.item_name_override_grffile)
- itemdb_read_itemnametable();
}
/*==========================================
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index f1e97227c..85a0cdb21 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -37,7 +37,6 @@ struct item_data {
int nameid;
char name[ITEM_NAME_LENGTH],jname[ITEM_NAME_LENGTH];
char prefix[NAME_LENGTH],suffix[NAME_LENGTH];
- char cardillustname[64];
//Do not add stuff between value_buy and wlv (see how getiteminfo works)
int value_buy;
int value_sell;
diff --git a/src/map/map.c b/src/map/map.c
index 6d1bb490d..b8e733499 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -3696,12 +3696,6 @@ void do_final(void) {
//we probably don't need the cache open at all times 'yet', so this is closed by mapsource_final [celest]
//map_cache_close();
- // We probably don't need the grfio after server bootup 'yet' too. So this is closed near the end of do_init [Lance]
- if((battle_config.cardillust_read_grffile || battle_config.item_equip_override_grffile ||
- battle_config.item_slots_override_grffile || battle_config.item_name_override_grffile ||
- battle_config.skill_sp_override_grffile))
- grfio_final();
-
for (i = 0; i < map_num; i++)
if (map[i].m >= 0)
map_foreachinmap(cleanup_sub, i, BL_ALL);
@@ -3991,17 +3985,6 @@ int do_init(int argc, char *argv[]) {
if (battle_config.pk_mode == 1)
ShowNotice("Server is running on '"CL_WHITE"PK Mode"CL_RESET"'.\n");
- if(!(battle_config.cardillust_read_grffile || battle_config.item_equip_override_grffile ||
- battle_config.item_slots_override_grffile || battle_config.item_name_override_grffile ||
- battle_config.skill_sp_override_grffile))
- grfio_final(); // Unused after reading all maps.
-
- //However, some reload functions still use it,disable them.
- //battle_config.cardillust_read_grffile =
- //battle_config.item_equip_override_grffile =
- //battle_config.item_slots_override_grffile =
- //battle_config.item_name_override_grffile = 0;
-
ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map_port);
return 0;
diff --git a/src/map/npc.c b/src/map/npc.c
index 90d61e226..8c7ac76da 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -3016,9 +3016,6 @@ int do_init_npc(void)
for (busy = 1; busy < MAX_NPC_CLASS; busy++)
npc_viewdb[busy].class_ = busy;
busy = 0;
- // indoorrswtable.txt and etcinfo.txt [Celest]
- if (battle_config.indoors_override_grffile)
- npc_read_indoors();
// comparing only the first 24 chars of labels that are 50 chars long isn't that nice
// will cause "duplicated" labels where actually no dup is...
diff --git a/src/map/script.c b/src/map/script.c
index 7abbe83df..2182e5c74 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -3565,7 +3565,6 @@ int buildin_getequippercentrefinery(struct script_state *st);
int buildin_successrefitem(struct script_state *st);
int buildin_failedrefitem(struct script_state *st);
int buildin_cutin(struct script_state *st);
-int buildin_cutincard(struct script_state *st);
int buildin_statusup(struct script_state *st);
int buildin_statusup2(struct script_state *st);
int buildin_bonus(struct script_state *st);
@@ -3866,7 +3865,6 @@ struct script_function buildin_func[] = {
{buildin_enableitemuse,"enable_items",""},
{buildin_disableitemuse,"disable_items",""},
{buildin_cutin,"cutin","si"},
- {buildin_cutincard,"cutincard","i"},
{buildin_viewpoint,"viewpoint","iiiii"},
{buildin_heal,"heal","ii"},
{buildin_itemheal,"itemheal","ii"},
@@ -5181,22 +5179,6 @@ int buildin_cutin(struct script_state *st)
return 0;
}
-/*==========================================
- * カードのイラストを表示する
- *------------------------------------------
- */
-int buildin_cutincard(struct script_state *st)
-{
- int itemid;
- struct item_data *i_data;
-
- itemid=conv_num(st,& (st->stack->stack_data[st->start+2]));
-
- i_data = itemdb_exists(itemid);
- if (i_data)
- clif_cutin(script_rid2sd(st),i_data->cardillustname,4);
- return 0;
-}
/*==========================================
*
diff --git a/src/map/skill.c b/src/map/skill.c
index 7365b6d9b..e780d8208 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -11,7 +11,6 @@
#include "../common/nullpo.h"
#include "../common/malloc.h"
#include "../common/showmsg.h"
-#include "../common/grfio.h"
#include "../common/ers.h"
#include "skill.h"
@@ -11571,62 +11570,9 @@ int skill_readdb (void)
return 0;
}
-/*===============================================
- * For reading leveluseskillspamount.txt [Celest]
- *-----------------------------------------------
- */
-static int skill_read_skillspamount (void)
-{
- char *buf,*p;
- struct skill_db *skill = NULL;
- int s, idx, new_flag=1, level=1, sp=0;
-
- buf=(char *) grfio_reads("data\\leveluseskillspamount.txt",&s);
-
- if(buf==NULL)
- return -1;
-
- buf[s]=0;
- for(p=buf;p-buf<s;){
- char buf2[64];
-
- if (sscanf(p,"%[@]",buf2) == 1) {
- level = 1;
- new_flag = 1;
- } else if (new_flag && sscanf(p,"%[^#]#",buf2) == 1) {
- for (idx=0; skill_names[idx].id != 0; idx++) {
- if (strstr(buf2, skill_names[idx].name) != NULL) {
- //Apply Guild/Homunc adjustment.
- sp = skill_names[idx].id;
- if (sp >= GD_SKILLBASE) sp = GD_SKILLRANGEMIN + sp - GD_SKILLBASE;
- if (sp >= HM_SKILLBASE) sp = HM_SKILLRANGEMIN + sp - HM_SKILLBASE;
- if (sp < 1 || sp >= MAX_SKILL_DB)
- continue;
- skill = &skill_db[sp];
- new_flag = 0;
- break;
- }
- }
- } else if (!new_flag && sscanf(p,"%d#",&sp) == 1) {
- skill->sp[level-1]=sp;
- level++;
- }
-
- p=strchr(p,10);
- if(!p) break;
- p++;
- }
- aFree(buf);
- ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","data\\leveluseskillspamount.txt");
-
- return 0;
-}
-
void skill_reload (void)
{
skill_readdb();
- if (battle_config.skill_sp_override_grffile)
- skill_read_skillspamount();
}
/*==========================================
@@ -11641,9 +11587,6 @@ int do_init_skill (void)
skill_unit_ers = ers_new(sizeof(struct skill_unit_group));
skill_timer_ers = ers_new(sizeof(struct skill_timerskill));
- if (battle_config.skill_sp_override_grffile)
- skill_read_skillspamount();
-
add_timer_func_list(skill_unit_timer,"skill_unit_timer");
add_timer_func_list(skill_castend_id,"skill_castend_id");
add_timer_func_list(skill_castend_pos,"skill_castend_pos");