Ericson2314 / Voxlap

Making Ken Silverman's "Voxlap" voxel graphics engine run on any platform with SDL.
97 stars 14 forks source link

Merging in Lensman's first round of Fixes #6

Closed Ericson2314 closed 11 years ago

Ericson2314 commented 11 years ago

OK! got your stuff. I am putting the openGL stuff in a separate branch for now. That's not to say I think it belongs (I think its great!!!), but I will probably end up continually rebasing that branch like no_asm, so we end up with a fully functional "museum" port that sticks to the original and extended version. Will help debugging too.

I see no changes to voxlap5.cpp, are the changes that fix the white sprites elsewhere (I can answer this myself once I build it).

Also, does this actually work for you with MSVC?

typedef union
{
    struct { long x, y; };
    long array[2];
#ifdef __GNUC__
    float vec __attribute__ ((vector_size (8)));
#endif
#ifdef _MSC_VER
    __declspec(align(16)) __m64 vec;
#endif
} lpoint2d;

My MSVC says it doesn't support this type of anonymous struct in anonymous union stuff in C++ mode, only C. What I have now does compile, but isn't as ideal.

Ericson2314 commented 11 years ago

Re: Ken's Editors. Ok, yeah we should probably leave them out for the immediate future, but I'd do Qt for GUI stuff, and refector the other windows bits either into *main or into a separate intermediary backend. In the long run it would be awesome to combine them into one super tool, but I think refactoring the platform-dependant into a shared object file would also help with that.

Lensman commented 11 years ago

Great thanks. Got voxed to compile, after commenting out some messagebox functions related to save / load. Similar in voxed, slab6 and kwalk. Should be easier than I first thought. So, basically we need a file /save load mech that works cross platform. Do you have any suggestions?

Lensman commented 11 years ago

Specifically the functions are savefileselect and loadfileselect which are duplicated across slab6, voxed and kwalk. Menus are another issue.

Lensman commented 11 years ago

Yes the declspec(align(16)) fixed the anon union as well as xmmintrin.h (for the m64, and other mmx relateds ), which isn't installed by default on windows

Changes that fix white sprite are so simple you'll laugh;

spade.flags = 1; instead of spade.flags = 0; So something upstream goes wonky when it's set to 0. I will investigate

Ericson2314 commented 11 years ago

Yay! savefileselect and loadfileselect I guess we can pull into another file, iogui.cpp ? Also rebased you stuff, though evidentally in a way that github doesn't recognize. I will now go back to move back to the xmm and mutate the history again.

Ericson2314 commented 11 years ago

https://github.com/Ericson2314/Voxlap/tree/openGL

Ericson2314 commented 11 years ago

Another thing is with proper use of NOASM the no_asm branch shouldn't be needed. I hope I can fix the macro stuff so that works soon.

Lensman commented 11 years ago

Sweet, voxed has an FPS counter. It runs at about 1/4 of the framerate of the ref binary which is just about right when not using SSE2, so the PBO and pure SDL version have same framerate where I thought the PBO was slowing things down. "If it bleeds, we can kill it."

Ericson2314 commented 11 years ago

Ah yeah, try the conservative branch, you can do SDL+SSE2 there. Speed it not an issue, just bugs. I'll give you a heads up when I got the history again rebased write, and we can merge in your comments to get voxed et all working too.

I'll have to go in about 30 minutes, but do you want to get on IRC? #buildandshoot at freenode

Lensman commented 11 years ago

I'm on IRC freenode now if you have time. If not another day.

Ericson2314 commented 11 years ago

ah freenode

Ericson2314 commented 11 years ago

I am on as Ericson2314, you can give me your nick or just /msg me

Ericson2314 commented 11 years ago

Well merged in round one, but feel free to keep on posting here or open up new ones.

aponigricon commented 11 years ago

god damn it you woke me in my sleep cant you post updates in like 8 hours? goodnight

Ericson2314 commented 11 years ago

wait what? ....Don't turn on audio notifications? :)

Ericson2314 commented 11 years ago

oh and whoops, #buildandshoot is sadly on quakenet

aponigricon commented 11 years ago

Well no shit, Sherlock.

Ericson2314 commented 11 years ago

...you should go back sleep