No announcement yet.

Trying to understand darkplaces source code

  • Filter
  • Time
  • Show
Clear All
new posts

  • #76
    I read the "c++ for dummies version" on Wikipedia which seemed to agree with what I said within the main paragraph.

    Static Function Members. By declaring a function member as static, you make it independent of any particular object of the class. A static member function can be called even if no objects of the class exist and the static functions are accessed using only the class name and the scope resolution operator
    I do not doubt your much more technical explanation as, I do not really program in cpp. I can mostly just read it.
    Last edited by MadGypsy; 06-24-2017, 02:47 PM.


    • #77
      @local scope wouldn't mean much otherwise

      In the languages I program in which support static the scope is limited to the class that contains the static and any class that imports it so, it's not entirely global but it isn't "private" either. Maybe more like protected or some kind of jacked up using but, we both know I am using those terms very loosely here.

      Edit... Obviously I am referring to public static. Private and protected statics are of course only local or also local to sub classes, respectively.
      Last edited by MadGypsy; 06-24-2017, 02:45 PM.


      • #78
        In quakespasm, Windows/QuakeSpasm.rc

        #include <winresrc.h>
        icon ICON "QuakeSpasm.ico"
        Can't find winresrc.h anywhere.

        Yeah, it's safe to delete the first line, confirmed.
        Last edited by vibok; 06-25-2017, 09:30 AM.


        • #79
          Tried to compile FTE, it prints "svnversion: command not found".

          Tried to "make win32", it says "no such target".

          I'll leave it at that for today, any hints are welcome.


          • #80
            from a cygwin shell:
            cd engine && make gl-rel FTE_TARGET=win32 && release/fteglqw.exe -basedir c:/games/quake

            if the svnversion program isn't installed then fte will display the build date+time instead of the svn version.
            Some Game Thing


            • #81
              darkplaces, here is my butchered makefile. It now can only build on windows, and can only build client, but hopefully it's easier to understand.


              it needs a bit more work still


              • #82
                TortoiseSVN shows that the last revision of darkplaces is r12334, but is that really the last one? Maybe I'm clicking the wrong thing. Really nothing new since April 26?


                Also, do I need to email somebody to commit something in there? Or can I just commit?


                • #83
                  April 2017 is the latest beta but there are daily autobuilds.
                  ♪ I'm skiiiiiiinnin' in the pain, just skiiiiiiinnin' in the pain ♪
                  ♪ What a glorious feelin' I'm haaaaaaappy again ♪


                  • #84
                    running darkplaces with -nohome once will result in it always using the folder dir instead of Saved Games dir. Not sure how to undo this now.

                    read fs.c, search for "-nohome"

                    fte behaves simularly btw.


                    • #85
                      when I alt-tab out of it, it keeps drawing. I can notice it because my computer starts heating.


                      • #86
                        Thought I disabled the libjpeg.dll, but it was actually loaded from GtkSharp, and then from mingw directory. Only noticed it after looking at ollydbg log.

                        libjpeg indeed is only for saving screenshots. Without libjpeg, darkplaces saves screenshots as tga, they are 20 times larger than jpg. 3MiB vs 150KiB. libjpeg-8.dll itself is 200 KiB.

                        Tried uncommenting D3D?=1 in makefile, don't see much difference. It even prints "opengl driver loaded" or something in the game. I guess I'll ignore D3D for now, and by that I mean delete.


                        • #87
                          libpng and zlib1 are still loaded from unrelated folder, weird as hell. Always though they can only be loaded from folder with program and system32 folder. Can't find explanation here

                          There are also a bunch of dll I don't understand, and one with "invalid or compressed Image Export Directory". I have no choice but ignore them for now.


                          • #88
                            I'm dumb, that folder was in the PATH.

                            Looks like you have to reload before any change in the PATH takes effect.

                            Now I need to find where in the source the dlopen happens, and disable it. I need to try deathmatch before that.


                            • #89
                              You have no goal. So there is no compass saying "This is north and that is the direction I want to go".

                              So you plod along randomly.

                              You are not deciding what you learn. Some $RANDOM thing happens and then you are trying to figure it out.

                              Other animals like chimpanzees use $RANDOM_EVENT as their learning method, similar to your method.

                              But the world is infinite and so knowledge infinite. And you can spend 300 years learning $RANDOM stuff and never attain anything useful.

                              This is why in college you are not allowed to learn $RANDOM stuff. You pick a major, and they make you do it and force you to apply the knowledge towards a specific goal.

                              A $SPECIFIC_GOAL. The thing you do not possess.

                              This is why I labelled you a random information collector, who would rather collect useless information than get your hands dirty doing something educational that creates deep understanding like, say, tutorials.

                              How many tutorials have you done? It is still zero, right?

                              All this time you've wasted --- And you've still done ZERO tutorials. Hahaha.
                     - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

                              So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...


                              • #90
                                I was wondering when you are going to show up.