Announcement

Collapse
No announcement yet.

Trying to understand darkplaces source code

Collapse
X
 
  • 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.
    http://www.nextgenquake.com

    Comment


    • #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.
      http://www.nextgenquake.com

      Comment


      • #78
        In quakespasm, Windows/QuakeSpasm.rc

        Code:
        #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.

        Comment


        • #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.

          Comment


          • #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

            Comment


            • #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.

              https://pastebin.com/DBhd6xHs

              it needs a bit more work still

              Comment


              • #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?

                svn://svn.icculus.org/twilight/trunk/darkplaces

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

                Comment


                • #83
                  April 2017 is the latest beta but there are daily autobuilds.
                  https://icculus.org/twilight/darkplaces/files/?C=M;O=D
                  ♪ I'm skiiiiiiinnin' in the pain, just skiiiiiiinnin' in the pain ♪
                  ♪ What a glorious feelin' I'm haaaaaaappy again ♪

                  Comment


                  • #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.

                    Comment


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

                      Comment


                      • #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.

                        Comment


                        • #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 https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx

                          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.

                          Comment


                          • #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.

                            Comment


                            • #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.
                              Quakeone.com - 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 ...

                              Comment


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

                                Comment

                                Working...
                                X