mirror of https://github.com/bsnes-emu/bsnes.git
Update to bsnes v027r04? release.
Okay, I posted a new WIP. This one's source only again, since the Windows port is still unchanged. I went through and used std::min + std::max, rather than my own #define, for the sole benefit of getting Nach's JMA code to compile again (JMA includes a C++ standard header that doesn't like you #defining min/max, apparently). I was kind of cheap with it though, max(0, min(10, value)) -> max(0U, min(10U, value)), etc. Geez, std::min/max can't even cast between uint16 and uint32. What a joke, I'll have to write my own that takes advantage of type traits. I also started killing off the "bheader.h" files. Since 90% of them are just template classes, I figure I may as well stick them all in a namespace and make something akin to boost / Loki. I'm calling this one nall (I love making up all these names, lately). I also use gcc -I to point to it, so you get #include <nall/array.hpp> instead of #include "../../../lib/barray.h", much nicer. Taking advantage of the new template library, I added any.hpp (generic object container), traits.hpp (type traits) and static.hpp (static assert, if), and with that, I made stdint.hpp, which is a C++ implementation of stdint.h. Since stdint.h is part of C99, it isn't included with all compilers (eg Visual C++). By using sizeof() and static_if, I was able to make my own compiler-independent version of this file. Thus, the dependency on stdint.h was removed. I'd be very interested in feedback on anything in nall/ (it's located in src/lib). Specifically, could someone with a big-endian machine test any.hpp? I'm worried that downcasting will reverse the order of data read back. Example test app: #include <stdio.h> #include <nall/any.hpp> int main() { nall::any t = 0x01020304; printf("0x%x\n",nall::any_cast<short>(t)); //should print 0x0304 return 0; } > Please byuu, can you extend the API, would you be so kind? Of course, I want vai to be used for more than just SNES emulation. Though I've yet to get anyone using any of my libraries before, so it may be a fairly pointless endeavor. It'll take me some time, though. I'm working on a lot of other stuff first. > Anyways, byuu, here's what I wrote of the OpenGL renderer so far, to > prove its very much being worked on. Really cool! My only concern is the use of Win32-specific code (header, GetForegroundWindow(), HDC stuff, setting up the pixel format stuff) ... no idea how this is going to compile on Linux :( I don't know the Linux equivalents to all of the Win32-specific stuff being done. Nonetheless, please take your time. I'll check it out when you have the Win version finished. Thanks a million for making this :D > What about guys like me who just stick to Intel HDA. Hah, I do the same. I'm not going to spend more on my sound card than on my mainboard that comes _with_ onboard sound. HDA sounds just fine to me :/ [No archive available]
This commit is contained in:
parent
f77aca7172
commit
a15d15047c