Skip to content

Commit dcdee8e

Browse files
committed
remove import/export options for ZQT and QSU files
It remains possible to load these files via File->Open. There's just no reason to make these things, so let's remove them from the UI.
1 parent 012ec9d commit dcdee8e

File tree

5 files changed

+6
-121
lines changed

5 files changed

+6
-121
lines changed

src/zq/zq_files.cpp

Lines changed: 2 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -978,10 +978,11 @@ int32_t onOpen()
978978
static EXT_LIST list[] =
979979
{
980980
{ (char *)"Quest Files (*.qst)", (char *)"qst" },
981-
{ (char *)"Unencrypted Quest Files (*.qsu)", (char *)"qsu" },
982981
{ (char *)"Quest Auto-backups (*.qb?)", (char *)"qb0,qb1,qb2,qb3,qb4,qb5,qb6,qb7,qb8,qb9" },
983982
{ (char *)"Quest Timed Auto-saves (*.qt?)", (char *)"qt0,qt1,qt2,qt3,qt4,qt5,qt6,qt7,qt8,qt9" },
984983
{ (char *)"Uncompressed Quest Timed Auto-saves (*.qu?)", (char *)"qu0,qu1,qu2,qu3,qu4,qu5,qu6,qu7,qu8,qu9" },
984+
{ (char *)"Unencrypted Quest Files (*.qsu)", (char *)"qsu" },
985+
{ (char *)"Quest Template Files (*.zqt)", (char *)"zqt" },
985986
{ (char *)"All Files (*.*)", NULL },
986987
{ NULL, NULL }
987988
};
@@ -1865,106 +1866,6 @@ int32_t onExport_Subscreen()
18651866
return D_O_K;
18661867
}
18671868

1868-
int32_t onImport_ZQT()
1869-
{
1870-
if(!getname("Import Quest Template (.zqt)","zqt",NULL,datapath,false))
1871-
return D_O_K;
1872-
1873-
saved=false;
1874-
// usetiles=true;
1875-
int32_t error = load_quest(temppath,true, false);
1876-
1877-
if(error != qe_OK && error != qe_cancel)
1878-
{
1879-
char buf[256+20],name[256];
1880-
extract_name(temppath,name,FILENAMEALL);
1881-
sprintf(buf,"Unable to load %s",name);
1882-
jwin_alert("Error",buf,NULL,NULL,"O&K",NULL,'k',0,get_zc_font(font_lfont));
1883-
}
1884-
1885-
register_blank_tiles();
1886-
loadlvlpal(Color);
1887-
setup_combo_animations();
1888-
setup_combo_animations2();
1889-
Map.setCurrMap(Map.getCurrMap()); // for bound checking
1890-
refresh(rALL);
1891-
refresh_pal();
1892-
return D_O_K;
1893-
}
1894-
1895-
int32_t onExport_ZQT()
1896-
{
1897-
if(!getname("Export Quest Template (.zqt)","zqt",NULL,datapath,false))
1898-
return D_O_K;
1899-
1900-
char buf[256+20],buf2[256+20],name[256];
1901-
extract_name(temppath,name,FILENAMEALL);
1902-
1903-
if(!save_unencoded_quest(temppath, true))
1904-
{
1905-
sprintf(buf,"ZQuest");
1906-
sprintf(buf2,"Saved %s",name);
1907-
}
1908-
else
1909-
{
1910-
sprintf(buf,"Error");
1911-
sprintf(buf2,"Error saving %s",name);
1912-
}
1913-
1914-
jwin_alert(buf,buf2,NULL,NULL,"O&K",NULL,'k',0,get_zc_font(font_lfont));
1915-
return D_O_K;
1916-
}
1917-
1918-
int32_t onImport_UnencodedQuest()
1919-
{
1920-
if(!getname("Import Unencoded Quest (.qsu)","qsu",NULL,datapath,false))
1921-
return D_O_K;
1922-
1923-
saved=false;
1924-
// usetiles=true;
1925-
int32_t ret = load_quest(temppath,false,false);
1926-
1927-
if(ret != qe_OK && ret != qe_cancel)
1928-
{
1929-
char buf[256+20],name[256];
1930-
extract_name(temppath,name,FILENAMEALL);
1931-
sprintf(buf,"Unable to load %s",name);
1932-
jwin_alert("Error",buf,NULL,NULL,"O&K",NULL,'k',0,get_zc_font(font_lfont));
1933-
}
1934-
1935-
register_blank_tiles();
1936-
loadlvlpal(Color);
1937-
setup_combo_animations();
1938-
setup_combo_animations2();
1939-
Map.setCurrMap(Map.getCurrMap()); // for bound checking
1940-
refresh(rALL);
1941-
refresh_pal();
1942-
return D_O_K;
1943-
}
1944-
1945-
int32_t onExport_UnencodedQuest()
1946-
{
1947-
if(!getname("Export Unencoded Quest (.qsu)","qsu",NULL,datapath,false))
1948-
return D_O_K;
1949-
1950-
char buf[256+20],buf2[256+20],name[256];
1951-
extract_name(temppath,name,FILENAMEALL);
1952-
1953-
if(!save_unencoded_quest(temppath, false))
1954-
{
1955-
sprintf(buf,"ZQuest");
1956-
sprintf(buf2,"Saved %s",name);
1957-
}
1958-
else
1959-
{
1960-
sprintf(buf,"Error");
1961-
sprintf(buf2,"Error saving %s",name);
1962-
}
1963-
1964-
jwin_alert(buf,buf2,NULL,NULL,"O&K",NULL,'k',0,get_zc_font(font_lfont));
1965-
return D_O_K;
1966-
}
1967-
19681869
//Doorsets
19691870
int32_t readzdoorsets(PACKFILE *f, int32_t first, int32_t count, int32_t deststart)
19701871
{

src/zq/zq_files.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ int32_t onImport_Subscreen();
5353
int32_t onExport_Subscreen();
5454
int32_t onImport_ZGP();
5555
int32_t onExport_ZGP();
56-
int32_t onImport_ZQT();
57-
int32_t onExport_ZQT();
58-
int32_t onImport_UnencodedQuest();
59-
int32_t onExport_UnencodedQuest();
6056
int32_t onAbout_Module();
6157
int32_t onExport_Tilepack();
6258
int32_t onImport_Tilepack();

src/zq/zq_misc.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,8 +790,6 @@ int32_t onImport_Tiles();
790790
int32_t onImport_Subscreen();
791791
int32_t onImport_Pals();
792792
int32_t onImport_ZGP();
793-
int32_t onImport_ZQT();
794-
int32_t onImport_UnencodedQuest();
795793

796794
int32_t onExport_Map();
797795
int32_t onExport_DMaps();
@@ -802,8 +800,6 @@ int32_t onExport_Tiles();
802800
int32_t onExport_Subscreen();
803801
int32_t onExport_Pals();
804802
int32_t onExport_ZGP();
805-
int32_t onExport_ZQT();
806-
int32_t onExport_UnencodedQuest();
807803

808804
int32_t onGotoMap();
809805

src/zq/zq_misc.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,6 @@ int32_t onImport_Guys();
243243
int32_t onImport_Subscreen();
244244
int32_t onImport_Pals();
245245
int32_t onImport_ZGP();
246-
int32_t onImport_ZQT();
247-
int32_t onImport_UnencodedQuest();
248246

249247
int32_t onExport_Map();
250248
int32_t onExport_DMaps();
@@ -256,8 +254,6 @@ int32_t onExport_Guys();
256254
int32_t onExport_Subscreen();
257255
int32_t onExport_Pals();
258256
int32_t onExport_ZGP();
259-
int32_t onExport_ZQT();
260-
int32_t onExport_UnencodedQuest();
261257
int32_t onAbout_Module();
262258
int32_t onExport_Tilepack();
263259
int32_t onImport_Tilepack();

src/zq/zquest.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -777,8 +777,6 @@ static MENU import_250_menu[] =
777777
{ (char *)"&Combo Table", onImport_Combos, NULL, 0, NULL },
778778
{ (char *)"&Combo Alias", onImport_ComboAlias, NULL, 0, NULL },
779779
// { (char *)"&Graphics Pack", onImport_ZGP, NULL, 0, NULL },
780-
{ (char *)"&Quest Template", onImport_ZQT, NULL, 0, NULL },
781-
{ (char *)"&Unencoded Quest", onImport_UnencodedQuest, NULL, 0, NULL },
782780
{ NULL, NULL, NULL, 0, NULL }
783781
};
784782

@@ -830,8 +828,6 @@ static MENU export_250_menu[] =
830828
{ (char *)"&Combo Table", onExport_Combos, NULL, 0, NULL },
831829
{ (char *)"&Combo Alias", onExport_ComboAlias, NULL, 0, NULL },
832830
{ (char *)"&Graphics Pack", onExport_ZGP, NULL, 0, NULL },
833-
{ (char *)"&Quest Template", onExport_ZQT, NULL, 0, NULL },
834-
{ (char *)"&Unencoded Quest", onExport_UnencodedQuest, NULL, 0, NULL },
835831
{ NULL, NULL, NULL, 0, NULL }
836832
};
837833

@@ -32442,11 +32438,11 @@ command_pair commands[cmdMAX]=
3244232438
{ "Export DMaps", 0, (intF) onExport_DMaps },
3244332439
{ "Export Map", 0, (intF) onExport_Map },
3244432440
{ "Export Palettes", 0, (intF) onExport_Pals },
32445-
{ "Export Quest Template", 0, (intF) onExport_ZQT },
32441+
{ "<UNUSED>", 0, NULL },
3244632442
{ "Export Strings", 0, (intF) onExport_Msgs },
3244732443
{ "Export Subscreen", 0, (intF) onExport_Subscreen },
3244832444
{ "Export Tiles", 0, (intF) onExport_Tiles },
32449-
{ "Export Unencoded Quest", 0, (intF) onExport_UnencodedQuest },
32445+
{ "<UNUSED>", 0, NULL },
3245032446
{ "Export Graphics Pack", 0, (intF) onExport_ZGP },
3245132447
{ "Flags", 0, (intF) onFlags },
3245232448
{ "Paste Freeform Combos", 0, (intF) onPasteFFCombos },
@@ -32466,11 +32462,11 @@ command_pair commands[cmdMAX]=
3246632462
{ "Import Graphics Pack", 0, (intF) onImport_ZGP },
3246732463
{ "Import Map", 0, (intF) onImport_Map },
3246832464
{ "Import Palettes", 0, (intF) onImport_Pals },
32469-
{ "Import Quest Template", 0, (intF) onImport_ZQT },
32465+
{ "<UNUSED>", 0, NULL },
3247032466
{ "Import Strings", 0, (intF) onImport_Msgs },
3247132467
{ "Import Subscreen", 0, (intF) onImport_Subscreen },
3247232468
{ "Import Tiles", 0, (intF) onImport_Tiles },
32473-
{ "Import Unencoded Quest", 0, (intF) onImport_UnencodedQuest },
32469+
{ "<UNUSED>", 0, NULL },
3247432470
{ "Info Types", 0, (intF) onInfoTypes },
3247532471
{ "Init Data", 0, (intF) onInit },
3247632472
{ "Integ. Check (All)", 0, (intF) onIntegrityCheckAll },

0 commit comments

Comments
 (0)