--- Log opened Sun Jan 30 00:00:09 2011 |
00:51 | | You're now known as TheWatcher[T-2] |
00:54 | | You're now known as TheWatcher[zZzZ] |
01:24 | <@McMartin> | Argh dammit |
01:24 | | * McMartin beats libsdl.org with a cheese |
01:24 | | * McMartin then sets about copying all his code over to his Mac. |
01:24 | <@McMartin> | Why are there no prebuilt MinGW SDL_image builds? |
01:32 | < gnolam> | Shit like that is part of the reason I did away with MinGW altogether. :P |
01:34 | < gnolam> | Way too many libraries giving you the choice between pre-built MSVC binary, MSVC project file, or - for MinGW - some kind of arcane build system straight from the screaming pages of the Kitab al-Azif itself that has about a 1 in 10 chance of actually working, even once you've fulfilled the dependencies and pawned your soul. |
01:36 | < gnolam> | Oh, and getting all the dependencies to work will probably require a virgin, a lunar eclipse and a blood sacrifice. |
01:37 | <@ToxicFrog> | Alternately, you can use the mingw tools to link against the msvc binaries. |
01:37 | <@McMartin> | TF: That is what just failed. |
01:37 | <@McMartin> | It's possible this is Code::Blocks being retarded. |
01:37 | <@ToxicFrog> | I've never used c::b, so no idea on that front. |
01:38 | | * McMartin is working on a program that will convert UQM-style fonts into something GM8 can use. |
01:38 | <@ToxicFrog> | If you were trying to link against sdl_image.dll directly, try linking against the import library instead, and vice versa. |
01:38 | <@McMartin> | I'd just loot Iji's font code but I want to add kerning. |
01:40 | | Orth[mini] [orthia@3CF3A5.E1CD01.36D449.95F5A5] has joined #code |
02:05 | < celticminstrel> | C::B on Mac is kinda unstable. At least, it was when I last checked, which was a month or three ago. |
02:06 | < celticminstrel> | I'm failing to determine whether you're talking about it on Mac or Windows... :| |
02:06 | < celticminstrel> | Actually, never mind, it looks like Windows. |
02:07 | | kwsn [kwsn@Nightstar-7426b23f.dyn.centurytel.net] has quit [Ping timeout: 121 seconds] |
02:08 | <@ToxicFrog> | celticminstrel: mingw is a windows thing, soooo... |
02:09 | < celticminstrel> | Just missed the connection at first between MinGW and Code::Blocks. |
02:26 | <@McMartin> | I was using C::B on WIndows |
02:27 | <@McMartin> | I'm taking my code and finishing it in Xcode because it isn't, itself, a "deliverable". At least not yet. |
02:36 | <@McMartin> | Yeah, OK, screw Xcode |
02:36 | | * McMartin adds four tokens to his source code and it compiles fine with a commandline g++ |
02:39 | < celticminstrel> | What was Xcode doing? |
02:39 | < celticminstrel> | And what four tokens? |
02:39 | < celticminstrel> | Sorry, just curious. |
02:40 | <@McMartin> | Xcode wasn't doing anything, it's just totally unnecessary |
02:40 | <@McMartin> | I had to modify some #includes to work right with Mac g++'s -framework argument, and then I had to #undef main because I'm abusing SDL in a way Cocoa doesn't like. |
02:41 | < Vornicus-Latens> | Yeah, you don't need xcode to build on mac. the old mac build of ottd was a work of art. |
02:41 | <@McMartin> | (Normally SDL on Mac requires a Cocoa shim layer Xcode will automatically add for you. Since I'm using SDL as basically an ImageMagick API, I don't need it for this). |
02:41 | <@McMartin> | There are a lot of things Xcode makes a whole lot easier, though. |
02:41 | <@McMartin> | This is a CLI app that makes extensive use of GUI libraries, and so that's Kind Of Weird. |
02:42 | | Vornicus-Latens is now known as Vornicus |
02:43 | <@McMartin> | (Basically, I have to include "SDL/SDL.h" instead of "SDL.h") |
02:43 | < celticminstrel> | I think you need that Cocoa layer to get an SDL window, or something... if you're not using the drawing aspect of SDL, you wouldn't need the Cocoa layer... right? |
02:43 | <@McMartin> | celticminstrel: Right, but the way SDL mutates the entry point is by #defining main to a different value |
02:43 | <@McMartin> | So I had to #undef main in *my* source because I want *that* to be my entry point, thankyouverymuch. |
02:44 | < celticminstrel> | Oh yeah, Xcode has this annoying habit of not finding includes if you give a relative path rather than just the include filename... :| |
02:44 | <@McMartin> | This isn't Xcode's fault |
02:44 | <@McMartin> | This is "I'm too lazy to actually type out all the -I and -L stuff when I could just do -framework SDL on the cmdline" |
02:44 | <@McMartin> | But -framework stuff needs the framework identifier in the #include. |
02:48 | | * McMartin re-teaches himself how to use C++ iostreams. |
02:52 | <@McMartin> | There we go. |
02:53 | | kwsn [kwsn@Nightstar-7426b23f.dyn.centurytel.net] has joined #code |
02:54 | < Vornicus> | Answer: avoid them like the plague. |
02:56 | <@McMartin> | Too lazy to do the checking required to make snprintf safe and functional. |
02:57 | <@McMartin> | Also, hm |
02:58 | <@McMartin> | I didn't think this cunning plan through all the way |
02:58 | <@McMartin> | It may be necessary to apply TW's library to this. |
03:01 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?] |
03:05 | < celticminstrel> | I quite like the iostreams actually. |
03:05 | < Vornicus> | You've never had to do formatting with them, then. |
03:06 | < celticminstrel> | Though they have been known to fail with cryptic error messages for completely non-apparent reasons. |
03:06 | < celticminstrel> | And by "fail", I mean at runtime. |
03:06 | < Vornicus> | It's so coated in modeyness that it's not funny. |
03:06 | <@McMartin> | Well, that's what I needed to do here, though it was a simple << setfill('0') << setw(width) |
03:07 | < celticminstrel> | The <iomanip> stuff is nice but a bit verbose for my liking. |
03:08 | < celticminstrel> | I actually do like the conciseness of printf; if there were a type-safe version of that, I might actually consider using it for string formatting (actually, there is a non-standard one, but I'd rather have one that can also support custom types). |
03:08 | <@McMartin> | Here it's more raging at the necessity for string processing in C. |
03:09 | < celticminstrel> | I'm thinking a function where you do something like sprintf("format string", var1, var2, var3) and it returns a std::string with the result. |
03:09 | <@McMartin> | ostringstream tends to be worth the pain. |
03:09 | <@McMartin> | Right |
03:09 | < celticminstrel> | That would be really nice. |
03:09 | <@McMartin> | The usual way to do that is to have a function that wraps two calls to snprintf and a call to std::string's constructor. |
03:11 | | * McMartin is about to win, but realizes that he has failed due to BMP's lack of alpha channels. |
03:12 | < celticminstrel> | I'd probably wrap the nonstandard function instead. I think it's asnprintf or something like that. |
03:12 | < celticminstrel> | But yeah, not that hard to make said function. |
03:13 | < celticminstrel> | Nevertheless, a function like that which could also handle class types would be nice to have. |
03:15 | < celticminstrel> | And that is not so easy. It'd probably require variadic templates. |
03:36 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed] |
03:41 | <@McMartin> | OK, that's a start |
03:42 | < celticminstrel> | I'm going to assume that has no relation whatsoever with my most recent line. |
03:42 | <@McMartin> | Quite. |
03:43 | <@McMartin> | I now need image editors I don't have on this system |
03:45 | <@McMartin> | Basically, I've gotten my font stored as a BMP |
03:45 | <@McMartin> | Now I need to either link in TW's SDL_imagesave code or process the image so that it has a proper alpha channel. |
03:45 | < celticminstrel> | If Mac: Preview. |
03:46 | <@McMartin> | I saw "instant alpha" but it didn't give me proper colorkeying. |
03:48 | <@McMartin> | The problem here is not "this isn't a PNG", it's "because it's going through BMP alpha channels are being wiped" |
03:48 | | Orth[mini] [orthia@3CF3A5.E1CD01.36D449.95F5A5] has quit [[NS] Quit: ] |
03:49 | < celticminstrel> | Can't you convert it to PNG and it'll work? :| |
03:49 | <@McMartin> | Er |
03:49 | <@McMartin> | Yes, but |
03:49 | <@McMartin> | It's then an alpha-free PNG |
03:49 | <@McMartin> | Because BMP doesn't have alpha. |
03:50 | < celticminstrel> | Oh, and you need it to have alpha? |
03:50 | <@McMartin> | Yes, that is the whole problem, as I said |
03:50 | < celticminstrel> | Ah. |
03:51 | <@McMartin> | Basically, the goal here is "given 95 PNGs that specify a sprite-font, produce 1 PNG and one metadata file that lets you represent the same thing more compactly, and also in a form that pre-existing game engines will like" |
04:32 | | Kindamoody is now known as Kindamoody[zZz] |
04:47 | <@McMartin> | Yeah, TW's stuff works |
04:47 | <@McMartin> | Also, my earlier problems on Windows were in fact c::b's fault, not SDL's |
05:07 | <@McMartin> | So now I have a usable PNG |
05:07 | <@McMartin> | Now I just need to dump the kerning info in a usable form. |
05:07 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Ping timeout: 121 seconds] |
05:12 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code |
05:51 | | celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
06:20 | | cpux is now known as shade_of_cpux |
06:45 | | AnnoDomini [annodomini@Nightstar-429fc5c9.adsl.tpnet.pl] has joined #code |
06:45 | | mode/#code [+o AnnoDomini] by Reiver |
07:04 | | kwsn is now known as kwsn\t-2 |
07:06 | | kwsn\t-2 [kwsn@Nightstar-7426b23f.dyn.centurytel.net] has quit [[NS] Quit: moo] |
07:11 | | Derakon is now known as Derakon[AFK] |
08:21 | | Vornicus is now known as Vornicus-Latens |
08:30 | | Kindamoody[zZz] is now known as Kindamoody |
11:07 | | You're now known as TheWatcher |
11:11 | <@McMartin> | TW: SDL_imagesave has saved the day again, incidentally |
11:13 | <@TheWatcher> | Awesome, glad it's of use! |
12:21 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code |
13:31 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
13:54 | | SmithKurosaki [smith@Nightstar-7820a96a.dsl.teksavvy.com] has joined #code |
14:28 | < gnolam> | Arrrrgh. |
14:29 | < gnolam> | I want every computer to be fitted with a device that electroshocks the user whenever he or she uses the word "lag" to refer to any kind of stutter, jitter or performance problem. |
14:39 | | Kindamoody is now known as Kindamoody|out |
14:50 | <@jerith> | gnolam: You want to introduce some lag into the wetware component? *flees* |
15:07 | < gnolam> | Possibly the Västgötalag. |
15:22 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [[NS] Quit: Going dooooown...] |
15:27 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code |
15:42 | | shade_of_cpux is now known as cpux |
16:00 | <@ToxicFrog> | I think my crypto prof likes scaring us. |
16:01 | < gnolam> | Oh? |
16:01 | <@ToxicFrog> | 2 (d) From (c), what is 7^7 (mod 13) |
16:02 | <@ToxicFrog> | 2 (e) Use the same technique to evaluate 7^10507 (mod 13) |
16:02 | <@ToxicFrog> | 2 (f) Also, 105308^7126 (mod 13) |
16:14 | < EvilDarkLord> | Basic crypto was a fun course. :) |
16:58 | | Kindamoody|out is now known as Kindamoody |
17:28 | | Derakon[AFK] is now known as Derakon |
18:14 | | AnnoDomini is now known as Birds |
19:34 | | Vornicus-Latens is now known as Vornicus |
19:44 | | AbuDhabi [annodomini@Nightstar-ffb6f00d.adsl.tpnet.pl] has joined #code |
19:44 | | AbuDhabi is now known as Birds_ |
19:46 | | Birds [annodomini@Nightstar-429fc5c9.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
19:51 | < Vornicus> | Hooray, modular arithmetic. |
20:02 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed] |
20:23 | | * gnolam stabs Inkscape. |
20:46 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code |
20:50 | | kwsn [kwsn@Nightstar-7426b23f.dyn.centurytel.net] has joined #code |
20:55 | | RichardBarrell [mycatverbs@Nightstar-ac7cec9b.cable.virginmedia.com] has joined #code |
21:28 | | Birds_ is now known as AnnoDomini |
23:28 | | AnnoDomini [annodomini@Nightstar-ffb6f00d.adsl.tpnet.pl] has quit [[NS] Quit: Zzz.] |
--- Log closed Mon Jan 31 00:00:10 2011 |