Add a Display Message With Title special node
- Remove Wandering Will Fight, which has been made redundant
This commit is contained in:
@@ -2152,6 +2152,10 @@ void general_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
|
||||
case eSpecType::DISPLAY_MSG:
|
||||
check_mess = true;
|
||||
break;
|
||||
case eSpecType::TITLED_MSG:
|
||||
get_strs(str1,str2, cur_spec_type, cur_node.m3, -1);
|
||||
handle_message(which_mode, cur_spec_type, cur_node.m1, cur_node.m2, a, b, str1, cur_node.pic, ePicType(cur_node.pictype));
|
||||
break;
|
||||
case eSpecType::DISPLAY_SM_MSG:
|
||||
get_strs(str1,str2, cur_spec_type,cur_node.m1,cur_node.m2);
|
||||
if(cur_node.m1 >= 0)
|
||||
@@ -2251,11 +2255,6 @@ void general_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
|
||||
check_mess = true;
|
||||
do_rest(spec.ex1a, spec.ex1b, spec.ex1b);
|
||||
break;
|
||||
case eSpecType::WANDERING_WILL_FIGHT:
|
||||
if(which_mode != eSpecCtx::OUTDOOR_ENC)
|
||||
break;
|
||||
*a = (spec.ex1a == 0) ? 1 : 0;
|
||||
break;
|
||||
case eSpecType::END_SCENARIO:
|
||||
end_scenario = true;
|
||||
break;
|
||||
@@ -4575,7 +4574,11 @@ void setsd(short a,short b,short val) {
|
||||
PSD[a][b] = val;
|
||||
}
|
||||
|
||||
void handle_message(eSpecCtx which_mode,short cur_type,short mess1,short mess2,short *a,short *b) {
|
||||
void handle_message(eSpecCtx which_mode,short cur_type,short mess1,short mess2,short *a,short *b,std::string title,pic_num_t pic,ePicType pt) {
|
||||
if(pic == -1) {
|
||||
pic = univ.scenario.intro_pic;
|
||||
pt = PIC_SCEN;
|
||||
}
|
||||
eEncNoteType note_type;
|
||||
switch(cur_type) {
|
||||
case 0:
|
||||
@@ -4602,7 +4605,7 @@ void handle_message(eSpecCtx which_mode,short cur_type,short mess1,short mess2,s
|
||||
where1 = is_out() ? univ.party.outdoor_corner.x + univ.party.i_w_c.x : univ.town.num;
|
||||
where2 = is_out() ? univ.party.outdoor_corner.y + univ.party.i_w_c.y : univ.town.num;
|
||||
std::string placename = is_out() ? univ.out->out_name : univ.town->town_name;
|
||||
cStrDlog display_strings(str1.c_str(), str2.c_str(),"",univ.scenario.intro_pic,PIC_SCEN,0);
|
||||
cStrDlog display_strings(str1.c_str(), str2.c_str(),title,pic,pt,0);
|
||||
display_strings.setSound(57);
|
||||
display_strings.setRecordHandler(cStringRecorder(note_type).string1(mess1).string2(mess2).from(where1,where2).at(placename));
|
||||
display_strings.show();
|
||||
|
@@ -26,7 +26,7 @@ cSpecial get_node(short cur_spec,short cur_spec_type);
|
||||
void general_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
|
||||
short *next_spec,short *next_spec_type,short *a,short *b,short *redraw);
|
||||
void setsd(short a,short b,short val);
|
||||
void handle_message(eSpecCtx which_mode,short cur_type,short mess1,short mess2,short *a,short *b);
|
||||
void handle_message(eSpecCtx which_mode,short cur_type,short mess1,short mess2,short*a,short*b,std::string title="",pic_num_t pic=-1,ePicType pt=PIC_SCEN);
|
||||
void get_strs(std::string& str1, std::string& str2,short cur_type,short which_str1,short which_str2) ;
|
||||
void ifthen_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
|
||||
short *next_spec,short *next_spec_type,short *a,short *b,short *redraw);
|
||||
|
@@ -594,7 +594,7 @@ enum class eSpecType {
|
||||
COPY_SDF = 23,
|
||||
DISPLAY_PICTURE = 24,
|
||||
REST = 25,
|
||||
WANDERING_WILL_FIGHT = 26,
|
||||
TITLED_MSG = 26,
|
||||
END_SCENARIO = 27, // add "win/lose" option
|
||||
SET_POINTER = 28,
|
||||
SET_CAMP_FLAG = 29,
|
||||
|
@@ -80,7 +80,7 @@ void cSpecial::append(legacy::special_node_type& old){
|
||||
case 23: type = eSpecType::COPY_SDF; break;
|
||||
// 24 was ritual of sanctification
|
||||
case 25: type = eSpecType::REST; break;
|
||||
case 26: type = eSpecType::WANDERING_WILL_FIGHT; break;
|
||||
case 26: type = eSpecType::CANT_ENTER; break; // originally wandering will fight
|
||||
case 27: type = eSpecType::END_SCENARIO; break;
|
||||
// 28-49 were undefined
|
||||
case 50: type = eSpecType::ONCE_GIVE_ITEM; break;
|
||||
@@ -498,9 +498,9 @@ static const char*const button_dict[7][11] = {
|
||||
{ // general nodes
|
||||
" mmmMmmmmmMmmm mmmmmm Mmm $ mmmmmm mmm", // msg1
|
||||
" ", // msg2
|
||||
" ", // msg3
|
||||
" p 3 ", // pic
|
||||
" ? ", // pictype
|
||||
" M ", // msg3
|
||||
" p p 3 ", // pic
|
||||
" ? ? ", // pictype
|
||||
" & x T i _ M cit j ", // ex1a
|
||||
" % S ss cJ ", // ex1b
|
||||
" ", // ex1c
|
||||
|
Reference in New Issue
Block a user