Added (and put to use) several more SDF_ constants.

git-svn-id: http://openexile.googlecode.com/svn/trunk@24 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
2009-04-19 15:43:04 +00:00
parent 0794231c20
commit 4c78d68b2b
15 changed files with 132 additions and 126 deletions

View File

@@ -11,6 +11,7 @@
#include "dlgtool.h" #include "dlgtool.h"
#include "dlgconsts.h" #include "dlgconsts.h"
#include "graphtool.h" #include "graphtool.h"
#include "boe.consts.h"
Rect pc_area_buttons[6][4] ; // 0 - whole 1 - pic 2 - name 3 - stat strs 4,5 - later Rect pc_area_buttons[6][4] ; // 0 - whole 1 - pic 2 - name 3 - stat strs 4,5 - later
Rect item_string_rects[24][4]; // 0 - name 1 - drop 2 - id 3 - Rect item_string_rects[24][4]; // 0 - name 1 - drop 2 - id 3 -
@@ -554,7 +555,7 @@ void handle_extra_menu(int item_hit)
break; break;
case 4: case 4:
if (party.stuff_done[304][0] > 0) { if (party.stuff_done[SDF_IS_PARTY_SPLIT] > 0) {
FCD(909,0); FCD(909,0);
break; break;
} }
@@ -563,14 +564,14 @@ void handle_extra_menu(int item_hit)
break; break;
case 5: case 5:
if (party.stuff_done[304][0] == 0) { if (party.stuff_done[SDF_IS_PARTY_SPLIT] == 0) {
FCD(911,0); FCD(911,0);
break; break;
} }
FCD(910,0); FCD(910,0);
c_town.p_loc.x = party.stuff_done[304][1]; c_town.p_loc.x = party.stuff_done[SDF_PARTY_SPLIT_X];
c_town.p_loc.y = party.stuff_done[304][2]; c_town.p_loc.y = party.stuff_done[SDF_PARTY_SPLIT_Y];
party.stuff_done[304][0] = 0; party.stuff_done[SDF_IS_PARTY_SPLIT] = 0;
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
if (adven[i].main_status >= 10) if (adven[i].main_status >= 10)
adven[i].main_status -= 10; adven[i].main_status -= 10;
@@ -622,7 +623,7 @@ void handle_extra_menu(int item_hit)
if (FCD(912,0) != 1) if (FCD(912,0) != 1)
break; break;
remove_party_from_scen(); remove_party_from_scen();
party.stuff_done[304][0] = 0; party.stuff_done[SDF_IS_PARTY_SPLIT] = 0;
break; break;
} }
redraw_screen(); redraw_screen();

View File

@@ -1350,7 +1350,7 @@ Boolean handle_action(EventRecord event)
// Wand monsts // Wand monsts
if ((overall_mode == MODE_OUTDOORS) && (party_toast() == FALSE) && (party.age % 10 == 0)) { if ((overall_mode == MODE_OUTDOORS) && (party_toast() == FALSE) && (party.age % 10 == 0)) {
i = get_ran(1,1,70 + PSD[306][8] * 200); i = get_ran(1,1,70 + PSD[SDF_LESS_WANDER_ENC] * 200);
if (i == 10) if (i == 10)
create_wand_monst(); create_wand_monst();
for (i = 0; i < 10; i++) for (i = 0; i < 10; i++)
@@ -1372,7 +1372,7 @@ Boolean handle_action(EventRecord event)
} }
} }
if (overall_mode == MODE_TOWN) { if (overall_mode == MODE_TOWN) {
i = get_ran(1,1,160 - c_town.difficulty + PSD[306][8] * 200); i = get_ran(1,1,160 - c_town.difficulty + PSD[SDF_LESS_WANDER_ENC] * 200);
if (i == 2) if (i == 2)
create_wand_monst(); create_wand_monst();
} }
@@ -1410,7 +1410,7 @@ Boolean handle_action(EventRecord event)
} }
} }
if (party.stuff_done[304][0] > 0) { if (party.stuff_done[SDF_IS_PARTY_SPLIT] > 0) {
end_split(0); end_split(0);
if (is_combat()) { if (is_combat()) {
overall_mode = MODE_TOWN; overall_mode = MODE_TOWN;
@@ -2086,33 +2086,33 @@ void increase_age()////
// clear_map(); // clear_map();
// decrease monster present counter // decrease monster present counter
party.stuff_done[305][9] = move_to_zero(party.stuff_done[305][9]); party.stuff_done[SDF_HOSTILES_PRESENT] = move_to_zero(party.stuff_done[SDF_HOSTILES_PRESENT]);
// Party spell effects // Party spell effects
if (party.stuff_done[305][0] == 1) {reset_text_bar(); if (party.stuff_done[SDF_PARTY_STEALTHY] == 1) {reset_text_bar();
add_string_to_buf("Your footsteps grow louder. "); } add_string_to_buf("Your footsteps grow louder. "); }
party.stuff_done[305][0] = move_to_zero(party.stuff_done[305][0]); party.stuff_done[SDF_PARTY_STEALTHY] = move_to_zero(party.stuff_done[SDF_PARTY_STEALTHY]);
if (party.stuff_done[305][2] == 1) {reset_text_bar(); if (party.stuff_done[SDF_PARTY_DETECT_MONST] == 1) {reset_text_bar();
add_string_to_buf("You stop detecting monsters. ");} add_string_to_buf("You stop detecting monsters. ");}
party.stuff_done[305][2] = move_to_zero(party.stuff_done[305][2]); party.stuff_done[SDF_PARTY_DETECT_MONST] = move_to_zero(party.stuff_done[SDF_PARTY_DETECT_MONST]);
if (party.stuff_done[305][3] == 1) {reset_text_bar(); if (party.stuff_done[SDF_PARTY_FIREWALK] == 1) {reset_text_bar();
add_string_to_buf("Your feet stop glowing. ");} add_string_to_buf("Your feet stop glowing. ");}
party.stuff_done[305][3] = move_to_zero(party.stuff_done[305][3]); party.stuff_done[SDF_PARTY_FIREWALK] = move_to_zero(party.stuff_done[SDF_PARTY_FIREWALK]);
if (party.stuff_done[305][1] == 2) if (party.stuff_done[SDF_PARTY_FLIGHT] == 2)
add_string_to_buf("You are starting to descend."); add_string_to_buf("You are starting to descend.");
if (party.stuff_done[305][1] == 1) { if (party.stuff_done[SDF_PARTY_FLIGHT] == 1) {
if (scenario.ter_types[out[party.p_loc.x][party.p_loc.y]].blockage > 2) { if (scenario.ter_types[out[party.p_loc.x][party.p_loc.y]].blockage > 2) {
add_string_to_buf(" You plummet to your deaths. "); add_string_to_buf(" You plummet to your deaths. ");
slay_party(2); slay_party(2);
print_buf(); print_buf();
pause(150); pause(150);
} }
else add_string_to_buf(" You land safely. "); else add_string_to_buf(" You land safely. ");
reset_text_bar(); reset_text_bar();
} }
party.stuff_done[305][1] = move_to_zero(party.stuff_done[305][1]); party.stuff_done[SDF_PARTY_FLIGHT] = move_to_zero(party.stuff_done[SDF_PARTY_FLIGHT]);
if ((overall_mode > MODE_OUTDOORS) && (c_town.town.lighting == 2)) if ((overall_mode > MODE_OUTDOORS) && (c_town.town.lighting == 2))
party.light_level = max (0,party.light_level - 9); party.light_level = max (0,party.light_level - 9);
@@ -2591,7 +2591,7 @@ Boolean outd_move_party(location destination,Boolean forced)
if (((boat_num = out_boat_there(real_dest)) < 30) && (party.in_boat < 0) && (party.in_horse < 0)) { if (((boat_num = out_boat_there(real_dest)) < 30) && (party.in_boat < 0) && (party.in_horse < 0)) {
if (flying() == TRUE) { if (flying() == TRUE) {
add_string_to_buf("You land first. "); add_string_to_buf("You land first. ");
party.stuff_done[305][1] = 0; party.stuff_done[SDF_PARTY_FLIGHT] = 0;
} }
give_help(61,0,0); give_help(61,0,0);
add_string_to_buf("Move: You board the boat. "); add_string_to_buf("Move: You board the boat. ");

View File

@@ -1657,11 +1657,11 @@ void combat_run_monst()
if (c_town.town.lighting == 3) if (c_town.town.lighting == 3)
party.light_level = 0; party.light_level = 0;
party.stuff_done[305][2] = move_to_zero(party.stuff_done[305][2]); party.stuff_done[SDF_PARTY_DETECT_LIFE] = move_to_zero(party.stuff_done[SDF_PARTY_DETECT_LIFE]);
party.stuff_done[305][3] = move_to_zero(party.stuff_done[305][3]); party.stuff_done[SDF_PARTY_FIREWALK] = move_to_zero(party.stuff_done[SDF_PARTY_FIREWALK]);
// decrease monster present counter // decrease monster present counter
party.stuff_done[305][9] = move_to_zero(party.stuff_done[305][9]); party.stuff_done[SDF_HOSTILES_PRESENT] = move_to_zero(party.stuff_done[SDF_HOSTILES_PRESENT]);
dump_gold(1); dump_gold(1);
@@ -1672,7 +1672,7 @@ void combat_run_monst()
update_stat = TRUE; update_stat = TRUE;
adven[i].status[1] = move_to_zero(adven[i].status[1]); adven[i].status[1] = move_to_zero(adven[i].status[1]);
adven[i].status[3] = move_to_zero(adven[i].status[3]); adven[i].status[3] = move_to_zero(adven[i].status[3]);
party.stuff_done[305][0] = move_to_zero(party.stuff_done[305][0]); party.stuff_done[SDF_PARTY_STEALTHY] = move_to_zero(party.stuff_done[SDF_PARTY_STEALTHY]);
if ((item = pc_has_abil_equip(i,50)) < 24) { if ((item = pc_has_abil_equip(i,50)) < 24) {
update_stat = TRUE; update_stat = TRUE;
heal_pc(i,get_ran(1,0,adven[i].items[item].item_level + 1)); heal_pc(i,get_ran(1,0,adven[i].items[item].item_level + 1));
@@ -1750,7 +1750,7 @@ void do_monster_turn()
// See if hostile monster notices party, during combat // See if hostile monster notices party, during combat
if ((cur_monst->active == 1) && (cur_monst->attitude % 2 == 1) && (overall_mode == MODE_COMBAT)) { if ((cur_monst->active == 1) && (cur_monst->attitude % 2 == 1) && (overall_mode == MODE_COMBAT)) {
r1 = get_ran(1,1,100); // Check if see PCs first r1 = get_ran(1,1,100); // Check if see PCs first
r1 += (party.stuff_done[305][0] > 0) ? 45 : 0; r1 += (party.stuff_done[SDF_PARTY_STEALTHY] > 0) ? 45 : 0;
r1 += can_see(cur_monst->m_loc,closest_pc_loc(cur_monst->m_loc),0) * 10; r1 += can_see(cur_monst->m_loc,closest_pc_loc(cur_monst->m_loc),0) * 10;
if (r1 < 50) if (r1 < 50)
cur_monst->active = 2; cur_monst->active = 2;
@@ -1788,7 +1788,7 @@ void do_monster_turn()
if (cur_monst->active == 2) { // Begin action loop for angry, active monsters if (cur_monst->active == 2) { // Begin action loop for angry, active monsters
// First note that hostile monsters are around. // First note that hostile monsters are around.
if (cur_monst->attitude % 2 == 1) if (cur_monst->attitude % 2 == 1)
party.stuff_done[305][9] = 30; party.stuff_done[SDF_HOSTILES_PRESENT] = 30;
// Give monster its action points // Give monster its action points
cur_monst->m_d.ap = cur_monst->m_d.speed; cur_monst->m_d.ap = cur_monst->m_d.speed;
@@ -1883,7 +1883,7 @@ void do_monster_turn()
center_on_monst = TRUE; center_on_monst = TRUE;
center = cur_monst->m_loc; center = cur_monst->m_loc;
draw_terrain(0); draw_terrain(0);
pause((PSD[306][6] == 3) ? 9 : PSD[306][6]); pause((PSD[SDF_GAME_SPEED] == 3) ? 9 : PSD[SDF_GAME_SPEED]);
} }
combat_posing_monster = current_working_monster = 100 + i; combat_posing_monster = current_working_monster = 100 + i;

View File

@@ -2,7 +2,7 @@
* consts.h * consts.h
* BoE * BoE
* *
* Created by Seanachi Clappison Dillon on 13/04/09. * Created by Celtic Minstrel on 13/04/09.
* *
*/ */
@@ -37,9 +37,15 @@
#define SDF_PARTY_SPLIT_Y 304][2 #define SDF_PARTY_SPLIT_Y 304][2
#define SDF_PARTY_SPLIT_PC 304][3 #define SDF_PARTY_SPLIT_PC 304][3
#define SDF_PARTY_SPLIT_TOWN 304][4 // for future use, hopefully #define SDF_PARTY_SPLIT_TOWN 304][4 // for future use, hopefully
//#define SDF_ 304][9
#define SDF_PARTY_STEALTHY 305][0
#define SDF_PARTY_FLIGHT 305][1
#define SDF_PARTY_DETECT_LIFE 305][2
#define SDF_PARTY_FIREWALK 305][3
#define SDF_SKIP_STARTUP 305][4 #define SDF_SKIP_STARTUP 305][4
#define SDF_LESS_SOUND 305][5 #define SDF_LESS_SOUND 305][5
#define SDF_NO_TARGET_LINE 305][6 #define SDF_NO_TARGET_LINE 305][6
#define SDF_HOSTILES_PRESENT 305][9
#define SFD_NO_MAPS 306][0 #define SFD_NO_MAPS 306][0
#define SDF_NO_SOUNDS 306][1 #define SDF_NO_SOUNDS 306][1
#define SDF_NO_FRILLS 306][2 #define SDF_NO_FRILLS 306][2

View File

@@ -1473,24 +1473,25 @@ void prefs_event_filter (short item_hit)
if (done_yet== TRUE) { if (done_yet== TRUE) {
if (did_cancel == FALSE) { if (did_cancel == FALSE) {
display_mode = cur_display_mode; display_mode = cur_display_mode;
party.stuff_done[306][0] = cd_get_led(1099,18); party.stuff_done[SFD_NO_MAPS] = cd_get_led(1099,18);
party.stuff_done[306][1] = cd_get_led(1099,20); party.stuff_done[SDF_NO_SOUNDS] = cd_get_led(1099,20);
play_sounds = 1 - party.stuff_done[306][1]; play_sounds = 1 - party.stuff_done[SDF_NO_SOUNDS];
party.stuff_done[306][2] = cd_get_led(1099,22); party.stuff_done[SDF_NO_FRILLS] = cd_get_led(1099,22);
party.stuff_done[306][3] = cd_get_led(1099,24); party.stuff_done[SDF_ROOM_DESCS_AGAIN] = cd_get_led(1099,24);
party.stuff_done[306][4] = cd_get_led(1099,27); party.stuff_done[SDF_NO_INSTANT_HELP] = cd_get_led(1099,27);
party.stuff_done[306][7] = cd_get_led(1099,38); party.stuff_done[SDF_EASY_MODE] = cd_get_led(1099,38);
party.stuff_done[306][8] = cd_get_led(1099,40); party.stuff_done[SDF_LESS_WANDER_ENC] = cd_get_led(1099,40);
party.stuff_done[306][9] = cd_get_led(1099,43); party.stuff_done[SDF_NO_TER_ANIM] = cd_get_led(1099,43);
party.stuff_done[306][5] = cd_get_led(1099,45); party.stuff_done[SDF_NO_SHORE_FRILLS] = cd_get_led(1099,45);
//party.stuff_done[SDF_SKIP_STARTUP] = cd_get_led(1099,46);
if (cd_get_led(1099,32) == 1) if (cd_get_led(1099,32) == 1)
PSD[306][6] = 0; PSD[SDF_GAME_SPEED] = 0;
if (cd_get_led(1099,34) == 1) else if (cd_get_led(1099,34) == 1)
PSD[306][6] = 1; PSD[SDF_GAME_SPEED] = 1;
if (cd_get_led(1099,36) == 1) else if (cd_get_led(1099,36) == 1)
PSD[306][6] = 2; PSD[SDF_GAME_SPEED] = 2;
if (cd_get_led(1099,47) == 1) else if (cd_get_led(1099,47) == 1)
PSD[306][6] = 3; PSD[SDF_GAME_SPEED] = 3;
if (cd_get_led(1099,29) == 1) if (cd_get_led(1099,29) == 1)
for (i = 0; i < 120; i++) for (i = 0; i < 120; i++)
party.help_received[i] = 0; party.help_received[i] = 0;
@@ -1503,9 +1504,9 @@ void prefs_event_filter (short item_hit)
563 + 10,425 + 40,TRUE); 563 + 10,425 + 40,TRUE);
}*/ }*/
} }
//play_sounds = 1 - party.stuff_done[306][1]; //play_sounds = 1 - party.stuff_done[SDF_NO_SOUNDS];
save_maps = 1 - party.stuff_done[306][0]; save_maps = 1 - party.stuff_done[SFD_NO_MAPS];
give_delays = party.stuff_done[306][2]; give_delays = party.stuff_done[SDF_NO_FRILLS];
save_prefs(); save_prefs();
} }
} }
@@ -1522,18 +1523,19 @@ void pick_preferences()
cd_set_led(1099,4 + cur_display_mode,1); cd_set_led(1099,4 + cur_display_mode,1);
cd_set_led(1099,18,(party.stuff_done[306][0] != 0) ? 1 : 0); cd_set_led(1099,18,(party.stuff_done[SFD_NO_MAPS] != 0) ? 1 : 0);
cd_set_led(1099,20,(play_sounds == FALSE) ? 1 : 0); cd_set_led(1099,20,(play_sounds == FALSE) ? 1 : 0);
cd_set_led(1099,22,(party.stuff_done[306][2] != 0) ? 1 : 0); cd_set_led(1099,22,(party.stuff_done[SDF_NO_FRILLS] != 0) ? 1 : 0);
cd_set_led(1099,24,(party.stuff_done[306][3] != 0) ? 1 : 0); cd_set_led(1099,24,(party.stuff_done[SDF_ROOM_DESCS_AGAIN] != 0) ? 1 : 0);
cd_set_led(1099,27,(party.stuff_done[306][4] != 0) ? 1 : 0); cd_set_led(1099,27,(party.stuff_done[SDF_NO_INSTANT_HELP] != 0) ? 1 : 0);
cd_set_led(1099,38,(party.stuff_done[306][7] != 0) ? 1 : 0); cd_set_led(1099,38,(party.stuff_done[SDF_EASY_MODE] != 0) ? 1 : 0);
cd_set_led(1099,40,(party.stuff_done[306][8] != 0) ? 1 : 0); cd_set_led(1099,40,(party.stuff_done[SDF_LESS_WANDER_ENC] != 0) ? 1 : 0);
cd_set_led(1099,43,(party.stuff_done[306][9] != 0) ? 1 : 0); cd_set_led(1099,43,(party.stuff_done[SDF_NO_TER_ANIM] != 0) ? 1 : 0);
cd_set_led(1099,45,(party.stuff_done[306][5] != 0) ? 1 : 0); cd_set_led(1099,45,(party.stuff_done[SDF_NO_SHORE_FRILLS] != 0) ? 1 : 0);
if (PSD[306][6] == 3) //cd_set_led(1099,46,(party.stuff_done[SDF_SKIP_STARTUP] != 0) ? 1 : 0);
if (PSD[SDF_GAME_SPEED] == 3)
cd_set_led(1099,47,1); cd_set_led(1099,47,1);
else cd_set_led(1099,32 + PSD[306][6] * 2,1); else cd_set_led(1099,32 + PSD[SDF_GAME_SPEED] * 2,1);
if (party.help_received[55] == 0) { if (party.help_received[55] == 0) {
cd_initial_draw(1099); cd_initial_draw(1099);

View File

@@ -472,18 +472,14 @@ void load_file()
add_string_to_buf("Load: Game loaded. "); add_string_to_buf("Load: Game loaded. ");
// Set sounds, map saving, and speed // Set sounds, map saving, and speed
if (((play_sounds == TRUE) && (party.stuff_done[306][1] == 1)) || if (((play_sounds == TRUE) && (party.stuff_done[SDF_NO_SOUNDS] == 1)) ||
((play_sounds == FALSE) && (party.stuff_done[306][1] == 0))) { ((play_sounds == FALSE) && (party.stuff_done[SDF_NO_SOUNDS] == 0))) {
flip_sound(); flip_sound();
} }
give_delays = party.stuff_done[306][2]; give_delays = party.stuff_done[SDF_NO_FRILLS];
if (party.stuff_done[306][0] == 0) if (party.stuff_done[SFD_NO_MAPS] == 0)
save_maps = TRUE; save_maps = TRUE;
else save_maps = FALSE; else save_maps = FALSE;
//if (party.stuff_done[306][5] == 0)
// end_music();
// else init_bg_music();
in_startup_mode = FALSE; in_startup_mode = FALSE;
in_scen_debug = FALSE; in_scen_debug = FALSE;

View File

@@ -1121,7 +1121,8 @@ void draw_text_bar(short mode)
if (mode == 1) if (mode == 1)
remember_tiny_text = 500; remember_tiny_text = 500;
if ((PSD[305][0] > 0) || (PSD[305][1] > 0) ||(PSD[305][2] > 0) ||(PSD[305][3] > 0) ) if ((PSD[SDF_PARTY_STEALTHY] > 0) || (PSD[SDF_PARTY_FLIGHT] > 0) ||
(PSD[SDF_PARTY_DETECT_MONST] > 0) || (PSD[SDF_PARTY_FIREWALK] > 0) )
remember_tiny_text = 500; remember_tiny_text = 500;
if (is_out()) { if (is_out()) {
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
@@ -1186,25 +1187,25 @@ void put_text_bar(char *str)
drawstring(str); drawstring(str);
if (monsters_going == FALSE) { if (monsters_going == FALSE) {
if (PSD[305][0] > 0) { if (PSD[SDF_PARTY_STEALTHY] > 0) {
MoveTo(xpos,14); MoveTo(xpos,14);
sprintf((char *) status_str,"Stealth"); sprintf((char *) status_str,"Stealth");
drawstring(status_str); drawstring(status_str);
xpos -= 60; xpos -= 60;
} }
if (PSD[305][1] > 0) { if (PSD[SDF_PARTY_FLIGHT] > 0) {
MoveTo(xpos,14); MoveTo(xpos,14);
sprintf((char *) status_str,"Flying"); sprintf((char *) status_str,"Flying");
drawstring(status_str); drawstring(status_str);
xpos -= 60; xpos -= 60;
} }
if (PSD[305][2] > 0) { if (PSD[SDF_PARTY_DETECT_LIFE] > 0) {
MoveTo(xpos,14); MoveTo(xpos,14);
sprintf((char *) status_str,"Detect Life"); sprintf((char *) status_str,"Detect Life");
drawstring(status_str); drawstring(status_str);
xpos -= 60; xpos -= 60;
} }
if (PSD[305][3] > 0) { if (PSD[SDF_PARTY_FIREWALK] > 0) {
MoveTo(xpos,14); MoveTo(xpos,14);
sprintf((char *) status_str,"Firewalk"); sprintf((char *) status_str,"Firewalk");
drawstring(status_str); drawstring(status_str);
@@ -2040,7 +2041,7 @@ void place_trim(short q,short r,location where,unsigned char ter_type)
// FIrst quick check ... if a pit or barrier in outdoor combat, no trim // FIrst quick check ... if a pit or barrier in outdoor combat, no trim
if ((is_combat()) && (which_combat_type == 0) && (ter_type == 86)) if ((is_combat()) && (which_combat_type == 0) && (ter_type == 86))
return; return;
if (PSD[306][5] > 0) if (PSD[SDF_NO_SHORE_FRILLS] > 0)
return; return;
targ.x = q; targ.x = q;
@@ -2320,7 +2321,7 @@ void boom_space(location where,short mode,short type,short damage,short sound)
return; return;
if ((boom_anim_active == TRUE) && (type != 3)) if ((boom_anim_active == TRUE) && (type != 3))
return; return;
if ((cartoon_happening == FALSE) && (PSD[306][2] > 0) && (fast_bang == TRUE)) if ((cartoon_happening == FALSE) && (PSD[SDF_NO_FRILLS] > 0) && (fast_bang == TRUE))
return; return;
if (is_out()) if (is_out())
return; return;
@@ -2390,7 +2391,7 @@ void boom_space(location where,short mode,short type,short damage,short sound)
if (fast_bang == 0) { if (fast_bang == 0) {
del_len = PSD[306][6] * 3 + 4; del_len = PSD[SDF_GAME_SPEED] * 3 + 4;
if (play_sounds == FALSE) if (play_sounds == FALSE)
FlushAndPause(del_len); FlushAndPause(del_len);
} }

View File

@@ -579,7 +579,7 @@ void draw_sfx()
location where_draw,loc; location where_draw,loc;
Rect orig_rect = {0,0,36,28},source_rect; Rect orig_rect = {0,0,36,28},source_rect;
if (PSD[306][2] > 0) if (PSD[SDF_NO_FRILLS] > 0)
return; return;
for (q = 0; q < 9; q++) for (q = 0; q < 9; q++)

View File

@@ -1259,7 +1259,7 @@ void give_help(short help1,short help2,short parent_num)
help_forced = TRUE; help_forced = TRUE;
help1 -= 200; help1 -= 200;
} }
if ((PSD[306][4] > 0) && (help_forced == FALSE)) if ((PSD[SDF_NO_INSTANT_HELP] > 0) && (help_forced == FALSE))
return; return;
if (party.help_received[help1] > 0) if (party.help_received[help1] > 0)
return; return;

View File

@@ -52,7 +52,7 @@ monster_record_type return_monster_template(unsigned char store)
monst.picture_num = 0; monst.picture_num = 0;
monst.m_num = m_num; monst.m_num = m_num;
monst.health = (PSD[306][7] == 0) ? monst.health : monst.health / 2; monst.health = (PSD[SDF_EASY_MODE] == 0) ? monst.health : monst.health / 2;
// now adjust for difficulty // now adjust for difficulty
monst.health = monst.health * difficulty_adjust(); monst.health = monst.health * difficulty_adjust();
@@ -358,7 +358,7 @@ void do_monsters()
if ((c_town.monst.dudes[i].active == 1) && (c_town.monst.dudes[i].attitude % 2 == 1) if ((c_town.monst.dudes[i].active == 1) && (c_town.monst.dudes[i].attitude % 2 == 1)
&& (dist(c_town.monst.dudes[i].m_loc,c_town.p_loc) <= 8)) { && (dist(c_town.monst.dudes[i].m_loc,c_town.p_loc) <= 8)) {
r1 = get_ran(1,1,100); r1 = get_ran(1,1,100);
r1 += (party.stuff_done[305][0] > 0) ? 46 : 0; r1 += (party.stuff_done[SDF_PARTY_STEALTHY] > 0) ? 46 : 0;
r1 += can_see(c_town.monst.dudes[i].m_loc,c_town.p_loc,0) * 10; r1 += can_see(c_town.monst.dudes[i].m_loc,c_town.p_loc,0) * 10;
if (r1 < 50) { if (r1 < 50) {
c_town.monst.dudes[i].active = 2; c_town.monst.dudes[i].active = 2;
@@ -901,7 +901,7 @@ Boolean town_move_monster(short num,location dest)
Boolean monster_placid(short m_num) Boolean monster_placid(short m_num)
{ {
if ((c_town.monst.dudes[m_num].attitude == 0) || if ((c_town.monst.dudes[m_num].attitude == 0) ||
((c_town.monst.dudes[m_num].attitude == 2) && (party.stuff_done[305][9] == 0))) ((c_town.monst.dudes[m_num].attitude == 2) && (party.stuff_done[SDF_HOSTILES_PRESENT] == 0)))
{ return TRUE;} { return TRUE;}
else { return FALSE;} else { return FALSE;}
} }

View File

@@ -142,7 +142,7 @@ void apply_unseen_mask()
ConstPatternParam c; ConstPatternParam c;
Boolean need_bother = FALSE; Boolean need_bother = FALSE;
if (PSD[306][2] > 0) if (PSD[SDF_NO_FRILLS] > 0)
return; return;
if ((is_combat()) && (which_combat_type == 0)) if ((is_combat()) && (which_combat_type == 0))
@@ -196,7 +196,7 @@ void apply_light_mask()
Rect big_to = {13,13,337,265}; Rect big_to = {13,13,337,265};
short i,j; short i,j;
Boolean is_dark = FALSE,same_mask = TRUE; Boolean is_dark = FALSE,same_mask = TRUE;
if (PSD[306][2] > 0) if (PSD[SDF_NO_FRILLS] > 0)
return; return;
if (is_out()) if (is_out())
return; return;
@@ -320,7 +320,7 @@ void add_missile(location dest,short missile_type,short path_type,short x_adj,sh
if (boom_anim_active == FALSE) if (boom_anim_active == FALSE)
return; return;
if (PSD[306][2] > 0) if (PSD[SDF_NO_FRILLS] > 0)
return; return;
// lose redundant missiles // lose redundant missiles
for (i = 0; i < 30; i++) for (i = 0; i < 30; i++)
@@ -377,7 +377,7 @@ void add_explosion(location dest,short val_to_place,short place_type,short boom_
{ {
short i; short i;
if (PSD[306][2] > 0) if (PSD[SDF_NO_FRILLS] > 0)
return; return;
if (boom_anim_active == FALSE) if (boom_anim_active == FALSE)
return; return;
@@ -535,7 +535,8 @@ void do_missile_anim(short num_steps,location missile_origin,short sound_num)
rect_draw_some_item(temp_gworld,missile_place_rect[i], rect_draw_some_item(temp_gworld,missile_place_rect[i],
temp_gworld,to_rect,0,1); temp_gworld,to_rect,0,1);
} }
if ((PSD[306][6] == 3) || ((PSD[306][6] == 1) && (t % 4 == 0)) || ((PSD[306][6] == 2) && (t % 3 == 0))) if ((PSD[SDF_GAME_SPEED] == 3) || ((PSD[SDF_GAME_SPEED] == 1) && (t % 4 == 0)) ||
((PSD[SDF_GAME_SPEED] == 2) && (t % 3 == 0)))
FlushAndPause(1); FlushAndPause(1);
} }
@@ -721,8 +722,8 @@ void do_explosion_anim(short sound_num,short special_draw)
rect_draw_some_item(temp_gworld,explode_place_rect[i], rect_draw_some_item(temp_gworld,explode_place_rect[i],
temp_gworld,to_rect,0,1); temp_gworld,to_rect,0,1);
} }
//if (((PSD[306][6] == 1) && (t % 3 == 0)) || ((PSD[306][6] == 2) && (t % 2 == 0))) //if (((PSD[SDF_GAME_SPEED] == 1) && (t % 3 == 0)) || ((PSD[SDF_GAME_SPEED] == 2) && (t % 2 == 0)))
FlushAndPause(2 * (1 + PSD[306][6])); FlushAndPause(2 * (1 + PSD[SDF_GAME_SPEED]));
} }
// Exit gracefully, and clean up screen // Exit gracefully, and clean up screen

View File

@@ -289,7 +289,7 @@ void init_party(short mode)
o_maps.outdoor_maps[i][k][l] = 0; o_maps.outdoor_maps[i][k][l] = 0;
// Default is save maps // Default is save maps
party.stuff_done[306][0] = 0; party.stuff_done[SFD_NO_MAPS] = 0;
save_maps = TRUE; save_maps = TRUE;
@@ -310,11 +310,11 @@ void init_party_scen_data()
short store_help; short store_help;
party.age = 0; party.age = 0;
store_help = PSD[306][4]; store_help = PSD[SDF_NO_INSTANT_HELP];
for (i = 0; i < 310; i++) for (i = 0; i < 310; i++)
for (j = 0; j < 10; j++) for (j = 0; j < 10; j++)
party.stuff_done[i][j] = 0; party.stuff_done[i][j] = 0;
PSD[306][4] = store_help; PSD[SDF_NO_INSTANT_HELP] = store_help;
party.light_level = 0; party.light_level = 0;
party.outdoor_corner.x = scenario.out_sec_start.x; party.outdoor_corner.x = scenario.out_sec_start.x;
party.outdoor_corner.y = scenario.out_sec_start.y; party.outdoor_corner.y = scenario.out_sec_start.y;
@@ -1669,7 +1669,7 @@ void do_mage_spell(short pc_num,short spell_num)
case 38: // Stealth case 38: // Stealth
adven[pc_num].cur_sp -= spell_cost[0][spell_num]; adven[pc_num].cur_sp -= spell_cost[0][spell_num];
party.stuff_done[305][0] += max(6,adven[pc_num].level * 2); party.stuff_done[SFD_NO_MAPS] += max(6,adven[pc_num].level * 2);
break; break;
@@ -1695,7 +1695,7 @@ void do_mage_spell(short pc_num,short spell_num)
break; break;
case 53: // fly case 53: // fly
if (party.stuff_done[305][1] > 0) { if (party.stuff_done[SDF_PARTY_FLIGHT] > 0) {
add_string_to_buf(" Not while already flying. "); add_string_to_buf(" Not while already flying. ");
return; return;
} }
@@ -1706,7 +1706,7 @@ void do_mage_spell(short pc_num,short spell_num)
else { else {
adven[pc_num].cur_sp -= spell_cost[0][spell_num]; adven[pc_num].cur_sp -= spell_cost[0][spell_num];
add_string_to_buf(" You start flying! "); add_string_to_buf(" You start flying! ");
party.stuff_done[305][1] = 3; party.stuff_done[SDF_PARTY_FLIGHT] = 3;
} }
break; break;
@@ -1838,13 +1838,13 @@ void do_priest_spell(short pc_num,short spell_num) ////
case 23: // Detect life case 23: // Detect life
add_string_to_buf(" Monsters now on map. "); add_string_to_buf(" Monsters now on map. ");
party.stuff_done[305][2] += 6 + get_ran(1,0,6); party.stuff_done[SDF_PARTY_DETECT_LIFE] += 6 + get_ran(1,0,6);
clear_map(); clear_map();
adven[pc_num].cur_sp -= spell_cost[1][spell_num]; adven[pc_num].cur_sp -= spell_cost[1][spell_num];
break; break;
case 37: // firewalk case 37: // firewalk
add_string_to_buf(" You are now firewalking. "); add_string_to_buf(" You are now firewalking. ");
party.stuff_done[305][3] += adven[pc_num].level / 12 + 2; party.stuff_done[SDF_PARTY_FIREWALK] += adven[pc_num].level / 12 + 2;
adven[pc_num].cur_sp -= spell_cost[1][spell_num]; adven[pc_num].cur_sp -= spell_cost[1][spell_num];
break; break;
@@ -3229,7 +3229,7 @@ unsigned char pick_trapped_monst()
Boolean flying() Boolean flying()
{ {
if (party.stuff_done[305][1] == 0) if (party.stuff_done[SDF_PARTY_FLIGHT] == 0)
return FALSE; return FALSE;
else return TRUE; else return TRUE;
} }
@@ -3394,7 +3394,7 @@ Boolean damage_pc(short which_pc,short how_much,short damage_type,short type_of_
if (damage_type != 10) { if (damage_type != 10) {
if (PSD[306][7] > 0) if (PSD[SDF_EASY_MODE] > 0)
how_much -= 3; how_much -= 3;
// toughness // toughness
if (adven[which_pc].traits[0] == TRUE) if (adven[which_pc].traits[0] == TRUE)

View File

@@ -293,7 +293,7 @@ Boolean check_special_terrain(location where_check,short mode,short which_pc,sho
if (ter_special == 2) { if (ter_special == 2) {
add_string_to_buf(" It's hot!"); add_string_to_buf(" It's hot!");
dam_type = 1; pic_type = 0; dam_type = 1; pic_type = 0;
if (party.stuff_done[305][3] > 0) { if (party.stuff_done[SDF_PARTY_FIREWALK] > 0) {
add_string_to_buf(" It doesn't affect you."); add_string_to_buf(" It doesn't affect you.");
break; break;
} }
@@ -731,13 +731,13 @@ effect_pat_type s = {{{0,0,0,0,0,0,0,0,0},
ASB(" You have more light."); increase_light(50 * str); ASB(" You have more light."); increase_light(50 * str);
break; break;
case 91: case 91:
ASB(" Your footsteps become quieter."); party.stuff_done[305][0] += 5 * str; ASB(" Your footsteps become quieter."); party.stuff_done[SDF_PARTY_STEALTHY] += 5 * str;
break; break;
case 92: case 92:
ASB(" You feel chilly."); party.stuff_done[305][3] += 2 * str; ASB(" You feel chilly."); party.stuff_done[SDF_PARTY_FIREWALK] += 2 * str;
break; break;
case 93: case 93:
if (party.stuff_done[305][1] > 0) { if (party.stuff_done[SDF_PARTY_FLIGHT] > 0) {
add_string_to_buf(" Not while already flying. "); add_string_to_buf(" Not while already flying. ");
break; break;
} }
@@ -746,7 +746,7 @@ effect_pat_type s = {{{0,0,0,0,0,0,0,0,0},
else if (party.in_horse >= 0)//// else if (party.in_horse >= 0)////
add_string_to_buf(" Leave horse first. "); add_string_to_buf(" Leave horse first. ");
else { else {
ASB(" You rise into the air!"); party.stuff_done[305][1] += str; ASB(" You rise into the air!"); party.stuff_done[SDF_PARTY_FLIGHT] += str;
} }
break; break;
case 94: case 94:
@@ -1326,7 +1326,7 @@ Boolean damage_monst(short which_m, short who_hit, short how_much, short how_muc
make_town_hostile(); make_town_hostile();
} }
if ((victim->attitude % 2 != 1) && (who_hit < 7) && if ((victim->attitude % 2 != 1) && (who_hit < 7) &&
((processing_fields == TRUE) && (party.stuff_done[305][9] == 0))) { ((processing_fields == TRUE) && (party.stuff_done[SDF_HOSTILES_PRESENT] == 0))) {
add_string_to_buf("Damaged an innocent."); add_string_to_buf("Damaged an innocent.");
victim->attitude = 1; victim->attitude = 1;
make_town_hostile(); make_town_hostile();
@@ -2240,14 +2240,14 @@ void affect_spec(short which_mode,special_node_type cur_node,short cur_spec_type
party.alchemy[spec.ex1a] = TRUE; party.alchemy[spec.ex1a] = TRUE;
break; break;
case 104: case 104:
r1 = (short) party.stuff_done[305][0]; r1 = (short) party.stuff_done[SDF_PARTY_STEALTHY];
r1 = minmax(0,250,r1 + spec.ex1a); r1 = minmax(0,250,r1 + spec.ex1a);
party.stuff_done[305][0] = r1; party.stuff_done[SDF_PARTY_STEALTHY] = r1;
break; break;
case 105: case 105:
r1 = (short) party.stuff_done[305][3]; r1 = (short) party.stuff_done[SDF_PARTY_FIREWALK];
r1 = minmax(0,250,r1 + spec.ex1a); r1 = minmax(0,250,r1 + spec.ex1a);
party.stuff_done[305][3] = r1; party.stuff_done[SDF_PARTY_FIREWALK] = r1;
break; break;
case 106: case 106:
if (party.in_boat >= 0) if (party.in_boat >= 0)
@@ -2255,9 +2255,9 @@ void affect_spec(short which_mode,special_node_type cur_node,short cur_spec_type
else if (party.in_horse >= 0)//// else if (party.in_horse >= 0)////
add_string_to_buf(" Can't fly when on a horse. "); add_string_to_buf(" Can't fly when on a horse. ");
else { else {
r1 = (short) party.stuff_done[305][1]; r1 = (short) party.stuff_done[SDF_PARTY_FLIGHT];
r1 = minmax(0,250,r1 + spec.ex1a); r1 = minmax(0,250,r1 + spec.ex1a);
party.stuff_done[305][1] = r1; party.stuff_done[SDF_PARTY_FLIGHT] = r1;
} }
break; break;
} }
@@ -2738,7 +2738,7 @@ void townmode_spec(short which_mode,special_node_type cur_node,short cur_spec_ty
*next_spec = -1; *next_spec = -1;
check_mess = FALSE; check_mess = FALSE;
} }
if (party.stuff_done[304][0] > 0) { if (party.stuff_done[SDF_IS_PARTY_SPLIT] > 0) {
ASB("Party is already split."); ASB("Party is already split.");
if (which_mode < 3) if (which_mode < 3)
*a = 1; *a = 1;

View File

@@ -141,10 +141,9 @@ void start_town_mode(short which_town, short entry_dir)
if (town_force < 200) if (town_force < 200)
which_town = town_force; which_town = town_force;
else if (PSD[304][9] == 0) { else if (PSD[304][9] == 0) {
play_town_sound = TRUE; play_town_sound = TRUE;
}
}
former_town = town_number = which_town; former_town = town_number = which_town;
@@ -522,13 +521,13 @@ void start_town_mode(short which_town, short entry_dir)
// End flying // End flying
if (party.stuff_done[305][1] > 0) { if (party.stuff_done[SDF_PARTY_FLIGHT] > 0) {
party.stuff_done[305][1] = 0; party.stuff_done[SDF_PARTY_FLIGHT] = 0;
add_string_to_buf("You land, and enter. "); add_string_to_buf("You land, and enter. ");
} }
// No hostile monsters present. // No hostile monsters present.
party.stuff_done[305][9] = 0; party.stuff_done[SDF_HOSTILES_PRESENT] = 0;
add_string_to_buf("Now entering:"); add_string_to_buf("Now entering:");
sprintf ((char *) message, " %-30.30s ",data_store->town_strs[0]); sprintf ((char *) message, " %-30.30s ",data_store->town_strs[0]);
@@ -692,7 +691,7 @@ location end_town_mode(short switching_level,location destination) // returns n
load_area_graphics(); load_area_graphics();
party.stuff_done[305][0] = 0; party.stuff_done[SDF_PARTY_STEALTHY] = 0;
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
for (j = 0; j < 15; j++) for (j = 0; j < 15; j++)
if ((j != 2) && (j != 7) && (j != 9)) if ((j != 2) && (j != 7) && (j != 9))
@@ -1632,7 +1631,7 @@ pascal void draw_map (DialogPtr the_dialog, short the_item)
// Now place PCs and monsters // Now place PCs and monsters
if ((draw_pcs == TRUE) && (modeless_exists[5] == TRUE)) { if ((draw_pcs == TRUE) && (modeless_exists[5] == TRUE)) {
if ((is_town()) && (party.stuff_done[305][2] > 0)) if ((is_town()) && (party.stuff_done[SDF_PARTY_DETECT_LIFE] > 0))
for (i = 0; i < T_M; i++) for (i = 0; i < T_M; i++)
if (c_town.monst.dudes[i].active > 0) { if (c_town.monst.dudes[i].active > 0) {
where = c_town.monst.dudes[i].m_loc; where = c_town.monst.dudes[i].m_loc;

View File

@@ -290,13 +290,13 @@ void end_split(short noise)
{ {
short i; short i;
if (party.stuff_done[304][0] == 0) { if (party.stuff_done[SDF_IS_PARTY_SPLIT] == 0) {
ASB("Party already together!"); ASB("Party already together!");
return; return;
} }
c_town.p_loc.x = party.stuff_done[304][1]; c_town.p_loc.x = party.stuff_done[SDF_PARTY_SPLIT_X];
c_town.p_loc.y = party.stuff_done[304][2]; c_town.p_loc.y = party.stuff_done[SDF_PARTY_SPLIT_Y];
party.stuff_done[304][0] = 0; party.stuff_done[SDF_IS_PARTY_SPLIT] = 0;
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
if (adven[i].main_status >= 10) if (adven[i].main_status >= 10)
adven[i].main_status -= 10; adven[i].main_status -= 10;