Quote:
|
Originally Posted by Eric the Red
Yes please!
|
Okay, it should be up now, and you can
grab it here. I have only put the source files in the archive, as the object/executables can be built, and the project file probably contains path information specific to my system, so you'll need to make a new project (deleting any files DevC++ creates by default, like main.cpp), and then add the files in the archive. You will also need to make sure that the right libraries are linked. The defaults should be fine, with one exception: In DevC++ (my version, anyways), go to 'Project', then 'Project Options', then click the 'Parameters' tab, and below the 'Linker' box, there will be a button labelled 'Add Library or Object'; click it. Browse to DevC++'s lib path, and add the file 'libwinmm.a'. If you're trying to build the code under Visual C++, I believe the filename is 'winmm.lib', but I make no guarantees if the code is compatible (VC++ is sometimes flaky).
Anyways, I don't care what you do with it, as long as you don't try to claim you wrote it. If you learn something from it, though, that's great. Also, the code might be a bit ugly (I wrote it like the night before my project was due, so it was kinda rushed, though I have tweaked it a bit since). You'll notice the drawing logic is somewhat separate from the block logic, so it should be possible to rewrite it as a graphical app without changing the core logic too much.
[edit] You'll probably want to change the size of the console window it launches in (the game assumes 80x50), or use alt-enter to go to full screen. Also, the keys are as follows: ESC to exit, SPACE to pause, ALT to rotate clockwise, CTRL to rotate counterclockwise, and the RIGHT, LEFT, and DOWN cursor keys to move blocks. If you want to change the keys, it should be quite trivial. [/edit]