The Visual Studio wiki isn't THAT bad...(but it does desperately need updating)
I don't feel like updating the wiki, so do this: -- Download: http://www.mediafire.com/?23zbauy855dl3i9 This should contain all of the includes and libraries you will need to compile. (The current Source-Required.zip should probably be replaced with this) -- Unzip, and copy the contents of the "CopyNPaste" folder (NOT the actual folder, just the stuff inside) to where your TPT source is. -- Create the project like the wiki says. -- It's probably a good idea to go to Project -> Properties -> Configuration Manager (button at top right) and change it from Debug to Release. -- Add the Includes folder to the Include Directories like the wiki says. (no need to add \Libraries) -- Add the following to the Additional Dependencies thing (follow the wiki to find it): shell32.lib ws2_32.lib wsock32.lib "\Libraries\SDL.lib" "\Libraries\SDLmain.lib" "\Libraries\libbz2.lib" "\Libraries\pthreadVC2.lib" "\Libraries\regex.lib" "\Libraries\lua5.1.lib" "\Libraries\libfftw3f-3.lib" Where is the location of your TPT source. -- To enable Lua console and gravity using FFTW, go to Project -> Properties -> Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions (open drop-down menu) -> , and add LUACONSOLE GRAVFFT to the list. (don't delete what's already there) -- Optionally (I *think* this makes your final compiled program a bit faster), under Project -> Properties -> Configuration Properties -> C/C++ -> Code Generation, change the Floating Point Model from "Precise" to "Fast". -- In graphics.c, misc.c, and powder.c, remove all of the inlines. (I'm not sure if this is still necessary, but I don't think anyone fixed it yet...?) In other words, change all #if defined(WIN32) && !defined(__GNUC__) _inline (blah blah) #else inline (blah blah) #endif
to just (blah blah)
-- Also, in luaconsole.h (has this been fixed yet?), do a search for (void*), and if you see a line like *((float*)(((void*)&parts[i])+offset)) = f;
Change (void*) to (unsigned long). (Yes, this is a pretty rough hack, but at least it gets VS to shut up about void* having no size) There should be 4 such lines total. If you don't know what to look for, just replace all (void*) with (unsigned long). (I think the only occurrences of (void*) are with lines like that, so it should be fine) -- Compile. (It should compile successfully) -- Find the resulting .exe file, and move it to your \DLL folder (where I put all of the .dll files). It should run.
And...I don't feel like updating the wiki right now (almost bedtime for me), so.... ...yeah. If you run into trouble, or if I sound confusing (I probably do), you can always ask....