Lots of TODO comments, some noting things related to the Windows version
This commit is contained in:
@@ -2001,6 +2001,7 @@ bool handle_keystroke(sf::Event& event){
|
||||
break;
|
||||
case '/':
|
||||
if(!in_scen_debug) break;
|
||||
// TODO: Make a dialog for this instead of flooding the transcript
|
||||
ASB("Debug hot keys");
|
||||
ASB(" B Leave town");
|
||||
ASB(" C Get cleaned up");
|
||||
@@ -2604,6 +2605,7 @@ void handle_death()
|
||||
}
|
||||
}
|
||||
else if(choice == "new") {
|
||||
// TODO: Windows version dumps to main screen without creating a party; which is better?
|
||||
start_new_game();
|
||||
return;
|
||||
}
|
||||
|
@@ -1631,6 +1631,7 @@ bool combat_next_step()
|
||||
pick_next_pc();
|
||||
if (current_pc != store_pc)
|
||||
to_return = true;
|
||||
// TODO: Windows version checks for overall_mode being MODE_OUTDOORS or MODE_TOWN - that's not necessary, right?
|
||||
center = univ.party[current_pc].combat_pos;
|
||||
//if (ensure_redraw == true)
|
||||
// draw_terrain(0);
|
||||
@@ -1809,6 +1810,7 @@ void do_monster_turn()
|
||||
// See if hostile monster notices party, during 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
|
||||
// TODO: Hang on, isn't stealth supposed to get better as you level up?
|
||||
r1 += (PSD[SDF_PARTY_STEALTHY] > 0) ? 45 : 0;
|
||||
r1 += can_see_light(cur_monst->cur_loc,closest_pc_loc(cur_monst->cur_loc),sight_obscurity) * 10;
|
||||
if (r1 < 50)
|
||||
@@ -2737,6 +2739,7 @@ void monst_fire_missile(short m_num,short bless,short level,location source,shor
|
||||
}
|
||||
}
|
||||
else {
|
||||
// TODO: This might be relevant to the AFFECT_DEADNESS special when used on monsters
|
||||
monst_spell_note(m_target->number,9);
|
||||
r1 = get_ran(1,0,20) + m_target->level / 4 + m_target->status[eStatus::BLESS_CURSE];
|
||||
if ((r1 > 14) || (m_target->immunities & 2))
|
||||
@@ -4054,6 +4057,7 @@ void radius_damage(location target,short radius, short dam, eDamageType type)///
|
||||
// Slightly kludgy way to only damage PCs in space)
|
||||
void hit_pcs_in_space(location target,short dam,eDamageType type,short report,short hit_all)
|
||||
{
|
||||
// TODO: Looks like this no longer does what it claims.
|
||||
//short store_active[T_M],i;
|
||||
|
||||
//for (i = 0; i < T_M; i++) {
|
||||
@@ -4909,6 +4913,7 @@ void process_fields()
|
||||
|
||||
void scloud_space(short m,short n)
|
||||
{
|
||||
// TODO: Is it correct for these to not affect monsters?
|
||||
location target;
|
||||
//cPopulation::cCreature;
|
||||
short i;
|
||||
|
@@ -133,6 +133,8 @@ void start_shop_mode(short shop_type,short shop_min,short shop_max,short cost_ad
|
||||
{
|
||||
RECT area_rect;
|
||||
|
||||
// This would be a place to hide the text box, if I add it.
|
||||
|
||||
if (shop_max < shop_min)
|
||||
shop_max = shop_min; ////
|
||||
store_cost_mult = cost_adj;
|
||||
@@ -174,6 +176,8 @@ void end_shop_mode()
|
||||
{
|
||||
RECT dummy_rect = {0,0,0,0};
|
||||
|
||||
// This would be a place to show the text box, if I add it (and if this is not an outdoor shop).
|
||||
|
||||
shop_sbar->hide();
|
||||
if (store_pre_shop_mode == 20) {
|
||||
strnum1 = strnum2 = oldstrnum1 = oldstrnum2 = 0;
|
||||
@@ -538,6 +542,8 @@ void start_talk_mode(short m_num,short personality,m_num_t monst_type,short stor
|
||||
area_rect = talk_area_rect;
|
||||
talk_gworld.create(area_rect.width(), area_rect.height());
|
||||
|
||||
// This would be the place to show the text box, if I add it.
|
||||
|
||||
// first make sure relevant talk strs are loaded in
|
||||
load_town_talk(personality / 10);
|
||||
|
||||
@@ -567,6 +573,7 @@ void start_talk_mode(short m_num,short personality,m_num_t monst_type,short stor
|
||||
|
||||
void end_talk_mode()
|
||||
{
|
||||
// This would be where to hide the text box, if I add it.
|
||||
overall_mode = store_pre_talk_mode;
|
||||
if (overall_mode == MODE_TALK_TOWN)
|
||||
overall_mode = MODE_TOWN;
|
||||
@@ -924,6 +931,7 @@ void handle_talk_event(location p)
|
||||
return;
|
||||
case 24:
|
||||
if (univ.party.can_find_town[b] > 0) {
|
||||
// TODO: Uh, is something supposed to happen here?
|
||||
}
|
||||
else if (univ.party.gold < a) {
|
||||
strnum1 = strnum2;
|
||||
@@ -950,6 +958,7 @@ void handle_talk_event(location p)
|
||||
talk_end_forced = true;
|
||||
break;
|
||||
case 28:
|
||||
// TODO: Any reason not to call something like kill_monst?
|
||||
univ.town.monst[store_m_num].active = 0;
|
||||
// Special killing effects
|
||||
if (sd_legit(univ.town.monst[store_m_num].spec1,univ.town.monst[store_m_num].spec2) == true)
|
||||
@@ -1116,6 +1125,13 @@ static bool prefs_event_filter (cDialog& me, std::string id, eKeyMod)
|
||||
PSD[SDF_NO_SHORE_FRILLS] = dynamic_cast<cLed&>(me["noshore"]).getState() != led_off;
|
||||
show_startup_splash = dynamic_cast<cLed&>(me["skipsplash"]).getState() == led_off;
|
||||
std::string speed = dynamic_cast<cLedGroup&>(me["speed"]).getSelected();
|
||||
/* TODO: Should I add these additional preferences from Windows?
|
||||
party.stuff_done[SDF_NO_TARGET_LINE] = cd_get_led(1099,50);
|
||||
party.stuff_done[SDF_LESS_SOUND] = cd_get_led(1099,52);
|
||||
party.stuff_done[SDF_FASTER_BOOM_SPACES] = cd_get_led(1099,56);
|
||||
party.stuff_done[SDF_ASK_ABOUT_TEXT_BOX] = cd_get_led(1099,60);
|
||||
*/
|
||||
// TODO: NO_SOUNDS and NO_MAPS preferences are stored in two different places
|
||||
if(speed == "fast")
|
||||
PSD[SDF_GAME_SPEED] = 0;
|
||||
else if(speed == "med")
|
||||
|
@@ -432,6 +432,7 @@ void draw_startup_stats()
|
||||
pc_rect.top = pc_rect.bottom - 25;
|
||||
pc_rect.left = pc_rect.right - 300;
|
||||
// TODO: Should replace this with a more appropriate copyright string
|
||||
// Windows replaced it with "That is not dead which can eternally lie..." - I don't think that's quite appropriate though.
|
||||
win_draw_string(mainPtr,pc_rect,"Copyright 1997, All Rights Reserved, v1.0.2",eTextMode::WRAP,style,ul);
|
||||
}
|
||||
|
||||
@@ -440,6 +441,7 @@ void draw_startup_stats()
|
||||
void draw_start_button(short which_position,short which_button)
|
||||
{
|
||||
RECT from_rect,to_rect;
|
||||
// TODO: Change third button (Windows calls it "Support and Downloads")
|
||||
const char *button_labels[] = {"Load Game","Make New Party","How To Order",
|
||||
"Start Scenario","Custom Scenario","Quit"};
|
||||
// The 0..65535 version of the blue component was 14472; the commented version was 43144431
|
||||
@@ -476,6 +478,7 @@ void main_button_click(RECT button_rect)
|
||||
button_rect.offset(ul);
|
||||
mainPtr.setActive();
|
||||
clip_rect(mainPtr, button_rect);
|
||||
// TODO: Mini-event loop so that the click doesn't happen until releasing the mouse button
|
||||
|
||||
draw_buttons(1);
|
||||
mainPtr.display();
|
||||
@@ -491,6 +494,7 @@ void arrow_button_click(RECT button_rect)
|
||||
button_rect.offset(ul);
|
||||
mainPtr.setActive();
|
||||
clip_rect(mainPtr, button_rect);
|
||||
// TODO: Mini-event loop so that the click doesn't happen until releasing the mouse button
|
||||
|
||||
refresh_stat_areas(1);
|
||||
mainPtr.display();
|
||||
@@ -1088,6 +1092,7 @@ void place_trim(short q,short r,location where,ter_num_t ter_type)
|
||||
at_bot = true;
|
||||
}
|
||||
else {
|
||||
// TODO: Shouldn't we subtract one here?
|
||||
if (where.x == univ.town->max_dim())
|
||||
at_right = true;
|
||||
if (where.y == univ.town->max_dim())
|
||||
@@ -1188,6 +1193,10 @@ void draw_trim(short q,short r,short which_trim,ter_num_t ground_ter)
|
||||
//which_trim is 3 -> drawing wall trim -> might shift down if ground is grass
|
||||
//short which_mode; // 0 top 1 bottom 2 left 3 right 4 up left 5 up right 6 down right 7 down left
|
||||
{
|
||||
/* TODO: Windows has a check for frills being enabled:
|
||||
if ((frills_on == false) || (((current_ground == 2) || (current_ground == 36)) && (PSD[SDF_COMPATIBILITY_FULL_TRIMS] == 0)))
|
||||
return;
|
||||
*/
|
||||
// which_trim
|
||||
// 0 - left, 1 - right, 2 - top, 3 - bottom, 4 - tl, 5 - tr, 6 - bl, 7 - br
|
||||
// 8 - wall tl, 9 - wall tr, 10 - wall bl, 11 - wall br
|
||||
@@ -1418,6 +1427,7 @@ void place_road(short q,short r,location where, bool here)
|
||||
eTrimType trim = scenario.ter_types[ref].trim_type;
|
||||
if (where.y > 0)
|
||||
ter = coord_to_ter(where.x,where.y - 1);
|
||||
// TODO: ter could be uninitialized here!
|
||||
eTrimType vertTrim = scenario.ter_types[ter].trim_type;
|
||||
if ((where.y == 0) || connect_roads(ter))
|
||||
vert = can_build_roads_on(ref);
|
||||
|
@@ -197,6 +197,9 @@ void draw_monsters() ////
|
||||
}
|
||||
if (picture_wanted < 1000) {
|
||||
for (k = 0; k < width * height; k++) {
|
||||
// TODO: Windows special-cases the bear and drake, whose graphics are split between two columns/sheets. Is this necessary?
|
||||
// It really doesn't look necessary to me, since each quadrant of the graphic is fetched separately.
|
||||
// Technically what they do is always pass 0 as the final argument to get_monster_template_rect, instead of passing k; they also hardcode the sheet to look on (4 for drake, 5 for bear).
|
||||
pic_num_t this_monst = univ.party.out_c[i].what_monst.get(j,true,&cMonster::picture_num);
|
||||
source_rect = get_monster_template_rect(this_monst,(univ.party.out_c[i].direction < 4) ? 0 : 1,k);
|
||||
to_rect = monst_rects[(width - 1) * 2 + height - 1][k];
|
||||
|
@@ -178,6 +178,7 @@ location get_cur_loc()
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Don't hardcode this!
|
||||
bool is_lava(short x,short y)////
|
||||
{
|
||||
ter_num_t ter;
|
||||
@@ -272,10 +273,12 @@ void update_explored(location dest)
|
||||
univ.out.out_e[dest.x][dest.y] = 2;
|
||||
for (look.x = shortdest.x - 4; look.x < shortdest.x + 5; look.x++)
|
||||
for (look.y = shortdest.y - 4; look.y < shortdest.y + 5; look.y++) {
|
||||
|
||||
// TODO: Windows had an extra check, is this needed?
|
||||
//if ((look.x == minmax(0,95,(int)look.x)) && (look.y == minmax(0,95,(int)look.y))) {
|
||||
if (univ.out.out_e[look.x][look.y] == 0)
|
||||
if(can_see_light(shortdest, look, sight_obscurity) < 5)
|
||||
univ.out.out_e[look.x][look.y] = 1;
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -103,6 +103,7 @@ location ul = {28,10};
|
||||
short display_mode = 0; // 0 - center 1- ul 2 - ur 3 - dl 4 - dr 5 - small win
|
||||
long stored_key;
|
||||
short pixel_depth,old_depth = 8;
|
||||
// TODO: Enumify stat_screen_mode
|
||||
short current_ground = 0,stat_screen_mode = 0;
|
||||
short anim_step = -1;
|
||||
|
||||
@@ -572,6 +573,8 @@ void handle_options_menu(int item_hit)
|
||||
create_pc(6,NULL);
|
||||
}
|
||||
else {
|
||||
// TODO: Allow additional towns to specify that you can make new characters in them
|
||||
// (Otherwise, certain scenarios where you can't return to the start town would prevent you from creating new characters in the scenario.)
|
||||
add_string_to_buf("Add PC: You can only make new");
|
||||
add_string_to_buf(" characters in the town you ");
|
||||
add_string_to_buf(" started in.");
|
||||
@@ -615,6 +618,7 @@ void handle_help_menu(int item_hit)
|
||||
}
|
||||
if(!dialogToShow.empty())
|
||||
cChoiceDlog(dialogToShow).show();
|
||||
// TODO: Windows version has an option to bring up Windows help for the game; should we have something equivalent for Mac?
|
||||
}
|
||||
void handle_library_menu(int item_hit)
|
||||
{
|
||||
|
@@ -1088,6 +1088,7 @@ bool monst_check_special_terrain(location where_check,short mode,short which_mon
|
||||
return true;
|
||||
else return false;
|
||||
break;
|
||||
// TODO: Should it check any other terrain specials?
|
||||
}
|
||||
|
||||
// Action may change terrain, so update what's been seen
|
||||
@@ -1105,6 +1106,7 @@ bool monst_check_special_terrain(location where_check,short mode,short which_mon
|
||||
|
||||
void forced_place_monster(m_num_t which,location where)
|
||||
{
|
||||
// TODO: Windows version has logic to destroy unimportant monsters to make room, but the real issue here is the non-dynamic nature of the monster array, so a better fix would be to use an std::vector in cPopulation... and then this function wouldn't even be needed.
|
||||
bool free_spot = false;
|
||||
short i = 0,r1;
|
||||
|
||||
|
@@ -743,6 +743,7 @@ void draw_shop_graphics(bool pressed,RECT clip_area_rect)
|
||||
// In the 0..65535 range, these blue components were: 0, 32767, 14535, 26623, 59391
|
||||
// The green components on the second line were 40959 and 24575
|
||||
// TODO: The duplication of sf::Color here shouldn't be necessary...
|
||||
// TODO: The Windows version appears to use completely different colours?
|
||||
sf::Color c[7] = {sf::Color{0,0,0},sf::Color{0,0,128},sf::Color{0,0,57},sf::Color{0,0,104},sf::Color{0,0,232},
|
||||
sf::Color{0,160,0},sf::Color{0,96,0}};
|
||||
RECT shopper_name = {44,6,56,260};
|
||||
|
@@ -1542,6 +1542,7 @@ bool damage_monst(short which_m, short who_hit, short how_much, short how_much_s
|
||||
how_much = 0;
|
||||
monst_marked_damage[which_m] += how_much;
|
||||
add_explosion(victim->cur_loc,how_much,0,(dam_type > 2) ? 2 : 0,14 * (victim->x_width - 1),18 * (victim->y_width - 1));
|
||||
// Note: Windows version printed an "undamaged" message here if applicable, but I don't think that's right.
|
||||
if (how_much == 0)
|
||||
return false;
|
||||
else return true;
|
||||
@@ -1571,6 +1572,7 @@ bool damage_monst(short which_m, short who_hit, short how_much, short how_much_s
|
||||
where_put = find_clear_spot(victim->cur_loc,1);
|
||||
if (where_put.x > 0)
|
||||
if ((which_spot = place_monster(victim->number,where_put)) < 90) {
|
||||
// TODO: Why so many assignments? Windows only assigns health and monst_start (start_loc I assume)
|
||||
univ.town.monst[which_spot].health = victim->health;
|
||||
univ.town.monst[which_spot].number = victim->number;
|
||||
univ.town.monst[which_spot].start_attitude = victim->start_attitude;
|
||||
@@ -1596,7 +1598,8 @@ bool damage_monst(short which_m, short who_hit, short how_much, short how_much_s
|
||||
// Monster damages. Make it hostile.
|
||||
victim->active = 2;
|
||||
|
||||
|
||||
// TODO: This looks like the reason Windows split the boom_space function in two.
|
||||
// It doesn't exactly make sense though, since in its version, boom_space is only called for how_much_spec.
|
||||
if (dam_type != 9) { // note special damage only gamed in hand-to-hand, not during animation
|
||||
if (party_can_see_monst(which_m) == true) {
|
||||
boom_space(victim->cur_loc,100,boom_gr[dam_type],how_much,sound_type);
|
||||
@@ -1641,6 +1644,7 @@ void kill_monst(cCreature *which_m,short who_killed)
|
||||
location l;
|
||||
|
||||
if(isHumanoid(which_m->m_type)) {
|
||||
// TODO: Uh, don't hardcode these!
|
||||
if (( which_m->number == 38) ||
|
||||
( which_m->number == 39))
|
||||
i = 4;
|
||||
@@ -1706,7 +1710,7 @@ void kill_monst(cCreature *which_m,short who_killed)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TODO: Check that this function is not called when a monster kills a monster, since that would lead to false incrementing of the stats.
|
||||
if (((is_town()) || (which_combat_type == 1)) && (which_m->summoned == 0)) {
|
||||
univ.party.m_killed[univ.town.num]++;
|
||||
}
|
||||
@@ -2138,6 +2142,7 @@ void general_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
|
||||
case eSpecType::CHANGE_TIME:
|
||||
check_mess = true;
|
||||
univ.party.age += spec.ex1a;
|
||||
// TODO: Should this trigger special events, timers, etc?
|
||||
break;
|
||||
case eSpecType::SCEN_TIMER_START:
|
||||
check_mess = true;
|
||||
@@ -2568,6 +2573,7 @@ void affect_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
|
||||
// Honour the request for alive PCs only.
|
||||
if(spec.ex1a == 1 || univ.party[pc].main_status == eMainStatus::ALIVE)
|
||||
current_pc_picked_in_spec_enc = pc;
|
||||
// TODO: If >= 100, select a specific monster
|
||||
} else {
|
||||
// Pick random PC (from *i)
|
||||
// TODO: What if spec.ex1a == 2?
|
||||
@@ -2597,6 +2603,7 @@ void affect_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
|
||||
else hit_party(r1,dam_type);
|
||||
}
|
||||
else damage_pc(pc,r1,dam_type,eRace::UNKNOWN,0);
|
||||
// TODO: Extend to affect monsters too
|
||||
break;
|
||||
}
|
||||
case eSpecType::AFFECT_HP:
|
||||
|
@@ -453,6 +453,7 @@ void start_town_mode(short which_town, short entry_dir)
|
||||
univ.town.items[j].item_level = univ.town->preset_items[i].ability;
|
||||
break;
|
||||
default: //leave other type alone
|
||||
// TODO: Could resupport this "forcing an ability" thing...
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -554,6 +555,7 @@ void start_town_mode(short which_town, short entry_dir)
|
||||
reset_item_max();
|
||||
town_force = 200;
|
||||
// TODO: One problem with this - it paints the terrain after the town entry dialog is dismissed
|
||||
// ... except it actually doesn't, because the town enter special is only queued, not run immediately.
|
||||
draw_terrain(1);
|
||||
}
|
||||
|
||||
|
@@ -81,6 +81,7 @@ bool operator == (location p1,location p2);
|
||||
bool operator != (location p1,location p2);
|
||||
bool operator == (rectangle r1, rectangle r2);
|
||||
bool operator != (rectangle r1, rectangle r2);
|
||||
// TODO: This isn't a union, because it returns a rectangle.
|
||||
rectangle operator|(rectangle one, rectangle two);
|
||||
rectangle rectunion(rectangle one, rectangle two);
|
||||
short dist(location p1,location p2);
|
||||
|
@@ -691,9 +691,11 @@ std::string cParty::start_split(short a,short b,snd_num_t noise,short who) {
|
||||
stuff_done[304][8] = univ.town.num;
|
||||
univ.town.p_loc.x = a;
|
||||
univ.town.p_loc.y = b;
|
||||
// TODO: This looks like it won't work.
|
||||
for (i = 0; i < 6; i++)
|
||||
if (!stuff_done[304][who])
|
||||
adven[i].main_status += eMainStatus::SPLIT;
|
||||
// TODO: Uh, why play sound 10 instead of the one passed in?
|
||||
if (noise > 0)
|
||||
play_sound(10);
|
||||
return "";
|
||||
|
@@ -64,6 +64,7 @@ public:
|
||||
short node_to_call;
|
||||
};
|
||||
// formerly party_record_type
|
||||
// TODO: Should we make age a long long?
|
||||
unsigned long age;
|
||||
unsigned short gold;
|
||||
unsigned short food;
|
||||
|
Reference in New Issue
Block a user