mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
Ports: Make Super Mario work with GCC 11
This commit is contained in:
parent
19064eaaca
commit
2f1ee91b3e
Notes:
sideshowbarker
2024-07-18 18:56:13 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/2f1ee91b3e7 Pull-request: https://github.com/SerenityOS/serenity/pull/6552
1 changed files with 46 additions and 0 deletions
46
Ports/Super-Mario/patches/gcc-11-static-initializers.patch
Normal file
46
Ports/Super-Mario/patches/gcc-11-static-initializers.patch
Normal file
|
@ -0,0 +1,46 @@
|
|||
diff -Naur Super-Mario-Clone-Cpp-master/src/CFG.cpp Super-Mario-Clone-Cpp-master.serenity/src/CFG.cpp
|
||||
--- Super-Mario-Clone-Cpp-master/src/CFG.cpp 2021-04-29 07:39:18.688987494 +0200
|
||||
+++ Super-Mario-Clone-Cpp-master.serenity/src/CFG.cpp 2021-04-29 07:41:19.464330908 +0200
|
||||
@@ -14,11 +13,11 @@
|
||||
int CCFG::GAME_HEIGHT = 448;
|
||||
int CCFG::GAME_WIDTH = 800;
|
||||
|
||||
-Text* CCFG::oText = new Text();
|
||||
-CIMG* CCFG::tSMBLOGO = new CIMG();
|
||||
+Text* CCFG::oText = NULL;
|
||||
+CIMG* CCFG::tSMBLOGO = NULL;
|
||||
|
||||
-MenuManager* CCFG::oMM = new MenuManager();
|
||||
-Music* CCFG::oMusic = new Music();
|
||||
+MenuManager* CCFG::oMM = NULL;
|
||||
+Music* CCFG::oMusic = NULL;
|
||||
|
||||
bool CCFG::keySpace = false;
|
||||
int CCFG::keyIDA = 0;
|
||||
@@ -30,18 +29,26 @@
|
||||
bool CCFG::canMoveBackward = true;
|
||||
|
||||
Text* CCFG::getText() {
|
||||
+ if (!oText)
|
||||
+ oText = new Text();
|
||||
return oText;
|
||||
}
|
||||
|
||||
MenuManager* CCFG::getMM() {
|
||||
+ if (!oMM)
|
||||
+ oMM = new MenuManager();
|
||||
return oMM;
|
||||
}
|
||||
|
||||
Music* CCFG::getMusic() {
|
||||
+ if (!oMusic)
|
||||
+ oMusic = new Music();
|
||||
return oMusic;
|
||||
}
|
||||
|
||||
CIMG* CCFG::getSMBLOGO() {
|
||||
+ if (!tSMBLOGO)
|
||||
+ tSMBLOGO = new CIMG();
|
||||
return tSMBLOGO;
|
||||
}
|
||||
|
Loading…
Reference in a new issue