Commited for Ishad Nha:

Changes for this version of the Blades of Exile 2009 Scenario Editor:

Fixed message about deleting towns when you want to create Scenario Text.txt.
I updated the Editor to include an outdoor zone report. 
I added the four scenario flags to the Scenario Object Report, because they reveal whether a scenario is Mac or Windows. Reports may crash if the scenario is Mac.
I introduced the repeat print of last file, it automatically prints a new version of the last report file to be printed. It is activated by Ctrl + P and accompanied by a message in the text area. 
Town report now lists all special nodes and dialog nodes. along with the relevant text messages. Irrelevant lines have been removed. The special nodes listings can be extended to scenario and outdoor reports.
Scenario and town timers have been added to reports.
Tables have been included in scenario, outdoor and town reports showing the lengths of the relevant strings. (For some reason the last 40 outdoor strings caused a crash of the Editor.)
Now all three types of report show the full details for special nodes.
Ctrl + (Number) shortcuts have been introduced for Town and Outdoor menus.
Area Rectangles now show the lower right coordinates too.
All menus now have hot keys for each item.


git-svn-id: http://openexile.googlecode.com/svn/trunk@133 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
Sylae Corell
2009-10-28 19:23:13 +00:00
parent 5ebbe14d6f
commit 54c5886fbf
11 changed files with 1610 additions and 713 deletions

View File

@@ -85,7 +85,7 @@ Boolean editing_town = FALSE;
short town_type = 0; // 0 - big 1 - ave 2 - small
char szWinName[] = "BoE for Win32 dialogs";
char szAppName[] = "Classic BoE Scenario Editor";
short last_file_printed = 0;
char szBladBase[128];
void loadSettingsFromFile()
@@ -602,32 +602,50 @@ Boolean handle_menu (short item, HMENU menu)
delete_last_town();
break;
case 119:
if (fancy_choice_dialog(866,0) == 1)
if (fancy_choice_dialog(866,0) == 1) {
last_file_printed = 0;
start_data_dump();
}
break;
case 120:
if (change_made == TRUE) {
give_error("You need to save the changes made to your scenario before you can delete a town.",
give_error("You need to save the changes made to your scenario before you can print the file Scenario Text.",
"",0);
return to_return;
}
if (fancy_choice_dialog(871,0) == 1)
if (fancy_choice_dialog(871,0) == 1) {
last_file_printed = 1;
scen_text_dump();
redraw_screen();
}
break;
case 121:
if (fancy_choice_dialog(867,0) == 1)
if (fancy_choice_dialog(867,0) == 1) {
last_file_printed = 2;
start_shopping_data_dump();
}
break;
case 122:
if (fancy_choice_dialog(868,0) == 1)
if (fancy_choice_dialog(868,0) == 1) {
last_file_printed = 3;
start_monst_data_dump();
}
break;
case 123:
if (fancy_choice_dialog(890,0) == 1)
start_spec_data_dump();
break;
case 123:
if (fancy_choice_dialog(890,0) == 1) {
last_file_printed = 4;
start_spec_data_dump();
}
break;
case 124:
if (fancy_choice_dialog(878,0) == 1) {
last_file_printed = 7;
object_scenario_data_dump();
}
break;
// Town Menu
case 201: edit_town_details(); break;
case 202: edit_town_wand(); break;
@@ -708,9 +726,16 @@ Boolean handle_menu (short item, HMENU menu)
}
break;
case 221: if (fancy_choice_dialog(877,0) == 1) // make concise town report
start_town_data_dump();
case 221: if (fancy_choice_dialog(877,0) == 1) { // make concise town report
last_file_printed = 5;
start_town_data_dump();
}
break;
case 222:
start_dialogue_editing(0);
break;
// Outdoor Menu
case 301: outdoor_details(); break;
@@ -741,6 +766,13 @@ Boolean handle_menu (short item, HMENU menu)
start_string_editing(1,0); break;
break;
case 313:
if (fancy_choice_dialog(879,0) == 1) {
last_file_printed = 6;
start_outdoor_data_dump();
}
break;
case 401:
start_town_edit();
break;
@@ -857,7 +889,7 @@ Boolean handle_menu (short item, HMENU menu)
}
break;
case 411:
case 411: // MENUITEM "Terrain Animations Play", 411
HMENU menu,big_menu;
big_menu = GetMenu(mainPtr);
@@ -909,11 +941,40 @@ Boolean handle_menu (short item, HMENU menu)
start_out_edit();
break;
case 414:
if (fancy_choice_dialog(878,0) == 1)
object_scenario_data_dump();
break;
case 414: // Repeat print of last file printed
if (last_file_printed == 0) {
set_string("File Repeat Printing:","Scenario Data");
start_data_dump();
}
if (last_file_printed == 1) {
set_string("File Repeat Printing:","Scenario Text");
scen_text_dump();
}
if (last_file_printed == 2) {
set_string("File Repeat Printing:","Scenario Shopping");
start_shopping_data_dump();
}
if (last_file_printed == 3) {
set_string("File Repeat Printing:","Monstdata");
start_monst_data_dump();
}
if (last_file_printed == 4) {
set_string("File Repeat Printing:","Specdata");
start_spec_data_dump();
}
if (last_file_printed == 5) {
set_string("File Repeat Printing:","Concise Town Report");
start_town_data_dump();
}
if (last_file_printed == 6) {
set_string("File Repeat Printing:","Concise Outdoor Report");
start_outdoor_data_dump();
}
if (last_file_printed == 7) {
set_string("File Repeat Printing:","Scenario Object Data");
object_scenario_data_dump();
}
break;
// Extra Help
case 801: // help file

View File

@@ -25,98 +25,101 @@ Exile MENU
{
MENUITEM "&Open Scenario\tCtrl+O", 1
MENUITEM "&Save Scenario\tCtrl+S", 2
MENUITEM "New Scenario\tCtrl+N", 3
MENUITEM "&New Scenario\tCtrl+N", 3
MENUITEM SEPARATOR
MENUITEM "&Quit\tCtrl+Q", 5
}
POPUP "&Scenario"
{
MENUITEM "Create New Town", 101
MENUITEM "&Create New Town", 101
MENUITEM SEPARATOR
MENUITEM "Scenario Details", 103
MENUITEM "Scenario Intro Text", 104
MENUITEM "Set Starting Location: Town", 105
MENUITEM "Set Starting Location: Outdoors", 106
MENUITEM "&Scenario Details", 103
MENUITEM "Scenario Intr&o Text", 104
MENUITEM "Set Starting &Location: Town", 105
MENUITEM "Set Starting &Location: Outdoors", 106
MENUITEM SEPARATOR
MENUITEM "Advanced:", 107
MENUITEM " Edit Special Nodes", 109
MENUITEM " Edit Scenario Text", 110
MENUITEM " Import Town", 111
MENUITEM " Edit Saved Item Rectangles", 112
MENUITEM " Edit Horses", 113
MENUITEM " Edit Boats", 114
MENUITEM " Set Variable Town Entry", 115
MENUITEM " Set Scenario Event Timers", 116
MENUITEM " Edit Item Placement Shortcuts", 117
MENUITEM " Delete Last Town", 118
MENUITEM " Edit Special &Nodes", 109
MENUITEM " Edit Scenario &Text", 110
MENUITEM " &Import Town", 111
MENUITEM " Edit Saved Item &Rectangles", 112
MENUITEM " Edit &Horses", 113
MENUITEM " Edit &Boats", 114
MENUITEM " Set &Variable Town Entry", 115
MENUITEM " Set Scenario &Event Timers", 116
MENUITEM " Edit Item &Placement Shortcuts", 117
MENUITEM " &Delete Last Town", 118
MENUITEM SEPARATOR
MENUITEM " Write Data To Text File", 119
MENUITEM " Do Full Text Dump", 120
MENUITEM " Scenario Shopping Text Dump", 121
MENUITEM " Scenario Monster Dump", 122
MENUITEM " Scenario Specials Dump", 123
MENUITEM " Write D&ata To Text File", 119
MENUITEM " Do &Full Text Dump", 120
MENUITEM " Scenario Shoppin&g Text Dump", 121
MENUITEM " Scenario &Monster Dump", 122
MENUITEM " Scenario Specials D&ump", 123
MENUITEM " Scenario Ob&ject Data Dump", 124
}
POPUP "&Town"
{
MENUITEM "Town Details\tCtrl+D", 201
MENUITEM "Town Wandering Monsters", 202
MENUITEM "Set Town Boundaries", 203
MENUITEM "Frill Up Terrain", 204
MENUITEM "Remove Terrain Frills", 205
MENUITEM "Edit Area Descriptions", 206
MENUITEM "Town &Details\tCtrl+D", 201
MENUITEM "Town &Wandering Monsters", 202
MENUITEM "Set Town &Boundaries", 203
MENUITEM "&Frill Up Terrain", 204
MENUITEM "Remo&ve Terrain Frills", 205
MENUITEM "Edit &Area Descriptions", 206
MENUITEM SEPARATOR
MENUITEM "Add Random Items", 208
MENUITEM "Set All Items Not Property", 209
MENUITEM "Clear All Items", 210
MENUITEM "Add Rand&om Items", 208
MENUITEM "Set All Items Not Propert&y", 209
MENUITEM "Clear All &Items", 210
MENUITEM SEPARATOR
MENUITEM "Clear All Monsters", 217
MENUITEM "Clear All Placed Specials", 218
MENUITEM "Clear All Preset Fields", 219
MENUITEM "Clear All Stains", 220
MENUITEM "Clear All &Monsters", 217
MENUITEM "&Clear All Placed Specials", 218
MENUITEM "Clear All &Preset Fields", 219
MENUITEM "Clear All &Stains", 220
MENUITEM SEPARATOR
MENUITEM "Advanced:", 212
MENUITEM " Edit Special Nodes", 213
MENUITEM " Edit Town Text\tCtrl+B", 214
MENUITEM " Advanced Town Details", 215
MENUITEM " Set Town Event Timers", 216
MENUITEM " Concise Town Report",221
MENUITEM " Edit Special &Nodes\tCtrl+1", 213
MENUITEM " Edit Town &Text\tCtrl+2", 214
MENUITEM " Edit Town Dialo&g\tCtrl+3", 222
MENUITEM " Advanced Town Detai&ls\tCtrl+4", 215
MENUITEM " Set Town &Event Timers\tCtrl+5", 216
MENUITEM " Concise Town &Report\tCtrl+6",221
}
POPUP "&Outdoors"
{
MENUITEM "Outdoor Details\tCtrl+D", 301
MENUITEM "Outdoor Wandering Monsters", 302
MENUITEM "Outdoor Special Encounters", 303
MENUITEM "Frill Up Terrain", 304
MENUITEM "Remove Terrain Frills", 305
MENUITEM "Edit Area Descriptions", 306
MENUITEM "Clear All Placed Specials", 307
MENUITEM "Outdoor &Details\tCtrl+D", 301
MENUITEM "Outdoor &Wandering Monsters", 302
MENUITEM "&Outdoor Special Encounters", 303
MENUITEM "&Frill Up Terrain", 304
MENUITEM "Remo&ve Terrain Frills", 305
MENUITEM "Edit &Area Descriptions", 306
MENUITEM "&Clear All Placed Specials", 307
MENUITEM SEPARATOR
MENUITEM "Advanced:", 310
MENUITEM " Edit Special Nodes\tCtrl+U", 311
MENUITEM " Edit Outdoor Text", 312
MENUITEM " Edit Special &Nodes\tCtrl+7", 311
MENUITEM " Edit Outdoor &Text\tCtrl+8", 312
MENUITEM " Concise Outdoor &Report\tCtrl+9",313
}
POPUP "&Additional Features"
{
MENUITEM "Terrain Animations Play", 411
MENUITEM "Terrain &Animations Play", 411
MENUITEM SEPARATOR
MENUITEM "Edit Town\tCtrl+T", 401
MENUITEM "Edit Outdoor\tCtrl+R", 402
MENUITEM "Load Another Outdoor Zone/Town\tCtrl+L", 403
MENUITEM "Edit &Town\tCtrl+T", 401
MENUITEM "Edit Outdoo&r\tCtrl+R", 402
MENUITEM "&Load Another Outdoor Zone/Town\tCtrl+L", 403
MENUITEM SEPARATOR
MENUITEM "Edit Terrain Types\tCtrl+E", 404
MENUITEM "Edit Monsters\tCtrl+F", 405
MENUITEM "Edit Items\tCtrl+G", 406
MENUITEM "&Edit Terrain Types\tCtrl+E", 404
MENUITEM "Edit &Monsters\tCtrl+F", 405
MENUITEM "Edit &Items\tCtrl+G", 406
MENUITEM SEPARATOR
MENUITEM "Return to Main Screen\tCtrl+M", 407
MENUITEM "Switch Viewing Mode\tCtrl+I", 408
MENUITEM "Load Previous Outdoor Zone/Town\tCtrl+J", 409
MENUITEM "Load Next Outdoor Zone/Town\tCtrl+K", 410
MENUITEM "Return to Main &Screen\tCtrl+M", 407
MENUITEM "Switch &Viewing Mode\tCtrl+I", 408
MENUITEM "Load &Previous Outdoor Zone/Town\tCtrl+J", 409
MENUITEM "Load &Next Outdoor Zone/Town\tCtrl+K", 410
MENUITEM SEPARATOR
MENUITEM "Scenario Object Data Dump", 414
MENUITEM "Repeat Printing of Last &File\tCtrl+P", 414
}
POPUP "&I1"
@@ -191,13 +194,13 @@ POPUP "&I1"
*/
POPUP "&Help"
{
MENUITEM "Index\tF1", 801
MENUITEM "&Index\tF1", 801
MENUITEM SEPARATOR
MENUITEM "Getting Started", 802
MENUITEM "Testing Your Scenario", 803
MENUITEM "Distributing Your Scenario", 804
MENUITEM "&Getting Started", 802
MENUITEM "&Testing Your Scenario", 803
MENUITEM "&Distributing Your Scenario", 804
MENUITEM SEPARATOR
MENUITEM "About Blades Scenario Editor", 805
MENUITEM "&About Blades Scenario Editor", 805
}
@@ -222,6 +225,16 @@ ACCELERATORS_1 ACCELERATORS
"^I", 408, ASCII
"^J", 409, ASCII
"^K", 410, ASCII
"^P", 414, ASCII
"^1", 213, ASCII
"^2", 214, ASCII
"^3", 222, ASCII
"^4", 215, ASCII
"^5", 216, ASCII
"^6", 221, ASCII
"^7", 311, ASCII
"^8", 312, ASCII
"^9", 313, ASCII
VK_TAB, 408, VIRTKEY, CONTROL, NOINVERT
VK_LEFT, 409, VIRTKEY, CONTROL, NOINVERT
VK_RIGHT, 410, VIRTKEY, CONTROL, NOINVERT
@@ -229,7 +242,7 @@ ACCELERATORS_1 ACCELERATORS
VK_DOWN, 413, VIRTKEY, CONTROL, NOINVERT
// Defined elsewhere: D,L
// Keys currently available: H,P,W,Y,Z
// Keys currently available: H,W,Y,Z
// Don't use keys A, X, C and V as they are Windows shortcuts (select all, cut, copy and paste)
}

View File

@@ -123,11 +123,12 @@ short button_left_adj[140] = {0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
};
char button_def_key[140] = {0,0,20,21,'k', 24,0,0,0,0,
'g','1','2','3','4', '5','6',0,0,0,
0,0,0,0,0,' ',0,22,23,0,
0,0,0,0,0,'1','2','3','4','5',
'6','7','8','9','a', 'b','c','d','e','f',
'6','7','8','9','a', 'b','c','d','e','f',
'g',0,0,0,0,0,0,0,0,0,
0,0,0,0,'y','n',0,'?','r',0,
0,0,0,0,0,0,0,0,0, 0,

File diff suppressed because it is too large Load Diff

View File

@@ -83,29 +83,29 @@ char edit_spec_stuff_done_mess[256] = {
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0};
char edit_spec_mess_mess[256] = {
0,1,1,1,0,1,1,0,0,0,
0,1,1,0,0,0,0,1,1,1,
1,0,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
1,1,0,0,1,4,4,4,5,5, // 50
5,1,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,0,0,0, // 100
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0, // 150
0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,0,0,0,0,2,2,
2,1,1,1,1,1,1,0,0,0,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,4,4,4,5,5, // 50
5,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1, // 100
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1, // 150
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,2,2,
2,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1, // 200
1,1,1,1,1,1,1,1,1,0,
0,0,0,0,0,0,1,1,1,3,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,3,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0};

View File

@@ -2407,13 +2407,17 @@ void put_scen_details_in_dlog()
cd_set_led_range(803,30,33,scenario.difficulty);
cd_set_led_range(803,21,24,scenario.rating);
cd_set_led(803,35,scenario.adjust_diff);
cd_set_led(803,35,scenario.adjust_diff);
CDSN(803,2,scenario.ver[0]);
CDSN(803,3,scenario.ver[1]);
CDSN(803,4,scenario.ver[2]);
CDST(803,5,scen_strs[1]);
CDST(803,6,scen_strs[2]);
CDST(803,7,scen_strs[3]);
CDSN(803,36,scenario.min_run_ver);
CDSN(803,37,scenario.prog_make_ver[0]);
CDSN(803,38,scenario.prog_make_ver[1]);
CDSN(803,39,scenario.prog_make_ver[2]);
}
void edit_scen_details_event_filter (short item_hit)

View File

@@ -465,7 +465,7 @@ STRINGTABLE
9019, "Number of Special Event (1 .. 10)"
9020, "Item To Give"
9021, "Item Class to Take Away"
9022, "Usused"
9022, "Unused"
9023, "Value to change the 10 flags to"
9024, "Flag to change to Part A"
9025, "Unused"
@@ -489,8 +489,8 @@ STRINGTABLE
9064, "Type of trap (see docs. for list)"
9081, "0 - only living, 1 - any PC"
9082, "Number of dice"
9083, "Amount"
9084, "Amount"
9083, "Amount to affect by"
9084, "Amount to affect by"
9085, "Amount (0 .. 100)"
9086, "Amount (0 .. 10)"
9087, "0 - dead, 1 - dust, 2- stoned"
@@ -514,32 +514,32 @@ STRINGTABLE
9105, "Amount (0 .. 250)"
9106, "Amount (0 .. 250)"
9107, "Amount (0 .. 250)"
9131, "If at least this value ..."
9132, "If in this town ..."
9133, "If random # (1 - 100) less than ..."
9134, "If has spec. item ..."
9131, "If at least this value "
9132, "If in this town "
9133, "If random # (1 - 100) less than "
9134, "If has spec. item "
9135, "Stuff Done flag 2 Part A"
9136, "X coordinate of space"
9137, "X coordinate of space"
9138, "If party has this much gold ..."
9139, "If party has this much food ..."
9138, "If party has this much gold "
9139, "If party has this much food "
9140, "X coordinate of space"
9141, "If has item of this special class ..."
9141, "If has item of this special class "
9142, "If has equipped item of this special"
9143, "If party has this much gold ..."
9144, "If party has this much food ..."
9143, "If party has this much gold "
9144, "If party has this much food "
9145, "X coordinate of space"
9146, "If has item of this special class ..."
9147, "If has equipped item of this class ..."
9148, "If this day has been reached ..."
9146, "If has item of this special class "
9147, "If has equipped item of this class "
9148, "If this day has been reached "
9149, "Unused"
9150, "Unused"
9151, "If this day has been reached ..."
9151, "If this day has been reached "
9152, "Unused"
9153, "Unused"
9154, "If the party has this much of skill"
9155, "Number of a SCENARIO special message"
9156, "If flag has this value ..."
9156, "If flag has this value "
9157, "Which Species? (0 - H.,1 - N., 2 - S.)"
9171, "0 - Hostile, 1 - Friendly"//, 2 - Dead"
9172, "X coordinate of space"
@@ -663,33 +663,33 @@ STRINGTABLE
9405, "Unused"
9406, "Unused"
9407, "Unused"
9431, "Call this special ..."
9432, "Call this special ..."
9433, "Call this special ..."
9434, "Call this special ..."
9431, "Call this special "
9432, "Call this special "
9433, "Call this special "
9434, "Call this special "
9435, "Stuff Done flag 2 Part B"
9436, "Y coordinate of space"
9437, "Y coordinate of space"
9438, "Call this special ..."
9439, "Call this special ..."
9438, "Call this special "
9439, "Call this special "
9440, "Y coordinate of space"
9441, "Call this special ..."
9442, "Call this special ..."
9443, "Call this special ..."
9444, "Call this special ..."
9441, "Call this special "
9442, "Call this special "
9443, "Call this special "
9444, "Call this special "
9445, "Y coordinate of space"
9446, "Call this special ..."
9447, "Call this special ..."
9448, "Call this special ..."
9449, "If any barrels, call this special ..."
9450, "If any crates, call this special ..."
9446, "Call this special "
9447, "Call this special "
9448, "Call this special "
9449, "If any barrels, call this special "
9450, "If any crates, call this special "
9451, "And this event didn't happen before it"
9452, "If any Cave Lore, call this special ..."
9453, "If any Woodsman, call this special ..."
9454, "Call this special ..."
9452, "If any Cave Lore, call this special "
9453, "If any Woodsman, call this special "
9454, "Call this special "
9455, "If answer matches, call this special"
9456, "Call this special ..."
9457, "Call this special ..."
9456, "Call this special "
9457, "Call this special "
9471, "Unused"
9472, "Y coordinate of space"
9473, "Y coordinate of space"
@@ -704,11 +704,11 @@ STRINGTABLE
9482, "Y coordinate of space to place"
9483, "Unused"
9484, "Unused"
9485, "If Pulled, call this special ..."
9485, "If Pulled, call this special "
9486, "Y coordinate to telep. to"
9487, "If Pushed, call this special ..."
9487, "If Pushed, call this special "
9488, "Y coordinate to go to"
9489, "If Pulled, call this special ..."
9489, "If Pulled, call this special "
9490, "Y coordinate to telep. to"
9491, "Y coordinate to place at"
9492, "Y coordinate of outdoor section"
@@ -812,21 +812,21 @@ STRINGTABLE
9705, "Unused"
9706, "Unused"
9707, "Unused"
9731, "If less than this ..."
9731, "If less than this "
9732, "Unused"
9733, "Unused"
9734, "Unused"
9735, "Unused"
9736, "If space is this terrain type ..."
9737, "If space is this terrain type ..."
9736, "If space is this terrain type "
9737, "If space is this terrain type "
9738, "Unused"
9739, "Unused"
9740, "If item of this class on space ..."
9740, "If item of this class on space "
9741, "Unused"
9742, "Unused"
9743, "Unused"
9744, "Unused"
9745, "If item of this class on space ..."
9745, "If item of this class on space "
9746, "Unused"
9747, "Unused"
9748, "Unused"
@@ -841,7 +841,7 @@ STRINGTABLE
9757, "Has this much of species"
9771, "Unused"
9772, "Terrain to change to"
9773, "Swap this terrain ..."
9773, "Swap this terrain "
9774, "Unused"
9775, "0 - Just move, 1 - Teleport"
9776, "Damage to inflict (0 .. 1000)"
@@ -962,36 +962,36 @@ STRINGTABLE
10005, "Unused"
10006, "Unused"
10007, "Unused"
10031, "Call this special ..."
10031, "Call this special "
10032, "Unused"
10033, "Unused"
10034, "Unused"
10035, "Call this special is 2nd flag lower ..."
10036, "Call this special ..."
10037, "Call this special ..."
10035, "Call this special is 2nd flag lower "
10036, "Call this special "
10037, "Call this special "
10038, "Unused"
10039, "Unused"
10040, "Call this special ..."
10040, "Call this special "
10041, "Unused"
10042, "Unused"
10043, "Unused"
10044, "Unused"
10045, "Call this special ..."
10045, "Call this special "
10046, "Unused"
10047, "Unused"
10048, "Unused"
10049, "Unused"
10050, "Unused"
10051, "Call this special ..."
10051, "Call this special "
10052, "Unused"
10053, "Unused"
10054, "Checking method (see docs)"
10055, "If answer matches, call this special"
10056, "Unused"
10057, "Checking method (-1 <, 0 =, 1 >)"
10057, "Checking method (-1 <, 0 =, 1 >)"
10071, "Unused"
10072, "Unused"
10073, "With this terrain ..."
10073, "With this terrain "
10074, "Unused"
10075, "Unused"
10076, "Unused"
@@ -1509,8 +1509,8 @@ STRINGTABLE
12003, "Unused"
12004, "Unused"
12005, "Unused"
12006, "First part of response ..."
12007, "Second part of response ..."
12006, "First part of response "
12007, "Second part of response "
12008, "Response depends on flag"
12009, "Stuff Done flag Pt. A"
12010, "Stuff Done flag Pt. B"
@@ -1523,36 +1523,36 @@ STRINGTABLE
12017, "Stuff Done flag Pt. B"
12018, "Unused"
12019, "Unused"
12020, "First part of response ..."
12021, "Second part of response ..."
12020, "First part of response "
12021, "Second part of response "
12022, "Inn"
12023, "Cost of Inn"
12024, "Quality of Inn (0 .. 3)"
12025, "Move party to X"
12026, "Move party to Y"
12027, "Response if can afford it ..."
12028, "Response if not enough money ..."
12027, "Response if can afford it "
12028, "Response if not enough money "
12029, "Depends on Day"
12030, "Day when response changes"
12031, "Unused"
12032, "Unused"
12033, "Unused"
12034, "Response if day not reached ..."
12035, "Response if day reached ..."
12034, "Response if day not reached "
12035, "Response if day reached "
12036, "Depends on time and event"
12037, "If this day has been reached ..."
12037, "If this day has been reached "
12038, "this event did not happen before it"
12039, "(Script overflow!)"
12040, "Unused"
12041, "Respond with this ..."
12042, "Otherwise respond with this ..."
12041, "Respond with this "
12042, "Otherwise respond with this "
12043, "Depends on town"
12044, "Town to check"
12045, "Unused"
12046, "Unused"
12047, "Unused"
12048, "Response if in this town ..."
12049, "Otherwise respond ..."
12048, "Response if in this town "
12049, "Otherwise respond "
12050, "Buy Items"
12051, "Cost adjustment (0 .. 6)"
12052, "Number of first item in shop"

View File

@@ -423,7 +423,7 @@ Boolean handle_action(POINT the_point, WPARAM wparam, LPARAM lparam )
else {
if (editing_town == TRUE) {
for (x = 0; x < 16; x++)
if (t_d.room_rect[x].right == -1) {
if ((t_d.room_rect[x].left < 1) && (t_d.room_rect[x].top < 1) && (t_d.room_rect[x].right < 1) && (t_d.room_rect[x].bottom < 1)) {
t_d.room_rect[x] = working_rect;
sprintf(town_strs[x + 1],"");
if (edit_area_rect_str(x,1) == FALSE)
@@ -433,7 +433,7 @@ Boolean handle_action(POINT the_point, WPARAM wparam, LPARAM lparam )
}
if (editing_town == FALSE) {
for (x = 0; x < 8; x++)
if (current_terrain.info_rect[x].right == -1) {
if ((current_terrain.info_rect[x].left < 1) && (current_terrain.info_rect[x].top < 1) && (current_terrain.info_rect[x].right < 1) && (current_terrain.info_rect[x].bottom < 1)) {
current_terrain.info_rect[x] = working_rect;
sprintf(data_store->out_strs[x + 1],"");
if (edit_area_rect_str(x,0) == FALSE)
@@ -3345,13 +3345,13 @@ void shut_down_menus(short mode)
if (mode == 0) {
// Item 2 is Save Scenario
EnableMenuItem(menu,2,MF_GRAYED | MF_BYCOMMAND);
for (i = 101; i < 124; i++)
for (i = 101; i < 125; i++)
EnableMenuItem(menu,i,MF_GRAYED | MF_BYCOMMAND);
for (i = 201; i < 222; i++)
for (i = 201; i < 223; i++)
EnableMenuItem(menu,i,MF_GRAYED | MF_BYCOMMAND);
for (i = 301; i < 314; i++)
EnableMenuItem(menu,i,MF_GRAYED | MF_BYCOMMAND);
for (i = 401; i < 415; i++)
for (i = 401; i < 416; i++)
EnableMenuItem(menu,i,MF_GRAYED | MF_BYCOMMAND);
//for (i = 600; i < 1000; i++) {
// EnableMenuItem(menu,i,MF_GRAYED | MF_BYCOMMAND);
@@ -3364,7 +3364,7 @@ void shut_down_menus(short mode)
if ((mode == 1) || (mode == 3)) {
for (i = 201; i < 212; i++)
EnableMenuItem(menu,i,MF_GRAYED | MF_BYCOMMAND);
for (i = 217; i < 221; i++)
for (i = 217; i < 223; i++)
EnableMenuItem(menu,i,MF_GRAYED | MF_BYCOMMAND);
//for (i = 600; i < 1000; i++) {
// EnableMenuItem(menu,i,MF_GRAYED | MF_BYCOMMAND);
@@ -3382,13 +3382,13 @@ void shut_down_menus(short mode)
if (mode == 4) {
for (i = 1; i < 6; i++)
EnableMenuItem(menu,i,MF_ENABLED | MF_BYCOMMAND);
for (i = 101; i < 124; i++)
for (i = 101; i < 125; i++)
EnableMenuItem(menu,i,MF_ENABLED | MF_BYCOMMAND);
for (i = 201; i < 222; i++)
for (i = 201; i < 223; i++)
EnableMenuItem(menu,i,MF_ENABLED | MF_BYCOMMAND);
for (i = 301; i < 314; i++)
EnableMenuItem(menu,i,MF_ENABLED | MF_BYCOMMAND);
for (i = 401; i < 415; i++)
for (i = 401; i < 416; i++)
EnableMenuItem(menu,i,MF_ENABLED | MF_BYCOMMAND);
//for (i = 600; i < 1000; i++) {
// EnableMenuItem(menu,i,MF_ENABLED | MF_BYCOMMAND);
@@ -3647,31 +3647,24 @@ void start_special_editing(short mode,short just_redo_text)
set_lb(NLS - 3,1,"Control-click to clear",1);
}
// if restoring is 1, this is just a redraw, so don't move scroll bar position
void start_dialogue_editing(short restoring)
{
short i,j;
char str[256];
char s[15] = " , ";
Boolean draw_full = FALSE;
if (overall_mode < 60)
set_up_main_screen();
if (overall_mode == 62)
draw_full = TRUE;
overall_mode = 60;
ShowScrollBar(right_sbar,SB_CTL,TRUE);
if (restoring == 0) {
lpsi.fMask = SIF_POS;
lpsi.nPos = 0;
SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE);
// SetScrollPos(right_sbar,SB_CTL,0,TRUE);
SetScrollPos(right_sbar,SB_CTL,0,TRUE);
reset_rb();
lpsi.fMask = SIF_RANGE;
lpsi.nMax = 70 - NRSONPAGE;
SetScrollInfo(right_sbar,SB_CTL,&lpsi,TRUE);
// SetScrollRange(right_sbar,SB_CTL,0,70 - NRSONPAGE,TRUE);
SetScrollRange(right_sbar,SB_CTL,0,70 - NRSONPAGE,TRUE);
}
for (i = 0; i < 10; i++) {
sprintf((char *) str,"Personality %d - %s",i + cur_town * 10,
@@ -3690,10 +3683,11 @@ void start_dialogue_editing(short restoring)
if (draw_full == TRUE)
redraw_screen();
else for (i = 0; i < NRSONPAGE; i++)
draw_rb_slot(i,0);
draw_rb_slot(i,0);
set_lb(NLS - 3,0,"",1);
}
Boolean save_check(short which_dlog)
{
short choice;

View File

@@ -51,7 +51,10 @@ Boolean cur_scen_is_win = TRUE;
talking_record_type *dummy_talk_ptr;
town_record_type *dummy_town_ptr;
extern char file_path_name[256];
extern char edit_jumpto_mess[256];
extern char edit_spec_stuff_done_mess[256];
extern char edit_spec_mess_mess[256];
extern char edit_pict_mess[256];
// Big waste!
char last_load_file[63] = "newscen.exs";
char szFileName [128] = "newscen.exs";
@@ -1211,15 +1214,279 @@ void oops_error(short error)
PostQuitMessage(0);
}
void start_outdoor_data_dump()
{
short i;
HANDLE data_dump_file_id;
DWORD dwByteRead;
char get_text[280], spec_name[256], str[256];
location out_sec = cur_out;
sprintf(get_text,"%s - BoE Concise Outdoor Report.txt",scen_strs[0]);
data_dump_file_id = CreateFile(get_text, GENERIC_WRITE, FILE_SHARE_READ, NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (data_dump_file_id == INVALID_HANDLE_VALUE)
{
oops_error(28);
beep();
return;
}
sprintf(get_text,"\r Concise Data Printout for Outdoor Zone X = %d, Y = %d: %s \r Scenario: %s\r\r",(short) out_sec.x,(short) out_sec.y,data_store->out_strs[0],scen_strs[0]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
sprintf(get_text," For rectangles: \"tl\" = the top and left corner of the rectangle while \"br\" = the bottom and right corner.\r\r Maximum number of any given type of outdoor zone object is shown by \"[ # ]\".\r Null objects are frequently not listed.");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
sprintf(get_text,"\r\r Outdoor Zone Placed Specials: [18]\r");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
for (i = 0; i < 18; i++) {
if ((current_terrain.specials[i].type > 0) || (current_terrain.specials[i].jumpto >= 0)) {
get_str(spec_name,22,current_terrain.specials[current_terrain.special_id[i]].type + 1);
sprintf(get_text," Placed special %d: x = %d, y = %d, state = %d, name = %s\r",i,current_terrain.special_locs[i].x,current_terrain.special_locs[i].y,current_terrain.special_id[i],spec_name);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
}
sprintf(get_text,"\r\r Town Entrances: [8]\r");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
for (i = 0; i < 8; i++) {
sprintf(get_text," Town Entrance %d: x = %d, y = %d, Town entered: %d\r",i,current_terrain.exit_locs[i].x,current_terrain.exit_locs[i].y,current_terrain.exit_dests[i]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
sprintf(get_text,"\r\r Outdoor Zones Signs: [8]\r");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
for (i = 0; i < 8; i++) {
sprintf(get_text," Outdoor Sign %d: x = %d, y = %d, text: \"%s\"\r",i,current_terrain.sign_locs[i].x,current_terrain.sign_locs[i].y,data_store->out_strs[100 + i]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
sprintf(get_text,"\r\r Outdoor Zone Special Nodes: [60]\r");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
for (i = 0; i < 60; i++) {
if ((current_terrain.specials[i].type > 0) || (current_terrain.specials[i].jumpto >= 0)) {
get_str(spec_name,22,current_terrain.specials[i].type + 1);
sprintf(get_text," Node %d: \tType = %d - %s\r",i,current_terrain.specials[i].type,spec_name);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
}
for (i = 0; i < 60; i++) {
if ((current_terrain.specials[i].type > 0) || (current_terrain.specials[i].jumpto >= 0)) {
get_str(spec_name,22,current_terrain.specials[i].type + 1);
sprintf(get_text,"\r Node %d: Type = %d - %s\r",i,current_terrain.specials[i].type,spec_name);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
switch (edit_spec_stuff_done_mess[current_terrain.specials[i].type]) {
case 0:
break;
case 1:
sprintf(get_text," SDF A: \tStuff Done Flag Part A = %d\r SDF B: \tStuff Done Flag Part B = %d\r",current_terrain.specials[i].sd1,current_terrain.specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 2:
sprintf(get_text," SDF A: \t0 - partial cleaning, 1 - cleans all = %d\r",current_terrain.specials[i].sd1);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 3:
sprintf(get_text," SDF A: \tStuff Done Flag Part A = %d\r",current_terrain.specials[i].sd1);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 4:
sprintf(get_text," SDF A: \tX of space to move to = %d\r SDF B: \tY of space to move to = %d\r",current_terrain.specials[i].sd1,current_terrain.specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 5:
sprintf(get_text," SDF A: \tTerrain to change to = %d\r SDF B: \tChance of changing (0 - 100) = %d\r",current_terrain.specials[i].sd1,current_terrain.specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 6:
sprintf(get_text," SDF A: \tSwitch this terrain type = %d\r SDF B: \twith this terrain type = %d\r",current_terrain.specials[i].sd1,current_terrain.specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 7:
sprintf(get_text," SDF A: \tChance of placing (0 - 100) = %d\r SDF B: \tWhat to place (see Help file.) = %d\r",current_terrain.specials[i].sd1,current_terrain.specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 8:
sprintf(get_text," SDF A: \tChance of placing (0 - 100) = %d\r SDF B: \t0 - web, 1 - barrel, 2 - crate = %d\r",current_terrain.specials[i].sd1,current_terrain.specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
}
switch (edit_spec_mess_mess[current_terrain.specials[i].type]) {
case 0:
break;
case 1:
sprintf(get_text," Message 1: \tFirst part of message = %d\r Message 2: \tSecond part of message = %d\r",current_terrain.specials[i].m1,current_terrain.specials[i].m2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 2:
sprintf(get_text," Message 1: \tNumber of first message in dialog = %d\r",current_terrain.specials[i].m1);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 3:
sprintf(get_text," Message 1: \tName of Store = %d\r",current_terrain.specials[i].m1);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 4:
sprintf(get_text," Message 1: \tNumber of first message in dialog = %d\r Message 2: \t1 - add 'Leave'/'OK' button, else no = %d\r",current_terrain.specials[i].m1,current_terrain.specials[i].m2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 5:
sprintf(get_text," Message 1: \tNumber of first message in dialog = %d\r Message 2: \tNum. of spec. item to give (-1 none) = %d\r",current_terrain.specials[i].m1,current_terrain.specials[i].m2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
}
switch (edit_spec_mess_mess[current_terrain.specials[i].type]) {
case 0:
break;
case 1: case 3:
if (current_terrain.specials[i].m1 >= 0) {
sprintf(get_text," String %d: \t\"%s\"\r",current_terrain.specials[i].m1 + 10,data_store->out_strs[ 10 + current_terrain.specials[i].m1]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if (current_terrain.specials[i].m2 >= 0) {
sprintf(get_text," String %d: \t\"%s\"\r",current_terrain.specials[i].m2 + 10,data_store->out_strs[ 10 + current_terrain.specials[i].m2]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
break;
case 2: case 4: case 5:
if ((current_terrain.specials[i].m1 >= 0) && (strlen (data_store->out_strs[ 10 + current_terrain.specials[i].m1]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\r",current_terrain.specials[i].m1 + 10,data_store->out_strs[current_terrain.specials[i].m1 + 10]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if ((current_terrain.specials[i].m1 >= 0) && (strlen (data_store->out_strs[ 11 + current_terrain.specials[i].m1]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\r",current_terrain.specials[i].m1 + 11,data_store->out_strs[current_terrain.specials[i].m1 + 11]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if ((current_terrain.specials[i].m1 >= 0) && (strlen (data_store->out_strs[ 12 + current_terrain.specials[i].m1]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\r",current_terrain.specials[i].m1 + 12,data_store->out_strs[current_terrain.specials[i].m1 + 12]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if ((current_terrain.specials[i].m1 >= 0) && (strlen (data_store->out_strs[ 13 + current_terrain.specials[i].m1]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\r",current_terrain.specials[i].m1 + 13,data_store->out_strs[current_terrain.specials[i].m1 + 13]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if ((current_terrain.specials[i].m1 >= 0) && (strlen (data_store->out_strs[ 14 + current_terrain.specials[i].m1]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\r",current_terrain.specials[i].m1 + 14,data_store->out_strs[current_terrain.specials[i].m1 + 14]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if ((current_terrain.specials[i].m1 >= 0) && (strlen (data_store->out_strs[ 15 + current_terrain.specials[i].m1]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\r",current_terrain.specials[i].m1 + 15,data_store->out_strs[current_terrain.specials[i].m1 + 15]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
break;
}
switch (edit_pict_mess[current_terrain.specials[i].type]) {
case 0:
break;
case 1:
sprintf(get_text," Picture: \tDialog Picture number = %d\r",current_terrain.specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 2:
sprintf(get_text," Picture: \tTerrain Picture number = %d\r",current_terrain.specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 3:
sprintf(get_text," Picture: \tMonster Picture number = %d\r",current_terrain.specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 4:
sprintf(get_text," Picture: \tChance of changing (0 - 100) = %d\r",current_terrain.specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 5:
sprintf(get_text," Picture: \tNumber of letters to match = %d\r",current_terrain.specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 6:
sprintf(get_text," Picture: \tRadius of explosion = %d\r",current_terrain.specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 7:
sprintf(get_text," Picture: \tSee help description = %d\r",current_terrain.specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
}
get_str(str,30,current_terrain.specials[i].type + 1);
if (strlen(str) != 6 ) {
sprintf(get_text," Extra 1a: \t%s = %d\r",str,current_terrain.specials[i].ex1a);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
get_str(str,31,current_terrain.specials[i].type + 1);
if (strlen(str) != 6 ) {
sprintf(get_text," Extra 1b: \t%s = %d\r",str,current_terrain.specials[i].ex1b);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
get_str(str,32,current_terrain.specials[i].type + 1);
if (strlen(str) != 6 ) {
sprintf(get_text," Extra 2a: \t%s = %d\r",str,current_terrain.specials[i].ex2a);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
get_str(str,33,current_terrain.specials[i].type + 1);
if (strlen(str) != 6 ) {
sprintf(get_text," Extra 2b: \t%s = %d\r",str,current_terrain.specials[i].ex2b);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if (current_terrain.specials[i].jumpto >= 0) {
switch (edit_jumpto_mess[current_terrain.specials[i].type]) {
case 0:
sprintf(get_text," Jump To: \tSpecial to Jump To = %d\r",current_terrain.specials[i].jumpto);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 1:
sprintf(get_text," Jump To: \tSpecial node if not blocked = %d\r",current_terrain.specials[i].jumpto);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 2:
sprintf(get_text," Jump To: \tSpecial after trap finished = %d\r",current_terrain.specials[i].jumpto);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 3:
sprintf(get_text," Jump To: \tOtherwise call this special = %d\r",current_terrain.specials[i].jumpto);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 4:
sprintf(get_text," Jump To: \tSpecial if OK/Leave picked = %d\r",current_terrain.specials[i].jumpto);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
}
}
}
}
sprintf(get_text,"\r\r Outdoor Zone Area Rectangles: [8]\r");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
for (i = 0; i < 8; i++) {
sprintf(get_text," Outdoor Rectangle %d: tl = (%d,%d), br = (%d,%d), text: \"%s\"\r",i,current_terrain.info_rect[i].left,current_terrain.info_rect[i].top,current_terrain.info_rect[i].right,current_terrain.info_rect[i].bottom,data_store->out_strs[1 + i]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
sprintf(get_text,"\r\r Outdoor Zone String Lengths: [140]\r");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
for (i = 0; i < 14; i++) {
sprintf(get_text," From %d: \t%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\r",i * 10,strlen(data_store->out_strs[i * 10]),strlen(data_store->out_strs[i * 10 + 1]),strlen(data_store->out_strs[i * 10 + 2]),strlen(data_store->out_strs[i * 10 + 3]),strlen(data_store->out_strs[i * 10 + 4]),strlen(data_store->out_strs[i * 10 + 5]),strlen(data_store->out_strs[i * 10 + 6]),strlen(data_store->out_strs[i * 10 + 7]),strlen(data_store->out_strs[i * 10 + 8]),strlen(data_store->out_strs[i * 10 + 9]));
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
sprintf(get_text,"\r\r");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
CloseHandle(data_dump_file_id);
}
void start_town_data_dump()
{
short i;
HANDLE data_dump_file_id;
DWORD dwByteRead;
char get_text[280], spec_name[256];
char get_text[280], spec_name[256], str[256];
data_dump_file_id = CreateFile("BoE Concise Town Report.txt", GENERIC_WRITE, FILE_SHARE_READ, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
sprintf(get_text,"%s - BoE Concise Town Report.txt",scen_strs[0]);
data_dump_file_id = CreateFile(get_text, GENERIC_WRITE, FILE_SHARE_READ, NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (data_dump_file_id == INVALID_HANDLE_VALUE)
{
@@ -1227,10 +1494,9 @@ void start_town_data_dump()
beep();
return;
}
sprintf(get_text,"\r\rConcise Town Data Printout for town %d, %s\r\r",cur_town,town_strs[0]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
sprintf(get_text," For rectangles: \"tl\" = the top and left corner of the rectangle while \"br\" = the bottom and right corner.\r\r Maximum number of any given type of town object is shown by \"[ # ]\".\rNull objects are frequently not listed.");
sprintf(get_text,"\r\rConcise Town Data Printout for town %d, %s\r Scenario: %s\r\r",cur_town,town_strs[0],scen_strs[0]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
sprintf(get_text," For rectangles: \"tl\" = the top and left corner of the rectangle while \"br\" = the bottom and right corner.\r\r Maximum number of any given type of town object is shown by \"[ # ]\".\r Null objects are frequently not listed.");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
sprintf(get_text,"\r\r In town rectangle: tl = (%d,%d), br = (%d,%d)\r",town.in_town_rect.left,town.in_town_rect.top,town.in_town_rect.right,town.in_town_rect.bottom);
@@ -1273,6 +1539,28 @@ void start_town_data_dump()
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
}
sprintf(get_text,"\r\r Town Area Rectangles: [16]\r");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
for (i = 0; i < 16; i++) {
sprintf(get_text," Town Rectangle %d: tl = (%d,%d), br = (%d,%d), text: \"%s\"\r",i,t_d.room_rect[i].left,t_d.room_rect[i].top,t_d.room_rect[i].right,t_d.room_rect[i].bottom,town_strs[1 + i]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
sprintf(get_text,"\r\r Town Timers: [8]\r");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
for (i = 0; i < 8; i++) {
sprintf(get_text," Timer %d: \tTime interval = %d, \tSpecial called = %d\r",i,town.timer_spec_times[i],town.timer_specs[i]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
sprintf(get_text,"\r\r Town String Lengths: [180]\r");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
for (i = 0; i < 18; i++) {
sprintf(get_text," From %d: \t%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\r",i * 10,strlen(town_strs[i * 10]),strlen(town_strs[i * 10 + 1]),strlen(town_strs[i * 10 + 2]),strlen(town_strs[i * 10 + 3]),strlen(town_strs[i * 10 + 4]),strlen(town_strs[i * 10 + 5]),strlen(town_strs[i * 10 + 6]),strlen(town_strs[i * 10 + 7]),strlen(town_strs[i * 10 + 8]),strlen(town_strs[i * 10 + 9]));
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
switch(scenario.town_size[cur_town]){
case 0:
@@ -1308,15 +1596,256 @@ void start_town_data_dump()
}
break;
}
sprintf(get_text,"\r\r Town Special Nodes: [100]\r");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
sprintf(get_text,"\r\r Town Special Nodes: [100]\r\r");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
for (i = 0; i < 100; i++) {
if ((town.specials[i].type > 0) || (town.specials[i].jumpto >= 0)) {
get_str(spec_name,22,town.specials[i].type + 1);
sprintf(get_text," Town special %d: Type = %d, SD1 = %d, SD2 = %d, Pic = %d, M1 = %d, M2 = %d, Ex1a = %d, Ex1b = %d, Ex2a = %d, Ex2b = %d, JumpTo = %d, Name = %s\r",i,town.specials[i].type,town.specials[i].sd1,town.specials[i].sd2,town.specials[i].pic,town.specials[i].m1,town.specials[i].m2,town.specials[i].ex1a,town.specials[i].ex1b,town.specials[i].ex2a,town.specials[i].ex2b,town.specials[i].jumpto,spec_name);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
get_str(spec_name,22,town.specials[i].type + 1);
sprintf(get_text," Node %d: \tType = %d - %s\r",i,town.specials[i].type,spec_name);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
}
for (i = 0; i < 100; i++) {
if ((town.specials[i].type > 0) || (town.specials[i].jumpto >= 0)) {
get_str(spec_name,22,town.specials[i].type + 1);
sprintf(get_text,"\r Node %d: Type %d - %s\r",i,town.specials[i].type,spec_name);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
switch (edit_spec_stuff_done_mess[town.specials[i].type]) {
case 0:
break;
case 1:
sprintf(get_text," SDF A: \tStuff Done Flag Part A = %d\r SDF B: \tStuff Done Flag Part B = %d\r",town.specials[i].sd1,town.specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 2:
sprintf(get_text," SDF A: \t0 - partial cleaning, 1 - cleans all = %d\r",town.specials[i].sd1);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 3:
sprintf(get_text," SDF A: \tStuff Done Flag Part A = %d\r",town.specials[i].sd1);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 4:
sprintf(get_text," SDF A: \tX of space to move to = %d\r SDF B: \tY of space to move to = %d\r",town.specials[i].sd1,town.specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 5:
sprintf(get_text," SDF A: \tTerrain to change to = %d\r SDF B: \tChance of changing (0 - 100) = %d\r",town.specials[i].sd1,town.specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 6:
sprintf(get_text," SDF A: \tSwitch this terrain type = %d\r SDF B: \twith this terrain type = %d\r",town.specials[i].sd1,town.specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 7:
sprintf(get_text," SDF A: \tChance of placing (0 - 100) = %d\r SDF B: \tWhat to place (see Help file.) = %d\r",town.specials[i].sd1,town.specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 8:
sprintf(get_text," SDF A: \tChance of placing (0 - 100) = %d\r SDF B: \t0 - web, 1 - barrel, 2 - crate = %d\r",town.specials[i].sd1,town.specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
}
switch (edit_spec_mess_mess[town.specials[i].type]) {
case 0:
break;
case 1:
sprintf(get_text," Message 1: \tFirst part of message = %d\r Message 2: \tSecond part of message = %d\r",town.specials[i].m1,town.specials[i].m2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 2:
sprintf(get_text," Message 1: \tNumber of first message in dialog = %d\r",town.specials[i].m1);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 3:
sprintf(get_text," Message 1: \tName of Store = %d\r",town.specials[i].m1);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 4:
sprintf(get_text," Message 1: \tNumber of first message in dialog = %d\r Message 2: \t1 - add 'Leave'/'OK' button, else no = %d\r",town.specials[i].m1,town.specials[i].m2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 5:
sprintf(get_text," Message 1: \tNumber of first message in dialog = %d\r Message 2: \tNum. of spec. item to give (-1 none) = %d\r",town.specials[i].m1,town.specials[i].m2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
}
switch (edit_spec_mess_mess[town.specials[i].type]) {
case 0:
break;
case 1: case 3:
if (town.specials[i].m1 >= 0) {
sprintf(get_text," String %d: \t\"%s\"\r",town.specials[i].m1 + 20,town_strs[town.specials[i].m1 + 20]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if (town.specials[i].m2 >= 0) {
sprintf(get_text," String %d: \t\"%s\"\r",town.specials[i].m2 + 20,town_strs[town.specials[i].m2 + 20]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
break;
case 2: case 4: case 5:
if ((town.specials[i].m1 >= 0) && (strlen (town_strs[town.specials[i].m1 + 20]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\r",town.specials[i].m1 + 20,town_strs[town.specials[i].m1 + 20]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if ((town.specials[i].m1 >= 0) && (strlen (town_strs[town.specials[i].m1 + 21]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\r",town.specials[i].m1 + 21,town_strs[town.specials[i].m1 + 21]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if ((town.specials[i].m1 >= 0) && (strlen (town_strs[town.specials[i].m1 + 22]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\r",town.specials[i].m1 + 22,town_strs[town.specials[i].m1 + 22]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if ((town.specials[i].m1 >= 0) && (strlen (town_strs[town.specials[i].m1 + 23]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\r",town.specials[i].m1 + 23,town_strs[town.specials[i].m1 + 23]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if ((town.specials[i].m1 >= 0) && (strlen (town_strs[town.specials[i].m1 + 24]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\r",town.specials[i].m1 + 24,town_strs[town.specials[i].m1 + 24]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if ((town.specials[i].m1 >= 0) && (strlen (town_strs[town.specials[i].m1 + 25]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\r",town.specials[i].m1 + 25,town_strs[town.specials[i].m1 + 25]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
break;
}
switch (edit_pict_mess[town.specials[i].type]) {
case 0:
break;
case 1:
sprintf(get_text," Picture: \tDialog Picture number = %d\r",town.specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 2:
sprintf(get_text," Picture: \tTerrain Picture number = %d\r",town.specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 3:
sprintf(get_text," Picture: \tMonster Picture number = %d\r",town.specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 4:
sprintf(get_text," Picture: \tChance of changing (0 - 100) = %d\r",town.specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 5:
sprintf(get_text," Picture: \tNumber of letters to match = %d\r",town.specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 6:
sprintf(get_text," Picture: \tRadius of explosion = %d\r",town.specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 7:
sprintf(get_text," Picture: \tSee help description = %d\r",town.specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
}
get_str(str,30,town.specials[i].type + 1);
if (strlen(str) != 6 ) {
sprintf(get_text," Extra 1a: \t%s = %d\r",str,town.specials[i].ex1a);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
get_str(str,31,town.specials[i].type + 1);
if (strlen(str) != 6 ) {
sprintf(get_text," Extra 1b: \t%s = %d\r",str,town.specials[i].ex1b);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
get_str(str,32,town.specials[i].type + 1);
if (strlen(str) != 6 ) {
sprintf(get_text," Extra 2a: \t%s = %d\r",str,town.specials[i].ex2a);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
get_str(str,33,town.specials[i].type + 1);
if (strlen(str) != 6 ) {
sprintf(get_text," Extra 2b: \t%s = %d\r",str,town.specials[i].ex2b);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if (town.specials[i].jumpto >= 0) {
switch (edit_jumpto_mess[town.specials[i].type]) {
case 0:
sprintf(get_text," Jump To: \tSpecial to Jump To = %d\r",town.specials[i].jumpto);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 1:
sprintf(get_text," Jump To: \tSpecial node if not blocked = %d\r",town.specials[i].jumpto);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 2:
sprintf(get_text," Jump To: \tSpecial after trap finished = %d\r",town.specials[i].jumpto);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 3:
sprintf(get_text," Jump To: \tOtherwise call this special = %d\r",town.specials[i].jumpto);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 4:
sprintf(get_text," Jump To: \tSpecial if OK/Leave picked = %d\r",town.specials[i].jumpto);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
}
}
}
}
sprintf(get_text,"\r\r Town Dialog Nodes: [60]\r");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
for (i = 0; i < 60; i++) {
if (talking.talk_nodes[i].personality != -1) {
get_str(str,40,talking.talk_nodes[i].type * 7 + 1);
sprintf(get_text," Node %d: \tPersonality %d, \tType = %d - %s\r",i,talking.talk_nodes[i].personality,talking.talk_nodes[i].type,str);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
}
for (i = 0; i < 60; i++) {
if (talking.talk_nodes[i].personality != -1) {
get_str(str,40,talking.talk_nodes[i].type * 7 + 1);
sprintf(get_text,"\r Node %d: Person %d, Type %d, Name = %s\r",i,talking.talk_nodes[i].personality,talking.talk_nodes[i].type,str);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
sprintf(str," Response to: \"xxxx\" and: \"xxxx\"");
str[15] = talking.talk_nodes[i].link1[0];
str[16] = talking.talk_nodes[i].link1[1];
str[17] = talking.talk_nodes[i].link1[2];
str[18] = talking.talk_nodes[i].link1[3];
str[27] = talking.talk_nodes[i].link2[0];
str[28] = talking.talk_nodes[i].link2[1];
str[29] = talking.talk_nodes[i].link2[2];
str[30] = talking.talk_nodes[i].link2[3];
WriteFile(data_dump_file_id, str,strlen(str),&dwByteRead,NULL);
get_str(str,40,talking.talk_nodes[i].type * 7 + 2);
if (strlen(str) != 6 ) {
sprintf(get_text,"\r Extra A: %s = %d",str,talking.talk_nodes[i].extras[0]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
get_str(str,40,talking.talk_nodes[i].type * 7 + 3);
if (strlen(str) != 6 ) {
sprintf(get_text,"\r Extra B: %s = %d",str,talking.talk_nodes[i].extras[1]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
get_str(str,40,talking.talk_nodes[i].type * 7 + 4);
if (strlen(str) != 6 ) {
sprintf(get_text,"\r Extra C: %s = %d",str,talking.talk_nodes[i].extras[2]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
get_str(str,40,talking.talk_nodes[i].type * 7 + 5);
if (strlen(str) != 6 ) {
sprintf(get_text,"\r Extra D: %s = %d",str,talking.talk_nodes[i].extras[3]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
get_str(str,40,talking.talk_nodes[i].type * 7 + 6);
sprintf(get_text,"\r Message 1: %s %s",str, talk_strs[40 + i * 2]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
get_str(str,40,talking.talk_nodes[i].type * 7 + 7);
sprintf(get_text,"\r Message 2: %s %s\r",str, talk_strs[41 + i * 2]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
}
sprintf(get_text,"\r\r");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
@@ -1327,12 +1856,13 @@ void start_town_data_dump()
void object_scenario_data_dump()
{
short i,j;
char get_text[280], spec_name[256];
char get_text[280], spec_name[256], str[256];
HANDLE data_dump_file_id;
DWORD dwByteRead;
data_dump_file_id = CreateFile("BoE Scenario Object data.txt", GENERIC_WRITE, FILE_SHARE_READ, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
sprintf(get_text,"%s - BoE Scenario Object Data.txt",scen_strs[0]);
data_dump_file_id = CreateFile(get_text, GENERIC_WRITE, FILE_SHARE_READ, NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (data_dump_file_id == INVALID_HANDLE_VALUE)
{
oops_error(28);
@@ -1343,6 +1873,12 @@ void object_scenario_data_dump()
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
sprintf(get_text," For rectangles: \"tl\" = the top and left corner of the rectangle while \"br\" = the bottom and right corner.\n\n Maximum number of any given type of town object is shown by \"[ # ]\".\n Null objects are frequently not listed.\n\n");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
sprintf(get_text," Scenario Miscellaneous Records:\n");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
sprintf(get_text," Scenario Flags: Flag 1 = %d, Flag 2 = %d, Flag 3 = %d, Flag 4 = %d\n\n",
scenario.flag1,scenario.flag2,scenario.flag3,scenario.flag4);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
sprintf(get_text,"The Special Items [50]\n Special Item Properties: A value of 1 means that the Special Item can be used,\n while a value of 10 means that the party starts the scenario with the item. \n A value of 11 means that it can be used and the party starts with it.\n\n");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
@@ -1375,17 +1911,219 @@ void object_scenario_data_dump()
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
}
sprintf(get_text,"\n\n Scenario Timers: [20]\n");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
for (i = 0; i < 20; i++) {
sprintf(get_text," Timer %d: \tTime interval = %d, \tSpecial called = %d\n",i,scenario.scenario_timer_times[i],scenario.scenario_timer_specs[i]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
sprintf(get_text,"\n\n Scenario Special Nodes: [256]\n");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
for (i = 0; i < 256; i++) {
if ((scenario.scen_specials[i].type > 0) || (scenario.scen_specials[i].jumpto >= 0)) {
get_str(spec_name,22,town.specials[i].type + 1);
sprintf(get_text," Scenario special %d: Type = %d, SD1 = %d, SD2 = %d, Pic = %d, M1 = %d, M2 = %d, Ex1a = %d, Ex1b = %d, Ex2a = %d, Ex2b = %d, JumpTo = %d, Name = %s\n",i,scenario.scen_specials[i].type,scenario.scen_specials[i].sd1,scenario.scen_specials[i].sd2,scenario.scen_specials[i].pic,scenario.scen_specials[i].m1,scenario.scen_specials[i].m2,scenario.scen_specials[i].ex1a,scenario.scen_specials[i].ex1b,scenario.scen_specials[i].ex2a,scenario.scen_specials[i].ex2b,scenario.scen_specials[i].jumpto,spec_name);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
}
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
for (i = 0; i < 256; i++) {
if ((scenario.scen_specials[i].type > 0) || (scenario.scen_specials[i].jumpto >= 0)) {
get_str(spec_name,22,scenario.scen_specials[i].type + 1);
sprintf(get_text," Node %d: \tType = %d \t%s\n",i,scenario.scen_specials[i].type,spec_name);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
}
for (i = 0; i < 256; i++) {
if ((scenario.scen_specials[i].type > 0) || (scenario.scen_specials[i].jumpto >= 0)) {
get_str(spec_name,22,scenario.scen_specials[i].type + 1);
sprintf(get_text,"\n Node %d: Type %d - %s\n",i,scenario.scen_specials[i].type,spec_name);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
switch (edit_spec_stuff_done_mess[scenario.scen_specials[i].type]) {
case 0:
break;
case 1:
sprintf(get_text," SDF A: \tStuff Done Flag Part A = %d\n SDF B: \tStuff Done Flag Part B = %d\n",scenario.scen_specials[i].sd1,scenario.scen_specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 2:
sprintf(get_text," SDF A: \t0 - partial cleaning, 1 - cleans all = %d\n",scenario.scen_specials[i].sd1);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 3:
sprintf(get_text," SDF A: \tStuff Done Flag Part A = %d\n",scenario.scen_specials[i].sd1);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 4:
sprintf(get_text," SDF A: \tX of space to move to = %d\n SDF B: \tY of space to move to = %d\n",scenario.scen_specials[i].sd1,scenario.scen_specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 5:
sprintf(get_text," SDF A: \tTerrain to change to = %d\n SDF B: \tChance of changing (0 - 100) = %d\n",scenario.scen_specials[i].sd1,scenario.scen_specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 6:
sprintf(get_text," SDF A: \tSwitch this terrain type = %d\n SDF B: \twith this terrain type = %d\n",scenario.scen_specials[i].sd1,scenario.scen_specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 7:
sprintf(get_text," SDF A: \tChance of placing (0 - 100) = %d\n SDF B: \tWhat to place (see Help file.) = %d\n",scenario.scen_specials[i].sd1,scenario.scen_specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 8:
sprintf(get_text," SDF A: \tChance of placing (0 - 100) = %d\n SDF B: \t0 - web, 1 - barrel, 2 - crate = %d\n",scenario.scen_specials[i].sd1,scenario.scen_specials[i].sd2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
}
switch (edit_spec_mess_mess[scenario.scen_specials[i].type]) {
case 0:
break;
case 1:
sprintf(get_text," Message 1: \tFirst part of message = %d\n Message 2: \tSecond part of message = %d\n",scenario.scen_specials[i].m1,scenario.scen_specials[i].m2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 2:
sprintf(get_text," Message 1: \tNumber of first message in dialog = %d\n",scenario.scen_specials[i].m1);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 3:
sprintf(get_text," Message 1: \tName of Store = %d\n",scenario.scen_specials[i].m1);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 4:
sprintf(get_text," Message 1: \tNumber of first message in dialog = %d\n Message 2: \t1 - add 'Leave'/'OK' button, else no = %d\n",scenario.scen_specials[i].m1,scenario.scen_specials[i].m2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 5:
sprintf(get_text," Message 1: \tNumber of first message in dialog = %d\n Message 2: \tNum. of spec. item to give (-1 none) = %d\n",scenario.scen_specials[i].m1,scenario.scen_specials[i].m2);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
}
switch (edit_spec_mess_mess[scenario.scen_specials[i].type]) {
case 0:
break;
case 1: case 3:
if (scenario.scen_specials[i].m1 >= 0) {
sprintf(get_text," String %d: \t\"%s\"\n",scenario.scen_specials[i].m1 + 160,scen_strs2[scenario.scen_specials[i].m1]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if (scenario.scen_specials[i].m2 >= 0) {
sprintf(get_text," String %d: \t\"%s\"\n",scenario.scen_specials[i].m2 + 160,scen_strs2[scenario.scen_specials[i].m2]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
break;
case 2: case 4: case 5:
if ((scenario.scen_specials[i].m1 >= 0) && (strlen (scen_strs2[scenario.scen_specials[i].m1]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\n",scenario.scen_specials[i].m1 + 160,scen_strs2[scenario.scen_specials[i].m1]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if ((scenario.scen_specials[i].m1 >= 0) && (strlen (scen_strs2[scenario.scen_specials[i].m1 + 1]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\n",scenario.scen_specials[i].m1 + 161,scen_strs2[scenario.scen_specials[i].m1 + 1]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if ((scenario.scen_specials[i].m1 >= 0) && (strlen (scen_strs2[scenario.scen_specials[i].m1 + 2]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\n",scenario.scen_specials[i].m1 + 162,scen_strs2[scenario.scen_specials[i].m1 + 2]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if ((scenario.scen_specials[i].m1 >= 0) && (strlen (scen_strs2[scenario.scen_specials[i].m1 + 3]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\n",scenario.scen_specials[i].m1 + 163,scen_strs2[scenario.scen_specials[i].m1 + 3]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if ((scenario.scen_specials[i].m1 >= 0) && (strlen (scen_strs2[scenario.scen_specials[i].m1 + 4]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\n",scenario.scen_specials[i].m1 + 164,scen_strs2[scenario.scen_specials[i].m1 + 4]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if ((scenario.scen_specials[i].m1 >= 0) && (strlen (scen_strs2[scenario.scen_specials[i].m1 + 5]) > 0)) {
sprintf(get_text," String %d: \t\"%s\"\n",scenario.scen_specials[i].m1 + 165,scen_strs2[scenario.scen_specials[i].m1 + 5]);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
break;
}
switch (edit_pict_mess[scenario.scen_specials[i].type]) {
case 0:
break;
case 1:
sprintf(get_text," Picture: \tDialog Picture number = %d\n",scenario.scen_specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 2:
sprintf(get_text," Picture: \tTerrain Picture number = %d\n",scenario.scen_specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 3:
sprintf(get_text," Picture: \tMonster Picture number = %d\n",scenario.scen_specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 4:
sprintf(get_text," Picture: \tChance of changing (0 - 100) = %d\n",scenario.scen_specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 5:
sprintf(get_text," Picture: \tNumber of letters to match = %d\n",scenario.scen_specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 6:
sprintf(get_text," Picture: \tRadius of explosion = %d\n",scenario.scen_specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 7:
sprintf(get_text," Picture: \tSee help description = %d\n",scenario.scen_specials[i].pic);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
}
get_str(str,30,scenario.scen_specials[i].type + 1);
if (strlen(str) != 6 ) {
sprintf(get_text," Extra 1a: \t%s = %d\n",str,scenario.scen_specials[i].ex1a);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
get_str(str,31,scenario.scen_specials[i].type + 1);
if (strlen(str) != 6 ) {
sprintf(get_text," Extra 1b: \t%s = %d\n",str,scenario.scen_specials[i].ex1b);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
get_str(str,32,scenario.scen_specials[i].type + 1);
if (strlen(str) != 6 ) {
sprintf(get_text," Extra 2a: \t%s = %d\n",str,scenario.scen_specials[i].ex2a);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
get_str(str,33,scenario.scen_specials[i].type + 1);
if (strlen(str) != 6 ) {
sprintf(get_text," Extra 2b: \t%s = %d\n",str,scenario.scen_specials[i].ex2b);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
if (scenario.scen_specials[i].jumpto >= 0) {
switch (edit_jumpto_mess[scenario.scen_specials[i].type]) {
case 0:
sprintf(get_text," Jump To: \tSpecial to Jump To = %d\n",scenario.scen_specials[i].jumpto);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 1:
sprintf(get_text," Jump To: \tSpecial node if not blocked = %d\n",scenario.scen_specials[i].jumpto);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 2:
sprintf(get_text," Jump To: \tSpecial after trap finished = %d\n",scenario.scen_specials[i].jumpto);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 3:
sprintf(get_text," Jump To: \tOtherwise call this special = %d\n",scenario.scen_specials[i].jumpto);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
case 4:
sprintf(get_text," Jump To: \tSpecial if OK/Leave picked = %d\n",scenario.scen_specials[i].jumpto);
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
break;
}
}
}
}
sprintf(get_text,"\n\n Scenario String Lengths: [300]\n");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
for (i = 0; i < 30; i++) {
sprintf(get_text," From %d: \t%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n",i * 10,strlen(scen_strs[i * 10]),strlen(scen_strs[i * 10 + 1]),strlen(scen_strs[i * 10 + 2]),strlen(scen_strs[i * 10 + 3]),strlen(scen_strs[i * 10 + 4]),strlen(scen_strs[i * 10 + 5]),strlen(scen_strs[i * 10 + 6]),strlen(scen_strs[i * 10 + 7]),strlen(scen_strs[i * 10 + 8]),strlen(scen_strs[i * 10 + 9]));
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
}
sprintf(get_text,"\n\n");
WriteFile(data_dump_file_id, get_text,strlen(get_text),&dwByteRead,NULL);
@@ -1402,8 +2140,9 @@ void start_data_dump()
DWORD dwByteRead;
location out_sec,last_out = cur_out;
data_dump_file_id = CreateFile("Scendata.txt", GENERIC_WRITE, FILE_SHARE_READ, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
sprintf(get_text,"%s - BoE Scenario Data.txt",scen_strs[0]);
data_dump_file_id = CreateFile(get_text, GENERIC_WRITE, FILE_SHARE_READ, NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (data_dump_file_id == INVALID_HANDLE_VALUE)
{
oops_error(28);
@@ -1495,16 +2234,17 @@ void start_data_dump()
}
void start_monst_data_dump(){
void start_monst_data_dump()
{
short i,j,last_town = cur_town;
char get_text[280];
HANDLE data_dump_file_id;
DWORD dwByteRead;
location out_sec,last_out = cur_out;
data_dump_file_id = CreateFile("Monstdata.txt", GENERIC_WRITE, FILE_SHARE_READ, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
sprintf(get_text,"%s - BoE Monstdata.txt",scen_strs[0]);
data_dump_file_id = CreateFile(get_text, GENERIC_WRITE, FILE_SHARE_READ, NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (data_dump_file_id == INVALID_HANDLE_VALUE)
{
oops_error(28);
@@ -1690,8 +2430,9 @@ void start_spec_data_dump(){
DWORD dwByteRead;
location out_sec,last_out = cur_out;
data_dump_file_id = CreateFile("Specdata.txt", GENERIC_WRITE, FILE_SHARE_READ, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
sprintf(get_text,"%s - BoE Specdata.txt",scen_strs[0]);
data_dump_file_id = CreateFile(get_text, GENERIC_WRITE, FILE_SHARE_READ, NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (data_dump_file_id == INVALID_HANDLE_VALUE)
{
oops_error(28);
@@ -1889,9 +2630,10 @@ void start_shopping_data_dump()
HANDLE data_dump_file_id;
DWORD dwByteRead;
location out_sec,last_out = cur_out;
data_dump_file_id = CreateFile("Scenario Shopping.txt", GENERIC_WRITE, FILE_SHARE_READ, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
sprintf(get_text,"%s - BoE Scenario Shopping.txt",scen_strs[0]);
data_dump_file_id = CreateFile(get_text, GENERIC_WRITE, FILE_SHARE_READ, NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (data_dump_file_id == INVALID_HANDLE_VALUE)
{
oops_error(28);
@@ -2117,9 +2859,10 @@ void scen_text_dump()
char get_text[300];
long len;
location out_sec,last_out = cur_out;
data_dump_file_id = CreateFile("Scentext.txt", GENERIC_WRITE, FILE_SHARE_READ, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
sprintf(get_text,"%s - BoE Scenario Text.txt",scen_strs[0]);
data_dump_file_id = CreateFile(get_text, GENERIC_WRITE, FILE_SHARE_READ, NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (data_dump_file_id == INVALID_HANDLE_VALUE)
{
oops_error(28);

View File

@@ -37,4 +37,5 @@ void make_new_scenario(char *file_name,short out_width,short out_height,short ma
void flip_rect(RECT16 *s);
void alter_rect(RECT16 *r);
void object_scenario_data_dump();
void start_outdoor_data_dump();
#endif

View File

@@ -591,18 +591,20 @@ void put_out_strs_in_dlog()
{
Str255 str;
short i;
for (i = 0; i < 8; i++) {
if ((current_terrain.info_rect[i].right == -1) || (str_do_delete[i] > 0)) {
if ((current_terrain.info_rect[i].left < 1) && (current_terrain.info_rect[i].top < 1) && (current_terrain.info_rect[i].right < 1) && (current_terrain.info_rect[i].bottom < 1))
{
sprintf((char *) str,"Not yet placed.");
cd_activate_item(850,25 + i,0);
}
else sprintf((char *) str,"X = %d, Y = %d",current_terrain.info_rect[i].left,
current_terrain.info_rect[i].top);
else
sprintf((char *) str,"L = %d, T = %d",current_terrain.info_rect[i].left,current_terrain.info_rect[i].top);
csit(850,13 + i,(char *) str);
sprintf((char *) str,"R = %d, B = %d",current_terrain.info_rect[i].right,current_terrain.info_rect[i].bottom);
csit(850,33 + i,(char *) str);
CDST(850,2 + i,data_store->out_strs[i + 1]);
}
}
void edit_out_strs_event_filter (short item_hit)
@@ -669,16 +671,18 @@ void put_town_strs_in_dlog()
short i;
for (i = 0; i < 16; i++) {
if ((t_d.room_rect[i].right == -1) || (str_do_delete[i] > 0)) {
sprintf((char *) str,"Not yet placed.");
if ((t_d.room_rect[i].left < 1) && (t_d.room_rect[i].top < 1) && (t_d.room_rect[i].right < 1) && (t_d.room_rect[i].bottom < 1)) {
cd_activate_item(839,41 + i,0);
sprintf((char *) str,"Not yet placed.");
sprintf((char *) str,"Not yet placed.");
}
else sprintf((char *) str,"X = %d, Y = %d",t_d.room_rect[i].left,
t_d.room_rect[i].top);
else
sprintf((char *) str,"L = %d, T = %d",t_d.room_rect[i].left,t_d.room_rect[i].top);
csit(839,21 + i,(char *) str);
sprintf((char *) str,"R = %d, B = %d",t_d.room_rect[i].right,t_d.room_rect[i].bottom);
csit(839,57 + i,(char *) str);
CDST(839,2 + i,town_strs[i + 1]);
}
}
void edit_town_strs_event_filter (short item_hit)