IRC logs for #opendune on OFTC at 2011-06-21
⏴ go to previous day
00:29:47 *** fjb is now known as Guest5382
05:14:17 *** Xaroth|Work has joined #openDune
05:14:17 *** ChanServ sets mode: +o Xaroth|Work
11:37:46 <DorpsGek> SVN: truebrain (r1842) -Add: named some ObjectInfo / UnitInfo variables
11:40:31 <DorpsGek> SVN: truebrain (r1843) -Fix: documentation glitches
11:43:54 <DorpsGek> SVN: truebrain (r1844) -Add: more naming of UnitInfo variables
11:59:24 <DorpsGek> SVN: truebrain (r1845) -Add: some more UnitInfo work
12:05:30 <DorpsGek> SVN: truebrain (r1846) -Add: move g_teamFindCount and g_teamFindArray out of g_global
12:07:57 <DorpsGek> SVN: truebrain (r1847) -Add: move g_scriptCurrentTeam out of g_global
12:08:30 <DorpsGek> SVN: truebrain (r1848) -Add: remove a now unused function
12:10:30 <DorpsGek> SVN: truebrain (r1849) -Add: move the team array to 32bit/64bit world
12:14:07 <DorpsGek> SVN: truebrain (r1850) -Add: move g_houseFindCount and g_houseFindArray out of g_global
12:14:40 <TrueBrain> you interrupted my commit-spree :(
12:18:27 <DorpsGek> SVN: truebrain (r1851) -Add: move g_playerHouse out of g_global
12:19:11 <DorpsGek> SVN: truebrain (r1852) -Fix (r1849): forgot to cleanup an unused parameter
12:23:38 <TrueBrain> for some reason, all savegames have units with houseID=13 in them
12:24:39 <TrueBrain> a carry-all, it seems
12:29:27 <TrueBrain> I can ignore it while loading?
12:31:56 <TrueBrain> LOL! Okay ... think I found it :D
12:32:14 <TrueBrain> we already fixed that :D
12:40:40 <DorpsGek> SVN: truebrain (r1853) -Add: moved the house array to 32bit/64bit world, and fixed up some enhancement, because it had far-going consequences
12:41:57 <TrueBrain> all house, structure, unit and teams no longer have a csip :D
12:42:06 <TrueBrain> in fact, it no longer is POSSIBLE to use csips on them :D
12:47:25 <TrueBrain> what do you think about that? Should I solve it differently?
12:47:28 <TrueBrain> (ignoring global.h ;))
12:47:48 <TrueBrain> that array is only used there, so I dunno if I want to make it a global one
12:48:37 <TrueBrain> on the other hand, we might want to make a TeamActionTypeToString for debugging
12:50:54 <glx> as TeamAction should be in team.h and not unit.h ;)
12:52:57 <TrueBrain> something like that?
12:54:44 <glx> looks better like that yes
12:55:36 <TrueBrain> to make clear what is in table/
12:55:51 <TrueBrain> owh, forgot g_ prefix
12:59:22 <DorpsGek> SVN: truebrain (r1854) -Add: moved g_table_teamActionName out of g_global, and cleaned up a few things related
13:01:50 <DorpsGek> SVN: truebrain (r1855) -Change: renamed tables dir to table
13:03:11 <glx> Erreur 1 error C2034: 'notused_0002' : type de champ de bits trop petit pour le nombre de bits d:\developpement\opendune\trunk\src\team.h 34
13:04:06 <DorpsGek> SVN: truebrain (r1856) -Fix (r1854): MSVC wine wine
13:23:05 <glx> hmm I think I'll extract ActionInfo (this one is easy :) )
13:23:11 <DorpsGek> SVN: truebrain (r1857) -Fix: cleaned up the include tree. It is now a bit more readable. Also removed libemu.h where possible
13:23:23 <TrueBrain> I wonder how to do those Infos
13:23:34 <TrueBrain> I kinda like table/, as then people can't just change it
13:24:16 <glx> and some info can be change via ini ;)
13:25:28 <TrueBrain> I am also thinking how to do saving
13:25:33 <TrueBrain> as now the struct is put in the savegame
13:25:42 <TrueBrain> which of course makes converting the csip to void * impossible
13:26:17 <glx> ha of course they are saved, as some objectinfo can change
13:26:35 <TrueBrain> can Infos be changed on runtime?
13:26:58 <TrueBrain> only Unit is saved in the savegame
13:27:05 <TrueBrain> so I guess it is recalculated?
13:28:57 <glx> if (s->upgradeLevel >= upgradeLevelRequired) {
13:29:15 <glx> in Structure_GetBuildable()
13:29:42 <TrueBrain> I know; but it doesn't seem to store this info on disk
13:30:13 <glx> no need to store as it's updated on demand
13:55:16 <TrueBrain> right, what-to-do-next
13:55:26 <TrueBrain> hmm .. Info stuff is kinda a bottleneck atm I guess :)
13:56:13 <TrueBrain> I am pretty sure the current layout won't change, only possible the names
13:56:32 <TrueBrain> so either we make a table that is unreadable (just a long matrix of data)
13:56:37 <TrueBrain> or we need a secondary format
13:56:43 <TrueBrain> well, we already said we wanted it in table/
13:56:48 <TrueBrain> so then matrix is best you can get
14:00:14 <TrueBrain> why so many changes in the project?
14:00:24 <TrueBrain> anyway, what the issue is here, it is completely unknown what the numbers mean :P
14:00:34 <TrueBrain> I guess it needs comments of some kind
14:00:48 <TrueBrain> maybe move ActionInfo above it
14:00:52 <TrueBrain> and store it in table/actioninfo.h?
14:01:03 <TrueBrain> meh; dunno about that
14:01:04 <glx> Name string reference = Attack
14:01:04 <glx> Action interrupt mode = 0 - Finish action cycle
14:01:04 <glx> Sidebar mode = Select target
14:01:04 <glx> Response sound = 21 - overout.voc
14:04:32 <TrueBrain> would that be more readable?
14:05:54 <TrueBrain> new file was not there :D
14:06:43 <glx> ha yes it's better like that
14:07:02 <TrueBrain> and I would do it in table/actioninfo.h
14:07:10 <TrueBrain> just to not make piles and piles of files
14:07:30 <TrueBrain> going to try to do that for UnitInfo now
14:07:50 <glx> I suggest StructureInfo (smaller)
14:07:57 <TrueBrain> objectInfo first ;)
14:09:28 <TrueBrain> sadly, I can't replace csip32 name with const char *name
14:09:46 <TrueBrain> or we need to change Load/Save immediatly too
14:10:06 <TrueBrain> I keep forgetting :D
14:18:02 <TrueBrain> that went pretty smooth tbh ... flags are a worse problem :D
14:19:04 <TrueBrain> what is our tab-size I wonder ... :D
14:23:02 <TrueBrain> project changes do worry me
14:23:06 <TrueBrain> my next commit will most likely change it again
14:23:25 <TrueBrain> can you find out why they differ?
14:30:09 <TrueBrain> so that was my mistake :D
14:30:26 <glx> should be </Filter> with one tab less
14:30:33 <TrueBrain> tables no longer exist ;)
14:31:07 <glx> so empty dir breaks generate
14:32:19 <DorpsGek> SVN: truebrain (r1858) -Fix: wrong filename in doxygen comment
14:33:49 <TrueBrain> so you need to include the table in every file that needs it ..
14:34:06 <TrueBrain> I don't like what you did in widget_draw.c btw
14:34:11 <TrueBrain> why move unit.h out of there?
14:34:26 <glx> unit.h must be before the table
14:34:40 <TrueBrain> how about we add the tables at the bottom of the include list
14:34:45 <TrueBrain> like a newline, then all tables needed?
14:35:25 <TrueBrain> aren't the tables duplicated in the executable now?
14:36:15 <glx> so I hope the compiler is smart
14:36:51 <TrueBrain> I hope so too ... :D
14:37:53 <glx> without static they are redefined (and compile fails)
14:44:06 <TrueBrain> woei, my table is accepted :D
14:47:13 <TrueBrain> now have to do StructureInfo too .. lol
14:48:28 <glx> hmm maybe g_actionInfo should be renamed ?
14:50:32 <DorpsGek> SVN: glx (r1859) -Add: made a real table for ActionInfo
14:55:00 <glx> grr sleep.h must be included before math.h unless stdlib.h is included before math.h
14:55:12 <Xaroth|Work> hah, logic in includes!
14:55:15 <TrueBrain> stdlib should always be included before math.h :D
14:55:44 <glx> but stdlib.h is not needed in widget_click.h
14:56:03 <glx> it is just included via windows.h in sleep.h
14:56:07 <Xaroth|Work> any harm in including it anyhow? for consistency sake?
15:04:32 <Xaroth|Work> I'll follow the expert oppinion there
15:06:47 <DorpsGek> SVN: glx (r1860) -Fix: MSVC no longer wants sleep.h to be included before math.h
15:07:37 <TrueBrain> better version (refresh)
15:08:38 * Xaroth|Work wonders what g_global->variable_7FAE is for :P
15:08:55 <TrueBrain> newer version (replaced 65535 with -1)
15:09:50 <TrueBrain> something is wrong ... animation is broken
15:11:49 <glx> ./* wsa */ "saboture.wsa",
15:13:34 <TrueBrain> clicking starbase fails hard
15:13:56 <TrueBrain> availability of course can't be written now
15:14:21 <TrueBrain> I didn't type any of the information, in case you were wondering :D
15:15:41 <TrueBrain> guess I could have replaced some values with ENUMs
15:15:46 <TrueBrain> but .. something for another day :P
15:16:38 <TrueBrain> found a possible issue with ObjectInfo being in 32bit/64bit world .. hmm ..
15:17:36 <Xaroth|Work> shouldn't the flags also be made... flags?
15:18:04 <glx> Xaroth|Work: not needed they are bools
15:18:37 <Xaroth|Work> TrueBrain: you missed the thought-train, but glx was on board :P
15:20:07 <TrueBrain> and I ran into an issue .. hmm ..
15:23:05 <DorpsGek> SVN: truebrain (r1861) -Fix (r1859): g_table_actionInfo is a const table
15:23:34 <TrueBrain> now at least my patch also fails :D
15:23:43 <glx> you'll can't do that for SI and UI
15:23:58 <TrueBrain> so I have to isolate availabe
15:24:08 <TrueBrain> which is rather hard, because it uses a pointer, not an index
15:26:45 <TrueBrain> okay ... need to think about this a bit ...
15:26:52 <TrueBrain> problem is FactoryWindowItem->objectInfo
15:27:01 <TrueBrain> I need a way to break out of thatone
15:27:50 <glx> ReadProfileIni() is a problem too
15:28:24 <TrueBrain> I have no issues removing thatone tbh
15:28:50 <TrueBrain> don't know what you think about it?
15:29:34 <TrueBrain> profile.ini is too restricted to allow real modification anyway .. I can only see it being used to cheat tbh :D
15:29:58 <Xaroth> what, cheating is bad? :P
15:30:04 <TrueBrain> but if you want to keep it, we have to do this ObjectInfo differently
15:30:10 <TrueBrain> not impossible or anything; just different :)
15:30:38 <TrueBrain> you know what, you two (glx / Xaroth) talk about it, I am going to make food :D
15:31:36 <TrueBrain> glx: I say ObjectInfo becuase I can't be arshed to write StructureInfo / UnitInfo all the time :P
15:31:54 <TrueBrain> they all 3 kinda include eachother for any observation ;)
15:31:59 <glx> let's use OI, UI and SI from now :)
15:36:46 <TrueBrain> so, what is it going to be? Xaroth, I expected more from a leadership position :D
15:37:05 <TrueBrain> do we want profile.ini to overwrite certain values, or are we going compiled-in static for now, and do such things later?
15:37:15 <Xaroth> tbh I'd say be gone with profile.ini.. for now
15:37:24 <Xaroth> we'll want a proper interface for that anyhow, not some silly ini file..
15:38:07 <Xaroth> btw, i see nyer's ini list has some variables that we have left unnamed in unitInfo... but from what I can see, those are a bit hard to verify :P
15:44:09 <Xaroth> that list names variable_0020 (above hasTurret) as 'worm camouflage' .. but that doesn't explain why sonic blast has it
15:45:24 <glx> problem is the order in this list is not the real order
15:56:16 <glx> ha right, but there are duplicates
15:57:04 <TrueBrain> okay, glx, if I get it right what we did now:
15:57:10 <TrueBrain> every file that needs actionInfo includes the table
15:57:12 <TrueBrain> which is a static const
15:57:20 <TrueBrain> so it optimizes it without pointers, and uses the value (most likely)
15:57:27 <TrueBrain> but every file duplicates the data
15:57:36 <TrueBrain> as 2 .c files have no way of knowing the data is shared with the other
15:57:58 <TrueBrain> I also realise how OpenTTD did that: NODEF
15:58:30 <TrueBrain> is 'extern' most of the time
15:59:02 <glx> so table file should be .c
15:59:23 <TrueBrain> I like that idea tbh
16:00:13 <TrueBrain> we can put ActionInfo in table/actioninfo.h
16:00:19 <TrueBrain> and the table itself in table/actioninfo.c
16:01:25 <TrueBrain> (also increases compile-speed :D)
16:15:59 <TrueBrain> but I guess no changes then
16:16:05 <glx> I just renamed .h into .c
16:16:25 <TrueBrain> hmm .. why not name it _table_ anymore?
16:17:03 <glx> it still table but declared outside table
16:17:22 <TrueBrain> but yeah, lets go for something like that
16:17:35 <TrueBrain> also solves the g_unitInfo for now, so
16:18:03 <glx> and that prevent some include mess :)
16:19:28 <glx> so it's easier to find where it's defined
16:22:50 <DorpsGek> SVN: glx (r1862) -Fix (r1859): defining tables in headers is not a good idea
16:29:58 <TrueBrain> bah; starport still crashes
16:31:38 <DorpsGek> SVN: truebrain (r1863) -Fix: filename in WSA_LoadFile is a const
16:33:48 <TrueBrain> because of moving it to 32bit world
16:33:59 <TrueBrain> FactoryWindowItem->objectInfo is 16bit
16:34:27 <TrueBrain> by the looks it is the only one
16:35:49 <glx> I can move this array outside global and convert it to "real" world
16:36:29 <TrueBrain> will do the other table files now
16:41:06 <TrueBrain> bah; NUM_VOICES define no longe rworks than of course
16:41:10 <TrueBrain> alsoa bit silly tbh
16:44:35 <DorpsGek> SVN: truebrain (r1864) -Fix: define tables in headers is not a good idea (part due)
16:58:54 <TrueBrain> but why I ask about free/malloc: the size is already known at compile-time, not?
16:58:56 <TrueBrain> so why not use that?
16:59:28 <glx> I'll change that after (I'm removing more stuff from g_global)
17:12:57 <TrueBrain> does construction still works?
17:13:57 <TrueBrain> ./* 0007(4) */ struct ObjectInfo *objectInfo; /*!< ?? */
17:18:40 <DorpsGek> SVN: glx (r1865) -Add: moved factoryWindowItems[] and other factoryWindow related variables out of g_global and to 32bit/64bit world
17:20:23 <TrueBrain> fuck; removed the unitInfo tables without saving them :D
17:20:32 <TrueBrain> and I lost the code for the UnitInfo :D
17:20:44 <TrueBrain> lets see if the online one is still good enough :P
17:21:18 <glx> I have one open in firefox
17:22:50 <TrueBrain> I think I got them ..
17:29:55 <TrueBrain> meh; whitespace hook
17:31:09 <DorpsGek> SVN: truebrain (r1866) -Add: made a table for g_table_unitinfo and g_table_structureinfo
17:33:10 <TrueBrain> guess HouseInfo is next ..
17:33:56 <TrueBrain> seems simple enough :D
17:46:39 <DorpsGek> SVN: truebrain (r1867) -Add: made a table for g_table_houseInfo
17:55:44 <DorpsGek> SVN: truebrain (r1868) -Fix: align comments
18:08:00 <DorpsGek> SVN: truebrain (r1869) -Add: made StructureInfo / UnitInfo constants as much as possible
18:10:22 <TrueBrain> const correctness ftw
18:10:27 <TrueBrain> 3 places where it isn't
18:12:52 <TrueBrain> I had a reason I wanted UnitInfo like this .. I just can't remember :D
18:13:16 <TrueBrain> guess it is time to remove wcsip
18:19:01 <DorpsGek> SVN: truebrain (r1870) -Add: replace a csip with a real pointer
18:26:25 <TrueBrain> bah; game crashes now :(
18:27:01 <TrueBrain> when game finishes, weird stuff happens
18:27:41 <TrueBrain> more 16bit pointers hiding I guess
18:29:53 <DorpsGek> SVN: truebrain (r1871) -Fix: more converting to real [ointers
18:30:19 <TrueBrain> well, editbox.c is finished
18:30:23 <TrueBrain> now where does this bug hides ...
18:33:18 <TrueBrain> I can't find why it would crash :s
18:35:02 <TrueBrain> well, gone for a few
18:35:06 <TrueBrain> will try to find it after that :D
18:35:14 <TrueBrain> Unit_CreateBullet seems the cause, so ..
18:39:37 *** Alberth has joined #openDune
18:39:38 *** ChanServ sets mode: +o Alberth
18:57:56 <glx> ERROR: unable to open file 'MENSHP.ENG'.
19:00:10 <glx> but this file doesn't exist
19:01:21 <Alberth> why is src/table/*.h a bad idea?
19:02:54 <glx> my guess is the fault is in r1867
19:05:58 <Alberth> [r1862] glx: -Fix (r1859): defining tables in headers is not a good idea <-- so that's why you started moving things around 8 revisions earlier :p
19:06:48 <glx> [17:57:07] <TrueBrain> okay, glx, if I get it right what we did now:
19:06:48 <glx> [17:57:12] <TrueBrain> every file that needs actionInfo includes the table
19:06:48 <glx> [17:57:15] <TrueBrain> which is a static const
19:06:48 <glx> [17:57:23] <TrueBrain> so it optimizes it without pointers, and uses the value (most likely)
19:06:48 <glx> [17:57:29] <TrueBrain> but every file duplicates the data
19:06:49 <glx> [17:57:39] <TrueBrain> as 2 .c files have no way of knowing the data is shared with the other
19:07:59 <DorpsGek> SVN: glx (r1872) -Fix (r1867): use a char when a char is needed
19:08:59 <Alberth> yeah, including a table more than once is a bad idea :p
19:09:18 *** Osai^2 has joined #openDune
19:10:38 <Alberth> some chat server came back online? :)
19:11:09 <pm> ;-) haydn obviously did something unexpected...
19:11:35 *** pm is now known as planetmaker
19:45:32 *** TinoDidriksen has joined #openDune
20:16:43 <DorpsGek> SVN: alberth (r1873) -Fix(r1827): Code style fix.
20:49:45 <DorpsGek> SVN: alberth (r1874) -Add: Named two functions.
21:02:22 <DorpsGek> SVN: glx (r1875) -Add: renamed g_map to g_mapSpriteID and replaced g_global->mapPointer with g_map
21:02:40 <glx> that removes a lot of indirections
21:17:55 <Alberth> segments make such a mess :)
21:22:24 *** TB is now known as TrueBrain
21:23:32 <glx> hmm I think I can remove a little more
21:23:39 <TrueBrain> glx: lo @ 1872 .. I did check most of them :D Missed one .. bah :P
21:23:58 <TrueBrain> Alberth: and yeah ... you only need to include the table once, which kinda went wrong really quick :D Reminded me of the issues with OpenTTD :)
21:24:28 <TrueBrain> many were like that
21:24:32 <TrueBrain> about 30% was [0], rest was *
21:24:37 <TrueBrain> (well, without the uint16 cast :P)
21:28:57 <glx> what do you think about my cleanup ?
21:29:35 <TrueBrain> I was tihnking about it, but I was afraid it would mess up some static memory address somewhere
21:30:07 <TrueBrain> but if you tested it
21:30:19 <glx> I don't see why it would be a problem
21:30:31 <TrueBrain> I didn't want to test it tbh :D
21:31:00 <TrueBrain> why remove the Map_GetTileByPosition wrapper btw?
21:31:27 <glx> I don't see the need for a wrapper to do &g_map[position]
21:31:41 <TrueBrain> can be useful for later stages, but yeah.. at least it is unified now :D
21:32:23 <DorpsGek> SVN: glx (r1876) -Fix: some cleanup
21:36:28 <DorpsGek> SVN: alberth (r1877) -Add: Renamed Map_B4CD_0C36 to Map_FixupSpiceEdges, removed global array 255E.
22:01:47 <glx> hmm memcpy(&emu_get_memory8(0x29E8, 0xA, 0x0), g_global->variable_2179, 36); can be removed in GameLoop_GameIntroAnimationMenu() I think
22:02:50 <glx> it copies something to s_input_local->mouseCoord which is no longer there :)
22:14:54 <DorpsGek> SVN: glx (r1878) -Cleanup (r1768): some leftover
22:19:20 <TrueBrain> k, one of my savegames still segfaults
22:22:08 <TrueBrain> nope, always worked
22:22:12 <TrueBrain> so something is wrong in conversion
22:24:05 <TrueBrain> that can indeed happen, according to the unitInfo
22:24:42 <DorpsGek> SVN: glx (r1879) -Add: moved animations and variable_395A out of g_global
22:26:13 <TrueBrain> I wonder why it was never before any issue
22:26:15 <TrueBrain> euh, how to solve it ..
22:27:46 <TrueBrain> we have one entry that is an uint8, the other that is an uint16
22:28:13 <glx> I don't find ui->actionID
22:28:33 <TrueBrain> it already were uint16 vs uint8 compares
22:28:36 <TrueBrain> but for some reason it worked
22:29:55 <DorpsGek> SVN: truebrain (r1880) -Fix: ACTION_INVALID is 0xFF, despite it (sometimes) being uint16
22:29:59 <TrueBrain> solved it temporary in this way
22:30:02 <TrueBrain> don't really like it, but it has to do
22:31:11 <TrueBrain> we use no enums in table/ yet
22:31:15 <glx> and change type to ActionType in both
22:31:21 <TrueBrain> we do need to convert that some day, but that will be an include hell
22:31:34 <TrueBrain> and you can't change to ActionType yet, as this struct is stored on disk
22:31:37 <TrueBrain> so it matters a lot what it is
22:31:54 <TrueBrain> hence, "but it has to do" :D
22:32:03 <TrueBrain> we come back to that when we fixed save/load mechanics :)
22:34:07 <TrueBrain> what to do with FileInfo. Atm it is local to file.c. So table/fileinfo.c is not really possible. Maybe make it global?
22:36:18 <glx> that's the only viable way
22:37:37 <glx> hmm seems it's not filed at start, or I'm wrong
22:40:31 <TrueBrain> now realise one mistake in the export
22:40:36 <TrueBrain> it has no indication of index :D
22:40:43 <TrueBrain> I should have added /* 0 */ etc
22:41:14 <glx> ha yes FileInfo contais filename and filesize
22:41:38 <TrueBrain> both runtime (shared) information as static :P
22:41:43 <TrueBrain> should be split tbh
22:48:29 <DorpsGek> SVN: truebrain (r1881) -Add: number the entries in table/ for easy lockup
23:09:30 <DorpsGek> SVN: truebrain (r1882) -Add: made a table for g_table_fileInfo
23:09:37 <TrueBrain> enough for tonight :)
23:11:49 <DorpsGek> SVN: glx (r1883) -Add: moved tickHouseXXX out of g_global
23:13:54 <glx> oh nice filesize is arbitrary
continue to next day ⏵