IRC logs for #opendune on OFTC at 2010-01-26
⏴ go to previous day
09:20:46 *** ChanServ sets mode: +v Yexo_
10:31:39 <Xaroth> so, TrueBrain, how you liking your new corp :P
10:32:07 <TrueBrain> havent played really :)
10:33:47 <TrueBrain> LOL! All of a sudden I remember I had to login to add things to my skill queue
10:33:53 <TrueBrain> I have 5 minutes left to do so :p (then it is empty)
12:17:52 <Xaroth> manually migrating esx instances from one host to the other is a pita
12:33:04 <Xaroth> not that it's a bad thing, after all.. it just means we're getting new toys :o
13:10:56 <Xaroth> BoB (aka IT Alliance now) had their territory 'stripped' from them by some members of the holding corp who were bribed to disband the alliance
13:11:14 <Xaroth> as such, goonswarm took over their place
13:11:56 <TrueBrain> glx: it should give you redirect information. If it does, please change the 'binaries.openttd.org' entries to 'cz.binaries.openttd.org', and replace the '/release' part of the url with '/openttd/binaries/release'
13:21:02 <glx> d:/developpement/ottd/trunk3/src/network/core/tcp_http.cpp:159: erreur: invalid conversion from 'const char*' to 'char*'
13:21:02 <glx> d:/developpement/ottd/trunk3/src/network/core/tcp_http.cpp:209: erreur: invalid conversion from 'const char*' to 'char*'
13:23:59 <TrueBrain> bit weird, 'strstr' returns char *, 'strcasestr' return const char * (for you)
13:24:23 <TrueBrain> nothing a cast can't solve
13:27:07 <glx> hehe it wroked before because it was only use as strcasestr != NULL :)
13:27:30 <glx> but indeed it's incorrectly declared and defined
13:42:20 <TrueBrain> with those corrections, it works?
13:46:46 <TrueBrain> but does the rest work?
13:47:24 <TrueBrain> (as I really can't be arsed about const errors)
13:47:40 <TrueBrain> that is for Rubidium :p
13:57:07 <glx> pk for msvc (redirect then download)
14:04:47 <TrueBrain> I have been told so many times it is not possible to write a HTTP component for OpenTTD
14:05:25 <glx> yeah like it's impossible to cross-compile for OSX ;)
14:27:05 <Xaroth> TrueBrain: so the more we tell you it's not possible, the more likely it is you'll find out a way that it'll work?
14:27:22 <Xaroth> in that case: "It's absolutely impossible that I wake up with 50 billion euro on my bank account"
14:28:44 <TrueBrain> not impossible, just hightly unlikely
15:00:33 <TrueBrain> the http client on the other hand ... all up and running :) Now it is up to Rubidium to connect the dots :)
15:04:19 <Xaroth> on a more bright note, 11/33 instances from the machine migrated
15:05:22 <Xaroth> needs to be done before next tuesday, so
15:06:59 <Xaroth> 4 working days left to do 22 instances
15:23:21 <TrueBrain> and that concludes OpenTTD for today / this week / this month :p
15:31:32 <TrueBrain> shit .. I don't have anything to eat for tonight ... bah ...
15:32:04 *** ChanServ sets mode: +v TrueBrain
15:40:58 <Xaroth> well it's not even 5pm, so there's still time :)
15:41:08 <Xaroth> unless you had planned on eating early :P
15:42:29 <TrueBrain> nah .. just don't feel like going out :p
17:39:12 <Xaroth> i'm geek of the year in the doomcraft awards -_-
17:41:28 <Xaroth> mainly for my pc knowledge, I think
19:09:18 <TinoDidriksen> Shouldn't the Private forum be...private?
19:11:06 <TinoDidriksen> Anyway, real question was, is the decompiler available?
19:11:30 <TrueBrain> and the private forum should be private yes .. Xaroth! :p
19:11:34 <TrueBrain> why you need/want it?
19:11:52 <TinoDidriksen> To decompile Master of Magic and get that brought up to date.
19:12:03 <TrueBrain> is it s 16bit DOS game?
19:13:42 <TinoDidriksen> Hm, whether it is 16bit...
19:14:16 <TrueBrain> else, send it to me, and I give it a look
19:15:14 <Xaroth> TinoDidriksen: still visible for you?
19:19:18 <TrueBrain> TinoDidriksen: DOSBOX refuses to run it
19:19:49 <TinoDidriksen> Well that's not the full game...just the main exe. I'll put up the whole.
19:20:21 <TrueBrain> in order for this to work, I need to be able to run the game ;)
19:20:50 <TinoDidriksen> Ah right, forgot...I even read that bit on the site.
19:21:29 <TrueBrain> and I can explain to you how to do it all yourself, but it is easier if I try first if it is possible in the first place ;)
19:31:21 <TinoDidriksen> I do get how to do it; I read all the docs about it. I could reimplement the idea, but would prefer not to have to.
19:32:07 <TrueBrain> I hope I can get the time to do so :)
19:32:36 <TrueBrain> (doing it again :p)
19:35:05 <TrueBrain> missing interrupt handlers
19:35:54 <TinoDidriksen> Probably audio setup...run install.exe to get the right, or to disable.
19:36:36 <TrueBrain> blegh ... who cares ...
19:36:46 <TrueBrain> raw access ... sucks
19:36:58 <TrueBrain> okay, TinoDidriksen, for this you will need to implement DTA :p Ghehe :)
19:37:01 <TrueBrain> how good are you in programming?
19:38:03 <TinoDidriksen> Very, but haven't heard acronym "DTA" before I'll admit.
19:38:22 <TrueBrain> that is no suprise, it is DOS specific
19:38:28 <TrueBrain> but okay, you have linux?
19:38:46 <TinoDidriksen> I have it all, even OS X in VBox finally...
19:39:19 <TrueBrain> that contains the decompiler itself
19:39:39 <TrueBrain> getting it to work will be a bit tricky
19:39:55 <TrueBrain> not sure the state the libemu is in, that is in that repos
19:40:00 <TrueBrain> else use the one from svn://svn.libemu.org/trunk
19:40:07 <TrueBrain> should not differ much, but maybe too much
19:40:16 <TrueBrain> now settings everything up is a bit tricky ...
19:41:32 <TrueBrain> extract that, and replace the working dir in the repos with the content of that working dir
19:41:41 <TrueBrain> contains all the files lowercase, and preset and shit
19:41:48 <TrueBrain> run 'make' in that dir, compiles it
19:41:57 <TrueBrain> (I believe I added a precompiled 64bit version :p)
19:42:08 <TrueBrain> LD_PRELOAD="../libjit.so" LD_LIBRARY_PATH=".." ./main
19:42:11 <TrueBrain> LD_PRELOAD="../libjit.so" LD_LIBRARY_PATH=".." ./main 2>run.log
19:42:13 <TrueBrain> should run the game
19:42:18 <TrueBrain> crashes very soon on INT21:2F
19:42:32 <TrueBrain> in src/libemu/int21.c, you will need to add that
19:42:38 <TrueBrain> won't be easy, I am afraid
19:42:59 <TrueBrain> any patches you have for libemu are very welcome, which is my only condition of using the software: when you add stuff to libemu, share that :)
19:43:06 <TrueBrain> and if you get stuck, let me know :)
19:43:14 <TrueBrain> it aint easy .. but I didn't make it to be easy :) I made it to work ;)
19:43:31 <TrueBrain> owh, and remember the legality of doing this on propertary software is doubtful, at best
19:44:42 <TinoDidriksen> As expected...copyright lawyers love to extend infinitely.
19:45:34 <TrueBrain> then I have one more thing to say: good luck ;) :)
19:45:58 <TrueBrain> I hope to write somewhere this year a better version, which gives much better decompiled code, and is much easier in using
19:47:03 <TrueBrain> owh, and when ever you got the game running in some kind of nice form with libemu
19:47:06 <TrueBrain> run: ./toc --static working
19:47:12 <TrueBrain> to produce .c files in working/decompiled
19:47:24 <TrueBrain> all the time up to that you are just harvesting runtime data
19:52:21 <TrueBrain> and, can you get it to work?
20:16:05 <TinoDidriksen> Was just installing the half dozen random packages since apparently that VM was not set up for dev...yes, works. And the opendune.org libemu is more up to date it'd seem; it certainly has some required symbols that libemu.org one does not.
20:17:31 <TrueBrain> I am still amazed this all works :) Ghehe :)
20:17:34 <TrueBrain> suprises me every time :p
20:17:54 <TinoDidriksen> The precompiled main in that tar was 32bit, btw.
20:18:07 <TrueBrain> ah :) I added -m32 everywhere, that is true :)
20:18:16 <TrueBrain> 4 months ago since I touched that project ;)
20:18:41 <TrueBrain> glx: can you run OpenDUNE over MSVC and mingw, and check for any warnings outside decompiled dir? There should be none. Also please test all release stuff we might want to use :) Tnx!
22:08:08 <glx> Avertissement,...1,...warning C4244: '=' : conversion de 'uint16' en 'char', perte possible de données,...d:\developpement\opendune\src\gui\editbox.c,...265
22:08:08 <glx> Avertissement,...2,...warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.,...d:\developpement\opendune\src\gui\viewport.c,...347
22:08:08 <glx> Avertissement,...3,...warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.,...d:\developpement\opendune\src\config.c,...28
22:08:08 <glx> Avertissement,...4,...warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.,...d:\developpement\opendune\src\config.c,...29
22:08:08 <glx> Avertissement,...5,...warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.,...d:\developpement\opendune\src\config.c,...31
22:08:10 <glx> Avertissement,...6,...warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.,...d:\developpement\opendune\src\scenario.c,...887
22:08:10 <glx> Avertissement,...7,...warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.,...d:\developpement\opendune\src\string.c,...48
22:08:25 <glx> only the first one is valid
22:08:51 <glx> and I can disable deprecation for the other (like in openttd)
22:09:12 <TrueBrain> that fixes the first?
22:09:26 <TrueBrain> why is snprintf unsafe?
22:09:29 <TinoDidriksen> & 0xFF makes it an int.
22:10:20 <glx> TinoDidriksen: but it also tells we don't care about other bits ;)
22:11:32 <DorpsGek> SVN: truebrain (r831) -Fix: MSVC doesn't like us silently converting uint16 to uint8
22:11:40 <TinoDidriksen> (char) would also do that.
22:11:57 <TrueBrain> yup, but this is in this case better :)
22:12:11 <TrueBrain> (if you look at the rest of the usage of 'key' that is :))
22:12:26 <TinoDidriksen> static_cast is neater, but since it's not C++...
22:13:01 <TinoDidriksen> Which reminds me, your coding guidelines say C89 but also say not to declare variables before using them...that seems conflicting.
22:13:45 <TrueBrain> that is wrong (the latter part)
22:14:17 <TinoDidriksen> "# Declare variables when you use them, not at the top of the function "
22:14:56 <TrueBrain> too much copy/pasting from OpenTTD: )
22:14:58 <TrueBrain> tnx TinoDidriksen, fixed ;)
22:18:41 <TrueBrain> k .. we let it in for the strcpy and strcat, as they are unsafe
22:18:45 <TrueBrain> but .. snprintf? fopen?
22:18:54 <TrueBrain> then lets shut them all up, and revisit them some other day :)
22:20:24 <glx> MS wants us to use fopen_s: Open a file. These are versions of fopen, _wfopen with security enhancements as described in Security Enhancements in the CRT.
22:20:36 <glx> that's why it's deprecated ;)
22:21:16 <glx> Writes formatted data to a string. These are versions of _snprintf, _snprintf_l, _snwprintf, _snwprintf_l with security enhancements as described in Security Enhancements in the CRT.
22:21:40 <TrueBrain> your patch will do fine :p
22:22:25 <glx> anyway we usually are careful when using these functions
22:23:31 <DorpsGek> SVN: glx (r832) -Fix: ignore MSVC C4996 warnings (deprecated functions)
continue to next day ⏵