*Added a custom makefile for DevCpp which solves the ressources multiple-definitions problem (Game and Editor, the Character Editor wasn't affected).

Following requests/reports :
Blades of Exile :
*Corrected the Skill and Giant Strength abilities handling so that they actually increase the chances of hitting instead of decreasing it (damages were correctly handled).
*Now trying to enter a blocked space multiple times won't produce a lot of message but add a (xX) suffix to the "blocked:" message (X number of tries to enter the space)

Minor Editor changes :
*When opening a new town or assigning a new town to a town entry on outdoor map, the input field is already selected (extended the basic function for flexibility).

Code-wise :
*Readded legacy monster skill constants in CONSTS.h, to make the original code easier to understand for newcomers.

Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@145 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
Chokboyz
2010-03-22 02:27:00 +00:00
parent f42f974453
commit 8fa380832c
15 changed files with 351 additions and 72 deletions

View File

@@ -7,7 +7,7 @@ Ver=1
IsCpp=1
Folders=Classes,Tools
CommandLine=
CompilerSettings=0000000000001000000000
CompilerSettings=0000000000010000000000
PchHead=-1
PchSource=-1
ProfilesCount=1
@@ -19,7 +19,7 @@ PrivateResource=Blades_of_Exile_private.rc
ResourceIncludes=
MakeIncludes=
Compiler=
CppCompiler=-Wall_@@_
CppCompiler=-Wall_@@__@@_
Linker=-lwinmm_@@_
Icon=
ExeOutput=
@@ -27,8 +27,8 @@ ObjectOutput=
OverrideOutput=0
OverrideOutputName=Blades of Exile.exe
HostApplication=
UseCustomMakefile=0
CustomMakefile=
UseCustomMakefile=1
CustomMakefile=Makefile-DevCpp.win
IncludeVersionInfo=0
SupportXPThemes=0
CompilerSet=0

View File

@@ -474,4 +474,9 @@ typedef struct {
location where;
}pending_special_type;
//text buffer struct (i.e bottom right window's content)
typedef struct {
char line[50];
} buf_line;
#endif

View File

@@ -0,0 +1,111 @@
# Project: Blades of Exile Win32
# Makefile created by Dev-C++ 4.9.9.2
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES = Blades_of_Exile_private.res
OBJ = boe.actions.o boe.main.o boe.combat.o boe.dlgutil.o boe.fields.o boe.fileio.o GLOBAL.o boe.graphics.o boe.graphutil.o boe.infodlg.o boe.itemdata.o boe.items.o boe.locutils.o boe.monster.o boe.newgraph.o boe.party.o boe.specials.o boe.text.o boe.town.o GLOBVAR.o tools/soundtool.o tools/soundvars.o tools/DLOGTOOL.o tools/mathutil.o classes/item.o classes/LOCATION.o classes/PC.o $(RES)
LINKOBJ = boe.actions.o boe.main.o boe.combat.o boe.dlgutil.o boe.fields.o boe.fileio.o GLOBAL.o boe.graphics.o boe.graphutil.o boe.infodlg.o boe.itemdata.o boe.items.o boe.locutils.o boe.monster.o boe.newgraph.o boe.party.o boe.specials.o boe.text.o boe.town.o GLOBVAR.o tools/soundtool.o tools/soundvars.o tools/DLOGTOOL.o tools/mathutil.o classes/item.o classes/LOCATION.o classes/PC.o $(RES)
LIBS = -L"C:/Dev-Cpp/lib/GTK+" -mwindows -lwinmm
INCS = -I"include"
CXXINCS =
BIN = "Blades of Exile.exe"
CXXFLAGS = $(CXXINCS) -Wall -O2
CFLAGS = $(INCS) -O2
RM = rm -f
.PHONY: all all-before all-after clean clean-custom
all: all-before "Blades of Exile.exe" all-after
clean: clean-custom
${RM} $(OBJ) $(BIN)
$(BIN): $(OBJ)
$(CPP) $(LINKOBJ) -o "Blades of Exile.exe" $(LIBS)
boe.actions.o: boe.actions.cpp
$(CPP) -c boe.actions.cpp -o boe.actions.o $(CXXFLAGS)
boe.main.o: boe.main.cpp
$(CPP) -c boe.main.cpp -o boe.main.o $(CXXFLAGS)
boe.combat.o: boe.combat.cpp
$(CPP) -c boe.combat.cpp -o boe.combat.o $(CXXFLAGS)
boe.dlgutil.o: boe.dlgutil.cpp
$(CPP) -c boe.dlgutil.cpp -o boe.dlgutil.o $(CXXFLAGS)
boe.fields.o: boe.fields.cpp
$(CPP) -c boe.fields.cpp -o boe.fields.o $(CXXFLAGS)
boe.fileio.o: boe.fileio.cpp
$(CPP) -c boe.fileio.cpp -o boe.fileio.o $(CXXFLAGS)
GLOBAL.o: GLOBAL.CPP
$(CPP) -c GLOBAL.CPP -o GLOBAL.o $(CXXFLAGS)
boe.graphics.o: boe.graphics.cpp
$(CPP) -c boe.graphics.cpp -o boe.graphics.o $(CXXFLAGS)
boe.graphutil.o: boe.graphutil.cpp
$(CPP) -c boe.graphutil.cpp -o boe.graphutil.o $(CXXFLAGS)
boe.infodlg.o: boe.infodlg.cpp
$(CPP) -c boe.infodlg.cpp -o boe.infodlg.o $(CXXFLAGS)
boe.itemdata.o: boe.itemdata.cpp
$(CPP) -c boe.itemdata.cpp -o boe.itemdata.o $(CXXFLAGS)
boe.items.o: boe.items.cpp
$(CPP) -c boe.items.cpp -o boe.items.o $(CXXFLAGS)
boe.locutils.o: boe.locutils.cpp
$(CPP) -c boe.locutils.cpp -o boe.locutils.o $(CXXFLAGS)
boe.monster.o: boe.monster.cpp
$(CPP) -c boe.monster.cpp -o boe.monster.o $(CXXFLAGS)
boe.newgraph.o: boe.newgraph.cpp
$(CPP) -c boe.newgraph.cpp -o boe.newgraph.o $(CXXFLAGS)
boe.party.o: boe.party.cpp
$(CPP) -c boe.party.cpp -o boe.party.o $(CXXFLAGS)
boe.specials.o: boe.specials.cpp
$(CPP) -c boe.specials.cpp -o boe.specials.o $(CXXFLAGS)
boe.text.o: boe.text.cpp
$(CPP) -c boe.text.cpp -o boe.text.o $(CXXFLAGS)
boe.town.o: boe.town.cpp
$(CPP) -c boe.town.cpp -o boe.town.o $(CXXFLAGS)
GLOBVAR.o: GLOBVAR.CPP
$(CPP) -c GLOBVAR.CPP -o GLOBVAR.o $(CXXFLAGS)
tools/soundtool.o: tools/soundtool.cpp
$(CPP) -c tools/soundtool.cpp -o tools/soundtool.o $(CXXFLAGS)
tools/soundvars.o: tools/soundvars.cpp
$(CPP) -c tools/soundvars.cpp -o tools/soundvars.o $(CXXFLAGS)
tools/DLOGTOOL.o: tools/DLOGTOOL.CPP
$(CPP) -c tools/DLOGTOOL.CPP -o tools/DLOGTOOL.o $(CXXFLAGS)
tools/mathutil.o: tools/mathutil.cpp
$(CPP) -c tools/mathutil.cpp -o tools/mathutil.o $(CXXFLAGS)
classes/item.o: classes/item.cpp
$(CPP) -c classes/item.cpp -o classes/item.o $(CXXFLAGS)
classes/LOCATION.o: classes/LOCATION.CPP
$(CPP) -c classes/LOCATION.CPP -o classes/LOCATION.o $(CXXFLAGS)
classes/PC.o: classes/PC.CPP
$(CPP) -c classes/PC.CPP -o classes/PC.o $(CXXFLAGS)
Blades_of_Exile_private.res: Blades_of_Exile_private.rc BLADES.RC GAMEDLOG.RC GAMESTR.RC
$(WINDRES) -i Blades_of_Exile_private.rc --input-format=rc -o Blades_of_Exile_private.res -O coff -D_INCLUDED_RC

View File

@@ -31,6 +31,10 @@
extern short store_flags[3];
//extern BOOL timed_special_happened;
unsigned char previous_blocked_direction = 50;//no previous block on initialisation
unsigned short times_blocked=0;
extern buf_line text_buffer[TEXT_BUF_LEN];
void init_screen_locs()
{
short i,j,k,l;
@@ -2521,6 +2525,7 @@ Boolean outd_move_party(location destination,Boolean forced)
Boolean keep_going = TRUE,check_f;
location store_corner,store_iwc;
unsigned char ter;
short buffer_ptr;
keep_going = check_special_terrain(destination,0,0,&spec_num,&check_f);
if (check_f == TRUE) forced = TRUE;
@@ -2712,8 +2717,19 @@ Boolean outd_move_party(location destination,Boolean forced)
return TRUE;
}
else {
sprintf ((char *) create_line, "Blocked: %s",dir_string[set_direction(party.p_loc, destination)]);
add_string_to_buf((char *) create_line);
if(set_direction(party.p_loc, destination) == previous_blocked_direction){
times_blocked++;
buffer_ptr = ((buf_pointer - 1) == -1) ? (TEXT_BUF_LEN - 1) : buf_pointer - 1;
sprintf(text_buffer[buffer_ptr].line, "Blocked: %s (x%d)",dir_string[set_direction(party.p_loc, destination)], times_blocked);
string_added = true;
print_buf();
}
else{
sprintf (create_line, "Blocked: %s",dir_string[set_direction(party.p_loc, destination)]);
add_string_to_buf(create_line);
previous_blocked_direction = set_direction(party.p_loc, destination);
times_blocked = 1;
}
return FALSE;
}
}
@@ -2728,6 +2744,7 @@ Boolean town_move_party(location destination,short forced)
short boat_there,horse_there,spec_num;
unsigned char ter;
Boolean check_f = FALSE;
short buffer_ptr;
if (in_scen_debug && ghost_mode) forced = TRUE;
@@ -2854,10 +2871,26 @@ Boolean town_move_party(location destination,short forced)
return TRUE;
}
else {
if (destination.isDoor())
sprintf ((char *) create_line, "Door locked: %s ",dir_string[set_direction(c_town.p_loc, destination)]);
else sprintf ((char *) create_line, "Blocked: %s ",dir_string[set_direction(c_town.p_loc, destination)]);
add_string_to_buf((char *) create_line);
if (destination.isDoor()){
sprintf (create_line, "Door locked: %s ",dir_string[set_direction(c_town.p_loc, destination)]);
add_string_to_buf(create_line);
}
else{
if(set_direction(c_town.p_loc, destination) == previous_blocked_direction){
times_blocked++;
buffer_ptr = ((buf_pointer - 1) == -1) ? (TEXT_BUF_LEN - 1) : buf_pointer - 1;
sprintf (text_buffer[buffer_ptr].line, "Blocked: %s (x%d)",dir_string[set_direction(c_town.p_loc, destination)], times_blocked);
string_added = true;
print_buf();
}
else{
sprintf (create_line, "Blocked: %s ",dir_string[set_direction(c_town.p_loc, destination)]);
add_string_to_buf(create_line);
previous_blocked_direction = set_direction(c_town.p_loc, destination);
times_blocked = 1;
}
}
return FALSE;
}
}

View File

@@ -16,6 +16,7 @@
#include "boe.town.h"
#include "boe.specials.h"
#include "boe.graphutil.h"
#include "classes/consts.h"
#include "globvar.h"
@@ -249,8 +250,8 @@ Boolean pc_combat_move(location destination)
return TRUE;
}
else {
sprintf ((char *) create_line, "Blocked: %s ",d_string[dir]);
add_string_to_buf((char *) create_line);
sprintf (create_line, "Blocked: %s ",d_string[dir]);
add_string_to_buf(create_line);
return FALSE;
}
}
@@ -279,38 +280,38 @@ void pc_attack(short who_att,short target)
// slice out bad attacks
if (adven[who_att].isAlive() == false)
return;
if ((adven[who_att].status[11] > 0) || (adven[who_att].status[12] > 0))
if ((adven[who_att].status[STATUS_ASLEEP] > 0) || (adven[who_att].status[STATUS_PARALYZED] > 0))
return;
last_attacked[who_att] = target;
which_m = &c_town.monst.dudes[target];
for (i = 0; i < 24; i++)
if (((adven[who_att].items[i].variety == 1) || (adven[who_att].items[i].variety == 2)) &&
if (((adven[who_att].items[i].variety == ITEM_TYPE_ONE_HANDED) || (adven[who_att].items[i].variety == ITEM_TYPE_TWO_HANDED)) &&
(adven[who_att].equip[i] == TRUE))
if (weap1 == 24)
weap1 = i;
else weap2 = i;
hit_adj = (-5 * minmax(-8,8,(int)adven[who_att].status[1])) + 5 * minmax(-8,8,(int)which_m->m_d.status[1])
- adven[who_att].statAdj(1) * 5 + (get_encumberance(who_att)) * 5;
hit_adj = (-5 * minmax(-8,8,(int)adven[who_att].status[STATUS_BLESS_CURSE])) + 5 * minmax(-8,8,(int)which_m->m_d.status[STATUS_BLESS_CURSE])
- adven[who_att].statAdj(SKILL_DEXTERITY) * 5 + (get_encumberance(who_att)) * 5;
dam_adj = minmax(-8,8,(int)adven[who_att].status[1]) - minmax(-8,8,(int)which_m->m_d.status[1])
+ adven[who_att].statAdj(0);
dam_adj = minmax(-8,8,(int)adven[who_att].status[STATUS_BLESS_CURSE]) - minmax(-8,8,(int)which_m->m_d.status[STATUS_BLESS_CURSE])
+ adven[who_att].statAdj(SKILL_STRENGTH);
if ((which_m->m_d.status[11] > 0) || (which_m->m_d.status[12] > 0)) {
if ((which_m->m_d.status[STATUS_ASLEEP] > 0) || (which_m->m_d.status[STATUS_PARALYZED] > 0)) {
hit_adj -= 80;
dam_adj += 10;
}
if ((skill_item = text_pc_has_abil_equip(who_att,37)) < 24) {
hit_adj += 5 * (adven[who_att].items[skill_item].ability_strength / 2 + 1);
if ((skill_item = text_pc_has_abil_equip(who_att,ITEM_SKILL)) < 24) {
hit_adj -= 5 * (adven[who_att].items[skill_item].ability_strength / 2 + 1);
dam_adj += adven[who_att].items[skill_item].ability_strength / 2;
}
if ((skill_item = text_pc_has_abil_equip(who_att,43)) < 24) {
if ((skill_item = text_pc_has_abil_equip(who_att,ITEM_GIANT_STRENGTH)) < 24) {
hit_adj -= adven[who_att].items[skill_item].ability_strength * 2;
dam_adj += adven[who_att].items[skill_item].ability_strength;
hit_adj += adven[who_att].items[skill_item].ability_strength * 2;
}
void_sanctuary(who_att);
@@ -321,11 +322,11 @@ void pc_attack(short who_att,short target)
if (weap1 == 24) {
sprintf ((char *) create_line, "%s punches. ",(char *) adven[who_att].name);//,hit_adj, dam_adj);
sprintf (create_line, "%s punches. ", adven[who_att].name);//,hit_adj, dam_adj);
add_string_to_buf((char *) create_line);
r1 = get_ran(1,0,100) + hit_adj - 20;
r1 += 5 * (adven[current_pc].status[6] / 3);
r1 += 5 * (adven[current_pc].status[STATUS_WEBS] / 3);
r2 = get_ran(1,1,4) + dam_adj;
if (r1 <= hit_chance[adven[who_att].skills[what_skill1]]) {
@@ -333,8 +334,8 @@ void pc_attack(short who_att,short target)
}
else {
draw_terrain(2);
sprintf ((char *) create_line, "%s misses. ",(char *) adven[who_att].name);
add_string_to_buf((char *) create_line);
sprintf (create_line, "%s misses. ",adven[who_att].name);
add_string_to_buf(create_line);
play_sound(2);
}
}
@@ -347,8 +348,8 @@ void pc_attack(short who_att,short target)
if (what_skill1 == 2)
what_skill1 = 3;
sprintf ((char *) create_line, "%s swings. ",(char *) adven[who_att].name);//,hit_adj, dam_adj);
add_string_to_buf((char *) create_line);
sprintf (create_line, "%s swings. ",adven[who_att].name);//,hit_adj, dam_adj);
add_string_to_buf(create_line);
r1 = get_ran(1,0,100) - 5 + hit_adj
- 5 * adven[who_att].items[weap1].bonus;
@@ -358,11 +359,11 @@ void pc_attack(short who_att,short target)
r1 += 25;
// race adj.
if ((adven[who_att].race == RACE_SLITH) && (adven[who_att].items[weap1].type == 3))
if ((adven[who_att].race == RACE_SLITH) && (adven[who_att].items[weap1].type == ITEM_POLE))
r1 -= 10;
r2 = get_ran(1,1,adven[who_att].items[weap1].item_level) + dam_adj + 2 + adven[who_att].items[weap1].bonus;
if (adven[who_att].items[weap1].ability == 12)
if (adven[who_att].items[weap1].ability == ITEM_WEAK_WEAPON)
r2 = (r2 * (10 - adven[who_att].items[weap1].ability_strength)) / 10;
if (r1 <= hit_chance[adven[who_att].skills[what_skill1]]) {
@@ -372,9 +373,9 @@ void pc_attack(short who_att,short target)
// assassinate
r1 = get_ran(1,0,100);
if ((adven[who_att].level >= which_m->m_d.level - 1)
&& (adven[who_att].skills[16] >= which_m->m_d.level / 2)
&& (adven[who_att].skills[SKILL_ASSASSINATION] >= which_m->m_d.level / 2)
&& (which_m->m_d.spec_skill != 12)) // Can't assassinate splitters
if (r1 < hit_chance[max(adven[who_att].skills[16] - which_m->m_d.level,0)]) {
if (r1 < hit_chance[max(adven[who_att].skills[SKILL_ASSASSINATION] - which_m->m_d.level,0)]) {
add_string_to_buf(" You assassinate. ");
spec_dam += r2;
}
@@ -393,30 +394,30 @@ void pc_attack(short who_att,short target)
break;
}
// poison
if ((adven[who_att].status[0] > 0) && (adven[who_att].weap_poisoned == weap1)) {
poison_amt = adven[who_att].status[0];
if (adven[who_att].hasAbilEquip(51) < 24)
if ((adven[who_att].status[STATUS_POISONED_WEAPON] > 0) && (adven[who_att].weap_poisoned == weap1)) {
poison_amt = adven[who_att].status[STATUS_POISONED_WEAPON];
if (adven[who_att].hasAbilEquip(ITEM_POISON_AUGMENT) < 24)
poison_amt += 2;
which_m->poison(poison_amt);
move_to_zero(adven[who_att].status[0]);
move_to_zero(adven[who_att].status[STATUS_POISONED_WEAPON]);
}
if ((adven[who_att].items[weap1].ability == 14) && (get_ran(1,0,1) == 1)) {
if ((adven[who_att].items[weap1].ability == ITEM_POISONED_WEAPON) && (get_ran(1,0,1) == 1)) {
add_string_to_buf(" Blade drips venom. ");
which_m->poison(adven[who_att].items[weap1].ability_strength / 2);
}
if ((adven[who_att].items[weap1].ability == 9) && (get_ran(1,0,1) == 1)) {
if ((adven[who_att].items[weap1].ability == ITEM_ACIDIC_WEAPON) && (get_ran(1,0,1) == 1)) {
add_string_to_buf(" Blade drips acid. ");
which_m->acid(adven[who_att].items[weap1].ability_strength / 2);
}
if ((adven[who_att].items[weap1].ability == 10) && (get_ran(1,0,1) == 1)) {
if ((adven[who_att].items[weap1].ability == ITEM_SOULSUCKER) && (get_ran(1,0,1) == 1)) {
add_string_to_buf(" Blade drains life. ");
adven[who_att].heal(adven[who_att].items[weap1].ability_strength / 2);
}
}
else {
draw_terrain(2);
sprintf ((char *) create_line, " %s misses. ",(char *) adven[who_att].name);
add_string_to_buf((char *) create_line);
sprintf (create_line, " %s misses. ", adven[who_att].name);
add_string_to_buf(create_line);
if (what_skill1 == 5)
play_sound(19);
else play_sound(2);
@@ -430,17 +431,17 @@ void pc_attack(short who_att,short target)
what_skill2 = 3;
sprintf ((char *) create_line, "%s swings. ",(char *) adven[who_att].name);//,hit_adj, dam_adj);
add_string_to_buf((char *) create_line);
sprintf (create_line, "%s swings. ", adven[who_att].name);//,hit_adj, dam_adj);
add_string_to_buf(create_line);
r1 = get_ran(1,0,100) + hit_adj - 5 * adven[who_att].items[weap2].bonus;
// Ambidextrous?
if (adven[who_att].traits[TRAIT_AMBIDEXTROUS] == FALSE)
r1 += 25;
r1 += 5 * (adven[current_pc].status[6] / 3);
r1 += 5 * (adven[current_pc].status[STATUS_WEBS] / 3);
r2 = get_ran(1,1,adven[who_att].items[weap2].item_level) + dam_adj - 1 + adven[who_att].items[weap2].bonus;
if (adven[who_att].items[weap2].ability == 12)
if (adven[who_att].items[weap2].ability == ITEM_WEAK_WEAPON)
r2 = (r2 * (10 - adven[who_att].items[weap2].ability_strength)) / 10;
if (r1 <= hit_chance[adven[who_att].skills[what_skill2]]) {
@@ -460,15 +461,15 @@ void pc_attack(short who_att,short target)
break;
}
if ((adven[who_att].items[weap2].ability == 14) && (get_ran(1,0,1) == 1)) {
if ((adven[who_att].items[weap2].ability == ITEM_POISONED_WEAPON) && (get_ran(1,0,1) == 1)) {
add_string_to_buf(" Blade drips venom. ");
which_m->poison(adven[who_att].items[weap2].ability_strength / 2);
}
if ((adven[who_att].items[weap2].ability == 9) && (get_ran(1,0,1) == 1)) {
if ((adven[who_att].items[weap2].ability == ITEM_ACIDIC_WEAPON) && (get_ran(1,0,1) == 1)) {
add_string_to_buf(" Blade drips acid. ");
which_m->acid(adven[who_att].items[weap2].ability_strength / 2);
}
if ((adven[who_att].items[weap2].ability == 10) && (get_ran(1,0,1) == 1)) {
if ((adven[who_att].items[weap2].ability == ITEM_SOULSUCKER) && (get_ran(1,0,1) == 1)) {
add_string_to_buf(" Blade drains life. ");
adven[who_att].heal(adven[who_att].items[weap2].ability_strength / 2);
}
@@ -476,8 +477,8 @@ void pc_attack(short who_att,short target)
}
else {
draw_terrain(2);
sprintf ((char *) create_line, "%s misses. ",(char *) adven[who_att].name);
add_string_to_buf((char *) create_line);
sprintf (create_line, "%s misses. ", adven[who_att].name);
add_string_to_buf( create_line);
if (what_skill2 == 5)
play_sound(19);
else play_sound(2);
@@ -486,7 +487,7 @@ void pc_attack(short who_att,short target)
move_to_zero(adven[who_att].status[0]);
take_ap(4);
if (((c_town.monst.dudes[target].m_d.status[10] > 0) || (c_town.monst.dudes[target].m_d.spec_skill == 22))
if (((c_town.monst.dudes[target].m_d.status[STATUS_MARTYRS_SHIELD] > 0) || (c_town.monst.dudes[target].m_d.spec_skill == 22))
&& (store_hp - c_town.monst.dudes[target].m_d.health > 0)) {
add_string_to_buf(" Shares damage! ");
adven[who_att].damage(store_hp - c_town.monst.dudes[target].m_d.health, 3,-1);

View File

@@ -1876,6 +1876,7 @@ void oops_error(short error)
give_error("The program encountered an error while loading/saving/creating the scenario. To prevent future problems, the program will now terminate. Trying again may solve the problem.",(char *) error_str,0);
}
//called recursively if a sub-directory is founded
void ListFiles(char *path, HWND listbox){
short len;

View File

@@ -182,8 +182,8 @@ Boolean check_special_terrain(location where_check,short mode,short which_pc,sho
}
if((mode == 2) && town_boat_there(where_check) < 30){//can't enter boats while in combat mode
sprintf ((char *) create_line, "Blocked: %s",dir_string[set_direction(pc_pos[current_pc], where_check)]);
add_string_to_buf((char *) create_line);
sprintf (create_line, "Blocked: %s",dir_string[set_direction(pc_pos[current_pc], where_check)]);
add_string_to_buf(create_line);
can_enter = FALSE;
}
if (can_enter == FALSE)

View File

@@ -1,5 +1,4 @@
#define LINES_IN_TEXT_WIN 11
#define TEXT_BUF_LEN 70
#include "global.h"
#include <cstdio>
@@ -13,10 +12,6 @@
#include "globvar.h"
typedef struct {
char line[50];
} buf_line;
buf_line text_buffer[TEXT_BUF_LEN];
void InsetRect(RECT *rect,short x, short y);
@@ -1212,7 +1207,7 @@ void add_string_to_buf(char *string)
print_buf();
through_sending();
}
sprintf((char *)text_buffer[buf_pointer].line, "%-49.49s", string);
sprintf(text_buffer[buf_pointer].line, "%-49.49s", string);
text_buffer[buf_pointer].line[49] = 0;
if (buf_pointer == (TEXT_BUF_LEN - 1))
buf_pointer = 0;

View File

@@ -7,6 +7,8 @@
#include "global.h" // structs
#define TEXT_BUF_LEN 70
short text_pc_has_abil_equip(short pc_num,short abil);
void put_pc_screen();
void place_buy_button(short position,short pc_num,short item_num,HDC hdc);

View File

@@ -171,6 +171,7 @@ enum eMonsterType {
};
//future spec_skill !!!
/* Special Ability a.k.a spec_skill */
enum eMonstAbil {
@@ -221,6 +222,66 @@ enum eMonstAbil {
MONST_CALL_GLOBAL_SPECIAL,
};
//at least for proper code comprehension
//legacy spec_skill
/* Special Ability a.k.a spec_skill */
/* #define MONSTER_NO_SPECIAL_ABILITY 0
#define MONSTER_THROWS_DARTS 1
#define MONSTER_SHOOTS_ARROWS 2
#define MONSTER_THROWS_SPEARS 3
#define MONSTER_THROWS_ROCKS1 4 //4-24 damages
#define MONSTER_THROWS_ROCKS2 5 //5-30 damages
#define MONSTER_THROWS_ROCKS3 6 //6-36 damages
#define MONSTER_THROWS_RAZORDISKS 7
#define MONSTER_PETRIFICATION_RAY 8
#define MONSTER_SP_DRAIN_RAY 9 //spell points drain ray
#define MONSTER_HEAT_RAY 10
#define MONSTER_INVISIBLE 11
#define MONSTER_SPLITS 12
#define MONSTER_MINDLESS 13
#define MONSTER_BREATHES_STINKING_CLOUDS 14
#define MONSTER_ICY_TOUCH 15
#define MONSTER_XP_DRAINING_TOUCH 16
#define MONSTER_ICY_AND_DRAINING_TOUCH 17
#define MONSTER_SLOWING_TOUCH 18
#define MONSTER_SHOOTS_WEB 19
#define MONSTER_GOOD_ARCHER 20
#define MONSTER_STEALS_FOOD 21
#define MONSTER_PERMANENT_MARTYRS_SHIELD 22
#define MONSTER_PARALYSIS_RAY 23
#define MONSTER_DUMBFOUNDING_TOUCH 24
#define MONSTER_DISEASE_TOUCH 25
#define MONSTER_ABSORB_SPELLS 26
#define MONSTER_WEB_TOUCH 27
#define MONSTER_SLEEP_TOUCH 28
#define MONSTER_PARALYSIS_TOUCH 29
#define MONSTER_PETRIFICATION_TOUCH 30
#define MONSTER_ACID_TOUCH 31
#define MONSTER_BREATHES_SLEEP_CLOUDS 32
#define MONSTER_ACID_SPIT 33
#define MONSTER_SHOOTS_SPINES 34
#define MONSTER_DEATH_TOUCH 35
#define MONSTER_INVULNERABILITY 36
#define MONSTER_GUARD 37 */
/* Create Monsters/Fields */
/* #define MONSTER_NO_RADIATE 0
#define MONSTER_RADIATE_FIRE_FIELDS 1
#define MONSTER_RADIATE_ICE_FIELDS 2
#define MONSTER_RADIATE_SHOCK_FIELDS 3
#define MONSTER_RADIATE_ANTIMAGIC_FIELDS 4
#define MONSTER_RADIATE_SLEEP_FIELDS 5
#define MONSTER_RADIATE_STINKING_CLOUDS 6
//as said 7,8 and 9 are unused
#define MONSTER_SUMMON1 10 //5 percent chance
#define MONSTER_SUMMON2 11 //20 percent chance
#define MONSTER_SUMMON3 12 //50 percent chance
//as said 13 and 14 are unused
#define MONSTER_DEATH_TRIGGERS 15 //death triggers global special
*/
/* Terrains Special Properties : scenario.ter_types[i].special */ //complete