Gloomcookie and other evilness
Jul. 27th, 2003 11:31 pmWaaaaaaaah! I want I want I want.
laumiere is very evil for introducing me to the wonders of Gloomcookie. Now I need to buy for myself. Thats despite me already having spent my spare money by accidentally buying the t.a.T.u. album earlier this week. Where do i find it? Forbidden planet and comics shops, yes, but i doubt I'm going into central London this week. Will large bookshops sell it? I'm going to diiiiiiiiiiiie without it.
Managed to miss a swathe of social engagements this weekend (Vicar alex's birthday, Tenebrae, Picnic&Piracy and Gay Pride march) due to feeling ill and stoppy and unsociable. Feeling a bit insecure recently, which is odd, as I've been feeling the most loved in many months, in a general sort of way, not by anyone in particular. I blame all you wonderful people for making me feel great, you're all wonderful! *huuuuuugs*
I vanquished evil today. I purged Elvira (
snow_leopard's computer) of virtually everything. And she appears to be behaving now. Or maybe the evil spirits that got exorcised have passed to jellyfish - as later the impossible happened - Linux crashed!! Been using Linux for 7 years now, and thats the first time I've seen a Linux crash.
For anyone interested, my game apricots is now version 0.2.4, and compiles under Linux and Windows (assuming you have a compiler and the SDL libraries), with optional audio. I did the cunning thing of putting it on freshmeat.net and now a bunch of geeky Germans appear to be debugging it for me. I'm such a lazy sod. :)
Many many huggles to doseybat who's had her passport stolen while in Moscow. *huuuuuuuugs*
Managed to miss a swathe of social engagements this weekend (Vicar alex's birthday, Tenebrae, Picnic&Piracy and Gay Pride march) due to feeling ill and stoppy and unsociable. Feeling a bit insecure recently, which is odd, as I've been feeling the most loved in many months, in a general sort of way, not by anyone in particular. I blame all you wonderful people for making me feel great, you're all wonderful! *huuuuuugs*
I vanquished evil today. I purged Elvira (
For anyone interested, my game apricots is now version 0.2.4, and compiles under Linux and Windows (assuming you have a compiler and the SDL libraries), with optional audio. I did the cunning thing of putting it on freshmeat.net and now a bunch of geeky Germans appear to be debugging it for me. I'm such a lazy sod. :)
Many many huggles to doseybat who's had her passport stolen while in Moscow. *huuuuuuuugs*
the apricots
Date: 2003-07-29 08:31 am (UTC)I've looked on the google but have so far failed to find out exactly what that library does and why I don't have it on my system!
Re: the apricots
Date: 2003-07-29 08:50 am (UTC)Which compiler are you using? I've got reports of successful Windows compilation using the Borland compiler BCC, and also Cygwin. So it can work, it may require a bit of fiddling. Which file is looking for condefs.h?
If we're lucky, I'm hoping the next release will incude pre-compiled binaries. That'll make installation a lot easier, especially on Windows.
Re: the apricots
Date: 2003-07-29 09:00 am (UTC)Re: the apricots
Date: 2003-07-29 09:10 am (UTC)Please let me know if you get anywhere with it, and good luck. :)
Re: the apricots
Date: 2003-07-29 02:22 pm (UTC)I have a copy of Visual C++ lying round so I'll try to see if I can get it to work.. actually the condefs.h file appears to do very little, apart from #define-ing the USEUNIT etc stuff so that the compiler doesn't treat it as code.
Re: the apricots
Date: 2003-07-29 03:43 pm (UTC)<li>VisualStudio needs windows.h for apricots.cpp, but you have to be careful when you #include it because it seems to #define min/max functions, which then confuses the min/max member functions of the shape class. However, we do need these min/max functions to be defined at some point, because they're used by draw_dither (it seems that for Borland, these are in stdlib as functions when in C++ mode, and I presume Linux does a similar sensible thing - under VisualStudio, I can only find them as #defines). So you need to #include <windows.h> in apricots.h, below the other includes (in particular, below shape.h). Alternatively, you can get away with only putting it in apricots.cpp, after apricots.h has been included, but you then need to provide definitions of min/max for draw_dither. Another possibilty would be to rename the min/max functions in the shape class. At least, I think this is all that's going on.. maybe there are better ways round the problem too.</li>
<li>VisualStudio is awkward about the scope of variables in a for loop - so the following code:<pre>
for(int i=0;i<10;i++) {
// blah
}
for(int i=0;i<10;i++) {
// more blah
}
</pre>isn't allowed. You either need to enclose the for loops inside an extra {}, or replace with for(i=0;...) and have an int i; beforehand. Or a quick cunning method is to stick:<pre>
#ifndef for
#define for if (0) {} else for
#endif
</pre>somewhere. Perhaps a bit hacky, but it fixes the problem without having to mess up various bits of the code.</li></ul>That seems to be enough to get it to work for me.
If you want, <user site="livejournal.com" user="fluffymark">, I'll send a set of files that compile with both Borland and VisualStudio (I'll also include the project files/workspaces - this is particularly useful for Borland, due to the arsey way it works when you set up a project.. it creates its own apricots.cpp file for the main project file, which you then have to overwrite with the real apricots.cpp file; I don't think it lets you select an existing cpp file to use as the project file). And I can do a binary too if you want that.
Re: the apricots
Date: 2003-07-29 04:33 pm (UTC)Oh well. At least i'm confident now that I wasn't being stupid about those horrible scoping rules that Visual C++ has (non-ANSI grrrrrrr!!).
One thing i didn't include was the borland-specific compiler code - now i know it's BORLAND, i'll fix up that bit.
I'm not using windows.h ??? But then maybe thats because I've changed WinMain() back to main() to get it to compile, which appears to work.
As for the max/min problem - this bug was reported to me already by someone attempting a BSD port. I've fixed it by rewriting the offending 4 lines in draw_dither() to use the limit() function defined in all.cpp, which works as both a max AND a min function. This makes the code more consistent. Yay!
The scoping rules are indeed horrible. I've done tedious thing of carefully going through the offending loops and actually renaming the loop variables. It'll hopefully compile in anything now, without the need of redefining for in a hacky way. :)
And then it compiled happily. and WHOA - it's fast. I'd forgotten windows actually has an accelerated driver for my graphics card, as it runs about 2 times quicker than on a dodgy driver in Linux.
So, thanks for the help, but it all seems we've been doing the same things. I've put a few more bugfixes in, and will be releasing another version soon. Watch this space. :)
Re: the apricots
Date: 2003-07-30 01:51 pm (UTC)I only seemed to need it because of WinMain, so yes. Though I can't seem to get it to work with main(). I tried doing the project as both an application and a console application - I think the problem is that SDL is supposed to redefine main as something else, and it supplies its own WinMain, but this doesn't appear to work for me (it didn't on Borland either).
Re: the apricots
Date: 2003-07-30 05:11 pm (UTC)And I've just this minute released Apricots 0.2.5. Just bugfixes this time, but an awful lot of them. See if you can compile it - it builds perfectly here on both gcc for Linux, and Visual C++ for Windows.
Re: the apricots
Date: 2003-07-30 06:38 pm (UTC)You might as well get rid of all the Borland specific stuff now, since as I explained in my email, I've also found it's easy enough to stick the Borland-project-related-data in a separate file. And I can include that source file and Borland project if you like, but they can just as easily be generated by whoever wants to compile it (well, assuming they already know enough about SDL and Borland, unlike me;), like you haven't included the VisualC project files either.
Re: the apricots
Date: 2003-07-31 08:19 am (UTC)I assume Borland still objects to initializing structs within structs, or has that somehow been magically cured now?
Re: the apricots
Date: 2003-07-29 09:27 am (UTC)Re: the apricots
Date: 2003-07-30 05:13 pm (UTC)