Jump to content
The Dark Mod Forums

mohij

Member
  • Posts

    244
  • Joined

  • Last visited

Posts posted by mohij

  1. Would a

    boost::shared_ptr<IMapExpression> createForToken(parser::DefTokeniser& tok)

    external friend function also be acceptable instead of another class? I got stuck while trying to use this function as a member of class IMapExpression, because you can't instanciate a class that is has vitual, but need to, because the createForToken is member of it. So simplest solution would be to make it external, but friend. Is that acceptable?

  2. With such a createForToken function I wouldn't even need an extra factory class. The method would simply be called for the base class by the Shader code, that's cool.

    And I think that this single function should already suffice as the public interface for the class.

    I will try/start to implement it tomorrow, I guess the next big task will be the MapExpressions themselves.

  3. After thinking about a service class, I am not sure anymore whether it would be easier with an extra service class.

    This extra service class would have to seperate between the different Tokens and work differently for different MapExpressions (as the different MapExpressions need different input).

    So I think implementing a service class that differenciates between the different MapExpressions and parses them the input they need would end in one big service class that does all the work and very small MapExpression classes that could as well be only functions. (the polymorphism wouldn't get used).

     

    MapExpressions that call each other are perhaps still better.

  4. The MapExpressions are only implemented on a very basic level at the moment. They should be reimplemented in a better way.

     

    At the moment I need to understand how they are used (or should be used) and how the new design should look.

     

    OrbWeaver said something about a hierarchy of polymorphic objects and an IMapExpression interface.

    The IMapExpression interface sounds like a module, I'm not sure whether a completely new module is appropriate for such a special thing as MapExpressions.

    Polymorphic objects sound good, but I'm not sure how the hierarchy should be done, the current implementation seems a bit trival, perhaps there is a better solution.

     

    Is the functionality of the MapExpressions (addnormals, hightmap, etc.) implemented somewhere already, or do I have to write those from scratch too?

     

    So that's where I currently am, tell me what you think.

  5. I took a look for into the shadersystem. If I understand correctly, the MapExpressions are simple modifications to textures, to enhance them on demand. And they are specified in the .mtr (Material) files. What I don't understand is, what Radiant has to do with it. It doesn't display them (does it?).

  6. I finished programming this feature. My problem is that radiant segfaults on any operation on entities. As this also happens also without using my new button, this is probably not related to my changes. So I can't test my button (and remove all those bugs that are surely in there ;-).

     

    Sometimes it just segfaults other times it shows:

    /plugins/entity/eclassmodel/../modelskinkey.h:114
    assertion failure: pointer "instantiable" is null
    ----------------
    ----------------
    Please report this error to the developers

    I guess it is related to greebos recent changes.

    I have no idea what I should do...

×
×
  • Create New...