Jump to content
The Dark Mod Forums

Itches, Glitches & Anything Else...


Recommended Posts

That's what I thought. Which raises the question, why in this case has GCC decided to look for symbols WITHOUT a leading underscore? The only thing unusual about this case is that it is the first time I have made OpenGL calls from within a static library. Maybe there is some special treatment that is given to libraries that causes the symbol naming convention to be changed.

 

Maybe there is a confusion how the functions were compiled? I think that in C++ mode there are no underscores attached, instead the names are mangled. So maybe you can check in your includefiles or makefiles wether there is some wrong definition of that #if _cplusplus kind of thing?

Gerhard

Link to comment
Share on other sites

The strange thing is, the object file generating the error (aabb.o in libmath.a) only has undefined symbols for the underscore versions - _glVertex3f@12 etc. These match the exported symbols from libopengl32.a, which means they should match - which they do in entity but not md3model.

Link to comment
Share on other sites

If they are not relied upon by Doom 3 code, strip them. If they are required in this way, consider rewriting the Doom 3 code so as not to use them, although this may well involve more work and is not necessarily required.

Link to comment
Share on other sites

Ok, I will test it out right now!

 

I have another question: I want to add the comma character "," to the list of kept delimiters of the DefTokeniser, but I somehow don't know how to do this elegantly (copying the whole DefTokenser to my own Tokeniser just doesn't feel right :) ).

 

So at the moment _keptDelimiters is initialised by the DefTokeniserFunc constructor. Is there a way to change the _keptDelims later on (i.e. after instantiating it)?

 

Apart from that, I'm nearly done with the parsing algorithm for the shaders, so hopefully I have something for you to proofread this weekend, if you don't mind ;-)

Link to comment
Share on other sites

So at the moment _keptDelimiters is initialised by the DefTokeniserFunc constructor. Is there a way to change the _keptDelims later on (i.e. after instantiating it)?

 

Yes, you'll note that the DefTokeniser constructor actually takes a list of delimiters but does nothing with it. Really it should take two lists (kept and non-kept) and pass them down to the DefTokeniserFunc. I think this code exists from when I was initially trying to use a standard Boost tokeniser (which takes a list of separators) before realising that I had to write my own.

 

Apart from that, I'm nearly done with the parsing algorithm for the shaders, so hopefully I have something for you to proofread this weekend, if you don't mind ;-)

 

Excellent, I look forward to seeing the result.

Link to comment
Share on other sites

There was a useOpenGL() missing in the sconscript, after adding this to module_env it was resolved (add module_env.useOpenGL() after sconscript:108).

 

I implemented the new constructor to DefTokeniser. It has now two optional arguments (const char* delims and keptDelims) apart from the inStr. This seems to work for me.

Link to comment
Share on other sites

Ok, I think I'm done with a first version of the new parser. It is in principle a re-write of the parsing code that is capable of everything the old parser was, but this one is more structured and does not get confused with the image program functions like heightmap() etc.

 

There is probably a lot that still can be improved, so a proofread and comments/suggestions from you would be appreciated!

 

Which way do you want me to send them to you?

Link to comment
Share on other sites

Ok, I'm dumb :), how do I do this with TortoiseSVN? The Diff-Command seems to be available for files only, not for folders. The "check for modifications" just lists the files that are modified, but not the differences themselves.

Link to comment
Share on other sites

I'm not all that familiar with TortoiseSVN, but I would expect there to be some kind of diff option for folders since this is a feature that SVN provides. Is there definitely no other command that could be used for this? Perhaps it is not named what you think.

 

You might need to use TortoiseMerge actually, which supposedly comes with TortoiseSVN.

Link to comment
Share on other sites

I tried a few but I'm afraid I will have to use google. The changed files are on their way, I manually figured out which ones have been changed.

 

Just a line in sconscript, and a few changed files in libs/parser and plugins/shaders.

 

edit: found it, it's "create patch". This creates some unified diff file with all the changes. Next time...

Link to comment
Share on other sites

edit: found it, it's "create patch". This creates some unified diff file with all the changes. Next time...

 

Would you be able to send me this patch? I can apply the patch with a few clicks in Eclipse, and easily see the changes, whereas by simply replacing the files this becomes a lot harder.

Link to comment
Share on other sites

Thanks, that's committed. I haven't gone through the code with a fine-toothed comb, but it works and the general structure looks OK which is good enough for me.

 

One thing I noticed was that some functions were passed non-const references (std::string&) when they could have been const - in C++ it is generally best to make everything const unless it has to be modified. This is one defense against inadvertent bugs because the compiler won't let you modify a const reference.

Link to comment
Share on other sites

Ok, I will go through the class and look where I can add the const.

 

edit: I added some const qualifiers to most of the strings, should be better now. The patch is already in your inbox. Wouldn't it be easier if I directly sent this into SVN? Not that I plan to go an a SVN rampage as soon as I have access - I can ask you for permission before I commit anything, so that you can still control the commits.

 

I'm currently working on outsourcing the toolbar icons to an XML file so that it is a bit more customisable. At the moment the icons are added to the GTKToolbar in mainframe.cpp line after line.

 

I had something like this in mind:

 

<?xml version="1.0"?>
<project version="2.0"/>
<toolbardescription>

<settings>
		 <!-- future settings go here -->
</settings>

<toolbars>
	<toolbar name="basic">
		<item type="icon" caption="Open an existing map" bitmap="file_open.bmp" command="OpenMap" />
		<item type="icon" caption="Save the active map" bitmap="file_save.bmp" command="SaveMap" />
		<item type="spacer" />
		<item type="icon" caption="x-axis Flip" bitmap="brush_flipx.bmp" command="MirrorSelectionX" />
	</toolbar>
</toolbars>

</toolbardescription>

 

What do you think? (Should I open a new thread for this?)

Link to comment
Share on other sites

I'll happily set you up with SVN commit access - you will need to create an account on SourceForge so I can do this. @Crispy - ditto.

 

That toolbar XML idea sounds excellent, as you have probably noticed I hate hardcoding things and would much rather everything was configured externally if possible. Take a look at GTK's UIManager which does exactly this:

 

http://developer.gnome.org/doc/API/2.0/gtk/GtkUIManager.html

 

Ultimately I would like everything to be available via a single internal interface - both game-specific and user-specific preferences would be available via XPath lookups (e.g. "/game/defaults/lightRadius" and "/user/windowPositions/entityBrower/x" or whatever).

Link to comment
Share on other sites

My fresh and shiny sourceforge Username is: greebo_darkmod (greebo was already in use...)

 

And I will take a look at this UIManager.

 

edit: Heh, looks like my idea is not so new after all, this UIManager is exactly what I had in mind. I will implement it, but this maybe take the whole next week as I will be quite busy (as usual) the next five days.

Link to comment
Share on other sites

I'll happily set you up with SVN commit access - you will need to create an account on SourceForge so I can do this. @Crispy - ditto.

My SF account is cpelling.

 

Only a few more weeks till I'll actually have the chance to use it. :rolleyes:

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

OK, you're both added now, and should have SVN commit access.

Cheers.

 

Heh, Chris P = Crispy :)

Well done. :)

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

This is how "far" I got till sunday evening: I could load a simplistic toolbar from my XML file and could successfully connect the actions to the existing commands of Radiant. However, I'm chewing on adding the icons to my toolbar, as there is no possibility to assign icons via the XML.

 

From the rather sparse documentation I found on the net, I assume it has to be done somehow via the GTkActions (there is even a function for creating icons for the action), but I could not figure it out before I stopped working yesterday.

Link to comment
Share on other sites

I'm not sure, but I think I finally will have to use such a "association table", where all the icon paths are stored for each of the internal radiant commands (but it is possible to outsource this into an XML file as well). I have to create GtkActions for all of the radiant commands anyways, so this is not the main issue.

 

The problem I ran into yesterday was how to get some icons to be displayed in the toolbar in the first place. I played around a bit, but I haven't found the right way to do this. Most probably because of my lack of experience with GTK, but I'm working on that.

 

Basically, I get a GtkWidget from the GtkUiManager when I tell it the right path into the XML file (like "/toolbar", which returns a toolbar widget).

 

This toolbar can be added to an existing container (in my case a vbox), this works, but no icons are there (just text buttons). I can change the display_mode of the toolbar to "GTK_DISPLAY_ICONS" (can't recall the exact name of the constant right now), but as there are no icons created by the UiManager, I have to set them on my own, which is where I'm stuck.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...