IRC logs for #opendune on OFTC at 2009-11-16
⏴ go to previous day
00:00:01 <TrueBrain> UnpackX gives me the idea it returns some kind of structure :p
00:00:15 <TrueBrain> (as unpacks in general do, where packs normally give serialised data like a uint16 or something)
00:00:59 <Xaroth> ah, nevermind, that makes some form of sense actually
00:04:15 <TrueBrain> okay, that makes no sense ... there are only 2 bits for 'house'
00:04:35 <TrueBrain> where we have 6 types ..
00:06:03 <TrueBrain> for sure they can't own buildings :p
00:06:10 <Xaroth> Sardukar own buildings
00:06:18 <Xaroth> but Fremen and Mercenary do not
00:06:32 <TrueBrain> by this, Fremen can, Sardukar not ..
00:06:38 <TrueBrain> or at least .. not without overflowing
00:06:39 <Xaroth> but that's odd, seeing Fremen is 0x3 and Sardukar are 0x4
00:06:49 <Xaroth> so that should be compensated, somehow?
00:07:09 <TrueBrain> emu_get_memory8(emu_es, emu_bx, 0x2) &= 0xFC;
00:07:10 <TrueBrain> emu_get_memory8(emu_es, emu_bx, 0x2) |= s->houseID;
00:07:20 <TrueBrain> dunno if I read the code correctly, but that is what I read in it ..
00:08:17 <TrueBrain> 39EA is the pointer to the map
00:08:25 <TrueBrain> bp+0x6 is the structure
00:08:32 <TrueBrain> emu_di is the position on the map
00:08:44 <TrueBrain> emu_ax at line 2 is the offset in the map, later on calculated again
00:08:54 <TrueBrain> (in emu_dx, that time)
00:10:13 <Xaroth> emu_al is s->houseID i assume?
00:12:24 <TrueBrain> it just doesn't make sense ...
00:12:59 <TrueBrain> I have to see the destroy routine to say anything more about this, as maybe he does clear the right bits, but it just looks weird
00:13:06 <TrueBrain> @base 2 16 11111000
00:14:35 <Xaroth> I think I messed up somewhere :P
00:14:59 <Xaroth> and by messed up i mean totally fucked up :P
00:15:33 <TrueBrain> in other code it does use 0xF8 before orring in the HouseID ...
00:16:04 <Xaroth> emu_get_memory16(emu_ss, emu_sp, 0x0);
00:16:05 <Xaroth> emu_get_memory16(emu_ss, emu_bp, 0x6) =
00:16:09 <Xaroth> that does not make sense
00:16:11 <Xaroth> if you don't have emu_bp :P
00:16:39 <TrueBrain> just a few lines lower ...
00:16:44 <TrueBrain> so placing Walls is BUGGED!
00:17:13 <SmatZ> not that the owner of walls matters :)
00:17:34 <TrueBrain> code quality is near to 0
00:17:46 <Xaroth> woop, workage again :P
00:17:46 <SmatZ> isn't the reason something like... preventing them from being counted as destroyed buildings, or so?
00:18:08 <TrueBrain> no, slabs have 0xF8
00:18:10 <Xaroth> randomly writing memory is a bad thing, mkay :P
00:18:16 <TrueBrain> and the lower 3 bits are the owner of a tile, as seen on the radar
00:19:01 <DorpsGek> SVN: truebrain (r490) -Fix (r488): if you remove an enhancement, also update the documentation
00:19:06 <TrueBrain> at least, so I think ;)
00:20:51 <Xaroth> more work on it tomorrow
00:22:16 <TrueBrain> emu_Tile_Unpack() and below miss a newline between emu_pop and rest
00:22:42 <TrueBrain> emu_get_memory16(emu_ss, emu_sp, 0x0) <- unneeded space (pedantic :p)
00:23:26 <Xaroth> ah, heh, my irc client doesn't show multiple spaces :P
00:23:30 <Xaroth> i was like.. what space!?!?
00:23:45 <SmatZ> missing svn properties at tile.h ?
00:23:48 <TrueBrain> + return (tile.d.ux == 0x0 && tile.d.uy == 0x0); <- you don['t agree on the 0x0 -> 0?
00:23:58 <Xaroth> SmatZ: not put on VC yet
00:24:07 <Xaroth> so no props due to not being versioned :)
00:24:24 <TrueBrain> Xaroth: s/X position/X-position/g
00:24:47 <Xaroth> TrueBrain: what function?
00:24:54 <TrueBrain> just search for it :)
00:25:28 <TrueBrain> + * Unpacks a packed 12 bit tile information and retrieves the X-position. <- Get the X-position of a packed 12 bit tile, or something of the like
00:25:47 <TrueBrain> as it never really unpacks :p
00:26:04 <Xaroth> gah, I'm too used to hitting the compile shortcut as a cheap way of saving+compiling .. now every time i want to do ctrl+shift+s i do ctrl+shift+b .. meaning the client locks up until it's done a full rebuild..
00:45:06 <TrueBrain> oaky ... again something I REALLY DO NOT understand ....
00:45:22 <TrueBrain> slab 1x1 and slab 2x2 share code .. but for slab 2x2 that shared code is copy/pasted again, and executed again ..
00:45:28 <TrueBrain> undoing the common part completely
00:52:21 <TrueBrain> the slabs code really doesn't make any sense to me :(
00:56:53 <TrueBrain> ah ... I understand :) It needs to loop twice, as in the first loop it might happen some pieces are outside of the building area
00:56:56 <TrueBrain> now this is a DIRTY hack
00:58:32 <TrueBrain> k, going to bed too
08:24:45 *** boekabart has joined #openDune
09:14:18 *** boekabart is now known as bb
09:16:28 *** boekabart has joined #openDune
09:44:40 *** boekabart has joined #openDune
09:44:51 * boekabart is here to stay now
09:45:01 <boekabart> switched to irssi...
09:52:09 *** boekabart has joined #openDune
11:01:23 <TrueBrain> good morning people
11:05:22 <TrueBrain> it is sucky weather outside :(
11:27:26 <TrueBrain> hmmm .. found a variable which is always 0 ..
11:27:28 <TrueBrain> I wonder what it does
11:30:50 <TrueBrain> when set to 1, you see the whole map, but you can't do anything in the game
11:32:18 <TrueBrain> cool, it is a debug mode :)
11:41:24 <DorpsGek> SVN: truebrain (r491) [JIT] -Add: mapped another 4 functions (scenario debug mode)
11:45:59 <TrueBrain> lol, segra found it too, but had no clue what it did :) Named it 'gamePause' .. which it is not ;)
11:47:49 <boekabart> isn't it more like a 'spectator' mode than 'debug' mode?
11:47:59 <TrueBrain> no, it is really to review your scenario
11:48:15 <TrueBrain> so .. scenarioDebug .. or scenarioPreview ..
11:48:37 <boekabart> the AI does stuff with it set to 1?
11:48:46 <TrueBrain> nope, game ticker doesn't run
11:48:57 <boekabart> maybe set it to 2 ;)
11:49:01 <DorpsGek> SVN: truebrain (r492) -Update (r491): update decompiled code
11:49:42 <TrueBrain> so name suggestions?
11:50:16 <boekabart> Debug doesn't sound OK
11:50:25 <boekabart> scenarioPreview that is
11:50:54 <boekabart> although it probaly can be set at any point in time?
11:51:04 <TrueBrain> it can never be set :)
11:51:24 <TrueBrain> yes, when it was set to 0 :)
11:51:51 <boekabart> what would happen if you set it to 1 during the game?
11:52:11 <boekabart> or is it a scenario-load-time only thing
11:52:46 <TrueBrain> it is mostly used at loading of a scenario
11:54:57 <TrueBrain> if (g_global->scenarioPreview) {
11:55:00 <TrueBrain> dunno about the name ...
11:55:36 <TrueBrain> scenarioPreviewMode?
11:57:27 <DorpsGek> SVN: truebrain (r493) -Add: found a debug mode which allows you to preview scenarios. Name the variable as such
12:05:15 <TrueBrain> enable it and see for your self :) B4B8, search for 37A0, set it to 1 instead of 0
12:05:18 <Xaroth> full field of view and stuff? or just the 'start' screen (own base etc)
12:05:39 <Xaroth> time for a blog post? :P
12:06:01 <TrueBrain> oh, I was going to blog about such things, wasn't I .. lol :p Forgot all about that :)
12:06:27 <Xaroth> maybe stupid suggestion, but maybe useful to turn that into a compiler flag?
12:06:48 <TrueBrain> for now, notpossible, as it is still in the decompiled code, the setting of the flag
12:07:00 <Xaroth> and compiler flag wouldn't be useful anyho
12:07:20 <Xaroth> recompiling to enter/leave debug mode is a bit... silly :P
12:07:24 <TrueBrain> or maybe we find a hidden panel which allows access to such things :p
12:07:28 <TrueBrain> lets first wait and see ;)
12:08:19 <TrueBrain> I have a function which checks if a structure can be build on a certain spot .. how to name that ..
12:08:48 <TrueBrain> IsBuildableAtTile? :p
12:17:30 <TrueBrain> now I really need to make map access much nicer :)
12:27:09 <TrueBrain> it seems there are 2 routines which handles the fog .. one for vehicles, one for structures
12:28:03 <TrueBrain> Xaroth: I need another briliant function name .. I have this function, which gets the radius and a tile, and removes the fog around it
12:28:40 <Xaroth> RevealFogOfWarAround ?
12:29:10 <Xaroth> or s/FogOfWar/FoW/ ... but that might not be that much explaining
12:29:19 <Xaroth> saves a bit on function name length tho
12:31:02 <TrueBrain> it needs a better name, but that can be done later :)
12:39:11 <planetmaker> RemoveFogAroundTile(tile *t)
12:39:22 <planetmaker> RemoveFogAroundTile(tile *t, uint8 r)
12:43:55 <glx> TrueBrain: did you test pak ?
12:44:13 <TrueBrain> not yet, just browsed through it, and found it lovely short :)
12:44:30 <glx> I tried to make it memory efficient too :)
12:45:38 <glx> and safe (it checks for unexisting files)
12:45:47 <glx> but doesn't warn about it
12:45:54 <TrueBrain> I will try it later today, if MrFlibble gives permission to use his changes :)
12:46:21 <TrueBrain> which he just did ;)
12:47:00 <glx> unpak then pak of an existing .pak gives a different "result" but should be compatible (different file order)
12:47:52 <TrueBrain> netbeans doesn't always update the last-modified time :(
12:48:29 <glx> but that's because I used wildcards when calling it
12:48:58 <TrueBrain> okay, lets try it ..
12:49:33 <TrueBrain> pak.c:40: warning: comparison between signed and unsigned
12:50:34 <glx> ha no, it's a valid warning :)
12:51:19 <TrueBrain> glx: works PERFECTLY
12:51:42 <glx> accepted by dune2 (I didn't check that point ;) )
12:52:00 <TrueBrain> I now have fixed scenarios in game :) Lovely ;)
12:57:23 <boekabart> hm "You do not have the required permissions to view the files attached to this post."
12:57:37 <TrueBrain> Xaroth: can you please allow non-registered members to download files?
12:59:00 <TrueBrain> I have no idea yet how we are going to release the scenario.pak with releases .. as we somehow have to inform people to use this .pak over theirs .. oh well .. now first some shopping :)
12:59:13 <TrueBrain> glx: soon we should add the 'pak' and 'unpak' to SVN under tools/, with a nice Makefile of some kind :)
12:59:30 <TrueBrain> and MSVC project files, I guess .. not sure yet how to do that layout
12:59:58 <glx> well no need for msvc project files when I provide exe ;)
13:00:16 <glx> and using a solution for 2 files is a big overload
13:00:34 <TrueBrain> so maybe add it in the main project file, as seperate project?
13:00:47 <TrueBrain> it would be nice if people can compile it in MSVC :p
13:17:12 <Xaroth> we might want to revert this change at some point when the forums are actively used tho
13:32:17 <TrueBrain> what is wrong with letting files being downloaded?
13:39:02 <TrueBrain> emu_Structure_ConnectWall
13:43:13 <TrueBrain> lets not worry about traffic :)
13:43:21 <Xaroth> hence at some later point :)
13:43:56 <TrueBrain> Server stats: max: 17 mbit/s. Average: 5 mbit/s
13:48:11 <TrueBrain> hmm .. emu_Structure_IsValidBuildLocation .. it is not an 'Is' function .. it also detects if there are slabs below the building
13:50:57 <TrueBrain> well, it returns either 0, 1, or a negative value indicating how many tiles have slabs below them
13:52:10 <TrueBrain> oh, do NOT have slabs below them, is more correct
13:57:35 <TrueBrain> glx: f__B4C1_0155_002A_AC43 <- 32bit div?
13:58:23 <TrueBrain> or div with 256 multiplier to avoid floats?
14:05:58 <glx> hmm looks like a 32bit div, with extra check (like returning -1 to prevent div/0)
14:07:13 <glx> unless it's ValueToPercent :)
14:07:45 <TrueBrain> it seems that it is
14:08:09 <glx> counter part of the function above it
14:29:13 <TrueBrain> s->hitpoints -= (si->hitpoints / 2) * tilesWithoutSlab / tilesStructure;
14:29:16 <TrueBrain> much more readable :p
14:30:10 <TrueBrain> Xaroth: what do we do ... buildings build completely on slabs do not degrate with dune2_enhanced?
14:34:56 <TrueBrain> very weird that only Windtrap shows up in this function ... not silos, only windtraps ...
14:35:09 <Xaroth> they shouldn't degrade when on slabs, no
14:35:53 <Xaroth> or at least, that was the assumed 'proper' function
14:38:42 <TrueBrain> k, I need a format for enhancement.txt .. either what it was, or what it now is ..
14:38:46 <TrueBrain> tricky to make that clear
14:40:15 <TrueBrain> k, in enhanced mode, structures no longer degrade if you build them completely on slabs
14:45:42 <TrueBrain> emu_lfp(&emu_es, &emu_bx, &emu_get_memory16(emu_ss, emu_bp, -0x4));
14:45:44 <TrueBrain> emu_lfp(&emu_es, &emu_bx, &emu_get_memory16(emu_es, emu_bx, 0x8));
14:46:24 <TrueBrain> such lines you really have to read a few times before you start to have a clue what they mean :)
14:50:57 <TrueBrain> if I would call a function: emu_Structure_Draw, would it be clear it doesn't draw as in to the blitter, but draw as in: to the map?
14:51:01 <TrueBrain> or how else should I be calling it?
14:52:27 <TrueBrain> emu_Structure_UpdateMap?
14:56:05 <TrueBrain> :/* 000E(4) */ PACK uint32 structuresBuilt; /*!< The Nth bit active means the Nth structure type is built (one or more). */
15:07:03 <Xaroth> that for tech tree calculations? :o
15:07:12 <Xaroth> aka can't build refinery with no windtraps
15:22:34 <Xaroth> Structure_RemoveFogAroundTile?
15:23:08 <Xaroth> I would have found it more senseful to make a generic for both units and structures
15:23:18 <TrueBrain> lets not debate that :)
15:24:15 <Xaroth> emu_ValueToPercent << shouldn't that be Util_ValueToPercent like in String_BlaBlaBla (s/Util/Whatever/)
15:24:33 <Xaroth> with emu_ in front of it ofcourse
15:24:49 <TrueBrain> yeah, most likely, but the other one was already named like this :p
15:25:57 <TrueBrain> named it Math_ValueToPercent and Math_PercentToValue
15:26:09 <Xaroth> emu_push(scsip.s.cs); emu_push(scsip.s.ip + 0x12);
15:26:23 <TrueBrain> I _think_ it is part of the script stuff
15:26:31 <TrueBrain> as vehicles show similar stuff
15:26:33 <TrueBrain> but I am not sure yet
15:26:54 <TrueBrain> hmm .. to commit or not to commit ..
15:27:38 <Xaroth> lots of calls to Tile_Unpack :o
15:28:55 <TrueBrain> hmm ... I found the reason for another bug
15:29:09 <TrueBrain> did you notice that when you build a oil refinery or what ever, on the right side it doesn't remove the fog?
15:29:33 <Xaroth> that's because it uses the leftmost tile to clear fow?
15:29:58 <Xaroth> at least, I had noticed something similar with palaces
15:30:10 <TrueBrain> yup :) Topleft tiles, radius 2
15:30:12 <Xaroth> had assumed it cleared with the left tiles only
15:30:14 <TrueBrain> that is how much fog is removed
15:30:23 <TrueBrain> where for slabs, it is all tiles, radius 2
15:30:24 <TrueBrain> where for slabs, it is all tiles, radius 1
15:30:53 <Xaroth> ah well, something fixable at least :)
15:30:55 <TrueBrain> most 'odd' part is that the solution is very simple :p
15:31:07 <TrueBrain> just moving a small piece a few lines lower
15:32:36 <Xaroth> I think that's what you get when you are making a 'new' type of game :)
15:32:50 <TrueBrain> and in the old days, beta-testers were a bit harder I guess
15:33:03 <Xaroth> beta testers were often in-house developers :P
15:33:59 <TrueBrain> k, lets test my enhanced code :)
15:34:33 <TrueBrain> wow .. that looks .. different :p
15:34:46 <TrueBrain> that really is a huge difference ...
15:47:13 <DorpsGek> SVN: truebrain (r494) -Add: named a few functions
15:48:27 <DorpsGek> SVN: truebrain (r495) -Add: figured out a few variables
15:50:41 <DorpsGek> SVN: truebrain (r496) 1) Building walls did not clear owner bits correctly
15:50:41 <DorpsGek> SVN: truebrain (r496) 3) Building a structure correctly removes fog for all tiles in the structure
15:50:41 <DorpsGek> SVN: truebrain (r496) 2) Building on slabs now no longer degrades your structure
15:50:41 <DorpsGek> SVN: truebrain (r496) -Add: Structure_Place(), and 3 enhancement related to it:
15:50:50 <TrueBrain> try it, and you will know immediatly what I mean :)
15:51:23 <TrueBrain> k, if any of you is ever bored, just look at structure.c for 'extern voids' which require converting :) They are all relative easy (the ones that are named)
15:54:58 <TrueBrain> I like it that there is a function to connect walls :)
15:57:41 <Xaroth> and not some wierd hack :P
15:58:09 <TrueBrain> but okay .. more and more things come out of the fog :) I like this function :)
15:58:33 <Xaroth> we're slowly getting there :)
16:00:02 <TrueBrain> how to call map tiles?
16:00:38 <TrueBrain> so a struct called 'Cell'?
16:00:49 <Xaroth> what should it be doing
16:01:06 <TrueBrain> normally I would call it Tile, but as tile32 is already there, this might be ambigious
16:01:17 <TrueBrain> well, what it IS doing, is store the information of a tile on the map :)
16:01:58 <TrueBrain> k, in the file map.h?
16:02:40 <TrueBrain> k .. in g_global is a pointer 39EA, which points to the map
16:02:44 <Xaroth> then again, tile32 is more a 'location' pointer
16:02:55 <TrueBrain> tile32 is the position
16:03:26 <TrueBrain> variable_39EA -> g_global->mapPointer, as it points to the map, and it isn't the map ..
16:03:29 <Xaroth> yeh, a Point in .net :P
16:03:54 <TrueBrain> we can also just call it Tile, the confusion should be limited I guess
16:04:08 <Xaroth> I don't mind either way
16:04:14 <TrueBrain> I btw called the PackedTile 'position' :p
16:04:45 <TrueBrain> a 12bit packed tile, yes
16:04:52 <TrueBrain> I called that position in Structure_Place()
16:05:08 <TrueBrain> so we should try to find some balance in the naming of position indicators :)
16:05:13 <TrueBrain> as this is starting to get confusing ;)
16:05:15 <Xaroth> structure_place uses packed tile?
16:05:24 <TrueBrain> packed tiles are used for simple math
16:05:49 <Xaroth> packed tiles will be one of the first things that need an overhaul i think :o
16:06:25 <Xaroth> (i'm not volunteering)
16:06:54 <TrueBrain> no, they are very useful :)
16:06:58 <TrueBrain> it is easier to work with them
16:07:01 <TrueBrain> as they contain what matters
16:07:07 <TrueBrain> tile32 is stupid with all those offset shit and blabla :p
16:07:08 <Xaroth> useful, yes, but kinda constraining us to 64x64 maps ;P
16:07:24 <Xaroth> then they need an overhaul too! :P
16:07:34 <TrueBrain> but okay ... /me goes to work on the map
16:07:56 <Xaroth> oo, rocket launch tonight
16:08:36 <Xaroth> astronauts are boarding
16:12:59 <TrueBrain> hmm .. I can't keep both the old way of wrong-owner-remove for Walls, and convert to a sane Tile system
16:13:05 <TrueBrain> so that is the first enhancement you can't disable :p
16:14:33 <TrueBrain> how to name the function which gives you the tile of the position ...
16:14:43 <TrueBrain> Map_GetTile(position) ?
16:15:18 <TrueBrain> GetTileByPosition and GetTileByTile
16:15:23 <TrueBrain> the start of the confusion ;)
16:15:39 <TrueBrain> we need a better name for tile32, and your tile.c stuff :)
16:16:24 <TrueBrain> and how to differ between packed and unpacked?
16:17:24 <Xaroth> what are the offsets used for?
16:17:44 <TrueBrain> units move from one side of the tile to the other
16:18:08 <TrueBrain> I do speak english :)
16:18:17 <Xaroth> yeh, but making sense, a bit less :P
16:18:21 <TrueBrain> units .. they are not just on a tile
16:18:24 <TrueBrain> they are somewhere on a tile
16:18:33 <TrueBrain> this is tile32.offset
16:18:38 <Xaroth> ah, so offset shows where on that tile
16:20:16 <Xaroth> Coordinate and Position ?
16:20:44 <TrueBrain> you use the packed version if you only care about the map
16:20:51 <TrueBrain> like structures and stuff
16:20:59 <TrueBrain> you use the unpacked version if you care where exactly on the map, like units
16:21:11 <TrueBrain> but in theory you can always use the unpacked version for all situations
16:21:20 <Xaroth> you use the position of a unit
16:21:23 <Xaroth> and the coordinate of a tile
16:21:43 <TrueBrain> just the packed version is very easy, as then you have: map[position]
16:22:14 <TrueBrain> but oaky .. lets keep the weird naming as it is for now, we will battle that another day ;)
16:23:15 <TrueBrain> removing limits will be very hard btw :p
16:25:13 <TrueBrain> wow, it seems I did it correct the first attempt
16:31:25 <TrueBrain> ah, now I also understand the weird sprite in the scenario preview mode
16:31:30 <TrueBrain> it shows where fields started
16:35:21 <DorpsGek> SVN: truebrain (r497) -Add: made a start figuring out the Tile struct, which holds the information of a tile in the map
16:39:17 <TrueBrain> there is another 'map', but I think that is what is last drawn ...
16:39:24 <TrueBrain> as you need to flag it before it redraws
16:40:25 <TrueBrain> Xaroth: I suggest we for now differ between tile32 and packed version by using tile32 tile, and uint16 position
16:41:06 <TrueBrain> okay, placing a wall has just 1 unknown function left .. getting there ;)
16:41:36 <TrueBrain> but that function checks 'Tile.unknown1' ... I dunno what it does :p
16:43:31 <TrueBrain> a structure can have at most 9 tiles, but it can be in the most odd shapes if you like
16:44:16 <TrueBrain> @calc 0x2d52 - 0x2c64
16:44:20 <DorpsGek> TrueBrain: 13.2222222222
16:44:21 <Xaroth> U-shaped buildings ftw :P
16:44:34 <TrueBrain> hmmm .. less than 13 possible shapes ..
16:44:42 <TrueBrain> but I can only think up 4 shapes
16:45:57 <Xaroth> 1x1, 2x2, 3x3, 1x2, 1x3, 2x1, 3x1
16:46:18 <Xaroth> then 4 L shapes one way around
16:46:22 <Xaroth> and another 4 the other way around
16:46:41 <TrueBrain> how to call a variable which holds the amount of tiles of which an structure exist?
16:47:07 <TrueBrain> how many of those are there IN DUNE :p
16:47:26 <TrueBrain> tilesStructure I have it named now
16:47:28 <TrueBrain> but that is a bit poor
16:49:32 <TrueBrain> structureTileCount = g_global->structureTileCount[si->layout];
16:49:34 <TrueBrain> for (i = 0; i < structureTileCount; i++) {
16:49:35 <TrueBrain> uint16 curPos = position + g_global->structureLayout[si->layout][i];
16:49:37 <TrueBrain> that is readable I guess :)
16:52:56 <TrueBrain> so how many are there ingame? 4?
16:54:22 <TrueBrain> @calc 0x2d52 - 0x2cac
16:55:03 <TrueBrain> @calc 0x2e78 - 0x2d5a
16:59:05 <TrueBrain> k, 7 layouts in the game .. never knew that :p
17:02:43 <DorpsGek> SVN: truebrain (r498) -Add: figured out how structure layouts work
17:05:50 <TrueBrain> k ... all things I can map, are now mapped (inside Structure_Place() )
18:20:30 <TrueBrain> that was a nice dinner :)
18:20:34 <TrueBrain> now lets continue .. where was I :)
18:24:03 * tneo can't recall level 8 being so though ...
18:24:17 <tneo> no spice left and just 2 vehicles to destroy a base
18:24:37 <TrueBrain> I had the same problem in A8 I believe
18:25:07 <TrueBrain> Xaroth: it crashes my browser
18:26:02 <TrueBrain> why are there 2 timers counting down?!
18:26:10 <Xaroth> top is the site's estimation
18:26:28 <Xaroth> green thing above is what they receive as signals, if it turns red it's most likely an abort
18:26:37 <Xaroth> aborts won't be verified until T-5m or something
18:26:47 <TrueBrain> what an annoying voice .....
18:26:52 <Xaroth> we were watching the pre-flight checkin stuff at the office
18:27:00 <Xaroth> TrueBrain: not just her voice.
18:27:49 <Xaroth> and they were 'checking in' over 3 hours ago
18:27:56 <Xaroth> so they been lying on their back for the past 3 hours :o
18:32:10 <TrueBrain> and "ourchitchat"...WHICHSUCKS!
18:34:25 <Xaroth> changed width of player to 1280
18:34:35 <Xaroth> can't work in different windows while fullscreenmode
18:34:46 <TrueBrain> a countdown clock which is not counting down .. as useful as any USA thingy ...
18:35:12 <Xaroth> they had a T-5 minutes for the Ares I-X rocket for.. 16 hours or so :P
18:35:23 <Xaroth> they are holding until all systems report go
18:37:45 <TrueBrain> I think unknown1 is 'fog'
18:38:50 <Xaroth> the astronauts actually wear parachutes
18:44:58 <TrueBrain> I don't get why the Fog of War is 7 bits ...
18:45:07 <planetmaker> [19:43] <Xaroth> [19:35:12] they had a T-5 minutes for the Ares I-X rocket for.. 16 hours or so :P <-- hey, those "holds" are in the schedule deliberately. And they were actually introduced in order to avoid errors ;-)
18:45:18 <Xaroth> 16 hours is a bit overkill tho :P
18:45:33 <Xaroth> well, for an unmanned flight, no
18:45:39 <Xaroth> but you do have human astronauts :P
18:45:53 <planetmaker> Also for manned flight it's not too much ;-) - but you might then rather cancel the launch
18:47:15 <planetmaker> As an astronout - those suckers didn't want me, but that's besides the point - I'd rather wait than go bye bye ;-)
18:47:35 <planetmaker> Chances are anyway 1% that it'll happen in your life, if you're an active astronout.
18:47:51 <Xaroth> TrueBrain: now you can 'see' that annoying voice :P
18:47:52 <TrueBrain> omg, her voice is not only annoying, she is ugly too
18:48:04 <Xaroth> hence why i said 'not just her voice' :P
18:48:16 <Xaroth> and she's gigglish -_-
18:48:56 <TrueBrain> okay ... this conversation is just sad .... very very very sad ....
18:50:35 <TrueBrain> Xaroth: Tile.fog or Tile.fogOfWar?
18:51:38 <Xaroth> and i thought I was a geek -_-
18:52:32 <TrueBrain> 7 bits .. why .. hmm ..
18:52:44 <TrueBrain> left, right, bottom, top, center .. still just 5 ...
18:53:23 <Xaroth> for tiles on ground, and units on tiles on ground
18:53:33 <TrueBrain> we talk fogOfWar here :p
18:54:41 <planetmaker> omg. You're so right. The girl in that launch-coverage is so a geek prototye that it couldn't be prototyped better ;-)
18:58:31 <TrueBrain> it is getting more and more sad .............
18:58:42 <TrueBrain> if I ever start to talk like this on a broadcast, please slap me in my face
18:59:47 <Xaroth> I was more thinking about getting a shotgun :P
19:00:20 <DorpsGek> SVN: truebrain (r499) -Add: Tile.unknown1 is most likely Tile.fogOfWar (although I have no clue why it would be 7 bits long)
19:01:16 <TrueBrain> LOL! Spaceflights are not like macdonalds? REALLY?!
19:01:26 <TrueBrain> @calc 0x2e9c0 + 0x323f
19:05:37 <tneo> is there a rough outline of what you guys want to program on short notice?
19:06:19 <Xaroth> C-ifying all the way :)
19:06:22 <TrueBrain> figuring out all unknowns :)
19:06:30 <tneo> yes that part I figured :-D
19:07:24 <TrueBrain> Xaroth: did you try trunk? And the fog that is removed when building a structure? As it really looks totally different now ;)
19:15:39 <Xaroth> those work terminals look like they been ripped straight out of the 70s :P
19:17:41 <TrueBrain> fullscreen is indeed stupid
19:19:46 <TrueBrain> Xaroth: how did you increase the size?
19:20:12 <Xaroth> find the embed thingie, change the width to 1280, height to 1000
19:20:13 <TrueBrain> hmm ... now I get the Mobile page
19:20:19 <Xaroth> find the object, do the same
19:20:26 <Xaroth> find the div surrounding it, set width to 1280 as well
19:21:06 <TrueBrain> lol ... I can't get an image anymore :(
19:23:04 <TrueBrain> nope ... no video :p
19:23:08 <TrueBrain> so do not reload, is my advise :)
19:23:31 <TrueBrain> audio works, but that is all
19:24:01 <TrueBrain> oeh, that page even skills with the browser size ;)
19:24:53 <TrueBrain> stupid annoying google-ads everywhere
19:34:19 <planetmaker> it is so totally useless to quote the ground speed...
19:39:12 <TrueBrain> to IX in 8+9 or not to IX in 8+9
19:39:26 <Xaroth> IX in 8+9 means harder game
19:39:46 <TrueBrain> tneo already complains H8 is too hard :p
19:40:18 <Xaroth> tneo: gimme a savegame of H8, and i'll see if i can finish it
19:40:40 <TrueBrain> Xaroth: but what you mind to walk it over with MrFlibble? See what has to be done with the scenarios to make them fair and stuff..
19:41:24 <TrueBrain> if you want to see the diff, unpak both scenario.pak (original and the uploaded of mine), and diff them ;)
19:43:08 <TrueBrain> when building a structure, something is calculated, dunno what yet, but it is cut off at 50% .. do windtraps still produce 50 power when they are below 50% in health?
19:43:47 <Xaroth> if you finished it, it's not too hard :P
19:43:54 <Xaroth> RTS should progressively become harder :)
19:44:19 <tneo> nope I said it was harder then I remembered :-P
19:44:57 <TrueBrain> btw, I think windtraps should display the total amount produced and used too .. as it annoys me that I see a windtrap which has surplus energy, yet there isn't enough in total
19:50:11 <TrueBrain> okay, despite the fact the GUI says the output of a windtrap can be below 50, in reality it never is
19:50:20 <TrueBrain> tneo: that only shows the stats about that windtrap
19:50:29 <TrueBrain> say, I have 2 windtraps, one producing 100, the other 50
19:50:40 <TrueBrain> when I click on the first, nothing tells me which suggests that
19:50:49 <TrueBrain> it says: needed: 75; output: 100
19:50:53 <TrueBrain> yet my radar is offline
19:51:10 <tneo> then the other one is below 75
19:51:19 <TrueBrain> yes, but it is annoying :)
19:51:35 <TrueBrain> hmm .. okay, so it is a bug or not, that the GUI tells me: output: 21, where in fact it is 50
19:51:43 <tneo> also annoying not knowing how much energy buildings cost
19:51:50 <TrueBrain> or is it a bug that it doesn't go below 50?
19:51:59 <TrueBrain> "the manual has it" :p
19:52:06 <TrueBrain> no, only in the GUI
19:52:08 <tneo> when damage level is high enough
19:52:10 <TrueBrain> the calculation doesn't
19:52:29 <tneo> in my lvl 8 i head 45 at times
19:52:30 <TrueBrain> I have 2 windtraps, one with: Output 23, the other with Output 31 (total of 54). I need 60. Yet, my radar is still running
19:52:35 <TrueBrain> in reality I have an output of 100
19:52:38 <tneo> and damage was yellow then
19:52:50 <TrueBrain> there is a difference between what the GUI tells you, and the game uses
19:53:49 <tneo> output seems to be divided among amount windtraps you have
19:53:51 <TrueBrain> there is even code to protect against > 100 :p No idea why ... ;)
19:54:01 <TrueBrain> no, output is per windtrap
19:54:31 <TrueBrain> needed is averaged, output is real value of that current windtrap
19:55:39 <planetmaker> crappy, buggy, original Dune2 ;-)
19:56:55 <planetmaker> btw, TrueBrain in r499:
19:56:58 <planetmaker> [Compiling] src/scenario.c
19:56:59 <planetmaker> src/scenario.c: In function ‘emu_Scenario_Load_Teams’:
19:57:01 <planetmaker> src/scenario.c:603: warning: unused parameter ‘key’
20:01:55 <planetmaker> Hm... Stability certainly didn't improve :S
20:04:51 <TrueBrain> I hate wordpress .. pff ..
20:06:23 <glx> looks like I missed the take off :)
20:06:45 <TrueBrain> Xaroth: I think we are better off if we make a subforum for the developers blog
20:16:08 <TrueBrain> like this (see Development forum)
20:16:32 <glx> but I was just in time for the separation :)
20:18:00 <glx> oh planetmaker killed many people :)
20:31:41 <TrueBrain> @calc 50 * 256 / 100
20:32:50 <TrueBrain> @calc 100 * 128 / 256
20:34:12 *** SmatZ__ has joined #openDune
20:40:28 <TrueBrain> in a function calculating power consumption I all of a sudden have a few lines which makes sure when you have no buildings left, a few vars are updated :s
20:47:17 <TrueBrain> did you know that AIs are underpowered?
20:47:25 <TrueBrain> they consume 465, they produce 237 ... :s
20:55:33 <DorpsGek> TrueBrain: 100001110
21:09:58 <DorpsGek> SVN: truebrain (r500) -Add: Structure_CalculatePowerAndCredit() and all variables that comes with it
21:14:47 <TrueBrain> k, enough for this day :)
21:15:15 <TrueBrain> Xaroth: outstanding question: what to do with windtraps < 50%. The GUI shows production against current health, internal power calculation is capped at 50%
21:15:21 <tneo> TrueBrain, how long would it take to make it work on a decent sized screen? :-P
21:15:32 <TrueBrain> I think the GUI is more correct .. if I damage a windtrap to 10%, it should not produce 50%
21:15:49 <TrueBrain> tneo: very long; that is in the deepest of the game, far behind all the game logic and stuff
21:15:59 <TrueBrain> besides, I doubt that scaling the images results in anything sane
21:16:12 <TrueBrain> and given that OpenTTD is only now getting ready to support high resolutions with bigger fonts .. I say a year or 5 ;)
21:16:27 <glx> already r500, let's celebrate ;)
21:16:36 <TrueBrain> glx: do you bring the cake?
21:17:10 <TrueBrain> and sending it over the post is not the best idea I guess :p
21:45:13 <Xaroth> it's only a 4 hour drive :/
21:51:21 *** Guest2339 has joined #openDune
21:51:58 <Guest2339> Program Termination: jumped to 3FF1:0992, which is not decompiled.
21:51:59 <Guest2339> The jump was triggered at decompiled/cs__B4A2.c:1081
21:52:01 <Guest2339> The jump appears to originate from B4A2:08A9.
21:52:26 <Guest2339> oh... I'm Guest ;-)
21:52:37 *** Guest2339 is now known as planetmaker
21:53:53 <glx> planetmaker: crash.bin required
21:56:12 <Xaroth> hm, so it clears px/ux
21:56:18 <Xaroth> then sets lx to 0x80 o_O
21:56:37 <glx> planetmaker: not for me, for TrueBrain :)
21:57:17 <Xaroth> TrueBrain: cs__0F3F.c @ emu_Tile_Center() .. am I correct to assume it doesn't give a rat's arse about x/y, just about the offset?
21:58:33 <Xaroth> glx might be able to answer that one as well ofc
22:49:31 <DorpsGek> Xaroth: Error: Something in there wasn't a valid number.
23:15:16 <Xaroth> TrueBrain: nice blog entries btw
23:22:19 <Xaroth> 0F3F:00B4:002A:89B2 emu_Tile_GetDistance # (from_tile, to_tile), distance as longest * 2 + shortest << looking at it, i think it's slightly different
23:22:25 <Xaroth> emu_ax = emu_get_memory16(emu_ss, emu_bp, 0x6);
23:22:25 <Xaroth> emu_bx = emu_get_memory16(emu_ss, emu_bp, 0xA);
23:22:25 <Xaroth> emu_subw(&emu_ax, emu_bx);
23:22:37 <Xaroth> indicates it's using x and y as separate params
23:23:42 <Xaroth> i mean, wouldn't it give odd results if the high bytes (px/py) are used?
23:23:55 <Xaroth> difference of one suddenly becomes a difference of .. more than one
23:24:54 <Xaroth> @base 2 10 0000000100000000
23:24:59 <Xaroth> @base 2 10 0000001000000000
23:25:45 <Xaroth> so i think the args are from_x, from_y, to_x, to_y
23:26:02 <Xaroth> and the result is longest + (shortest / 2)
23:28:34 <Xaroth> TrueBrain: also, I think the extra space on emu_get_memory you mentioned yesterday, wasn't my doing
23:33:27 <Xaroth> also, abs() is in standard libraries right?
23:44:43 <glx> Xaroth: maybe 2 32bits args
23:45:03 <glx> check the callers to be sure :)
23:45:45 <Xaroth> already tested it by running it, i see nothing glitching at first hand
23:45:54 <Xaroth> wouldn't be much difference though
23:46:01 <SmatZ> abs() can be macro as well
23:46:10 <Xaroth> as x is treated as first 16bit, and y as second 16bit
23:46:48 <Xaroth> SmatZ: as long as it works, I'll let TrueBrain and glx shout at me when I use something that doesn't work as it should :P
23:48:37 <glx> arg you made me find another variable :)
23:48:38 <Xaroth> glx: they are being pushed to the stack as 16 bits
23:49:06 <glx> of course they are push as 16 bits, there's no other way :)
23:49:42 <Xaroth> then there's not much difference in treating them as 4 uint16 or 2 uint32 :)
23:49:44 <glx> remember it's a 16bit CPU
23:50:02 <Xaroth> besides the obvious need for processing if it's 2 uint32 :P
23:50:47 <glx> but for understanding it may be easier to take these args as 32bits
23:51:12 <Xaroth> from_x, from_y, to_x, to_y as compared to from_xy, to_xy ?
23:51:52 <Xaroth> anyways, another function less in 0F3F
23:52:03 <Xaroth> down to 4 named, and 5 unnamed functions
23:52:48 <glx> ,...emu_lfp(&emu_es, &emu_bx, &emu_get_memory16(emu_ds, 0x00, 0x394E));
23:52:48 <glx> ,...emu_push(emu_get_memory16(emu_es, emu_bx, 0xC));
23:52:48 <glx> ,...emu_push(emu_get_memory16(emu_es, emu_bx, 0xA));
23:52:48 <glx> ,...emu_push(emu_cs); emu_push(0x03D0); emu_cs = 0x0F3F; emu_Tile_GetDistance();
23:53:18 <Xaroth> er, is that cs_1Asomething?
23:53:31 <Xaroth> I was looking at something really similar to that piece of code :P
23:53:58 <Xaroth> emu_lfp(&emu_es, &emu_bx, &emu_get_memory16(emu_ss, emu_bp, 0x6));
23:53:58 <Xaroth> emu_push(emu_get_memory16(emu_es, emu_bx, 0xC));
23:53:58 <Xaroth> emu_push(emu_get_memory16(emu_es, emu_bx, 0xA));
23:53:58 <Xaroth> emu_push(emu_cs); emu_push(0x072A); emu_cs = 0x0F3F; emu_Tile_GetDistance();
23:54:19 <glx> ,...emu_lfp(&emu_es, &emu_bx, &emu_get_memory16(emu_ss, emu_bp, -0x10));
23:54:19 <glx> ,...emu_push(emu_get_memory16(emu_es, emu_bx, 0xC));
23:54:19 <glx> ,...emu_push(emu_get_memory16(emu_es, emu_bx, 0xA));
23:54:19 <glx> ,...emu_push(emu_get_memory16(emu_ss, emu_bp, 0xA));
23:54:19 <glx> ,...emu_push(emu_get_memory16(emu_ss, emu_bp, 0x8));
23:54:20 <glx> ,...emu_push(emu_cs); emu_push(0x008D); emu_cs = 0x0F3F; emu_Tile_GetDistance();
23:54:49 <glx> anyway there's a struct somewhere with x and y at A and C :)
23:56:42 <glx> oh TrueBrain broke compilation, missing emu_ layer for Structure_CalculatePowerAndCredit
23:57:00 <Xaroth> I, haven't updated yet :P
23:58:27 <Xaroth> any way to force by reference arguments?
23:58:38 <Xaroth> seeing I can't return both uint16 x and uint16 y
23:59:53 <Xaroth> uint16 bla, ... , ... , uint16 *pointer_thingie ?
continue to next day ⏵