#exult@irc.freenode.net logs for 15 Mar 2003 (GMT)

Archive Today Yesterday Tomorrow
Exult homepage

[01:02:20] --> Kirben has joined #exult
[01:02:20] --- ChanServ gives channel operator status to Kirben
[01:28:36] --> syke has joined #exult
[01:28:39] <syke> hi
[01:28:55] <syke> is anyone here familiar with the scaling gfx code in exult?
[01:32:40] --> Servus has joined #exult
[01:38:32] --> `daniel has joined #exult
[01:41:42] <-- `daniel has left IRC (Client Quit)
[01:51:14] <-- Dark-Star|away has left #exult ()
[01:54:32] <-- syke has left #exult ()
[02:50:47] --> Yuv422 has joined #exult
[03:01:05] --> Matt_O has joined #exult
[04:57:01] --> ShadwChsr has joined #exult
[05:26:58] <Servus> hello
[05:46:13] <ShadwChsr> hey
[05:46:24] <Servus> got my quadtree nearly working :)
[05:47:23] <Servus>
[06:00:51] <ShadwChsr> cool :)
[06:37:01] <ShadwChsr> havin fun? :)
[06:38:53] <Servus> kinda i guess, its a pain
[06:39:02] <Servus> confusing...
[06:39:09] <ShadwChsr> :)
[06:39:17] <ShadwChsr> give up! <chants> 2d 2d 2d
[06:39:17] <ShadwChsr> ;)
[06:39:38] <Servus> hardly
[06:39:43] <ShadwChsr> :)
[06:39:46] <Servus> how are you doing on yours?
[06:40:10] <ShadwChsr> Well, i got some help from another exult person but I'm stuck on "normal" pixel->tile coordinate conversion
[06:40:17] <ShadwChsr> not even the ray/object/elevation stuff
[06:40:22] <ShadwChsr> just plain old run of the mill ;)
[06:40:35] <ShadwChsr> my old code was inacurate so i want to fix it, old stuff is commented out
[06:40:51] <ShadwChsr> and the pixel->tile conversion is used to determine where to render, so its only rendering tile 0x0 right now
[06:40:52] <ShadwChsr> ;)
[06:40:57] <Servus> yeah i know how easy it is to get muddy code
[06:44:37] <Servus> heres a question : i have a series of bytes in a file that i'm reading, and i want to put them directly into a "float" array
[06:45:37] <Servus> if the byte is 0xff(255) then i want it to go into the float as 255.0f, and right now im just loading it into a temporary int array then using a for loop to move them over, but that's... bad; got a better idea?
[06:46:18] <Servus> or just plain old load a byte into a float?
[06:46:39] <ShadwChsr> ahhhhh
[06:46:44] <ShadwChsr> I wrote code that does exactially that
[06:47:09] <ShadwChsr> i loaded in to a char array of length sizeof(float), then typecasted to the float
[06:47:10] <Servus> i want to do it all in the fread statement
[06:47:35] <ShadwChsr> i wrote special functions to do it
[06:47:41] <Servus> right now im fread( <into myInt> ); myFloat = myInt;
[06:48:13] <ShadwChsr> you cant typecast?
[06:48:22] <ShadwChsr> just do this
[06:48:27] <Servus> i wondered if there was some type of syntactic trickery to allow me to type something like fread( float(myFloat) );
[06:48:30] <ShadwChsr> (float)(byte)
[06:48:31] <ShadwChsr> ;)
[06:48:37] <Servus> doesnt work...
[06:48:44] <ShadwChsr> try
[06:48:48] <ShadwChsr> (float)(int)(byte)
[06:49:00] <ShadwChsr> because you can go from byte->int and int->float
[06:49:42] <Servus> no good
[06:50:26] <ShadwChsr> hmm weird <shrug>
[06:50:32] <ShadwChsr> just write a function :)
[06:50:39] <ShadwChsr> put it in a class
[06:51:05] <ShadwChsr> class DataReader { public: static float ReadByte(..) const; } then typecast the result from the function
[06:51:24] <ShadwChsr> then all you need to do is (float)DataReader::ReadByte(..);
[06:52:07] <Servus> http://sourcepost.sytes.net/sourceview.aspx?source_id=4375
[06:52:21] <Servus> thats precisely what i dont want; i already have that:(
[06:52:53] <ShadwChsr> You cant
[06:53:15] <ShadwChsr> it requires a pointer and a float's datastructure is significantly different from an int :)
[06:53:36] <Servus> thats the point of casting
[06:53:51] <ShadwChsr> you can only cast the result though
[06:53:58] <ShadwChsr> and fread doesnt return a result, it gets passed a pointer
[06:54:49] <ShadwChsr> it can only read data into the same type, or a char array
[06:54:55] <ShadwChsr> otherwise you just get corrupted data
[06:56:11] <Servus> thats the point of casting operators... to change stuff midstream
[06:56:45] <ShadwChsr> true, but casting is going to typecast BEFORE it fread's
[06:56:46] <ShadwChsr> if you do a
[06:56:50] <ShadwChsr> fread( *TileWidth, sizeof(unsigned long), 1, fMap );
[06:56:52] <ShadwChsr> err
[06:57:04] <Servus> &TileWidth, i dont know how it got changed in sourcepost
[06:57:11] <ShadwChsr> fread( *(float)TileWidth, sizeof(unsigned long), 1, fMap ); or something, it's just going to typecast before it every executes that function
[06:57:29] <Servus> dynamic_cast etc, but i cant get it to work
[06:58:12] <ShadwChsr> you cant :)
[06:58:23] <ShadwChsr> the typecasting needs to happen after the function call, which means another line
[06:58:26] <ShadwChsr> :)
[06:58:35] <Servus> youre not very helpful:P
[06:58:39] <ShadwChsr> if you want clean code write a data reader like .net
[06:58:43] <ShadwChsr> thats what I did
[06:58:49] <ShadwChsr> I'm not helpfull but its the truth hehehe
[06:59:04] <ShadwChsr> .net has a datareader class which has overloaded functions with different results
[06:59:10] <ShadwChsr> c++ cant do that but you can just give them different names
[06:59:25] <ShadwChsr> ReadByte, ReadBool, ReadInt, etc, and return a result instead of passing a pointer or ref or out var
[06:59:30] <ShadwChsr> then you typecast the result
[06:59:36] <ShadwChsr> my app does:
[07:00:26] <ShadwChsr> (double)DataReader::ReadUInt32(fFileHandle, iSomeFilePosition);
[07:00:35] <Servus> i already typecasted the result and it works fine, but doing a for loop to convert 10mb of points from an int array to a float array takes time
[07:01:02] <ShadwChsr> unsigned float m_TileWidth;
[07:01:02] <ShadwChsr> unsigned long TileWidth;
[07:01:05] <ShadwChsr> where is that declared?
[07:01:08] <ShadwChsr> in the loop?
[07:01:25] <ShadwChsr> TileWidth specifically
[07:01:53] <ShadwChsr> also, isn't a double faster than a float?
[07:01:58] <Servus> theres no loop at all
[07:02:19] <Servus> im not doing anything with arrays in the sample, if there was, you'd know it, and i dont know about doubles being faster -- they take up more memory
[07:02:20] <ShadwChsr> 12... but doing a for loop to convert 10mb of points from an int array to a float array takes time
[07:03:05] <Servus> in my program, _not_ in the sample
[07:03:27] <ShadwChsr> how much time?
[07:04:25] <Servus> about 1.5 seconds to process 10mb of data
[07:04:38] <ShadwChsr> yeah I'd say that's pretty good :)
[07:04:38] <Servus> that time includes calculating all normals, building a tree, etc
[07:04:49] <ShadwChsr> i imagine you're in debug mode, right? :)
[07:04:50] <Servus> but still
[07:05:02] <Servus> im creating a nasty memory spike there for a little moment
[07:05:27] <ShadwChsr> well, building the tree will create the spike I imagine
[07:05:33] <ShadwChsr> probably a rescursive call
[07:05:45] <ShadwChsr> look at unrolling some of your variables out of the recursive function
[07:05:53] <ShadwChsr> <guesses>
[07:05:53] <ShadwChsr> ;)
[07:06:56] <Servus> it is recursive, the tree is trouble, but im trying to ignore it right now and fix this
[07:07:33] <ShadwChsr> yeah, but you're blaming the memory spike and slowdown on your conversion when it might be just the tree ode
[07:07:34] <ShadwChsr> code
[07:08:21] <ShadwChsr> You're not going to get it any faster ;) You're using a whole extra 4B of memory doing it that way, not sure what the problem is :)
[07:09:06] <Servus> you've got a 10mb heightmap
[07:09:14] <Servus> that's an extra 10mb of memory, and it takes longer
[07:09:31] <ShadwChsr> its not though
[07:09:56] <ShadwChsr> unless the function is recursive, that variable will go out of scope and be reused the next time its called
[07:10:07] <Servus> of course it goes out of scope
[07:10:13] <Servus> but that's not the point, i want to know how to do it
[07:10:39] <ShadwChsr> You cant.. fread operates on raw memory, and an integer's data structure is different from a float's :)
[07:11:35] <Servus> thats the _point_of_a_cast_operator_
[07:11:46] <Servus> blah
[07:11:48] <ShadwChsr> yes :)
[07:12:10] <ShadwChsr> but cast operators have an order of execution
[07:12:18] <ShadwChsr> (after)Function((before)Variable);
[07:12:33] <ShadwChsr> you cant typecast something after a function call in a parameter
[07:12:40] <ShadwChsr> only the result
[07:13:08] <ShadwChsr> even if its an out or pointer parameter, you still cant..
[07:14:06] <ShadwChsr> the fread function basically copies memory between a file and a pointer
[07:14:38] <ShadwChsr> which means no matter what, even if you did find a way, something somewhere will still need to allocate that 4byte integer to load the data into
[07:14:40] <ShadwChsr> and then typecast it
[07:15:02] <ShadwChsr> it cant load data into a variable and typecast itself into something else :)
[07:15:36] <ShadwChsr> your other option might be bytewise operators
[07:15:50] <ShadwChsr> ie/ manually typecast
[07:16:08] <ShadwChsr> load it into the float right off the bat and then modify it's data to be accurate
[07:16:40] <ShadwChsr> a bitshift might be faster than a typecast and another allocated variable
[07:16:57] * ShadwChsr is just going to be quiet now :)
[07:17:37] <Servus> ;)
[07:18:21] <ShadwChsr> without knowing assembly I cant say with 100% confidence it's impossible :)
[07:18:45] <Servus> i could do it in assembly
[07:18:59] <Servus> i hope to keep this as cross-platform as possible tho :)
[07:19:57] <ShadwChsr> any thoughts on how to do the coordinate conversion? hehhehehe
[07:20:02] <ShadwChsr> it's another fun anglish thing
[07:20:12] <ShadwChsr> but im not too good with my isometric theory :)
[07:21:11] <Servus> yes, use the graphics api
[07:21:26] <Servus> or let me give you an algorithm
[07:23:04] <Servus> http://sourcepost.sytes.net/sourceview.aspx?source_id=4377 use this with the other algorithm i gave
[07:23:15] <Servus> once you get the mouse vector, use this to see if it intersects somewhere
[07:23:35] <Servus> or just use that and check it against the mouse x,y coords
[07:25:16] <ShadwChsr> doesnt say what its doing tho :)
[07:25:20] <ShadwChsr> looks like a rotation?
[07:25:24] <Servus> dunno, not my code
[07:26:09] <Servus> what you'd do tho, is get the world ray, and rotate it by the camera's rotation, and see where it intersects with the surface of your monitory
[07:28:39] <Servus> thats to find the 2d coords of a 3d object... to find the 3d intersection point from a 2d x,y mouse coord, get a ray coming straight into your monitor wherever you clicked, then rotate it by the camera's direction, and see where that ray first touches an object
[07:30:15] <ShadwChsr> thats easy enough when you have a 3d camera tho ;)
[07:31:20] <ShadwChsr> hehehe :)
[07:32:07] <Servus> your camera vector is (yaw,pitch,roll)(-45', 45', 0)
[07:32:38] <ShadwChsr> pitch isn't 45 though, it's 30
[07:32:41] <ShadwChsr> but close enough :)
[07:32:51] <Servus> 30 since when?
[07:33:07] <ShadwChsr> 45 is UO (which has an incorrect perspective)
[07:33:11] <ShadwChsr> why game is 30
[07:33:13] <ShadwChsr> err my
[07:33:38] <ShadwChsr> *digs for code
[07:34:18] <ShadwChsr> angle = asin(TileHeight/TileWidth)
[07:34:55] <ShadwChsr> asin(36/72) = 30
[07:35:31] <Servus> i think youre thinking angle = asin(CameraDist/CameraHeight), which you dont have :)
[07:36:29] <Servus> ok lemme use my engine to see:)
[07:37:15] * ShadwChsr cries and gets confused
[07:37:15] <ShadwChsr> ;)
[07:37:51] <Servus> hehe
[07:38:06] <Servus> in a real 3d engine with perspective, the ratio of tilewidth-on-screen to tileheight-on-screen changes for every tile
[07:38:21] <Servus> so... use real 3d with a locked camera :-)
[07:38:42] <ShadwChsr> http://www.ul.ie/~rynnet/keanea/isometri.htm
[07:42:06] <ShadwChsr> if its isometric its 45 if its dimetric its 30
[07:42:31] <Servus> lots of sparkly animations:p
[07:48:57] <ShadwChsr> *does some calculations
[07:51:24] <Servus> wondering why my quadtree wont subdivide the last piece
[07:52:15] <ShadwChsr> well all 3 angles should be 120
[07:52:22] <ShadwChsr> I got 116, 116, and 126
[07:52:48] <Servus> remember they were handdrawn and someone probably just arbitrarily made a nice-looking diamond:)
[07:52:49] <ShadwChsr> so its hard to tell if its dimetric or isometric, if its error or dimetric
[07:52:56] <ShadwChsr> yeah i know
[07:53:08] <Servus> id say 116,116,126 averages out to 120 enough
[07:53:16] <ShadwChsr> yeah same here
[07:53:32] <ShadwChsr> isometric means a 45 degree angle looking down
[07:53:42] <ShadwChsr> dimetric could be any arbatrary pitch
[07:53:59] <ShadwChsr> but the yaw must be 45
[07:54:07] <ShadwChsr> trimetric means the pitch and yaw can be anything but the other must be 0
[07:54:11] <ShadwChsr> (roll)
[07:54:40] <ShadwChsr> Ultima Online is "Planometric"
[07:54:57] <Servus> roll is nearly always 0, unless youre making a flight sim :)
[07:55:06] <ShadwChsr> meaning the top of the tile makes nice 90 angles at each angle
[07:55:23] <ShadwChsr> Ul
[07:55:29] <ShadwChsr> http://fp.keystage4dt.f9.co.uk/images/Ks4/Graphics/axonom3.gif
[07:55:31] <Servus> shake your head left and right, that's yaw. nod up and down, that's pitch. now cock your head to the side, that's roll...
[07:55:53] <Servus> thats an ugly cube
[07:56:05] <ShadwChsr> yeah but thats why UO looks wonky
[07:56:06] <ShadwChsr> :)
[07:56:12] <Servus> UO looks alright
[07:56:31] <ShadwChsr> its not a "real life" camera angle
[07:56:38] <Servus> plays like crap, but thats another issue
[07:56:46] <ShadwChsr> if you did UO in a real or 3d camera, it wouldn't be 3d
[07:56:50] <Servus> neither is furcadia, there's no perspective
[07:56:52] <ShadwChsr> you would be looking straight down on everything
[07:56:55] <ShadwChsr> Yeah
[07:58:23] <ShadwChsr> how do I know if the yaw should be 45 or -45?
[07:59:05] <Servus> it depends on your implementation -- i simply prefer to think of yaw as a clockwise thing :)
[07:59:18] <Servus> and 0 yaw = due north, but thats just cuz i like it that way
[07:59:51] <Servus> if you move your head left, that's counterclockwise, so -45 yaw
[08:00:27] <ShadwChsr> k makes sense :)
[08:01:27] <ShadwChsr> dangit I need a new hamster
[08:01:31] <ShadwChsr> this one just doesnt run fast enough
[08:01:32] <ShadwChsr> ;P
[08:01:53] <ShadwChsr> going to need to get a math certified one :)
[08:02:28] <ShadwChsr> what was your angle of pitch calculation again? :)
[08:02:46] <ShadwChsr> height/width * 90?
[08:03:44] <Servus> hamsters of purple tentacle power generators!
[08:04:06] <Servus> 90*(height/width) tho that's just a guess really:)
[08:04:12] <Servus> but 45' seems logical to me...
[08:04:42] <ShadwChsr> oh :P
[08:04:58] <ShadwChsr> So i got a guess that seems logical or someone else that figured it out, but returns a dimetric angle
[08:05:03] * ShadwChsr gets a headache
[08:05:03] <ShadwChsr> ;)
[08:05:40] <Servus> heh
[08:05:44] <Servus> my quadtree wont divide the last bit!
[08:05:51] <Servus> i need to redesign it now that i almost get it :)
[08:14:21] --> matto has joined #exult
[08:18:24] <Servus> hello
[08:19:07] --> Kirben2 has joined #exult
[08:19:35] <-- Matt_O has left IRC (Read error: 54 (Connection reset by peer))
[08:19:38] <Servus> ooh, LOD works:-)
[08:20:50] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[08:32:32] <-- Yuv422 has left IRC ("[BX] Hrm... I wonder if I paid this month's electr...EOF From client")
[09:29:49] --> Yuv422 has joined #exult
[10:17:12] <Servus> got it:)
[10:17:46] <Servus>
[10:18:56] <ShadwChsr> :)
[10:19:08] <Servus> its slow tho
[10:19:17] <Servus> and it doesnt work exactly right
[10:19:29] <Servus> it should prune a lot more triangles (side of mesas and on top of them)
[10:19:30] <ShadwChsr> yeah but theoretically you'd only need to do that when saving the map
[10:19:39] <ShadwChsr> standard practice in game-dev is to precalculate stuff like that
[10:19:40] <Servus> i mean it renders slow
[10:19:45] <ShadwChsr> oh? weird!
[10:19:53] <Servus> yeah i can speed it up a lot tho
[10:19:56] <Servus> i have a crappy tree
[10:21:05] <Servus> also, my "should i keep subdividing?" function is absolutely awful, but i know exactly how to fix it, but i have to go home now
[10:22:04] <Servus> it loads up really quickly
[10:23:10] <Servus> well im outta here, bye
[10:23:32] <Servus> ++ATH0 CARRIER LOST
[10:23:33] <-- Servus has left IRC ()
[10:27:52] --> wjp has joined #exult
[10:27:52] --- ChanServ gives channel operator status to wjp
[10:28:21] <wjp> hi
[10:28:39] <DarkeZzz> Hello.
[10:32:30] <Yuv422> hi guys
[10:34:45] <Yuv422> I've registered my sourceforge project. just waiting for it to be approved.
[10:41:53] --> matto1 has joined #exult
[10:44:04] --> Kirben has joined #exult
[10:47:50] <-- Kirben2 has left IRC (calvino.freenode.net irc.freenode.net)
[10:47:50] <-- matto has left IRC (calvino.freenode.net irc.freenode.net)
[10:51:26] <wjp> ShadwChsr: pitch = height/width * 90 doesn't make any sense really
[10:51:36] --> Kirben2 has joined #exult
[10:53:33] <-- Kirben2 has left IRC (calvino.freenode.net irc.freenode.net)
[11:04:22] <Yuv422> is there a sprintf equivilent method in the std::string class?
[11:04:47] <wjp> no
[11:05:00] <Yuv422> :(
[11:07:06] <ShadwChsr> wjp: yeah thats what i thought
[11:07:11] <ShadwChsr> I'm sticking with your method :)
[11:07:32] <wjp> I'm not entirely sure about the Z-length anymore, though
[11:07:53] <ShadwChsr> ok *flags it as such
[11:08:00] <wjp> it seems to make sense, but it doesn't make the Z edges as long as the other edges
[11:09:00] <ShadwChsr> you're 100% sure about the pitch, though, right?
[11:09:51] <wjp> 100% is a bit much, but I'm fairly sure :-)
[11:10:32] <ShadwChsr> ok :)
[11:10:36] <wjp> Colourless agreed on the 30deg, though
[11:10:44] <ShadwChsr> awesome :)
[11:10:50] <ShadwChsr> that means it's "dimetric"
[11:11:13] <ShadwChsr> I also found out that UO is known as "Planometric"
[11:11:21] <ShadwChsr> before I learned that i just assumed it was screwed up ;)
[11:11:22] <wjp> that would also explain why the Z length isn't the same as the other two, then :-)
[11:12:29] <ShadwChsr> I'd hassle you for some screenpixel->tile coordinate conversion algorithms, but its 3am, bedtime ;)
[11:12:58] <wjp> :-)
[11:13:01] <wjp> g'night
[11:13:05] <ShadwChsr> night
[11:13:07] <-- ShadwChsr has left IRC ()
[11:58:10] <wjp> DarkeZzz: still around?
[12:00:59] * wjp doesn't get that wuc crash artaxerxes is getting
[12:01:06] <wjp> or, rather, I do get it, but I don't understand it
[12:01:30] <wjp> for some reason ferror(fi) suddenly becomes true in the middle of read_token
[12:01:45] <wjp> and I don't have a clue why
[12:03:06] <wjp> a simple while (!feof(fi)) { fgetc(fi); } loop doesn't have any problems
[12:03:15] <wjp> and ferror(fi) stays false, too
[12:03:59] <DarkeZzz> Still around.
[12:05:06] <DarkeZzz> Where is this? On the forum, bug tracker, or old irc logs?
[12:05:09] <wjp> ML
[12:05:32] * DarkeZzz checks.
[12:08:55] <DarkeZzz> Works fine for me.
[12:09:19] <wjp> with your own wuc build or with his?
[12:09:20] <DarkeZzz> Though I haven't got an up-to-date cvs tree. wuc/wud haven't changed in ages though, yes?
[12:09:30] <wjp> I tried with my own, btw
[12:09:59] <DarkeZzz> My own.
[12:10:46] <wjp> weird
[12:11:45] <DarkeZzz> Get it the first time when I run his.
[12:12:04] <wjp> gcc issue maybe?
[12:12:32] <wjp> (I'm still using 3.2-r1)
[12:12:58] <wjp> could you try rebuilding your own wuc?
[12:13:00] <DarkeZzz> I'm on 3.2.2.
[12:13:07] <wjp> (it doesn't require anything other than wuc.c)
[12:13:28] <wjp> (so 'gcc -g -o wuc wuc.o' should do the trick)
[12:14:07] <DarkeZzz> Yes, just checking something first.
[12:14:25] <DarkeZzz> It's his .uc file, it's corrupted.
[12:14:34] <wjp> it is?
[12:14:36] <DarkeZzz> My wud'd output file worked 'perfectly' with his wuc.
[12:15:03] <wjp> could it be some of the <32 characters?
[12:15:19] <wjp> ugh, bbl
[12:15:33] <DarkeZzz> No idea. Unfortunately my file is significantly different to his.
[12:15:33] <DarkeZzz> Bye!
[12:32:08] <wjp> b
[12:33:11] <wjp> what I don't get is why ferror() would become true halfway through a token
[12:35:50] <DarkeZzz> We're hitting the end of the file by reading too much? That's my first thought. Should check the code for read_token though, no? *grin*
[12:36:08] <wjp> it's at offset 13d4
[12:36:14] <wjp> which is nowhere near the end
[12:36:21] <wjp> feof() is false at that point ,btw
[12:38:45] <DarkeZzz> What characters are around offset 13d4? It might be that it's choking on a combination of control characters, though really it shouldn't...
[12:39:06] <wjp> 2c , - 0 0 13d1- 0
[12:39:07] <wjp> 20 - 0 0 13d2- 0
[12:39:07] <wjp> 65 e - 1 0 13d3- 0
[12:39:07] <wjp> 74 t - 1 0 13d4- 0
[12:39:07] <wjp> 20 - 1 0 13d5- 0
[12:39:07] <wjp> 63 c - 1 0 13d6- 0
[12:39:09] <wjp> 65 e - 1 0 138c- 0
[12:39:11] <wjp> 6c l - 1 0 2029- 0
[12:39:13] <wjp> 65 e - 1 0 3029- 0
[12:39:15] <wjp> 75 u - 1 0 4029- 0
[12:39:17] <wjp> 76 v - 1 0 3fb5- 0
[12:39:19] <wjp> 65 e - 1 0 19b6- 0
[12:39:23] <wjp> 72 r - 1 0 ffffffff- 16
[12:39:25] <wjp> 20 - 1 0 ffffffff- 16
[12:39:29] <DarkeZzz> BTW, both my wud and the one in the dump file both segfault.
[12:39:34] <wjp> <character read> <character read> - ferror feof ftell - errno
[12:39:35] <wjp> (all in hex)
[12:40:13] <wjp> the output is in the inner loop after c == 39
[12:40:37] <wjp> errno 0x16 = EINVAL
[12:42:41] * DarkeZzz blinks. Invalid argument?
[12:43:08] <wjp> ah...
[12:43:11] <wjp> stupid
[12:43:14] <wjp> char token[256]
[12:43:25] * wjp wonders why he didn't pick that up earlier
[12:43:57] <DarkeZzz> Because you're so used to the sanity of std::strings? *grin*
[12:44:05] <wjp> that must be it :-)
[12:44:47] * wjp adds a couple of zeroes to that constant
[12:45:34] <DarkeZzz> And add a test in the while loop for it to error out should 'i' reach that number. An assert will make it a *bit* simpler should someone trip over that again. *grin*
[12:45:46] <wjp> unsurprisingly it works now :-)
[12:47:19] <DarkeZzz> Wow! It does! That's just... amazing!
[12:59:47] <-- Kirben has left IRC ("System Meltdown")
[13:08:35] --> Colourless has joined #Exult
[13:08:35] --- ChanServ gives channel operator status to Colourless
[13:09:02] <DarkeZzz> Greetings.
[13:10:09] <Colourless> hi
[13:10:17] <wjp> hi
[13:26:37] --- Colourless is now known as Cless|Away
[13:54:32] <Yuv422> I'm off. cya guys.
[13:54:35] <-- Yuv422 has left IRC ("[BX] Silly faggot! mIRC is for kids!")
[14:51:28] --- Cless|Away is now known as Colourless
[14:59:13] <wjp> wb
[14:59:19] <Colourless> thx
[15:21:01] --> armav has joined #exult
[15:34:45] <-- armav has left IRC ("Client Exiting")
[17:55:28] <-- Colourless has left IRC ("casts invisibility")
[17:56:01] --> Dark-Star has joined #exult
[19:43:41] --> ShadwChsr has joined #exult
[19:43:46] <ShadwChsr> hi :)
[19:44:01] <wjp> hi
[19:44:47] * ShadwChsr yawns and stretches ;)
[19:47:29] <ShadwChsr> Can I bug you about mouse->tile coordinate conversion now? <grin>
[19:48:09] <wjp> you can try ;-)
[19:48:15] <ShadwChsr> any ideas? :)
[19:49:14] <wjp> how about inverting the formula you use for tile->pixel conversion?
[19:50:01] <ShadwChsr> doesnt work because you loose precision
[19:50:10] <wjp> you do?
[19:50:31] <ShadwChsr> yeah it tile->screen only returns the position to place the tile (top-left coordinates)
[19:50:44] <ShadwChsr> so unless the mouse exactially clicked on that one spot, inverting it isnt going to help :)
[19:51:39] <wjp> well, if you invert it in some sufficiently general way, it should work
[19:52:14] <wjp> basically you change your tile->screen formula to accept non-integers too
[19:52:21] <wjp> and then invert that one
[20:00:39] * ShadwChsr nods
[20:22:48] --> armav has joined #exult
[20:31:37] <-- armav has left IRC ("Client Exiting")
[20:40:04] --> MgWlf100 has joined #exult
[20:40:05] <-- ShadwChsr has left IRC (Read error: 104 (Connection reset by peer))
[20:40:09] --- MgWlf100 is now known as ShadwChsr
[21:41:51] <-- ShadwChsr has left IRC (Read error: 104 (Connection reset by peer))
[21:56:38] --- Dark-Star is now known as Dark-Star|afk
[22:44:41] --- Dark-Star|afk is now known as Dark-Star
[23:34:15] --> Valkrys has joined #exult
[23:34:32] <wjp> hi
[23:34:45] <Valkrys> Hey.
[23:34:56] <Valkrys> How's it going?
[23:35:07] <wjp> pretty good, thanks :-)