mitchellsternke / supermariobros-c Goto Github PK
View Code? Open in Web Editor NEWAn attempt to translate the original Super Mario Bros. for the NES to readable C/C++
An attempt to translate the original Super Mario Bros. for the NES to readable C/C++
From the source directory, I built the game like this using gcc 4.8.5 and SDL 2.0.3:
g++ -std=c++11 Main.cpp Emulation/*.cpp SMB/*.cpp Util/*.cpp -o smb -lSDL2
First, the compilation errors:
In SMB/SMBEngine.cpp
, there's a memcpy
with a cast to ptrdiff_t
. My compiler wasn't happy unless that was std::ptrdiff_t
.
Similarly in SMB/SMBEngine.hpp
, the declaration of writeData
that takes a size_t
argument needed std::size_t
.
The game itself ran insanely fast. Granted, I didn't look very hard, but I didn't see any framerate limit code.
In Main.cpp
, right before while (running)
, I added:
int program_start = SDL_GetTicks();
int frame = 0;
Inside that main loop block, after the call to SDL_RenderPresent(renderer);
, I added the following:
int now = SDL_GetTicks();
int delay = program_start + int(double(frame) * double(1000) / double(60)) - now;
if (delay > 0)
{
SDL_Delay(delay);
}
frame++;
It's not super elegant, but it works pretty well to correct the framerate to 60FPS.
$ make
[ 5%] [FLEX][scanner] Building scanner with flex 2.5.35
[ 11%] [BISON][parser] Building parser with bison 2.3
asm6502.y: conflicts: 14 shift/reduce
Scanning dependencies of target codegen
[ 17%] Building CXX object codegen/CMakeFiles/codegen.dir/parser.cpp.o
[ 23%] Building CXX object codegen/CMakeFiles/codegen.dir/lexer.cpp.o
[ 29%] Building CXX object codegen/CMakeFiles/codegen.dir/ast.cpp.o
[ 35%] Building CXX object codegen/CMakeFiles/codegen.dir/translator.cpp.o
[ 41%] Building CXX object codegen/CMakeFiles/codegen.dir/util.cpp.o
[ 47%] Linking CXX executable codegen
[ 47%] Built target codegen
Scanning dependencies of target smbc
[ 52%] Building CXX object CMakeFiles/smbc.dir/source/Main.cpp.o
[ 58%] Building CXX object CMakeFiles/smbc.dir/source/Emulation/APU.cpp.o
[ 64%] Building CXX object CMakeFiles/smbc.dir/source/Emulation/Controller.cpp.o
[ 70%] Building CXX object CMakeFiles/smbc.dir/source/Emulation/MemoryAccess.cpp.o
In file included from /Users/${user}/Desktop/smb/smb-c/source/Emulation/MemoryAccess.cpp:1:
/Users/${user}/Desktop/smb/smb-c/source/Emulation/../SMB/SMBEngine.hpp:174:64: error: no type named 'size_t' in
namespace 'std'
void writeData(uint16_t address, const uint8_t* data, std::size_t length);
~~~~~^
1 error generated.
make[2]: *** [CMakeFiles/smbc.dir/source/Emulation/MemoryAccess.cpp.o] Error 1
make[1]: *** [CMakeFiles/smbc.dir/all] Error 2
make: *** [all] Error 2
mkdir ./build
$ mkdir ./build/
cd ./build/
$ cd ./build/
cmake ..
$ cmake ..
-- The C compiler identification is AppleClang 9.0.0.9000039
-- The CXX compiler identification is AppleClang 9.0.0.9000039
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found BISON: /usr/bin/bison (found version "2.3")
-- Found FLEX: /usr/bin/flex (found version "2.5.35")
-- Boost version: 1.67.0
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/${user}/Desktop/smb/smb-c/build
make
$ make
[ 5%] [FLEX][scanner] Building scanner with flex 2.5.35
[ 11%] [BISON][parser] Building parser with bison 2.3
asm6502.y: conflicts: 14 shift/reduce
Scanning dependencies of target codegen
[ 17%] Building CXX object codegen/CMakeFiles/codegen.dir/parser.cpp.o
[ 23%] Building CXX object codegen/CMakeFiles/codegen.dir/lexer.cpp.o
[ 29%] Building CXX object codegen/CMakeFiles/codegen.dir/ast.cpp.o
[ 35%] Building CXX object codegen/CMakeFiles/codegen.dir/translator.cpp.o
[ 41%] Building CXX object codegen/CMakeFiles/codegen.dir/util.cpp.o
[ 47%] Linking CXX executable codegen
[ 47%] Built target codegen
Scanning dependencies of target smbc
[ 52%] Building CXX object CMakeFiles/smbc.dir/source/Main.cpp.o
[ 58%] Building CXX object CMakeFiles/smbc.dir/source/Emulation/APU.cpp.o
[ 64%] Building CXX object CMakeFiles/smbc.dir/source/Emulation/Controller.cpp.o
[ 70%] Building CXX object CMakeFiles/smbc.dir/source/Emulation/MemoryAccess.cpp.o
In file included from /Users/${user}/Desktop/smb/smb-c/source/Emulation/MemoryAccess.cpp:1:
/Users/${user}/Desktop/smb/smb-c/source/Emulation/../SMB/SMBEngine.hpp:174:64: error: no type named 'size_t' in namespace 'std'
void writeData(uint16_t address, const uint8_t* data, std::size_t length);
~~~~~^
1 error generated.
make[2]: *** [CMakeFiles/smbc.dir/source/Emulation/MemoryAccess.cpp.o] Error 1
make[1]: *** [CMakeFiles/smbc.dir/all] Error 2
make: *** [all] Error 2
macOS Sierra 10.12.6
$ clang --version
$ clang --version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
b29ce3515d6ecf4415a18aa4c5f18d5026c78699
I am not a lawyer and is in no way giving legal advice. However, this project seems like it's sharing copyrighted software from Nintendo. This fact could be a problem.
Manjaro can't compile this because of missing SDL?
ain.cpp:(.text+0x58c): undefined reference to SDL_GetTicks' /usr/bin/ld: Main.cpp:(.text+0x5b8): undefined reference to
SDL_PollEvent'
/usr/bin/ld: Main.cpp:(.text+0x604): undefined reference to SDL_GetKeyboardState' /usr/bin/ld: Main.cpp:(.text+0x7d6): undefined reference to
SDL_SetWindowFullscreen'
/usr/bin/ld: Main.cpp:(.text+0x81b): undefined reference to SDL_UpdateTexture' /usr/bin/ld: Main.cpp:(.text+0x82a): undefined reference to
SDL_RenderClear'
/usr/bin/ld: Main.cpp:(.text+0x843): undefined reference to SDL_RenderSetLogicalSize' /usr/bin/ld: Main.cpp:(.text+0x863): undefined reference to
SDL_RenderCopy'
/usr/bin/ld: Main.cpp:(.text+0x885): undefined reference to SDL_RenderSetLogicalSize' /usr/bin/ld: Main.cpp:(.text+0x8a5): undefined reference to
SDL_RenderCopy'
/usr/bin/ld: Main.cpp:(.text+0x8b4): undefined reference to SDL_RenderPresent' /usr/bin/ld: Main.cpp:(.text+0x8b9): undefined reference to
SDL_GetTicks'
/usr/bin/ld: Main.cpp:(.text+0x922): undefined reference to SDL_Delay' /usr/bin/ld: CMakeFiles/smbc.dir/source/Emulation/APU.cpp.o: in function
APU::stepFrame()':
APU.cpp:(.text+0x3f4): undefined reference to SDL_LockAudio' /usr/bin/ld: APU.cpp:(.text+0x4f1): undefined reference to
SDL_UnlockAudio'
/usr/bin/ld: CMakeFiles/smbc.dir/source/Util/Video.cpp.o: in function generateScanlineTexture(SDL_Renderer*)': Video.cpp:(.text+0x3f2): undefined reference to
SDL_CreateTexture'
/usr/bin/ld: Video.cpp:(.text+0x4fe): undefined reference to SDL_SetTextureBlendMode' /usr/bin/ld: Video.cpp:(.text+0x518): undefined reference to
SDL_UpdateTexture'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/smbc.dir/build.make:219: smbc] Error 1
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/smbc.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
I have successfully compiled and ran the game, but I can't seem to be able to use any controls other that left, right, restart, pause and fullscreen as left arrow, right arrow, r, enter, and f. On the screen where I choose between one or two player mode, I can not use any button to change the selected option, but I can use enter to select one player.
To compile and run, I did:
mkdir build
cd build
cmake ..
make
mv smbc .. # for the .nes file
cd ..
./smbc
I am using macOS 11.6
Are there other controls, or other configs needed?
How do I compile the code on windows, is it possible with visual studio?
cmake ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found BISON: /usr/bin/bison (found version "3.0.4")
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- Boost version: 1.65.1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/itachi/my_Learning/SuperMarioBros-C/build
itachi@itachi-pc ~/my_Learning/SuperMarioBros-C/build $ make
[ 5%] [FLEX][scanner] Building scanner with flex 2.6.4
[ 10%] [BISON][parser] Building parser with bison 3.0.4
asm6502.y: warning: 14 shift/reduce conflicts [-Wconflicts-sr]
Scanning dependencies of target codegen
[ 15%] Building CXX object codegen/CMakeFiles/codegen.dir/parser.cpp.o
[ 21%] Building CXX object codegen/CMakeFiles/codegen.dir/lexer.cpp.o
[ 26%] Building CXX object codegen/CMakeFiles/codegen.dir/ast.cpp.o
[ 31%] Building CXX object codegen/CMakeFiles/codegen.dir/translator.cpp.o
[ 36%] Building CXX object codegen/CMakeFiles/codegen.dir/util.cpp.o
[ 42%] Linking CXX executable codegen
[ 42%] Built target codegen
Scanning dependencies of target smbc
[ 47%] Building CXX object CMakeFiles/smbc.dir/source/Configuration.cpp.o
[ 52%] Building CXX object CMakeFiles/smbc.dir/source/Main.cpp.o
[ 57%] Building CXX object CMakeFiles/smbc.dir/source/Emulation/APU.cpp.o
[ 63%] Building CXX object CMakeFiles/smbc.dir/source/Emulation/Controller.cpp.o
[ 68%] Building CXX object CMakeFiles/smbc.dir/source/Emulation/MemoryAccess.cpp.o
[ 73%] Building CXX object CMakeFiles/smbc.dir/source/Emulation/PPU.cpp.o
[ 78%] Building CXX object CMakeFiles/smbc.dir/source/SMB/SMB.cpp.o
[ 84%] Building CXX object CMakeFiles/smbc.dir/source/SMB/SMBData.cpp.o
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp: In member function ‘void SMBEngine::loadConstantData()’:
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:222:26: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::TopStatusBarLine_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GameText_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
TopStatusBarLine - GameText, TopStatusBarLine - GameText,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:222:55: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::TopStatusBarLine_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GameText_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
TopStatusBarLine - GameText, TopStatusBarLine - GameText,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:223:27: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::WorldLivesDisplay_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GameText_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
WorldLivesDisplay - GameText, WorldLivesDisplay - GameText,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:223:57: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::WorldLivesDisplay_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GameText_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
WorldLivesDisplay - GameText, WorldLivesDisplay - GameText,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:224:25: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::TwoPlayerTimeUp_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GameText_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
TwoPlayerTimeUp - GameText, OnePlayerTimeUp - GameText,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:224:53: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::OnePlayerTimeUp_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GameText_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
TwoPlayerTimeUp - GameText, OnePlayerTimeUp - GameText,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:225:27: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::TwoPlayerGameOver_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GameText_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
TwoPlayerGameOver - GameText, OnePlayerGameOver - GameText,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:225:57: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::OnePlayerGameOver_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GameText_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
TwoPlayerGameOver - GameText, OnePlayerGameOver - GameText,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:226:25: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::WarpZoneWelcome_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GameText_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
WarpZoneWelcome - GameText, WarpZoneWelcome - GameText
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:226:53: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::WarpZoneWelcome_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GameText_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
WarpZoneWelcome - GameText, WarpZoneWelcome - GameText
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:920:21: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::World1Areas_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::AreaAddrOffsets_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
World1Areas - AreaAddrOffsets, World2Areas - AreaAddrOffsets,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:920:52: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::World2Areas_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::AreaAddrOffsets_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
World1Areas - AreaAddrOffsets, World2Areas - AreaAddrOffsets,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:921:21: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::World3Areas_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::AreaAddrOffsets_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
World3Areas - AreaAddrOffsets, World4Areas - AreaAddrOffsets,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:921:52: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::World4Areas_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::AreaAddrOffsets_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
World3Areas - AreaAddrOffsets, World4Areas - AreaAddrOffsets,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:922:21: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::World5Areas_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::AreaAddrOffsets_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
World5Areas - AreaAddrOffsets, World6Areas - AreaAddrOffsets,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:922:52: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::World6Areas_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::AreaAddrOffsets_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
World5Areas - AreaAddrOffsets, World6Areas - AreaAddrOffsets,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:923:21: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::World7Areas_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::AreaAddrOffsets_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
World7Areas - AreaAddrOffsets, World8Areas - AreaAddrOffsets
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:923:52: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::World8Areas_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::AreaAddrOffsets_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
World7Areas - AreaAddrOffsets, World8Areas - AreaAddrOffsets
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3048:21: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::DeathMusHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
DeathMusHdr - MHD, // event music
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3049:24: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GameOverMusHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GameOverMusHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3050:23: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::VictoryMusHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
VictoryMusHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3051:25: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::WinCastleMusHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
WinCastleMusHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3052:24: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GameOverMusHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GameOverMusHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3053:26: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::EndOfLevelMusHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
EndOfLevelMusHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3054:27: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::TimeRunningOutHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
TimeRunningOutHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3055:20: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::SilenceHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
SilenceHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3056:29: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart1Hdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart1Hdr - MHD, // area music
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3057:21: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::WaterMusHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
WaterMusHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3058:27: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::UndergroundMusHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
UndergroundMusHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3059:22: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::CastleMusHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
CastleMusHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3060:23: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::Star_CloudHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
Star_CloudHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3061:30: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelLeadInHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelLeadInHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3062:23: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::Star_CloudHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
Star_CloudHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3063:20: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::SilenceHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
SilenceHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3064:30: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelLeadInHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelLeadInHdr - MHD, // ground level music layout
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3065:29: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart1Hdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart1Hdr - MHD, GroundLevelPart1Hdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3065:56: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart1Hdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart1Hdr - MHD, GroundLevelPart1Hdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3066:30: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart2AHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart2AHdr - MHD, GroundLevelPart2BHdr - MHD, GroundLevelPart2AHdr - MHD, GroundLevelPart2CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3066:58: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart2BHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart2AHdr - MHD, GroundLevelPart2BHdr - MHD, GroundLevelPart2AHdr - MHD, GroundLevelPart2CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3066:86: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart2AHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
undLevelPart2AHdr - MHD, GroundLevelPart2BHdr - MHD, GroundLevelPart2AHdr - MHD, GroundLevelPart2CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3066:114: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart2CHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
, GroundLevelPart2BHdr - MHD, GroundLevelPart2AHdr - MHD, GroundLevelPart2CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3067:30: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart2AHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart2AHdr - MHD, GroundLevelPart2BHdr - MHD, GroundLevelPart2AHdr - MHD, GroundLevelPart2CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3067:58: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart2BHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart2AHdr - MHD, GroundLevelPart2BHdr - MHD, GroundLevelPart2AHdr - MHD, GroundLevelPart2CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3067:86: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart2AHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
undLevelPart2AHdr - MHD, GroundLevelPart2BHdr - MHD, GroundLevelPart2AHdr - MHD, GroundLevelPart2CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3067:114: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart2CHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
, GroundLevelPart2BHdr - MHD, GroundLevelPart2AHdr - MHD, GroundLevelPart2CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3068:30: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart3AHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart3AHdr - MHD, GroundLevelPart3BHdr - MHD, GroundLevelPart3AHdr - MHD, GroundLevelLeadInHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3068:58: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart3BHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart3AHdr - MHD, GroundLevelPart3BHdr - MHD, GroundLevelPart3AHdr - MHD, GroundLevelLeadInHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3068:86: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart3AHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
undLevelPart3AHdr - MHD, GroundLevelPart3BHdr - MHD, GroundLevelPart3AHdr - MHD, GroundLevelLeadInHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3068:114: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelLeadInHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
, GroundLevelPart3BHdr - MHD, GroundLevelPart3AHdr - MHD, GroundLevelLeadInHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3069:29: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart1Hdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart1Hdr - MHD, GroundLevelPart1Hdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3069:56: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart1Hdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart1Hdr - MHD, GroundLevelPart1Hdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3070:30: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart4AHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart4AHdr - MHD, GroundLevelPart4BHdr - MHD, GroundLevelPart4AHdr - MHD, GroundLevelPart4CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3070:58: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart4BHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart4AHdr - MHD, GroundLevelPart4BHdr - MHD, GroundLevelPart4AHdr - MHD, GroundLevelPart4CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3070:86: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart4AHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
undLevelPart4AHdr - MHD, GroundLevelPart4BHdr - MHD, GroundLevelPart4AHdr - MHD, GroundLevelPart4CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3070:114: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart4CHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
, GroundLevelPart4BHdr - MHD, GroundLevelPart4AHdr - MHD, GroundLevelPart4CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3071:30: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart4AHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart4AHdr - MHD, GroundLevelPart4BHdr - MHD, GroundLevelPart4AHdr - MHD, GroundLevelPart4CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3071:58: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart4BHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart4AHdr - MHD, GroundLevelPart4BHdr - MHD, GroundLevelPart4AHdr - MHD, GroundLevelPart4CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3071:86: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart4AHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
undLevelPart4AHdr - MHD, GroundLevelPart4BHdr - MHD, GroundLevelPart4AHdr - MHD, GroundLevelPart4CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3071:114: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart4CHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
, GroundLevelPart4BHdr - MHD, GroundLevelPart4AHdr - MHD, GroundLevelPart4CHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3072:30: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart3AHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart3AHdr - MHD, GroundLevelPart3BHdr - MHD, GroundLevelPart3AHdr - MHD, GroundLevelLeadInHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3072:58: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart3BHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart3AHdr - MHD, GroundLevelPart3BHdr - MHD, GroundLevelPart3AHdr - MHD, GroundLevelLeadInHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3072:86: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart3AHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
undLevelPart3AHdr - MHD, GroundLevelPart3BHdr - MHD, GroundLevelPart3AHdr - MHD, GroundLevelLeadInHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3072:114: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelLeadInHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
, GroundLevelPart3BHdr - MHD, GroundLevelPart3AHdr - MHD, GroundLevelLeadInHdr - MHD,
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3073:30: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart4AHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart4AHdr - MHD, GroundLevelPart4BHdr - MHD, GroundLevelPart4AHdr - MHD, GroundLevelPart4CHdr - MHD
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3073:58: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart4BHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
GroundLevelPart4AHdr - MHD, GroundLevelPart4BHdr - MHD, GroundLevelPart4AHdr - MHD, GroundLevelPart4CHdr - MHD
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3073:86: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart4AHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
undLevelPart4AHdr - MHD, GroundLevelPart4BHdr - MHD, GroundLevelPart4AHdr - MHD, GroundLevelPart4CHdr - MHD
/home/itachi/my_Learning/SuperMarioBros-C/source/SMB/SMBData.cpp:3073:114: warning: narrowing conversion of ‘(((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::GroundLevelPart4CHdr_ptr) - ((int)((SMBEngine*)this)->SMBEngine::dataPointers.SMBDataPointers::MusicHeaderData_ptr))’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
D, GroundLevelPart4BHdr - MHD, GroundLevelPart4AHdr - MHD, GroundLevelPart4CHdr - MHD
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-c++11-narrowing’
[ 89%] Building CXX object CMakeFiles/smbc.dir/source/SMB/SMBEngine.cpp.o
[ 94%] Building CXX object CMakeFiles/smbc.dir/source/Util/Video.cpp.o
[100%] Linking CXX executable smbc
[100%] Built target smbc
itachi@itachi-pc ~/my_Learning/SuperMarioBros-C/build $ ./smbc
Failed to open the file "Super Mario Bros. (JU) (PRG0) [!].nes". Exiting.
Failed to initialize. Please check previous error messages for more information. The program will now exit.
I have the dependencies, but I got this error when I ran make:
collect2.exe: error: ld returned 1 exit status
make[2]: *** [codegen/CMakeFiles/codegen.dir/build.make:175: codegen/codegen] Error 1
make[1]: *** [CMakeFiles/Makefile2:142: codegen/CMakeFiles/codegen.dir/all] Error 2
make: *** [Makefile:103: all] Error 2
I don't know if that's the whole thing but there are other errors at other places
Hello,
Would this code allow someone to port the game to Sega Master System? Just curious as I have always wondered what the game might look like on SMS with that systems expanded color palette.
Thanks,
Tim
I tried running the smbc
executable and it says "This app can't run on your PC." I compiled using WSL Ubuntu because I was having too much issues trying to compile on Windows. The bash spewed a bunch of warnings when I compiled it the first time but I don't know if that is the real issue...
I can't compile the project.
error is:
“parser.hpp”: No such file or directory Project1 C:\Users\pf\source\repos\Project1\Project1\codegen\translator.cpp 6
I have a better palette, code from PPU.cpp (palette is based off of the one used in BizHawk):
const uint32_t paletteRGB[64] = { 0x666666, 0x002a88, 0x1412a8, 0x3b00a4, 0x5c007e, 0x6e0040, 0x6c0700, 0x571d00, 0x343500, 0x0c4900, 0x005200, 0x004f08, 0x00404e, 0x000000, 0x000000, 0x000000, 0xaeaeae, 0x155fda, 0x4240fe, 0x7627ff, 0xa11bcd, 0xb81e7c, 0xb53220, 0x994f00, 0x6c6e00, 0x388700, 0x0d9400, 0x009032, 0x007c8e, 0x000000, 0x000000, 0x000000, 0xfefefe, 0x64b0fe, 0x9390fe, 0xc777fe, 0xf36afe, 0xfe6ecd, 0xfe8270, 0xeb9f23, 0xbdbf00, 0x89d900, 0x5de530, 0x45e182, 0x48cedf, 0x4f4f4f, 0x000000, 0x000000, 0xfefefe, 0xc1e0fe, 0xd4d3fe, 0xe9c8fe, 0xfbc3fe, 0xfec5eb, 0xfecdc6, 0xf7d9a6, 0xe5e695, 0xd0f097, 0xbef5ab, 0xb4f3cd, 0xb5ecf3, 0xb8b8b8, 0x000000, 0x000000 };
When entering the warp zone pipe in 1-2 before they are loaded, the game does not load the same destination as the original cartridge release of the game.
Video
What do I do to fix this? I am compiling with mingw32-make.
[ 47%] Built target codegen
[ 52%] Linking CXX executable smbc.exe
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x120): undefined reference to `SDL_Init'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x15e): undefined reference to `SDL_CreateWindow'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x17f): undefined reference to `SDL_CreateRenderer'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x1a0): undefined reference to `SDL_RenderSetLogicalSize'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x1c8): undefined reference to `SDL_CreateTexture'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x21f): undefined reference to `SDL_OpenAudio'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x229): undefined reference to `SDL_PauseAudio'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x241): undefined reference to `SDL_CloseAudio'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x250): undefined reference to `SDL_DestroyTexture'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x25f): undefined reference to `SDL_DestroyTexture'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x26e): undefined reference to `SDL_DestroyRenderer'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x27d): undefined reference to `SDL_DestroyWindow'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x282): undefined reference to `SDL_Quit'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x2d6): undefined reference to `SDL_GetTicks'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x2ff): undefined reference to `SDL_PollEvent'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x345): undefined reference to `SDL_GetKeyboardState'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x529): undefined reference to `SDL_SetWindowFullscreen'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x569): undefined reference to `SDL_UpdateTexture'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x578): undefined reference to `SDL_RenderClear'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x592): undefined reference to `SDL_RenderSetLogicalSize'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x5b4): undefined reference to `SDL_RenderCopy'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x5ce): undefined reference to `SDL_RenderSetLogicalSize'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x5f0): undefined reference to `SDL_RenderCopy'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x5ff): undefined reference to `SDL_RenderPresent'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x604): undefined reference to `SDL_GetTicks'
CMakeFiles\smbc.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x658): undefined reference to `SDL_Delay'
CMakeFiles\smbc.dir/objects.a(APU.cpp.obj):APU.cpp:(.text+0x39f): undefined reference to `SDL_LockAudio'
CMakeFiles\smbc.dir/objects.a(APU.cpp.obj):APU.cpp:(.text+0x49a): undefined reference to `SDL_UnlockAudio'
CMakeFiles\smbc.dir/objects.a(Video.cpp.obj):Video.cpp:(.text+0x3fb): undefined reference to `SDL_CreateTexture'
CMakeFiles\smbc.dir/objects.a(Video.cpp.obj):Video.cpp:(.text+0x4f8): undefined reference to `SDL_SetTextureBlendMode'
CMakeFiles\smbc.dir/objects.a(Video.cpp.obj):Video.cpp:(.text+0x516): undefined reference to `SDL_UpdateTexture'
C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x2e): undefined reference to `WinMain'
collect2.exe: error: ld returned 1 exit status
mingw32-make[2]: *** [CMakeFiles\smbc.dir\build.make:198: smbc.exe] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:72: CMakeFiles/smbc.dir/all] Error 2
mingw32-make: *** [Makefile:83: all] Error 2
EDIT: Figured out there is a Constants.hpp file so it should be fairly simple to make a settings window that modifies the numbers within. A settings window would be able useful to people to make it easier to change the palette colors, sampling rate, frame-rate, etc. Obviously it should work fairly straightforward for casual people to just open the game and play without changing any settings. (This is a suggestion, but it's not really needed for most people)
Feature Request:
Many thanks & happy new year!
Hi could you please add controller support to this game?
This is not an issue just a question. I made a translation of Super Mario Bros for c#/xna and wondering if I could use your emulation code in my project?
This would allow APU emulation to be removed by converting the sounds to wav/other format while keeping the sounds accurate. Here's an NSF file that includes both sounds and music.
Super Mario Bros. (NTSC) (SFX).zip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.