[00:41:37] <-- wjp has left IRC ("Zzzz...")
[01:10:56] <-- Dark-Star has left #pentagram ()
[01:11:13] --> Kirben has joined #pentagram
[01:11:13] --- ChanServ gives channel operator status to Kirben
[06:37:11] --- Darke|zzZ is now known as Darke
[06:37:15] --- ChanServ gives channel operator status to Darke
[09:42:33] <-- Darke has left IRC ("Inficio-Infeci-Infectum")
[10:34:25] --> sg1-cashman has joined #pentagram
[10:34:47] <sg1-cashman> Is this the Ultima 8 pentagram engine?
[10:35:34] <Kirben> yes
[10:36:43] <sg1-cashman> For anyone who is looking back at the logs! I have been working on the crusader flex format including shapes, globs fixed.dat for a while now and I just found you guys have also managed to work out the format!
[10:37:00] <sg1-cashman> anyway I am stuck with the crusader glob.flx view formula
[10:37:39] <sg1-cashman> I dont understand much c code and I use a basic language, could someone please give me a basic english explanation on what the formula for screenx and screen y are
[10:38:03] <sg1-cashman> using x,y,z
[10:38:35] <sg1-cashman> I know what the structure of the format is, I just need the crusader version of the x,y,z display to x,y formula
[10:38:35] <sg1-cashman> thanx!
[10:41:47] <sg1-cashman> Good luck to the future of pentagram - I plan to carry on with my project which is based on crusader engine, if only I can get the globs to view correctyl!
[10:41:47] <sg1-cashman> .
[10:47:23] --> cashman has joined #pentagram
[10:47:58] * cashman slaps sg1-cashman around a bit with a large trout
[10:51:08] <-- sg1-cashman has left IRC (Read error: 104 (Connection reset by peer))
[11:20:13] <-- cashman has left IRC ()
[11:49:06] --> Colourless has joined #Pentagram
[11:49:06] --- ChanServ gives channel operator status to Colourless
[13:44:56] --> wjp has joined #pentagram
[13:44:56] --- ChanServ gives channel operator status to wjp
[13:56:15] <-- Colourless has left IRC ("later")
[15:40:10] --> Colourless has joined #Pentagram
[15:40:10] --- ChanServ gives channel operator status to Colourless
[16:41:53] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[17:06:10] <-- Colourless has left IRC ("casts invisibility")
[20:26:49] --> sg1-cashman has joined #pentagram
[20:26:57] <wjp> hi
[20:27:01] <sg1-cashman> hey
[20:27:15] <sg1-cashman> did you read yesturdays log
[20:27:45] <wjp> I did now :-)
[20:28:03] <wjp> didn't I write that up in the docs/ dir somewhere?
[20:28:12] <sg1-cashman> Did you see the bit I put there, are you a pentagram developer?
[20:28:35] <wjp> yes I did, and yes, I am :-)
[20:29:31] <wjp> from docs/gfxfmt.txt:
[20:29:35] <wjp> ScreenX = (MapX - MapY) / 4
[20:29:35] <wjp> ScreenY = (MapX + MapY) / 8 - MapZ
[20:30:06] <wjp> for a glob structure it's slightly different:
[20:30:19] <sg1-cashman> Thanx but this doesnt quite appear to work for crusader, whats the glob structure
[20:30:25] <wjp> MapX = MapX * 2 + OriginalMapX
[20:30:25] <wjp> MapY = MapY * 2 + OriginalMapY
[20:30:25] <wjp> MapZ = MapZ + OriginalMapZ
[20:30:25] <wjp> ScreenX = (MapX - MapY) / 4
[20:30:25] <wjp> ScreenY = (MapX + MapY) / 8 - MapZ
[20:30:44] <wjp> I haven't looked at crusader, I'm afraid, but our map viewer is supposed to work for crusader
[20:31:12] <sg1-cashman> yes your glob viewer works with crusader and I looked at the .cc code but I dont understand much c langage
[20:31:38] <wjp> which language are you using?
[20:32:11] <sg1-cashman> you have a part that says u8 always aligned to a 512x512 grid and cru 1024x1024! -- I am onyl using quickbasic, using a asmbler engine for it called UGL with mmx optimization.
[20:32:28] <sg1-cashman> that grid? whats that about
[20:33:16] <sg1-cashman> I converted the crusader shapes and viewed the globs with ur globviewer thats how I know you have the information
[20:33:16] <wjp> a glob basically forms a block of 512x512 in world-coordinates
[20:33:29] <wjp> when placing a glob it aligns it to the nearest 512x512 point
[20:33:36] <sg1-cashman> or 1024 in crusader so I believe
[20:33:39] * wjp nods
[20:33:51] <wjp> ah, yes, I see the code that does that
[20:34:15] <wjp> what you want to look at is Glob.cc, line 35-85
[20:34:37] <wjp> try to 'ignore' the syntax and just look at the formulas used
[20:34:43] <sg1-cashman> so in ur c code is that data - whats in the square brackets just info on storing the glob info and nothing to do with the screen formula
[20:34:59] <wjp> data is an array containing the raw data from the file
[20:35:41] <sg1-cashman> just as I thought! thanx equiv would be somthing like dim X(0 to 100) as integer in quickbasic for storage
[20:36:11] <wjp> items is an area in which I store the items that make up the glob
[20:36:15] <wjp> s/area/array/
[20:36:33] <sg1-cashman> Funny that I have been working on crusader and only just found out that another team has been working on the flex format
[20:36:48] <wjp> flex is a very basic wrapper format, btw
[20:36:56] <wjp> it's the things inside it that are interesting :-)
[20:37:18] <sg1-cashman> yes true!
[20:38:04] <wjp> anyway, if you look at Glob.cc lines 46-48, there I get the x, y and z coordinates for the item
[20:38:10] <wjp> x and y are multiplied by 2
[20:38:21] <wjp> in crusader, they're even multiplied by 4
[20:38:45] <sg1-cashman> so in cru just *4 for x and y! thanx I tried that..
[20:38:59] <wjp> then, the 'paint' function starting at line 65:
[20:39:23] <wjp> the 'x' and 'y' there are the coordinates at which the glob are placed
[20:39:38] <wjp> x and y are rounded down to the nearest 1024-multiple first
[20:39:58] <wjp> (x &= ~0x3FF; is the C syntax for this; not sure how you would do it in basic)
[20:39:59] <sg1-cashman> I can display floor glob info fine, so that means I must ben closed but I have been working with e.g. glob num 102 and the walls dont align properly
[20:40:24] <sg1-cashman> oh! round down
[20:40:51] <wjp> yes, it took me quite a while to figure that part out :-)
[20:41:07] <wjp> I had huge gaps in some maps when I wasn't doing that yet
[20:41:10] <sg1-cashman> did you have globs not aligning correctly but looking close before you did that
[20:41:33] <wjp> in U8 everything was roughly ok, but some globs were totally in the wrong place
[20:41:44] <wjp> I haven't the situation in crusader
[20:41:49] <wjp> haven't seen*
[20:42:02] <wjp> it basically depends on what they have done with the 10 bits you ignore
[20:42:42] <wjp> anyway, after adjusting the x and y glob coordinates, you can calculate the on-screen coordinates:
[20:43:01] <wjp> dispx = (item.x + x - item.y - y) / 4
[20:43:15] <wjp> dispy = (item.x + x + item.y + y) / 8 - item.z - z
[20:43:41] <wjp> (where item.x, item.y, item.z are the item's coordinates as calculated above)
[20:43:52] <wjp> (and x, y, z are the coordinates of the glob itself again)
[20:44:03] <sg1-cashman> ok thanx!
[20:44:24] <wjp> then I shift the glob a bit by 'sx' and 'sy', which depends on which part of the map you're viewing
[20:45:07] <wjp> now, the main problem with displaying things is the order in which they have to drawn
[20:45:14] <wjp> to be drawn*
[20:45:20] <sg1-cashman> I onyl want to make a glob viewer at the moment! - I have been working on the fixed.dat map format for cru a bit but I want to get the globs right for starters e.g. like ur globviewer but for qb
[20:45:31] * wjp nods
[20:45:54] <wjp> hm, come to think of it, I've actually seen a qb version of the viewer somewhere
[20:46:16] <wjp> but it seems that page is gone (404)
[20:46:27] <sg1-cashman> order to be drawn, why is that a prob? you mean for maps not globs. --> a glob viewer? there is a qucikbasic flex shapes viewer
[20:47:26] <sg1-cashman> thanx very much for ur time!
[20:47:27] <wjp> well, an object standing in front of a wall will have to be drawn after the wall, or the wall will cover the object
[20:47:34] <wjp> sure, no problem
[20:47:36] <wjp> good luck on your project
[20:47:49] <sg1-cashman> thanx!
[20:52:52] <sg1-cashman> why would you want to item.z - z if there is no item z calculation or is there? and you forgot to tell me
[20:53:35] <wjp> item.z is set at line 48
[20:53:44] <wjp> you get it directly from the raw data
[20:54:47] <sg1-cashman> yeah but besides item.z whats with the plain Z variable
[20:55:13] <wjp> that's the coordinates of the glob itself
[20:55:28] <wjp> you'll only need that when drawing the glob in the actual map
[20:56:05] <sg1-cashman> I thought Item.z was the coordinates of the glob itself cause it looks like that to me
[20:56:18] <wjp> item.z is the z coordinate of the item
[21:01:06] --> cashman has joined #pentagram
[21:01:07] <-- sg1-cashman has left IRC (Read error: 104 (Connection reset by peer))
[21:01:34] <cashman> thanx I will now try and put this info into quickbasic code now. I am sure it was just the grid alignment that I stuffed up on
[21:02:02] <wjp> that won't have any effect when you're only doing a glob viewer
[21:02:09] <cashman> would I be right that its possible for the floor tiles eg. 4 tiles drawing correctly without the 1024 alignment but everthing else looking out of place
[21:02:10] <wjp> it just affects the placement of the glob in the rest of the map
[21:03:58] <cashman> hmm so If i dont need the alignment info if I only want to make a glob vieer! am I right! - I wonder what I am doing wrong
[21:04:46] <cashman> I will put bits of my source on globs display in IRC to show you
[21:04:47] * wjp nods; you don't need the alignment info then
[21:05:14] <wjp> k, but don't paste very large code segments please :-)
[21:05:50] <cashman> to make things easier when I started and to not confuse me I used the origin flexmanager to rip a glob out of its flex format for one thing
[21:06:16] <wjp> origin flexmanager?
[21:06:42] <cashman> yeah there is a flexmanager when I worked out the flex format I found a flexmanager that could have helped eariler
[21:06:53] <cashman> in the crusader goods dir there is a flexman.exe prog!
[21:07:13] <cashman> this shows all sorts of info on .flx and adding and extracting and making new flx files etc.
[21:07:15] <wjp> heh, cool, I should take a closer look at my crusadar cds sometime :-)
[21:07:28] <wjp> not that I'll be able to run it in linux, but still :-)
[21:07:31] <cashman> yeah! do you own both like me!
[21:07:49] <cashman> I use a dos boot disk to use the tools
[21:07:54] <wjp> yeah, I have both, but I only got them recently; CDs are still shrinkwrapped :-)
[21:07:59] <cashman> and play cru again sometimes
[21:08:53] <cashman> ok so I open the glob and it has a header right! 1 byte on the amount of shapes in glob and 1 byte of unknown just a filler
[21:09:12] <cashman> then I grab 1 byte each for x,y,z and then integer for shape and 1 byte for frame
[21:09:27] <wjp> no, the first two bytes are the number of items together
[21:09:45] <cashman> oh so is that integer!
[21:09:53] <wjp> 16 bit integer, yes
[21:10:12] <wjp> be careful with qb data types :-)
[21:10:22] <cashman> ok thanx but that doesnt really matter I havnt stuffed anything up yet as I have beening work ing with glob with only 12 items in anywayz
[21:10:33] * wjp nods
[21:10:33] <cashman> yes I figure that!!
[21:11:01] <cashman> but when I display print the info to screen and compare with the hex editor info I get the same numbers
[21:11:18] <cashman> just the positoning of globs on screen is not working right!
[21:12:28] <wjp> ok, let's trace the process, then. What do you do after you have all the data from the file?
[21:12:31] <cashman> I have this in a loop - I pass the info to the shapes viewer and then return and get more x,y,z type and frm until I have reacted the end of the glob
[21:12:40] <wjp> k
[21:13:09] <cashman> this is only for a test not optimized and stored at once altough I have tried that before and I can do it how you do it
[21:13:27] <wjp> doesn't matter much at first
[21:13:38] <wjp> see if you can get it to display correctly, first :-)
[21:13:54] <cashman> I grab 1 glob piece of data at a time! - yeah I know. should I post my source
[21:14:04] <wjp> I guess the shapeviewer displays the shape at given (x,y) screen coords?
[21:14:25] <wjp> which screen coords do you pass to it exactly?
[21:14:35] <cashman> yes! I have the StXpos and StyPos which get there info from Mapx and Mapy!
[21:14:54] <wjp> and Mapz too, I hope?
[21:15:00] <cashman> the formula! and the globs I am using only have mapz as zero anyways so that shoudl help not confuse
[21:15:07] <wjp> k
[21:15:33] <cashman> is that fine! mapz=0 so it wouldnt matter if it wasnt there for that glob?
[21:15:43] <cashman> even thought I put it in the formula
[21:15:44] <wjp> right after reading mapx, mapy, you have to multiply them by 4
[21:15:56] <cashman> yes! I have done that.
[21:16:22] <wjp> ok, then you have screenx = (mapx - mapy) / 4?
[21:16:38] <wjp> (I guess you could cancel the *4 and this /4 out)
[21:16:49] <wjp> and screeny = (mapx + mapy) / 8 - mapz
[21:17:53] <wjp> but feel free to post your code if you want me to take a look at it
[21:18:12] <cashman> yip ok!
[21:18:48] <cashman> I will post a clean ver with out remarks ! remember I am not reading the glob from the glob.flx file instead I have ripped the glob out but you probably dont care about that part anyways
[21:22:05] <cashman> .
[21:22:06] <cashman> .
[21:22:06] <cashman> .
[21:22:06] <cashman> .
[21:22:07] <cashman> DEFINT A-Z
[21:22:07] <cashman> '$DYNAMIC
[21:22:08] <cashman> CLEAR
[21:22:10] <cashman> DIM TypPos(0 TO 2047) AS LONG
[21:22:12] <cashman> DIM TypSiz(0 TO 2047) AS LONG
[21:22:14] <cashman> DIM FrmPos(0 TO 4000) AS LONG
[21:22:16] <cashman> DIM FrmSiz(0 TO 4000) AS LONG
[21:22:18] <cashman> DIM LinPos(0 TO 199) AS LONG
[21:22:20] <cashman> SCREEN 13
[21:22:22] <cashman> CLS
[21:22:24] <cashman> OPEN "g:\static\gamepal.pal" FOR BINARY AS #1
[21:22:26] <cashman> SEEK #1, 1
[21:22:28] <cashman> OUT &H3C8, 0
[21:22:30] <cashman> FOR Ct = 1 TO 768
[21:22:32] <cashman> OUT &H3C9, ASC(INPUT$(1, #1))
[21:22:34] <cashman> NEXT Ct
[21:22:36] <cashman> CLOSE #1
[21:22:38] <cashman> OPEN "g:\static\shapes.FLX" FOR BINARY AS #1
[21:22:40] <cashman> GET #1, 85, NumTyp
[21:22:42] <cashman> SEEK #1, 129
[21:22:44] <cashman> FOR Ct = 0 TO NumTyp - 1
[21:22:46] <cashman> GET #1, , TypPos(Ct): TypPos(Ct) = TypPos(Ct) + 1
[21:22:49] <cashman> GET #1, , TypSiz(Ct)
[21:22:50] <cashman> NEXT Ct
[21:22:52] <cashman> 'Ripped glob data!
[21:22:54] <cashman> OPEN "d:\regret\project\new\g1
[21:22:56] <cashman> sorry!
[21:22:58] <cashman> thats only part
[21:23:00] <cashman> 'Ripped glob data!
[21:23:02] <cashman> OPEN "d:\regret\project\new\g102.dat" FOR BINARY AS #2
[21:23:04] <cashman> GET #2, , GlobNum 'Integer
[21:23:06] <cashman> FOR GlobCounter = 0 TO GlobNum - 1 'Get Quickbasic real position.
[21:23:07] <-- cashman has left IRC (Excess Flood)
[21:23:55] --> sg1-cashman has joined #pentagram
[21:24:09] <wjp> that was why I warned you not to paste too large a piece of code :-)
[21:24:24] <sg1-cashman> 'Ripped glob data!
[21:24:24] <sg1-cashman> OPEN "d:\regret\project\new\g102.dat" FOR BINARY AS #2
[21:24:24] <sg1-cashman> GET #2, , GlobNum 'Integer
[21:24:24] <sg1-cashman> FOR GlobCounter = 0 TO GlobNum - 1 'Get Quickbasic real position.
[21:24:24] <sg1-cashman> GlobMapX = ASC(INPUT$(1, #2)) 'X,Y,Z are 1 Byte each.
[21:24:24] <sg1-cashman> GlobMapY = ASC(INPUT$(1, #2))
[21:24:26] <sg1-cashman> GlobMapX = GlobMapX * 4
[21:24:28] <sg1-cashman> GlobMapY = GlobMapY * 4
[21:24:30] <sg1-cashman> GlobMapZ = ASC(INPUT$(1, #2))
[21:24:32] <sg1-cashman> GET #2, , GlobTypNum '4,5 bytes are the shape type!! hmm
[21:24:34] <sg1-cashman> GlobFrmNum = ASC(INPUT$(1, #2)) '1 byte frame! umm
[21:24:36] <sg1-cashman> GoTyp = GlobTypNum
[21:24:38] <sg1-cashman> GoFrm = GlobFrmNum
[21:24:40] <sg1-cashman> 'tried this again!
[21:24:42] <sg1-cashman> StXPos = (GlobMapX - GlobMapY) / 4
[21:24:44] <sg1-cashman> StyPos = (GlobMapX + Glo
[21:24:46] <sg1-cashman> Sorry about that! - I ment to post this instead!!
[21:25:38] <wjp> the last line is incomplete
[21:25:56] <sg1-cashman> this is the glob read chunk - the rest is the shapes viewier which isnt here and the glob for counter has a next after the shapes viewer
[21:26:05] <sg1-cashman> sorry
[21:26:12] <sg1-cashman> StyPos = (GlobMapX + GlobMapY) / 8 - GlobMapZ
[21:26:55] <wjp> right, I guess that looks ok
[21:27:25] <sg1-cashman> hmm well my shapes viewer is working fine!
[21:27:42] <sg1-cashman> the globs for the floor are fine! the 4 floor tiles for glob num 102 but the walls arnt allgined right
[21:28:07] <wjp> what do you by 'not aligned' right? are the some walls overlapping others while they shouldn't be?
[21:28:36] <wjp> do you mean by*
[21:29:08] <sg1-cashman> no I have e.g. the floor tiles correct and glob num 102 in crusader should have a wall along the right edge of the floor complete and there is a gap
[21:29:35] <sg1-cashman> and there should be to smaller pieces of small up the top on the left edge and there arnt alignup up right
[21:31:51] <sg1-cashman> Could I maybe send you a file of the complete source for this maybe! -including the shape view bit
[21:32:18] <wjp> could you send me a screenshot?
[21:33:26] <sg1-cashman> I might try and view qb in a window and take screen shot!
[21:33:46] <sg1-cashman> yes I have screen shot! where do I send it!
[21:33:54] <sg1-cashman> whast ur email or somthing like that
[21:34:03] <wjp> dcc?
[21:34:12] <sg1-cashman> ??
[21:34:19] <sg1-cashman> sorry
[21:34:23] <sg1-cashman> not thinking aye
[21:35:02] <sg1-cashman> yip!
[21:35:43] <sg1-cashman> hey I am finially glad to find sometime else working on this stuff! whould you believe that I was interested in this format but had hardly a thing to go on for about 3 years!
[21:36:07] <sg1-cashman> and I managed to work out some stuff by myself and then I saw ur latest utils with a glob viewer
[21:36:35] <wjp> which glob number is this?
[21:36:45] <sg1-cashman> not worried about what'son screen at the moment and this is only currently 320*200 res
[21:36:49] <sg1-cashman> this is glob number 102
[21:37:02] <wjp> from which crusader?
[21:37:07] <sg1-cashman> no regret!
[21:37:20] <sg1-cashman> I can send you the glob.flx if ur cd isnt open
[21:37:32] <sg1-cashman> oops u need the shapes file
[21:37:37] <wjp> I have them
[21:37:40] <sg1-cashman> coolz
[21:37:53] <sg1-cashman> you got ur cd's open have you
[21:38:02] <wjp> had to happen sometime :-)
[21:38:07] <sg1-cashman> true!
[21:39:38] <sg1-cashman> I was thinking if I worked out anymore crusader stuff after this glob thing hopefully, I could post to you guys if you havnt already worked it out, I would be happy to help out
[21:39:50] --> Dark-Star has joined #pentagram
[21:40:01] * wjp converts crusader shapes into u8 format
[21:40:10] <sg1-cashman> If I dig up my older source I had crusader maps viewing sort a ok apart from that formula again and the globs missing
[21:40:14] <Dark-Star> Hi
[21:40:22] <sg1-cashman> haha! yeah convert
[21:40:49] <sg1-cashman> hey there dark star I am a developer as well working on my own project - using cursader flx
[21:41:03] <sg1-cashman> I am stuck currently with the globs and I am getting some help
[21:41:42] <sg1-cashman> darkstar are you a developer
[21:42:06] <Dark-Star> sg1-cashman: no, not really... althogh I sent in a patch or two :-)
[21:42:40] <sg1-cashman> aye good on you, I hope to get onto map displaying when I get the globs working ok
[21:42:54] <Dark-Star> sg1-cashman what is your own project? something like a crusader-engine?
[21:43:04] * Dark-Star looks puzzled
[21:43:45] <sg1-cashman> yeah somthing like that! - really just interested in the .flx files like you guys arebut I would love to turn it into a map viewer and other tools , I have a shapes viewer and kinda a glob viewer which am getting help with now
[21:44:09] <wjp> we're not just interested in the file formats ;-)
[21:44:29] <sg1-cashman> are you guys still interested in making a clone of u8
[21:44:55] <sg1-cashman> I reacon there isnt that much difference bewteen u8 and crusader, in the end you might be able to incoroperate u8 and cru into 1 set of tolls
[21:44:57] <sg1-cashman> tools
[21:45:20] <sg1-cashman> do you work on exult as well?
[21:45:24] <wjp> yeah
[21:45:40] <sg1-cashman> so did you view glob 102
[21:46:03] <wjp> yes, although the shape converter seems to be have some issues with shape 1122, so I can't see some of it
[21:46:14] <wjp> but it does look like some of the walls are misaligned
[21:46:16] <sg1-cashman> yeah I found that so not all shapes will appear on globs!
[21:46:23] <sg1-cashman> yeah!
[21:47:01] <sg1-cashman> do you know any quickbasic
[21:47:17] <wjp> I knew it once
[21:47:23] <wjp> haven't used it in ~10 years I guess
[21:47:35] <sg1-cashman> do you have qb45 lying around at all
[21:47:37] <wjp> sheesh I'm getting old already :-)
[21:47:46] <wjp> um, yes, I should have qb45 around somewhere
[21:48:07] <wjp> but I haven't used windows in quite a while either, so really no easy way to run it :-)
[21:48:23] <sg1-cashman> what if I gave you the source and the already extracted glob g102.dat I called it, cant you run a sorta dos box
[21:48:52] <wjp> the executable format is entirely different, also qb needs DOS functions
[21:49:13] <wjp> I'd have to get a dos emulator to run it in linux
[21:49:19] <sg1-cashman> what about dark-star, could he possibly run it
[21:49:37] * Dark-Star uses windows but I dunno if I have QB4 lying around...
[21:50:05] <sg1-cashman> you can download it, not that big! I could send you the files
[21:50:16] <sg1-cashman> uf you dont mine
[21:50:21] <wjp> woohoo! finished star control 2! :-)
[21:50:30] <sg1-cashman> haha cool
[21:50:36] <Dark-Star> sg1-cashman: anyway, I don't have any crusader data files :-)
[21:50:45] <sg1-cashman> oh ok
[21:51:38] <sg1-cashman> um wjp If I gave you my source code file could you take a look at it and get back to me on it, are there possibly others working on pentagram that could help me out
[21:51:51] <wjp> sure, dcc me the file and I'll take a quick look
[21:52:30] <Dark-Star> wjp: is there any recent progress on pentagram? this channel seems quite dead lately ...
[21:52:47] <wjp> Darke has committed his usecode compiler to CVS last week
[21:53:31] <wjp> but progress on pentagram has slowed a bit, yes. I'm personally very low on time atm :/
[21:54:00] <sg1-cashman> I'll keep u posted on my stuff if I get anywhre
[21:55:13] <wjp> what exactly is the range of the integer data type?
[21:55:27] <wjp> signed 16 bit?
[21:55:34] <wjp> signed 32 bit?
[21:55:49] <sg1-cashman> signed 16 bit
[21:55:53] <sg1-cashman> signed 32 bit is long
[21:56:07] <sg1-cashman> the bit at the beginning the dim is the shapes stuff
[21:56:21] <sg1-cashman> the bit I gave you before is the glob reader and below that is the shapes viewer!
[21:57:08] <sg1-cashman> input$(1,#2) is at the moment the simple way of getting 1 byte -- not using my asmbler lib at the moment until i get this working
[21:57:40] <wjp> does asc(input()) give a signed or unsigned byte?
[21:59:11] <sg1-cashman> Signed! it returns
[21:59:22] <wjp> there's the problem then
[21:59:38] <sg1-cashman> integer - this valaue I get is the same as the one returned from the hex file though
[21:59:57] <wjp> but does it return values from 0-255 or from -128 to 127?
[22:00:27] <sg1-cashman> oh yeh 0-255 yeh
[22:00:33] <wjp> ok, so unsigned
[22:00:35] <wjp> that should be ok
[22:01:03] <sg1-cashman> I get info like x:255 y:127 stuff like that
[22:01:22] <sg1-cashman> worry yeah! I typoed! a bit there! I must have really confused you
[22:03:23] <sg1-cashman> the strange bit is that the floor appears to be displaying correctly - did you kinda see that in the screen sht
[22:04:17] <wjp> or the rest is ok but the floor is wrong :-)
[22:05:21] <sg1-cashman> the rest isnt ok though! because the right wall is a whole wall right along and no gap
[22:05:40] <sg1-cashman> another screen shot
[22:07:21] <sg1-cashman> not bad for dial-up modem aye! 30 kb/s but 90% compression ahah
[22:08:32] <sg1-cashman> this shows more floor but that righ wall I was talking about - compare that to the glob viewer of urs and you see
[22:08:54] * wjp recompiles glob viewer to get some extra info
[22:09:32] <wjp> ok, there should be 13 objects in there
[22:10:19] <wjp> 1020, 508, 0 -> 328,309: Painting shape: 126:0
[22:10:19] <wjp> 508, 508, 0 -> 200,245: Painting shape: 126:0
[22:10:19] <wjp> 508, 1020, 0 -> 72,309: Painting shape: 126:0
[22:10:19] <wjp> 1020, 1020, 0 -> 200,373: Painting shape: 126:0
[22:10:19] <wjp> 60, 60, 0 -> 200,133: Painting shape: 1446:1
[22:10:21] <wjp> 28, 124, 0 -> 176,137: Painting shape: 828:0
[22:10:23] <wjp> 28, 252, 0 -> 144,153: Painting shape: 1424:0
[22:10:25] <wjp> 28, 1020, 0 -> -48,249: Painting shape: 1438:0
[22:10:27] <wjp> 28, 508, 0 -> 80,185: Painting shape: 810:0
[22:10:29] <wjp> 1020, 28, 0 -> 448,249: Painting shape: 809:0
[22:10:31] <wjp> 316, 28, 0 -> 272,161: Painting shape: 288:0
[22:10:34] <wjp> 508, 28, 0 -> 320,185: Painting shape: 591:0
[22:10:35] <wjp> 380, 28, 0 -> 288,169: Painting shape: 676:0
[22:11:08] <wjp> GlobMapX, GlobMapY, GlobMapZ -> DisplayX, DisplayY: Painting shape: GlobTypNum, GlobFrmNum
[22:11:26] <wjp> see if your values are equal
[22:11:40] <sg1-cashman> ok hang on
[22:11:40] <wjp> (or in the case of DisplayX, DisplayY equal up to translation
[22:14:54] <sg1-cashman> yip! this is correct - after rewriting a print variables and stuff
[22:15:11] <sg1-cashman> 13 objects in the glob and all turn out the smae values
[22:15:18] <sg1-cashman> whats ur painting shape 126:0
[22:15:39] <sg1-cashman> whats that for again - is that ur alignment on screen with the resoluion or somthin?
[22:15:45] <wjp> that means it paints shape 126, frame 0
[22:16:11] <wjp> you named those GlobTypNum, GlobFrmNum
[22:17:15] <sg1-cashman> well all that turned out to be the same data!
[22:17:27] <wjp> including the display coordinates?
[22:17:38] <sg1-cashman> yeah thats different variable names so I pass to shapes viewer
[22:17:52] <sg1-cashman> yip all the ones on the left are right after the *4
[22:17:58] <sg1-cashman> the shapes are correct with there frames
[22:18:08] <sg1-cashman> are the -> corrdinates before *4
[22:18:13] <wjp> no, after
[22:18:29] <sg1-cashman> no hmm
[22:18:30] <wjp> after the '->' are the on-screen coordinates
[22:18:42] <sg1-cashman> what are the coordnates -->
[22:18:44] <wjp> what you called StXPos, StYPos
[22:18:51] <sg1-cashman> ok!
[22:19:00] <sg1-cashman> havt checked that yet!
[22:19:01] <sg1-cashman> wait
[22:19:12] <wjp> only they may be a bit different because I center things on-screen
[22:20:32] <wjp> let me uncenter things so they should be equal to yours
[22:20:52] <wjp> 1020, 508, 0 -> 128,191: Painting shape: 126:0
[22:20:52] <wjp> 508, 508, 0 -> 0,127: Painting shape: 126:0
[22:20:52] <wjp> 508, 1020, 0 -> -128,191: Painting shape: 126:0
[22:20:52] <wjp> 1020, 1020, 0 -> 0,255: Painting shape: 126:0
[22:20:52] <wjp> 60, 60, 0 -> 0,15: Painting shape: 1446:1
[22:20:54] <wjp> 28, 124, 0 -> -24,19: Painting shape: 828:0
[22:20:56] <wjp> 28, 252, 0 -> -56,35: Painting shape: 1424:0
[22:20:58] <wjp> 28, 1020, 0 -> -248,131: Painting shape: 1438:0
[22:21:00] <wjp> 28, 508, 0 -> -120,67: Painting shape: 810:0
[22:21:02] <wjp> 1020, 28, 0 -> 248,131: Painting shape: 809:0
[22:21:04] <wjp> 316, 28, 0 -> 72,43: Painting shape: 288:0
[22:21:06] <wjp> 508, 28, 0 -> 120,67: Painting shape: 591:0
[22:21:08] <wjp> 380, 28, 0 -> 88,51: Painting shape: 676:0
[22:21:40] <sg1-cashman> are ur stxpos and stypos not using map alignement 1024!
[22:21:50] <sg1-cashman> or are they
[22:22:01] <wjp> map alignment is irrelevant here
[22:22:05] <sg1-cashman> ok
[22:22:24] <wjp> you only need to look at that when putting the glob into the rest of the map
[22:22:54] <sg1-cashman> well I dont get the screenx and screeny the same! hmm
[22:23:07] <wjp> what do you get for the first one, for example?
[22:23:33] <wjp> if you fill in the formulas manually: (1020 - 508) / 4 = 128 and (1020 + 508) / 8 - 0 = 191
[22:23:43] <sg1-cashman> 1020,508,0 -->128,191
[22:23:53] <wjp> ok, so that one's correct
[22:24:18] <sg1-cashman> its comming up fine now for that
[22:25:46] <sg1-cashman> well I dont know - maybe there is somthing wrong with the shapes viewer stxpos stypos! how I use them
[22:26:25] <wjp> a-ha.. you don't use xoff, yoff anywhere
[22:26:48] <sg1-cashman> oh man is that what I have buggered up! maybe
[22:27:12] <sg1-cashman> yeah thats the shapes x and y offset! how do I use that
[22:27:32] <sg1-cashman> do you use that??!
[22:27:38] <wjp> the easiest way to use it here is to do stxpos = stxpos - xoff and stypos = stypos - yoff
[22:27:43] <wjp> (right after reading xoff and yoff)
[22:30:33] <sg1-cashman> now I get the floor right again but the shapes look more aligned the walls that is but still not in the right place
[22:30:37] <sg1-cashman> looks closer to me
[22:34:17] <wjp> eek, that looks weird
[22:35:04] <sg1-cashman> yeah I know aye but a bit closer!
[22:35:13] <sg1-cashman> I still get the same data as you and formula
[22:35:24] <sg1-cashman> off course that wont change now
[22:37:13] <sg1-cashman> x and y off are integer arnt they (2 bytes)
[22:37:20] <wjp> yes
[22:37:50] <wjp> signed 16 bit
[22:39:53] <sg1-cashman> must be somthing to do with LINE (XPos + StXPos, YPos + StyPos)-(XPos + DatLen - 1 + StXPos, YPos + StyPos), ASC(INPUT$(1, #1))
[22:39:55] <sg1-cashman> possibly
[22:40:05] <sg1-cashman> PSET (CtX + StXPos, YPos + StyPos), ASC(INPUT$(1, #1))
[22:40:11] <sg1-cashman> PSET (CtX + StXPos, YPos + StyPos), ASC(INPUT$(1, #1))
[22:40:34] <sg1-cashman> pset to draw the single pixels and the line to draw a whole line that is the same color and on the sme row
[22:40:42] <sg1-cashman> the shp viewer
[22:41:44] * wjp hms
[22:42:05] <wjp> what are all the unknown$ = lines when reading the frame?
[22:42:44] <wjp> xlen, ylen, xoff and yoff directly follow eachother in the data file
[22:46:10] <sg1-cashman> hang on - I will look
[22:47:00] <wjp> the top unknown$ = INPUT$(4, #1) looks ok, but I think the others should be removed
[22:50:09] <sg1-cashman> hmm are the x and y len both unsigned!
[22:50:19] <sg1-cashman> I mean signed
[22:50:35] <wjp> doesn't matter; there aren't any shapes big enough for it to matter
[22:51:03] <sg1-cashman> this info is for drawing the flx and if I remove those then the reading is stuffed up
[22:51:16] <wjp> well, it is already 'stuffed up' ;-)
[22:51:32] <sg1-cashman> my linpos gets a subscript out of range and - ! what do you mean if the flx shapes view ok
[22:51:34] <wjp> try commenting out the two INPUT$(2, #1) lines
[22:51:48] <wjp> so it would read:
[22:51:55] <wjp> SEEK #1, FrmPos(GoFrm)
[22:51:55] <wjp> GET #1, , TypNum
[22:51:55] <wjp> GET #1, , FrmNum
[22:51:59] <wjp> unknown$ = INPUT$(4, #1)
[22:51:59] <wjp> GET #1, , Compr
[22:52:01] <wjp> GET #1, , XLen
[22:52:06] <wjp> GET #1, , YLen
[22:52:08] <wjp> YLen = YLen + 1
[22:52:12] <wjp> GET #1, , XOff
[22:52:12] <wjp> GET #1, , YOff
[22:54:16] <sg1-cashman> it displays
[22:54:17] <sg1-cashman> GET #1, , XOff
[22:54:17] <sg1-cashman> GET #1, , YOff
[22:54:17] <sg1-cashman> FOR Ct = 0 TO YLen
[22:54:17] <sg1-cashman> unknown$ = INPUT$(2, #1)
[22:54:19] <sg1-cashman> LinPos(Ct) = SEEK(1)
[22:54:24] <sg1-cashman> the linepos is out of range
[22:54:29] <sg1-cashman> subscript
[22:55:03] <wjp> try making your LinPos array a bit bigger
[22:56:06] <sg1-cashman> nothing on screen now
[22:56:42] <wjp> weird
[22:56:53] <wjp> oh... wait
[22:56:59] <sg1-cashman> ok
[22:57:06] <wjp> crusader's data format is slightly different of course :-)
[22:57:20] <wjp> that's why those unknown = lines are there
[22:57:36] * wjp hits self
[22:57:37] <sg1-cashman> I get exactally what you mean ! yeah I was going to poin that out! I fiqured out the cru data format the shapes sdisplay ok
[22:58:10] <wjp> ok, you need another one of those unknown = lines between reading Xoff and Yoff
[22:58:24] <wjp> um, no, sorry
[22:58:53] <sg1-cashman> eyah um you dont want to know what that looks like 1hahahh
[22:59:04] <sg1-cashman> a 2 year olds picture
[22:59:10] <wjp> or maybe you need one before reading xoff and one before reading yoff
[22:59:38] <wjp> did you put back all the unknown = input$(2, #1) you removed earlier?
[22:59:40] <sg1-cashman> hmm you guys seamed to work out the shps format for cru when you wrote the converter - I still dont get what I ned to do now
[22:59:44] <sg1-cashman> yes!
[23:00:01] <wjp> ok, and you tried putting extra ones right before the GET #1, , Xoff line?
[23:00:11] <wjp> and one before the GET #1, , Yoff?
[23:00:44] <sg1-cashman> extra ones you mean 4 bytes now instead of 2!
[23:01:10] <sg1-cashman> um no 2 extra before xoff and yoff sorry
[23:02:08] <sg1-cashman> oooow closer! um I put 4 xtra ones in! should I give you a screen shot
[23:02:16] <wjp> sure :-)
[23:02:25] <wjp> 4 extra ones? where exactly?
[23:03:23] <sg1-cashman> unknown$ = INPUT$(2, #1)
[23:03:24] <sg1-cashman> GET #1, , XLen
[23:03:24] <sg1-cashman> unknown$ = INPUT$(2, #1)
[23:03:24] <sg1-cashman> GET #1, , YLen
[23:03:24] <sg1-cashman> 'PRINT stxpos; stypos
[23:03:24] <sg1-cashman> YLen = YLen + 1
[23:03:28] <sg1-cashman> unknown$ = INPUT$(4, #1) 'hay! um closer
[23:03:30] <sg1-cashman> GET #1, , Xoff
[23:03:32] <sg1-cashman> GET #1, , Yoff
[23:03:57] <wjp> what if you read 2 bytes before xoff and 2 bytes before yoff?
[23:04:01] <sg1-cashman> but there are some shape pixels which arnt right! some of that 2 year olds picture is still visible
[23:04:14] <wjp> screenshot please :-)
[23:04:23] <wjp> I don't quite get what you mean by '2 year olds picture'
[23:05:32] <sg1-cashman> um there are a few pixels out of place! hang on I'll screen shot it
[23:07:11] <sg1-cashman> now there is a wall right around where there should be a bit of a gap
[23:09:14] <sg1-cashman> tried another glob it see if I had sometime wrong like a similar but not glob 102 ! I am using 102 which is good and I used the source on another glob and it is similar with stuff in the wrong place but close
[23:09:28] * wjp watches the filename get longer and longer
[23:10:02] <sg1-cashman> sorry!
[23:10:19] <wjp> ooh, it looks quite good now, doesn't it?
[23:10:31] <wjp> just some broken pixels in places
[23:10:43] <sg1-cashman> yeah sure does but do you understand how there should be a gap on the left and yeah some broken pixels
[23:11:01] <wjp> why should there be a gap on the left?
[23:12:00] <sg1-cashman> glob 102 has 2 small gabs!
[23:12:09] <sg1-cashman> not 2 solid walls!
[23:12:14] <wjp> how do you know?
[23:12:36] <sg1-cashman> I used ur glob viewer and plus I tried e.g. glob 103 with my prog and there is a little stuff up
[23:12:37] <sg1-cashman> the same
[23:12:51] <wjp> well, our glob viewer isn't 100% for crusader :-)
[23:13:52] <sg1-cashman> but it looks correct! enough at the moment, mine doesnt look quite like that! hang on
[23:14:09] <wjp> but the placement in yours is ok now I guess
[23:14:25] <wjp> so it's just a matter of finding the source of the corruption
[23:16:28] <sg1-cashman> but say look at glob 103
[23:16:37] <sg1-cashman> and I will send you a screen of the example I have
[23:17:34] <sg1-cashman> actually you might be right! maybe it isnt ment to have gaps!
[23:17:55] <sg1-cashman> maybe also some globs have to be drawn before others! well look at this screnen I give you
[23:18:06] <wjp> our shapeconverter is just broken a bit, which causes some shapes to be missing
[23:18:51] <sg1-cashman> yeah I get that but the globs I have been viewing dont use those higher shapes I'm sure
[23:19:00] <sg1-cashman> well wait i wonder about 103
[23:20:25] <sg1-cashman> when does ur shapes convert cut out again!
[23:20:54] <wjp> at about 1100 IIRC
[23:21:09] <wjp> and there's a lot of 1400+ shapes in glob 103
[23:21:15] <wjp> ok, your 103 looks quite good
[23:21:16] <sg1-cashman> yeah 1446
[23:21:22] <wjp> shape ordering is wrong, though
[23:21:37] <sg1-cashman> ok so do you see about that! the 2 behind the floor!
[23:21:40] <wjp> (i.e., ground is drawn on top of some of the walls)
[23:21:43] <sg1-cashman> I wonder how they determined that
[23:21:50] <wjp> yes, I wonder too :-)
[23:21:59] <wjp> if you ever find out, we're _very_ interested :-)
[23:22:07] <sg1-cashman> hmmm I wish jason ely would get us more info grr!
[23:22:14] <wjp> we have rather a complicated sorting algorithm at the moment :-)
[23:22:18] <sg1-cashman> hey did you hear that they "lost the source code"!
[23:22:33] <wjp> that story's about U7's source code
[23:22:43] <sg1-cashman> whast the sorting algorithm 4? - ok u7
[23:23:02] <wjp> well, as you can see here the ground is drawn over the walls, while it should be the other way around
[23:23:15] <wjp> this means that you have to draw all the images in a very specific order
[23:23:43] <wjp> and this boils down to sorting them
[23:24:04] <sg1-cashman> ouch! so you have this problem with ultima 8
[23:24:10] <wjp> I don't think we ever managed to perfect the algorithm
[23:24:13] <wjp> yes
[23:24:25] <wjp> in ultima 8 and I think with crusader too
[23:24:43] <wjp> but as I said I didn't look at crusader much
[23:25:33] <sg1-cashman> hmm interesting!
[23:26:44] <sg1-cashman> I will work on that broken pixel problem! cant be to much I hope
[23:27:01] <wjp> probably a loop which doesn't stop in time
[23:27:16] <sg1-cashman> oh yeah maybe!
[23:27:28] <sg1-cashman> I had the problem when I was figuring out the format
[23:27:40] <sg1-cashman> thanx very much aye!
[23:28:06] <sg1-cashman> I think I helped create one of the biggest pentagram logs
[23:28:22] <wjp> heh :-)
[23:28:24] <wjp> good :-)
[23:29:11] <wjp> the largest, in fact :-)
[23:29:22] <wjp> 60K
[23:29:26] <wjp> second largest was 51K
[23:29:48] <sg1-cashman> true!
[23:35:03] <wjp> just did some cross-referencing of those lines with shape-boundaries, and it could be that all those lines are directly beneath a shape
[23:35:21] <wjp> which would indicate that maybe the y-loop goes on one pixel too far
[23:36:31] <sg1-cashman> ok! -
[23:36:57] <sg1-cashman> this might not be right! I surpose the first thing you tried was draw the glob file backwards
[23:37:13] <sg1-cashman> about that wall, floor thing
[23:37:48] <wjp> no, I went straight for a more complex algorithm, I think
[23:38:37] <sg1-cashman> were you talking about ypos=ypos+1
[23:38:41] <sg1-cashman> area
[23:38:52] <wjp> possibly, I'm not entirely sure :-)
[23:39:26] <wjp> ah, I think I see a problem
[23:39:40] <wjp> you write to your LinPos array 0-based, but you read 1-based
[23:40:51] <wjp> so it should be 'FOR Ct = 1 TO Ylen' where reading it
[23:40:58] <sg1-cashman> bingo! I increased the y by 1! right! when I got y's lenght, because we fixed that 2 bytes and another 2 for xoff and yoff I dont ned the y len =ylen+1
[23:41:24] <wjp> or that :-)
[23:41:53] <wjp> you'll also need to set XPos = 0 instead of = Xlen
[23:41:59] <wjp> otherwise it'll skip the first line
[23:42:11] <sg1-cashman> ok
[23:42:53] <sg1-cashman> not for crusader!!
[23:43:07] <sg1-cashman> this draw fine and if I do that then its some data before the flex frame!
[23:43:58] <wjp> this worked ok because you did YLen = Ylen + 1 too
[23:44:55] <sg1-cashman> ?? you mean yeah well I killed that ylen +1 part!
[23:45:02] <sg1-cashman> I kept the x=Xlen
[23:46:15] <wjp> but then it increases ypos to 1 right at the beginning of the loop, doesn't it?
[23:47:22] <sg1-cashman> thats a nested! loop sorry! I should have explained
[23:47:25] <wjp> but anyway, does removing ylen+1 fix the corrupted pixels?
[23:47:33] <sg1-cashman> does the first draw then this gets increased
[23:48:00] <sg1-cashman> no wait!
[23:48:10] <sg1-cashman> maybe ur right where I stuck the y increase
[23:48:11] <sg1-cashman> umm
[23:49:01] <sg1-cashman> removing ylen+1 does removed the cirruptness!
[23:49:55] <wjp> ok, excellent :-)
[23:50:19] <sg1-cashman> the same screen shot but no corruptness!
[23:51:27] <sg1-cashman> could make ypos -1 to start with just incase but I cant see a difference on this glob
[23:51:52] <wjp> the problem is that the top line of most shapes is black :-)
[23:52:51] <sg1-cashman> yeah so in ur opinion I made ypos -1 so then it flicks to 0 to start off in the loop
[23:53:05] <sg1-cashman> I also found that when working out the format about the black at the tops
[23:53:20] <sg1-cashman> nice to see some progress
[23:53:29] <wjp> try filling the screen with white before drawing the glob
[23:53:34] <wjp> you should see the black outlines then
[23:55:43] --> Darke has joined #pentagram
[23:55:50] <sg1-cashman> ok
[23:56:15] * Dark-Star needs to go
[23:56:18] <Dark-Star> see ya!
[23:56:42] <wjp> bye
[23:56:42] <sg1-cashman> yip!!
[23:56:49] <wjp> hi exultbot
[23:56:52] <wjp> eh?
[23:56:55] <wjp> hi Darke :-)
[23:56:55] <sg1-cashman> errr?
[23:57:00] <-- Dark-Star has left #pentagram ()
[23:57:00] * wjp hits his tab key
[23:58:29] <sg1-cashman> if I put the ypos at 0 at the start then I cut off the very top of the shape so -1 suits well
[23:59:22] --- Darke is now known as DarkeWork
[23:59:26] <DarkeWork> Hi!
[23:59:41] <wjp> did you know our crusader->u8 shapeconverter is broken?