code logs -> 2007 -> Wed, 14 Feb 2007< code.20070213.log - code.20070215.log >
--- Log opened Wed Feb 14 00:00:30 2007
00:04 MyCatSleeps is now known as MyCatVerbs
00:05 MyCatVerbs is now known as NSGuest-446
00:05 Serah-Lost [~-@87.72.36.ns-26407] has quit [Ping Timeout]
00:32 Chalcedon is now known as ChalcyNap
00:41 NSGuest-446 is now known as MyCatVerbs
00:54 MyCatVerbs is now known as MyCatSleeps
00:55 * ToxicFrog foams
00:56
< Vornicus>
from the brain?
01:00
< ToxicFrog>
Yes.
01:00
< ToxicFrog>
But progress has been made.
01:00
< ToxicFrog>
I am now on the verge of getting it to play movies straight off the hard drive.
01:01
< ToxicFrog>
Just a bit of function call hackery is needed.
01:01 timelady [~romana@Nightstar-14410.lns3.adl2.internode.on.net] has joined #Code
01:02
< ToxicFrog>
I can't just do string hacking because the string I need to hack is an sprintf argument: sprintf("%c:\\%s\\%s", cdDriveLetter, "Data", "2.ZRB")
01:02
< ToxicFrog>
So I need to get to instead do sprintf(".\\movies\\%s", "2.ZRB")
01:03 ChalcyNap is now known as Chalcedon
01:03 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: ]
01:03 Serah-Lost [~-@87.72.36.ns-26407] has joined #Code
01:03 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
01:03 mode/#code [+o Chalcedon] by ChanServ
01:06
< ToxicFrog>
Hmm
01:06
< ToxicFrog>
So eax is the drive letter, edx is "data" and ecx is the ZRB name
01:06
< ToxicFrog>
I think I can just NOP out "push eax" and "push edx" and it'll Just Work.,
01:08
< ToxicFrog>
Thankfully NOP is only one byte long.
01:09
< ToxicFrog>
Goddamn defective alien variable-width instruction sets.
01:11 Serah-Lost [~-@87.72.36.ns-26407] has quit [Ping Timeout]
01:13
< ToxicFrog>
Ok, that didn't work.
01:13 Serah-Lost [~-@87.72.36.ns-26407] has joined #Code
01:26
< ToxicFrog>
Oh yes.
01:26
< ToxicFrog>
It works.
01:26 * ToxicFrog dances
01:27
< timelady>
everybody dance now
01:28
< ToxicFrog>
NOPping out stuff didn't work, but switching it around to sprintf(buf, ".\\movies\\%s", zrbName, "Data", driveLetter) worked.
01:31
< ToxicFrog>
Now for the considerably less simple task of adding support for music played from the hard drive.
01:33
< Vornicus>
CD music I believe is accomplished through a Windows API call. Can you change it to an API call to Windows Media?
01:39 timelady [~romana@Nightstar-14410.lns3.adl2.internode.on.net] has quit [Quit: run away! run away!]
01:40
< ToxicFrog>
Maybe.
01:41
< ToxicFrog>
I haven't looked at the music subsystem yet.
01:41
< ToxicFrog>
At the moment I'm in the process of repackaging everything - I'm splitting it into several different rarballs so people can download based on what they want.
01:42
< ToxicFrog>
Core, OTA missions, TACC missions, skirmish maps, movies.
01:50
< Vornicus>
How big is the glom?
01:51 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Quit: Have to get up in three hours, so I better go to bed...]
01:55
< ToxicFrog>
Which one?
01:55
< ToxicFrog>
TA core (ie, the required files only, which includes the OTA campaign, and TAM) is around 200MB.
01:55
< ToxicFrog>
TACC is 155MB.
01:55
< ToxicFrog>
Err, 115.
01:55
< ToxicFrog>
The multiplayer maps are 250MB.
01:55
< ToxicFrog>
The movies are just shy of 100MB.
01:56
< ToxicFrog>
(removing the OTA campaign would shave off another 100MB from the core, but total4.hpi also contains Rather Important parts of the UI)
01:59
< Vornicus>
...I'm surprised the movies are that small.
02:05
< ToxicFrog>
Well, there's only five of them (Cavedog logo, prologue, Core victory, Arm victory, and I have no idea what the last one is but it's small)
02:06
< ToxicFrog>
They're also in interlaced SMK format and are, I think, 640x480
02:06
< ToxicFrog>
(which is actually 640x240 since they're interlaced)
02:09
< ToxicFrog>
Aah.
02:09
< ToxicFrog>
1 is the prologue.
02:09
< ToxicFrog>
2 is Arm victory.
02:09
< ToxicFrog>
Wait, no.
02:10
< ToxicFrog>
Right, off by one error there.
02:10
< ToxicFrog>
Cavedog logo; Prologue; Arm victory; Core victory; credits.
02:10
< ToxicFrog>
Unlike FooCraft, it doesn't have several movies per campaign, and the victory movies are fairly short.
02:11
< Vornicus>
ah, so
02:14
< ToxicFrog>
Instead, it has an awesome looking splash screen after each mission, typically depicting an victory that bears no resemblance to how you actually won the map.
02:16
< Vornicus>
heh
03:35
< ToxicFrog>
Ok. I have now divided into:
03:35
< ToxicFrog>
- core (80MB)
03:35
< ToxicFrog>
- OTA singleplayer (144MB)
03:36
< ToxicFrog>
- TACC singleplayer (114MB, but requires OTA singleplayer)
03:36
< ToxicFrog>
- OTA skirmish maps (95MB)
03:36
< ToxicFrog>
- TACC skirmish maps (150MB)
03:36
< ToxicFrog>
- movies (100MB)
04:36 Chalcedon is now known as ChalcyOut
04:39 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
04:40 mode/#code [+o Chalcy] by ChanServ
04:41 ChalcyOut [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
04:50 ReivWork is now known as Reiver
05:55 ChalcyGone [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
05:56 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
06:04 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code
06:36 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
06:36 mode/#code [+o Chalcy] by ChanServ
06:37 ChalcyGone [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
06:37 Chalcy is now known as Chalcedon
06:48 gnolam is now known as gnolam|68k
07:13 MahalWork is now known as Mahal
07:18 Reiver is now known as ReivOut
07:33 Doctor_Nick [~fdsaf@Nightstar-27777.rag-a.fsu.edu] has joined #Code
07:34
< Doctor_Nick>
hey, anyone awake at this hour?
07:34
< McMartin>
Kind of busy, but what's up?
07:34
< Doctor_Nick>
i was just wondering if a non-initialized ANSI string in C++ contains a null terminator or not.
07:34
< McMartin>
"ANSI string"?
07:34
< Doctor_Nick>
you know, the string class that comes with most c++ compilers
07:35
< McMartin>
C++ string classes don't exist as C strings unless you call c_str() on them.
07:35
< Doctor_Nick>
?
07:36
< McMartin>
I'd have to check my STL docs
07:36
< McMartin>
But I'm not sure if C++ strings are ever null-terminated.
07:36
< Doctor_Nick>
huh.
07:36
< McMartin>
The "here's a pointer, keep reading until I tell you to stop" is a C-ism.
07:37
< McMartin>
You get the length of a C++ string by calling size() on it.
07:37
< McMartin>
They're like vectors.
07:38
< McMartin>
Here we go.
07:38
< McMartin>
... it's even worse than that."String contents are not necessarily stored contiguously; see the c_str and data member functions if you need the string contents as a contiguous character array"
07:39
< McMartin>
So to iterate through all the characters of a string, you'd have to use STL iterators.
07:39
< McMartin>
Which, happily, almost look like pointers.
07:39
< McMartin>
But you check for == x.end(), not *i == 0.
07:39
< Doctor_Nick>
hmm.
07:40
< McMartin>
Also, by "uninitialized" do you mean not new()ed, or "declared on the stack but unassigned"?
07:40
< Doctor_Nick>
declared but not assigned to anything
07:40
< McMartin>
Because in the former case, you aren't allowed to do anything to it, and in the latter, it has actually been initialized behind your back to be the empty string.
07:40
< Doctor_Nick>
ok
07:41
< McMartin>
Trying to access out of range will throw out_of_range.
07:42
< Doctor_Nick>
and if you try to access where the null terminator would be in a C string, that will give you an out of range?
07:42
< McMartin>
My reference doesn't say.
07:42
< Doctor_Nick>
hmmm
07:42
< McMartin>
If you need a C string from a C++ string, call c_str() on your C++ string and you'll get a char * you can read to your heart's content.
07:43
< McMartin>
That said, mixing the C and C++ libraries is a recipe for endless suffering.
07:43
< Doctor_Nick>
well, thats not what im doing
07:43
< McMartin>
I suspect you have actually asked the wrong question.
07:43
< McMartin>
What are you actually trying to do here?
07:43
< Doctor_Nick>
im writing my own string class that is supposed to do most of what an ANSI string does
07:44
< Doctor_Nick>
and im trying to figure out how an ANSI string acts in certain situations so i can figure out how I want my string to act
07:44
< McMartin>
... are you allowing mid-string nulls?
07:44
< McMartin>
Also.
07:44
< Doctor_Nick>
god, no
07:44
< Doctor_Nick>
i'd kill myself
07:44
< McMartin>
Why are you writing your own string class?
07:44
< Doctor_Nick>
programming assignment
07:46
< Doctor_Nick>
is that the "I'm not going to help you with your homework" silence? ;)
07:46
< McMartin>
No, that's me testing something in g++
07:46
< Doctor_Nick>
ah :)
07:47
< McMartin>
C++ strings do allow mid-string nulls.
07:47
< Doctor_Nick>
:O
07:47
< McMartin>
They are not null-terminated; they carry a size field instead.
07:48
< McMartin>
I suggest reading your assignment more carefully
07:48
< Doctor_Nick>
what happens when you try to access where the null terminator would be at the end?
07:48 Vornicus is now known as Vornicus-Latens
07:48
< Doctor_Nick>
I am reading my assignment, its rather sparse on the requirements list
07:49
< Doctor_Nick>
I mean, Im going to talk to my TA tomorrow about this but i'm just trying to get as far as i can tonight
07:49
< McMartin>
If your assignment is "mimic C++ strings as well as you can", kill them.
07:49
< McMartin>
The ISO C++ standard is hundreds and hundreds of pages long.
07:49
< Doctor_Nick>
its not
07:49
< McMartin>
g++ behaves in a manner that I cannot believe is correct.
07:49
< Doctor_Nick>
they gave us a header
07:50
< Doctor_Nick>
we just have to fill in the functions
07:50
< McMartin>
OK
07:51
< McMartin>
at() throws an exception if n >= size().
07:51
< Doctor_Nick>
sweet
07:51
< McMartin>
operator[] returns 0 if n == size(), and behavior is undefined if n > size().
07:51
< McMartin>
g++ appears to return 0 if n >= size(), but I wouldn't put it past g++ to introduce buffer overflow errors.
07:51
< Doctor_Nick>
thats exactly what i needed to know
07:51
< Doctor_Nick>
does G++ have a reputation for being buggy?
07:52
< McMartin>
C and C++ do~
07:52
< Doctor_Nick>
ha :P
07:52
< McMartin>
If you call x[n] with n more than 1 past the end of the string, it is legal for the compiler to cause demons to fly out your nose.
07:52
< McMartin>
For "legal" meaning "standards-complaint".
07:53
< McMartin>
It can, in fact, replace your entire program with hardcore pr0n and still be compliant.
07:53
< McMartin>
It is "an error" to do so.
07:53
< McMartin>
Which is to say, any program that does it has undefined behavior.
07:53
< McMartin>
... I suggest throwing an exception.
07:53 * McMartin is uptight about access violations. =P
07:53
< Doctor_Nick>
you'd think that after 20 odd years they would figure out bounds checking
07:54
< McMartin>
They did.
07:54
< McMartin>
It's called "Write in Java, Python, Ruby, C#, etc. etc. etc."
07:54
< Doctor_Nick>
:P
07:54
< McMartin>
C++ is burdened by C.
07:54
< Doctor_Nick>
im starting to realize this
07:54
< McMartin>
It is not even theoretically possible to bounds-check C, given its library.
07:54
< Doctor_Nick>
I wrote a program in C yesterday, and i realized it wasnt much different than C++
07:55
< Doctor_Nick>
C++ is for people too lazy to code in C, really :/
07:55
< McMartin>
C++ is quite likely my least favorite language on Earth.
07:56
< McMartin>
C++ is also significantly more painful to use than C for anything that C++ would be better than Java or Python at.
07:56
< Doctor_Nick>
how do I throw an exception in C++?
07:56
< McMartin>
If you haven't covered it yet, just always return null or something.
07:56
< Doctor_Nick>
k
07:56
< McMartin>
I don't actually understand C++ exceptions, other than that (a) you can throw *anything*, and (b) C++ exceptions are really slow compared to ML's.
08:06
< Doctor_Nick>
do you know anything about C++ iostream? specifically, im trying to get characters from istream
08:07
< McMartin>
Isn't that just "cin >> string_variable"?
08:08
< Doctor_Nick>
well, im trying to overload the >> operator, so im dealing with the is itself
08:08
< Doctor_Nick>
so can i go like, cin >> string[i]; until i get to '\0'?
08:09
< McMartin>
Is operator>> "read from this istream into this string", or is it "treat this string as if it were an istream"?
08:09
< Doctor_Nick>
the first one
08:09
< McMartin>
I suspect you'd be looking for \n, though, not \0.
08:09
< Doctor_Nick>
hmm
08:10
< Mahal>
\n = endline
08:10
< Mahal>
\0 = null I think?
08:10
< McMartin>
Correct
08:10
< Mahal>
it's been ... 3 years since I last touched c++
08:10
< McMartin>
I'm not sufficiently up on iostream to know if \0 is also EOF, but it's not in C.
08:10
< Mahal>
so it's pretty impressive I remembers that much >.<
08:10
< Mahal>
No.
08:10
< Mahal>
EOF is something else.
08:10
< Mahal>
I can't remmber what.
08:11
< Doctor_Nick>
ctrl d in linux
08:11
< Mahal>
... er, I think.
08:11
< Doctor_Nick>
ctrl z in windows
08:11
< McMartin>
No
08:11
< Mahal>
Yes.
08:11
< McMartin>
You can read past those.
08:11
< Doctor_Nick>
oh?
08:11
< Mahal>
You can, but most of the intro programs say to look for ^z or ^d
08:11
< McMartin>
Binary files can have whatever the Hell the want.
08:11 * Mahal nods.
08:11
< McMartin>
they Hell they want, rather
08:12 ReivOut is now known as Reiver
08:12
< McMartin>
If I need to, for whatever reason, load the number 4 or the number 26 into some variable, my executable will have ^d or ^z in it.
08:12
< McMartin>
Or rather, it's likely to.
08:12
< McMartin>
All bets are off on RISC architectures.
08:13
< McMartin>
But even there I think immediate constants are usually at least byte-aligned.
08:47
< Doctor_Nick>
im heading to bed, thanks for your help McMartin
08:47 Doctor_Nick [~fdsaf@Nightstar-27777.rag-a.fsu.edu] has quit [Quit: ]
09:19 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: ]
09:46 * Serah-Lost has had no luck in hr EMS problem.
09:46 * AnnoDomini patpats Serah-Lost..
09:46
< Serah-Lost>
But could someone point me to a place to redownload the VMDS driver so I may check if mine is corrupted or otherwise brøken?
09:47 * Serah-Lost has been toiling with it for 3 hours now, trying to set up EMS using command line tools to "enable" it in places, or to turn that which might use existing EMX/XMS off, to no avail.
09:48
< AnnoDomini>
You obviously need to install an older OS. Just a thought. :)
09:49
< Serah-Lost>
:p
09:49
< Serah-Lost>
I have considered it. But I want to use mIRC while playing my games.
09:49
< Serah-Lost>
And mIRC doesn't come in 16bit support anymore.
09:50
< Serah-Lost>
Besides I like XP, besides for the tiny fact that they completely screwed over dos.
09:50
< AnnoDomini>
Win95 is 32bit, no?
09:51
< Serah-Lost>
I don't remember.
09:51
< AnnoDomini>
I think it is.
09:51
< Serah-Lost>
But 98 is vastly superior to 95, in terms of stability and support.
09:51
< Serah-Lost>
Most importantly, 95/98 won't fly for one very particular reason.
09:51
< AnnoDomini>
Win95 OSR2 is not that bad in terms of stability.
09:51
< Serah-Lost>
$uptime(system,2) = 14wks 4days 13hrs 25mins
09:51
< Serah-Lost>
But not good enough.
09:52
< AnnoDomini>
I wouldn't have thought you were one for this type of e-dick show-offism. <_<
09:53
< Reiver>
More to the point I think she hates rebooting her computer.
09:53
< Reiver>
It tempts hardware failures every try.
09:53
< Reiver>
Current uptime: 1wk 3days 23hrs 51mins 33secs
09:53
< Reiver>
Mine, meanwhile, gets rebooted a lot.
09:53
< Serah-Lost>
Yup.
09:53
< Reiver>
:)
09:54
< Serah-Lost>
<Reiver> It tempts hardware failures every try. <- Cooling and reheating the circuitries.
09:54
< Serah-Lost>
Although, a reboot may happen.
09:54
< Serah-Lost>
It also has to do with my horrible horrible ability to keep track of stuff.
09:54
< Serah-Lost>
My FF regularly uses 300 MBRAM because it's a bitch and I don't close windows.
09:55 You're now known as TheWatcher[wr0k]
09:55 * Serah-Lost dances with TheWatcher[wr0k].
10:14 gnolam|68k is now known as gnolam
10:22 Mahal is now known as MahalBedd
10:32 Thaqui [~Thaqui@Nightstar-26359.jetstream.xtra.co.nz] has quit [Quit: Leaving]
10:34 Reiver is now known as ReivSLEP
10:58
< McMartin>
... wow.
10:58
< McMartin>
Recoding one of the C64 BASIC examples in machine code produced a 350x speedup in initialization time.
13:20 You're now known as TheWatcher[afk]
14:23 You're now known as TheWatcher[wr0k]
16:56 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Quit: Changing the PSU. For real this time.]
16:58 You're now known as TheWatcher
17:27 Vornicus-Latens is now known as Vornicus
17:33 gnolam [Lenin@85.8.5.ns-20483] has joined #Code
17:34 ReivSLEP is now known as Reiver
17:46 Reiver is now known as ReivWork
18:42
<@jerith>
Hello all.
18:45 * jerith prods MyCatSleeps.
18:45
<@jerith>
Those DVDs arrived. Thanks muchly. :-)
18:57 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
19:06 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
19:06 mode/#code [+o Chalcedon] by ChanServ
19:12 GeekSoldier [IceChat7@Nightstar-3321.pools.arcor-ip.net] has joined #code
19:27 AnnoDomini [~farkoff@Nightstar-29669.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
19:32 AnnoDomini [~farkoff@Nightstar-29110.neoplus.adsl.tpnet.pl] has joined #Code
19:53 GeekSoldier [IceChat7@Nightstar-3321.pools.arcor-ip.net] has quit [Quit: Easy as 3.14159265358979323846...]
20:06 MahalBedd is now known as Mahal
20:18 Thaqui [~Thaqui@Nightstar-26359.jetstream.xtra.co.nz] has joined #code
21:09 Chalcedon is now known as ChalcyThesis
21:23
< ToxicFrog>
Serah-Lost: http://vogons.zetafleet.com/viewtopic.php?t=2071
21:23
< ToxicFrog>
Also. Win95 and 98 are 32-bit shells and extensions on top of DOS.
21:24
< ToxicFrog>
16-bit would be DOS support.
21:24
< ToxicFrog>
And in fact I do know people who run mIRC on 98, although god alone knows why.
21:38 Clairvoire [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
21:38 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
21:38 mode/#code [+o Chalcy] by ChanServ
21:39 ChalcyThesis [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
21:40 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Ping Timeout]
21:44 Netsplit Troika.TX.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: ReivWork, EvilDarkLord, Thaqui, MyCatSleeps, @Chalcy
21:51 ReivWork [~reaverta@IRCop.Nightstar.Net] has joined #Code
21:58 MyCatSleeps [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
21:58 Thaqui [~Thaqui@Nightstar-26359.jetstream.xtra.co.nz] has joined #code
21:58 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
21:58 EvilDark1ord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has joined #code
21:58 Chalcy is now known as ChalcyThesis
21:58 EvilDark1ord is now known as EvilDarkLord
22:00 MyCatSleeps is now known as MyCatVerbs
22:23 You're now known as TheWatcher[T-2]
22:25 Netsplit Troika.TX.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: MyCatVerbs, EvilDarkLord, ChalcyThesis, Thaqui
22:26 Netsplit over, joins: MyCatVerbs
22:26 Netsplit over, joins: Thaqui, ChalcyThesis
22:26 Netsplit over, joins: EvilDarkLord
22:26 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
22:26 mode/#code [+o Chalcy] by ChanServ
22:27 ThaquiLaptop [~Thaqui@Nightstar-26359.jetstream.xtra.co.nz] has joined #code
22:27 ChalcyThesis [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
22:28 Thaqui [~Thaqui@Nightstar-26359.jetstream.xtra.co.nz] has quit [Ping Timeout]
22:28 You're now known as TheWatcher[zZzZ]
22:28 ThaquiLaptop is now known as Thaqui
22:32 BlueTiger [BlueTiger@Nightstar-567.natsoe.res.rr.com] has joined #Code
22:37 Clairvoire [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: ping timeout]
22:38 gnolam [Lenin@85.8.5.ns-20483] has quit [Ping Timeout]
23:12 Chalcy is now known as ChalcyThesis
23:20 BlueTiger [BlueTiger@Nightstar-567.natsoe.res.rr.com] has quit [Quit: UT2k4 time! :D]
23:50 EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has quit [Ping Timeout]
23:50 McMartin [~mcmartin@Nightstar-8547.dsl.pltn13.pacbell.net] has quit [Operation timed out]
23:54 McMartin [~mcmartin@Nightstar-6825.dsl.pltn13.sbcglobal.net] has joined #code
23:54 mode/#code [+o McMartin] by ChanServ
--- Log closed Thu Feb 15 00:00:30 2007
code logs -> 2007 -> Wed, 14 Feb 2007< code.20070213.log - code.20070215.log >