This is running natively. It took about 4 hours work of source modification, adding extra platform checks everywhere necessary, but most were identical to linux (the things that were unix filesystem operations). It took an hour to get SDL 1.2 working with the mac-specific header files, and to work through a bunch of linker errors. It's a very messy job, but the main outcome is it didn't actually require that much work, and I'd be happy to help more on it. Otherwise the Mac system OpenGL frameworks (libraries) were easy to link to.
I started trying to use clang (Apple LLVM compiler) with makefile, but couldn't resolve linker errors, so I imported into an Xcode project so it would manage compiling properly. Having got it to run now though, the makefile could be fixed to work.
BTW there were 395 compiler warnings -- your C++ is a bit outdated and messy
(BTW the 'register' tag is completely ignored by modern compilers, that was most of the warnings)
There are some obvious problems and as I'm a complete noob to the game I don't actually know how to play to test more things, but generally it worked and created a universe and loaded it.
Confirmed working:
- Game graphics
- World gen, save & load
- Movement (WASD, jump)
- Placing voxel (at least the one that was in inventory to start)
- Key mapping
- Fullscreen & windowed
Not completely working or not working at all:
- Audio (kinda works, but system complains it's using deprecated API. Upgrading to SDL 2.0 would fix). Volume setting has no effect
- Opening inventory ('I' key) didn't seem to work? Not sure why
- Retina graphics (this is normal, no openGL games support retina well)
BTW J'ai remarqué que vous êtes français -- je parle français bien mais je vais mieux à comprendre qu'à parler/écrire (j'ai aucune doute qu'il y a plusieurs d'erreurs dans cette phrase).
Congratulation for this work
We'll try to help you as far as we can....
About SDL sound, we already got sound problems on Windows depending on how the SDL library is compiled. The problem with SDL audio is that this library is built differently depending on which audio library header was detected. As we understood, if no "modern" audio system header is detected on SDL compilation, it revert on some kind of default codepath.
We suggest to try a precompiled library from the official SDL website to test if it's working better.
We'll certainly make an SDL 2 official transition soon. (That's a change the core team will do all internally because that's an important move, we have to master it).
At this point, the "not working" inventory seem to be the only serious issue.
The inventory opening is triggered in ZGame_Events.cpp at line 869.
First, we suggest you insert a breakpoint (or a printf) into the "if" block to see if the execution reach in when you press the "I" key. If not the case, it could be a problem about keyboard scancode.
If execution enters well into the "if", make the following tests :
Look at the sidebar : does the sidebar is displaying well ? (Image showing the sidebar at the right of the screen
http://www.blackvoxel.com/view.php?node=1239).
Try to hit the "F12" key : A little transparent window should show on the upper left of the screen displaying framerate. (This test is for ensuring that the Blackvoxel windowing system is working well. )
An opengl display problem is always possible, but very unlikely as we choosed a "most compatible" way to make display an never get any serious opengl display problems despite various drivers and platforms.
As we understand, you used the LLVM compiler. As currently, the status of Blackvoxel is "untested" with LLVM, we can not exclude the possibility that some problems can come from.
Like a lot of video games, Blackvoxel uses a rather "low level" programming style and a lot of optimisation (in order to make the dynamic MVI concept running at a good speed :
http://www.blackvoxel.com/view.php?node=1569 ).
That can make compiler little differences more important than in regular programs.
Ultimately, if nothing else works, we suggest to make a try with the gcc compiler to see if some issues goes out.
Oui, nous sommes français. Nous avons bien compris ce que vous avez dit.
Ne vous inquietez pas pour les petites fautes. Nous sommes certains que nous en faisons beaucoup quand nous parlons ou écrivons en anglais.
The Blackvoxel Team