+++ /dev/null
---- scorched/src/common/image/ImagePngFactory.cpp~ 2010-08-07 23:27:04.000000000 +0200
-+++ scorched/src/common/image/ImagePngFactory.cpp 2012-02-12 12:56:58.330929507 +0100
-@@ -104,7 +104,7 @@
-
- static void user_png_error(png_structp png_ptr, png_const_charp msg)
- {
-- longjmp(png_ptr->jmpbuf,1);
-+ longjmp(png_jmpbuf(png_ptr),1);
- }
-
- static void user_png_warning(png_structp png_ptr, png_const_charp msg)
---- scorched/src/client/client/LoadPNG.cpp~ 2010-08-16 01:26:36.000000000 +0200
-+++ scorched/src/client/client/LoadPNG.cpp 2012-02-12 12:51:20.395625495 +0100
-@@ -12,7 +12,7 @@
-
- SDL_Surface *EXT_LoadPNG_RW(SDL_RWops *src)
- {
-- int start;
-+ int start, num_palette;
- const char *error;
- SDL_Surface *volatile surface;
- png_structp png_ptr;
-@@ -28,6 +28,7 @@
- int row, i;
- volatile int ckey = -1;
- png_color_16 *transv;
-+ png_colorp png_palette;
-
- if ( !src ) {
- /* The error message has been set in SDL_RWFromFile */
-@@ -58,7 +59,7 @@
- * the normal method of doing things with libpng). REQUIRED unless you
- * set up your own error handlers in png_create_read_struct() earlier.
- */
-- if ( setjmp(png_ptr->jmpbuf) ) {
-+ if ( setjmp(png_jmpbuf(png_ptr)) ) {
- error = "Error reading the PNG file.";
- goto done;
- }
-@@ -127,9 +128,9 @@
- Rmask = 0x000000FF;
- Gmask = 0x0000FF00;
- Bmask = 0x00FF0000;
-- Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0;
-+ Amask = (png_get_channels(png_ptr, info_ptr) == 4) ? 0xFF000000 : 0;
- } else {
-- int s = (info_ptr->channels == 4) ? 0 : 8;
-+ int s = (png_get_channels(png_ptr, info_ptr) == 4) ? 0 : 8;
- Rmask = 0xFF000000 >> s;
- Gmask = 0x00FF0000 >> s;
- Bmask = 0x0000FF00 >> s;
-@@ -137,7 +138,7 @@
- }
- }
- surface = SDL_AllocSurface(SDL_SWSURFACE, width, height,
-- bit_depth*info_ptr->channels, Rmask,Gmask,Bmask,Amask);
-+ bit_depth*png_get_channels(png_ptr, info_ptr), Rmask,Gmask,Bmask,Amask);
- if ( surface == NULL ) {
- error = "Out of memory";
- goto done;
-@@ -177,6 +178,7 @@
-
- /* Load the palette, if any */
- palette = surface->format->palette;
-+ png_get_PLTE(png_ptr, info_ptr, &png_palette, &num_palette);
- if ( palette ) {
- if(color_type == PNG_COLOR_TYPE_GRAY) {
- palette->ncolors = 256;
-@@ -185,12 +187,12 @@
- palette->colors[i].g = i;
- palette->colors[i].b = i;
- }
-- } else if (info_ptr->num_palette > 0 ) {
-- palette->ncolors = info_ptr->num_palette;
-- for( i=0; i<info_ptr->num_palette; ++i ) {
-- palette->colors[i].b = info_ptr->palette[i].blue;
-- palette->colors[i].g = info_ptr->palette[i].green;
-- palette->colors[i].r = info_ptr->palette[i].red;
-+ } else if (num_palette > 0 ) {
-+ palette->ncolors = num_palette;
-+ for( i=0; i<num_palette; ++i ) {
-+ palette->colors[i].b = png_palette[i].blue;
-+ palette->colors[i].g = png_palette[i].green;
-+ palette->colors[i].r = png_palette[i].red;
- }
- }
- }
-diff -ur scorched3d-43.3d/src/launcher/wxdialogs/Display.cpp scorched3d-43.3d-wx3/src/launcher/wxdialogs/Display.cpp
---- scorched3d-43.3d/src/launcher/wxdialogs/Display.cpp 2011-10-11 00:26:43.000000000 +0200
-+++ scorched3d-43.3d-wx3/src/launcher/wxdialogs/Display.cpp 2014-01-18 17:36:33.855429533 +0100
-@@ -88,7 +88,7 @@
+From: Markus Koschany <apo@debian.org>
+Date: Fri, 15 Jul 2016 18:01:36 +0200
+Subject: wx3.0 compat
+
+Make Scorched3D compatible with wxWidgets 3.0
+
+Thanks to Olly Betts for the patch.
+---
+ src/launcher/wxdialogs/Display.cpp | 10 +++++-----
+ src/launcher/wxdialogs/DisplayDialog.cpp | 10 +++++-----
+ src/launcher/wxdialogs/SettingsDialog.cpp | 14 +++++++-------
+ 3 files changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/src/launcher/wxdialogs/Display.cpp b/src/launcher/wxdialogs/Display.cpp
+index e0a423a..22169e0 100644
+--- a/src/launcher/wxdialogs/Display.cpp
++++ b/src/launcher/wxdialogs/Display.cpp
+@@ -26,7 +26,7 @@ static void createMainControls(wxWindow *parent, wxSizer *sizer)
+ // Display settings\r
+ wxStaticBox *displayBox = new wxStaticBox(parent, -1, wxT("&Display"));\r
+ wxStaticBoxSizer *displaySizer = new wxStaticBoxSizer(displayBox, wxVERTICAL);\r
+- wxFlexGridSizer *displaySizer2 = new wxFlexGridSizer(2, 3, 5, 5);\r
++ wxFlexGridSizer *displaySizer2 = new wxFlexGridSizer(0, 3, 5, 5);\r
+ wxStaticText *resText = new wxStaticText(parent, -1, wxT("&Resolution :"));\r
+ IDC_DISPLAY_CTRL = \r
+ new wxComboBox(parent, -1,\r
+@@ -88,7 +88,7 @@ static void createMainControls(wxWindow *parent, wxSizer *sizer)
// Sound settings\r
wxStaticBox *soundBox = new wxStaticBox(parent, -1, wxT("&Sound"));\r
wxStaticBoxSizer *soundSizerMain = new wxStaticBoxSizer(soundBox, wxVERTICAL);\r
- wxFlexGridSizer *soundSizer1 = new wxFlexGridSizer(4, 2);\r
-+ wxFlexGridSizer *soundSizer1 = new wxFlexGridSizer(4, 2, wxSize(5, 5));\r
++ wxFlexGridSizer *soundSizer1 = new wxFlexGridSizer(0, 4, 2, 0);\r
wxStaticText *volumeText = new wxStaticText(parent, -1, wxT("Sound Volume :"));\r
wxStaticText *musicVolumeText = new wxStaticText(parent, -1, wxT("Music Volume :"));\r
wxStaticText *ambientVolumeText = new wxStaticText(parent, -1, wxT("Ambient Volume :"));\r
-@@ -137,7 +137,7 @@
+@@ -137,7 +137,7 @@ static void createMainControls(wxWindow *parent, wxSizer *sizer)
wxT("Game Detail Options"));\r
wxStaticBoxSizer *speedSizer = new wxStaticBoxSizer(speedBox, wxHORIZONTAL);\r
\r
- wxGridSizer *loadSizer = new wxFlexGridSizer(2, 2);\r
-+ wxGridSizer *loadSizer = new wxFlexGridSizer(2, 2, wxSize(5, 5));\r
++ wxGridSizer *loadSizer = new wxFlexGridSizer(0, 2, 2, 0);\r
IDC_LOADULTRA_CTRL = new wxButton(parent, ID_LOADULTRA, wxT("&Ultra Detail"), wxDefaultPosition, wxSize(120,-1));\r
IDC_LOADDEFAULTS_CTRL = new wxButton(parent, ID_LOADDEFAULTS, wxT("&Normal Detail"), wxDefaultPosition, wxSize(120,-1));\r
IDC_LOADMEDIUM_CTRL = new wxButton(parent, ID_LOADMEDIUM, wxT("Faster Detail"), wxDefaultPosition, wxSize(120,-1));\r
-@@ -471,7 +471,7 @@
+@@ -256,7 +256,7 @@ static void createSpeedControls(wxWindow *parent, wxSizer *sizer)
+ wxStaticBox *waterDetailBox = new wxStaticBox(parent, -1, \r
+ wxT("Graphics Detail"));\r
+ wxStaticBoxSizer *waterDetailSizer = new wxStaticBoxSizer(waterDetailBox, wxHORIZONTAL);\r
+- wxGridSizer *waterDetailSizer2 = new wxGridSizer(3, 1, 10, 10);\r
++ wxGridSizer *waterDetailSizer2 = new wxGridSizer(0, 1, 10, 10);\r
+ \r
+ IDC_NOWATERREF_CTRL = \r
+ new wxCheckBox(parent, -1, wxT("Don't draw water reflections - Large Framerate Improvement"));\r
+@@ -471,7 +471,7 @@ static void createKeysControls(wxWindow *parent, wxSizer *topsizer)
{\r
wxScrolledWindow *scrolledWindow = new wxScrolledWindow(parent, -1, \r
wxDefaultPosition, wxSize(480, 250));\r
- wxSizer *sizer = new wxFlexGridSizer(5, 1);\r
-+ wxSizer *sizer = new wxFlexGridSizer(5, 1, wxSize(5, 5));\r
++ wxSizer *sizer = new wxFlexGridSizer(0, 5, 1, 0);\r
\r
keyboardKeyList.clear();\r
if (!Keyboard::instance()->loadKeyFile())\r
-diff -ur scorched3d-43.3d/src/launcher/wxdialogs/DisplayDialog.cpp scorched3d-43.3d-wx3/src/launcher/wxdialogs/DisplayDialog.cpp
---- scorched3d-43.3d/src/launcher/wxdialogs/DisplayDialog.cpp 2012-01-08 16:26:34.000000000 +0100
-+++ scorched3d-43.3d-wx3/src/launcher/wxdialogs/DisplayDialog.cpp 2014-01-18 17:39:41.062094844 +0100
-@@ -733,7 +733,7 @@
- convertString(S3D::formatStringBuffer("%s.s3m", (const char *) (selection.mb_str(wxConvUTF8)))), // default filename\r
- wxT(""), // default extension\r
- wxT("*.s3m"),\r
+diff --git a/src/launcher/wxdialogs/DisplayDialog.cpp b/src/launcher/wxdialogs/DisplayDialog.cpp
+index c34c9dc..0cdc620 100644
+--- a/src/launcher/wxdialogs/DisplayDialog.cpp
++++ b/src/launcher/wxdialogs/DisplayDialog.cpp
+@@ -449,15 +449,15 @@ void DisplayFrame::refreshScreen()
+ IDC_SLIDER1_CTRL->SetValue(OptionsDisplay::instance()->getBrightness());\r
+ IDC_SLIDER1_CTRL->SetToolTip(wxString(OptionsDisplay::instance()->getBrightnessEntry().getDescription(), wxConvUTF8));\r
+ IDC_VOLUME_CTRL->SetRange(0, 128);\r
+- IDC_VOLUME_CTRL->SetTickFreq(4, 0);\r
++ IDC_VOLUME_CTRL->SetTickFreq(4);\r
+ IDC_VOLUME_CTRL->SetValue(OptionsDisplay::instance()->getSoundVolume());\r
+ IDC_VOLUME_CTRL->SetToolTip(wxString(OptionsDisplay::instance()->getSoundVolumeEntry().getDescription(), wxConvUTF8));\r
+ IDC_MUSICVOLUME_CTRL->SetRange(0, 128);\r
+- IDC_MUSICVOLUME_CTRL->SetTickFreq(4, 0);\r
++ IDC_MUSICVOLUME_CTRL->SetTickFreq(4);\r
+ IDC_MUSICVOLUME_CTRL->SetValue(OptionsDisplay::instance()->getMusicVolume());\r
+ IDC_MUSICVOLUME_CTRL->SetToolTip(wxString(OptionsDisplay::instance()->getMusicVolumeEntry().getDescription(), wxConvUTF8));\r
+ IDC_AMBIENTVOLUME_CTRL->SetRange(0, 128);\r
+- IDC_AMBIENTVOLUME_CTRL->SetTickFreq(4, 0);\r
++ IDC_AMBIENTVOLUME_CTRL->SetTickFreq(4);\r
+ IDC_AMBIENTVOLUME_CTRL->SetValue(OptionsDisplay::instance()->getAmbientSoundVolume());\r
+ IDC_AMBIENTVOLUME_CTRL->SetToolTip(wxString(OptionsDisplay::instance()->getAmbientSoundVolumeEntry().getDescription(), wxConvUTF8));\r
+ IDC_USERNAME_CTRL->SetValue(wxString(OptionsDisplay::instance()->getOnlineUserName(), wxConvUTF8));\r
+@@ -736,7 +736,7 @@ void DisplayFrame::onExportMod(wxCommandEvent &event)
+ #if wxCHECK_VERSION(2, 8, 0)\r
+ wxFD_SAVE);\r
+ #else\r
- wxSAVE);\r
+ wxFD_SAVE);\r
+ #endif\r
if (file.empty()) return;\r
ModFiles files;\r
- if (!files.loadModFiles(std::string(selection.mb_str(wxConvUTF8)), false))\r
-@@ -757,7 +757,7 @@
- wxT(""), // default filename\r
- wxT(""), // default extension\r
- wxT("*.s3m"),\r
+@@ -764,7 +764,7 @@ void DisplayFrame::onImportMod(wxCommandEvent &event)
+ #if wxCHECK_VERSION(2, 8, 0)\r
+ wxFD_OPEN | wxFD_FILE_MUST_EXIST);\r
+ #else\r
- wxOPEN | wxFILE_MUST_EXIST);\r
+ wxFD_OPEN | wxFD_FILE_MUST_EXIST);\r
+ #endif\r
if (file.empty()) return;\r
ModFiles files;\r
- std::string mod;\r
-diff -ur scorched3d-43.3d/src/launcher/wxdialogs/KeyDialog.cpp scorched3d-43.3d-wx3/src/launcher/wxdialogs/KeyDialog.cpp
---- scorched3d-43.3d/src/launcher/wxdialogs/KeyDialog.cpp 2011-06-28 01:11:12.000000000 +0200
-+++ scorched3d-43.3d-wx3/src/launcher/wxdialogs/KeyDialog.cpp 2014-01-18 17:41:35.702094014 +0100
-@@ -107,7 +107,7 @@
- keyDialogControlDown = event.ControlDown();\r
- keyDialogShiftDown = event.ShiftDown();\r
- keyDialogAltDown = event.AltDown();\r
-- keyDialogKeyCode = event.KeyCode();\r
-+ keyDialogKeyCode = event.GetKeyCode();\r
- frame_->EndModal(0);\r
- }\r
- }\r
-diff -ur scorched3d-43.3d/src/launcher/wxdialogs/SettingsDialog.cpp scorched3d-43.3d-wx3/src/launcher/wxdialogs/SettingsDialog.cpp
---- scorched3d-43.3d/src/launcher/wxdialogs/SettingsDialog.cpp 2011-09-06 01:29:53.000000000 +0200
-+++ scorched3d-43.3d-wx3/src/launcher/wxdialogs/SettingsDialog.cpp 2014-01-18 17:43:23.118759904 +0100
-@@ -105,7 +105,7 @@
+diff --git a/src/launcher/wxdialogs/SettingsDialog.cpp b/src/launcher/wxdialogs/SettingsDialog.cpp
+index b312085..03ba629 100644
+--- a/src/launcher/wxdialogs/SettingsDialog.cpp
++++ b/src/launcher/wxdialogs/SettingsDialog.cpp
+@@ -105,7 +105,7 @@ void SettingsFrame::createMainPanel(bool server)
mainPanel_ = new wxPanel(book_, -1);\r
book_->AddPage(mainPanel_, wxT("Main"));\r
wxSizer *mainPanelSizer = new wxBoxSizer(wxVERTICAL);\r
- wxSizer *sizer = new wxFlexGridSizer(2, 2);\r
-+ wxSizer *sizer = new wxFlexGridSizer(2, 2, wxSize(5, 5));\r
++ wxSizer *sizer = new wxFlexGridSizer(0, 2, 2, 0);\r
mainPanelSizer->Add(sizer, 0, wxALL | wxALIGN_CENTER, 10);\r
\r
setters_.push_back(\r
-@@ -166,7 +166,7 @@
+@@ -166,7 +166,7 @@ void SettingsFrame::createMoneyPanel()
{\r
moneyPanel_ = new wxPanel(book_, -1);\r
wxSizer *ecoPanelSizer = new wxBoxSizer(wxVERTICAL);\r
- wxSizer *sizer = new wxFlexGridSizer(2, 2);\r
-+ wxSizer *sizer = new wxFlexGridSizer(2, 2, wxSize(5, 5));\r
++ wxSizer *sizer = new wxFlexGridSizer(0, 2, 2, 0);\r
ecoPanelSizer->Add(sizer, 0, wxALL | wxALIGN_CENTER, 10);\r
\r
setters_.push_back(\r
-@@ -215,7 +215,7 @@
+@@ -215,7 +215,7 @@ void SettingsFrame::createScorePanel()
{\r
scorePanel_ = new wxPanel(book_, -1);\r
wxSizer *ecoPanelSizer = new wxBoxSizer(wxVERTICAL);\r
- wxSizer *sizer = new wxFlexGridSizer(2, 2);\r
-+ wxSizer *sizer = new wxFlexGridSizer(2, 2, wxSize(5, 5));\r
++ wxSizer *sizer = new wxFlexGridSizer(0, 2, 2, 0);\r
ecoPanelSizer->Add(sizer, 0, wxALL | wxALIGN_CENTER, 10);\r
\r
setters_.push_back(\r
-@@ -249,7 +249,7 @@
+@@ -249,7 +249,7 @@ void SettingsFrame::createWeaponsPanel()
{\r
weaponsPanel_ = new wxPanel(book_, -1);\r
wxSizer *ecoPanelSizer = new wxBoxSizer(wxVERTICAL);\r
- wxSizer *sizer = new wxFlexGridSizer(2, 2);\r
-+ wxSizer *sizer = new wxFlexGridSizer(2, 2, wxSize(5, 5));\r
++ wxSizer *sizer = new wxFlexGridSizer(0, 2, 2, 0);\r
ecoPanelSizer->Add(sizer, 0, wxALL | wxALIGN_CENTER, 10);\r
\r
setters_.push_back(\r
-@@ -286,7 +286,7 @@
+@@ -286,7 +286,7 @@ void SettingsFrame::createEnvPanel()
{\r
envPanel_ = new wxPanel(book_, -1);\r
wxSizer *envPanelSizer = new wxBoxSizer(wxVERTICAL);\r
- wxSizer *sizer = new wxFlexGridSizer(2, 2);\r
-+ wxSizer *sizer = new wxFlexGridSizer(2, 2, wxSize(5, 5));\r
++ wxSizer *sizer = new wxFlexGridSizer(0, 2, 2, 0);\r
envPanelSizer->Add(sizer, 0, wxALL | wxALIGN_CENTER, 10);\r
\r
setters_.push_back(\r
-@@ -337,7 +337,7 @@
+@@ -337,7 +337,7 @@ void SettingsFrame::createLandPanel()
wxScrolledWindow *scrolledWindow = new wxScrolledWindow(landPanel_, -1, \r
wxDefaultPosition, wxSize(225, 200));\r
\r
- wxSizer *sizer = new wxFlexGridSizer(3, 3);\r
-+ wxSizer *sizer = new wxFlexGridSizer(3, 3, wxSize(5, 5));\r
++ wxSizer *sizer = new wxFlexGridSizer(0, 3, 3, 0);\r
int i = 0;\r
std::list<LandscapeDefinitionsEntry> &defns =\r
landscapeDefinitions.getAllLandscapes();\r
-@@ -438,7 +438,7 @@
+@@ -438,7 +438,7 @@ void SettingsFrame::createPlayersPanel()
wxT("Players are persistent for game"));\r
playersPanelSizer->Add(IDC_SERVER_RESIDUAL_CTRL, 0, wxALIGN_CENTER | wxTOP, 10);\r
\r
- wxSizer *sizer = new wxGridSizer(3, 3);\r
-+ wxSizer *sizer = new wxGridSizer(3, 3, wxSize(5, 5));\r
++ wxSizer *sizer = new wxGridSizer(0, 3, 3, 0);\r
playersPanelSizer->Add(sizer, 0, wxALL | wxALIGN_CENTER, 10);\r
\r
for (int i=0; i<24; i++)\r