Announcement

Collapse
No announcement yet.

Trying to understand darkplaces source code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    An svc_signonnum has been received, perform a client side setup.
    Last edited by vibok; 05-28-2017, 08:48 AM.

    Comment


    • #17
      BSDmakefile -- this is for BSD OS, don't need that.
      Last edited by vibok; 05-28-2017, 08:48 AM.

      Comment


      • #18
        I can just upload the builded with doxygen documentation somewhere, if anyone here needs it.
        Last edited by vibok; 05-28-2017, 08:49 AM.

        Comment


        • #19
          Both makefile and BSDmakefile include makefile.inc with the use of "include makefile.inc".
          Last edited by vibok; 05-28-2017, 08:50 AM.

          Comment


          • #20
            Probably crypto is needed for online play, haven't tested.
            Last edited by vibok; 05-28-2017, 08:51 AM.

            Comment


            • #21
              Choose Your Own Adventure:

              You are standing at the edge of swimming pool.

              1. If you want to stand at the side of the pool ... there is a video series that should entertain you. https://www.youtube.com/watch?v=yPHJgfSnTbI

              2. If you plan to jump in the pool, there are QuakeC tutorials here. InsideQC

              I hope you enjoy watching the videos
              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


              • #22
                @Baker
                First video series is, probably worth watching. I should've linked it by now. As a warning though, it's a bit slowpaced, it takes him way too much time to get in the quake related stuff (first interesting video is the Handmade Quake 4.3 - Loading Quake's Pak Files, way towards the end). Pretty good if you want to learn winapi, I guess. And he uses software rendering, which you have no reason to even know how to do nowadays. (Not sure if he even got that far.)

                I'll read the second link, but it's probably more for modders. May be useful, who knows.

                You enjoy being a dick, huh. My sense of humour circuits fried a long time ago, while paranoia seems quite active.
                Last edited by vibok; 05-25-2017, 04:40 AM.

                Comment


                • #23
                  Just watched "Handmade Quake 5.1 - Intro To Memory Management", and I'm actually glad he went for software renderer. He shown how memory is organized, and where the z-buffer is stored. Dos times memory management is hilarious, it's a lost art nowadays.

                  Darkplaces does things much differently, I don't understand what's going on in zone.c and zone.h. Maybe I'll get it one day.

                  Comment


                  • #24
                    Originally posted by vibok View Post
                    You enjoy being a dick, huh.
                    Will I call out a make-believe modder? I sure will.

                    You'll be able to watch those videos for weeks, collecting more and more information while not applying it.

                    You'll be the most knowledgable guy that hasn't opened an IDE, hasn't opened a map editor and hasn't done a QuakeC tutorial ever!
                    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


                    • #25
                      What's a make-believe?

                      Comment


                      • #26
                        Any idea why this doesn't work?

                        Code:
                        static void _vector_max(const vec3_t * a, const vec3_t * v) {
                            if(v[0]>a[0]) {a[0]=v[0];}
                        }
                        Code:
                        error: assignment to expression with array type
                        This is C, not QuakeC.

                        Comment


                        • #27
                          annoying warning in this function, let's throw it here
                          i guess i'll just disable it, don't wanna touch it

                          or maybe I'll redo it as a macro or something, it blends together as it is.

                          sv_phys.c:758
                          In function 'RotateBBox':
                          warning: this 'if' clause does not guard... [-Wmisleading-indentation]


                          Code:
                          static void RotateBBox(const vec3_t mins, const vec3_t maxs, const vec3_t angles, vec3_t rotatedmins, vec3_t rotatedmaxs)
                          {
                          	vec3_t v, u;
                          	matrix4x4_t m;
                          	Matrix4x4_CreateFromQuakeEntity(&m, 0, 0, 0, angles[PITCH], angles[YAW], angles[ROLL], 1.0);
                          
                          	v[0] = mins[0]; v[1] = mins[1]; v[2] = mins[2]; Matrix4x4_Transform(&m, v, u);
                          		VectorCopy(u, rotatedmins); VectorCopy(u, rotatedmaxs);
                          	v[0] = maxs[0]; v[1] = mins[1]; v[2] = mins[2]; Matrix4x4_Transform(&m, v, u);
                          		if(rotatedmins[0] > u[0]) rotatedmins[0] = u[0]; if(rotatedmins[1] > u[1]) rotatedmins[1] = u[1]; if(rotatedmins[2] > u[2]) rotatedmins[2] = u[2];
                          		if(rotatedmaxs[0] < u[0]) rotatedmaxs[0] = u[0]; if(rotatedmaxs[1] < u[1]) rotatedmaxs[1] = u[1]; if(rotatedmaxs[2] < u[2]) rotatedmaxs[2] = u[2];
                          	v[0] = mins[0]; v[1] = maxs[1]; v[2] = mins[2]; Matrix4x4_Transform(&m, v, u);
                          		if(rotatedmins[0] > u[0]) rotatedmins[0] = u[0]; if(rotatedmins[1] > u[1]) rotatedmins[1] = u[1]; if(rotatedmins[2] > u[2]) rotatedmins[2] = u[2];
                          		if(rotatedmaxs[0] < u[0]) rotatedmaxs[0] = u[0]; if(rotatedmaxs[1] < u[1]) rotatedmaxs[1] = u[1]; if(rotatedmaxs[2] < u[2]) rotatedmaxs[2] = u[2];
                          	v[0] = maxs[0]; v[1] = maxs[1]; v[2] = mins[2]; Matrix4x4_Transform(&m, v, u);
                          		if(rotatedmins[0] > u[0]) rotatedmins[0] = u[0]; if(rotatedmins[1] > u[1]) rotatedmins[1] = u[1]; if(rotatedmins[2] > u[2]) rotatedmins[2] = u[2];
                          		if(rotatedmaxs[0] < u[0]) rotatedmaxs[0] = u[0]; if(rotatedmaxs[1] < u[1]) rotatedmaxs[1] = u[1]; if(rotatedmaxs[2] < u[2]) rotatedmaxs[2] = u[2];
                          	v[0] = mins[0]; v[1] = mins[1]; v[2] = maxs[2]; Matrix4x4_Transform(&m, v, u);
                          		if(rotatedmins[0] > u[0]) rotatedmins[0] = u[0]; if(rotatedmins[1] > u[1]) rotatedmins[1] = u[1]; if(rotatedmins[2] > u[2]) rotatedmins[2] = u[2];
                          		if(rotatedmaxs[0] < u[0]) rotatedmaxs[0] = u[0]; if(rotatedmaxs[1] < u[1]) rotatedmaxs[1] = u[1]; if(rotatedmaxs[2] < u[2]) rotatedmaxs[2] = u[2];
                          	v[0] = maxs[0]; v[1] = mins[1]; v[2] = maxs[2]; Matrix4x4_Transform(&m, v, u);
                          		if(rotatedmins[0] > u[0]) rotatedmins[0] = u[0]; if(rotatedmins[1] > u[1]) rotatedmins[1] = u[1]; if(rotatedmins[2] > u[2]) rotatedmins[2] = u[2];
                          		if(rotatedmaxs[0] < u[0]) rotatedmaxs[0] = u[0]; if(rotatedmaxs[1] < u[1]) rotatedmaxs[1] = u[1]; if(rotatedmaxs[2] < u[2]) rotatedmaxs[2] = u[2];
                          	v[0] = mins[0]; v[1] = maxs[1]; v[2] = maxs[2]; Matrix4x4_Transform(&m, v, u);
                          		if(rotatedmins[0] > u[0]) rotatedmins[0] = u[0]; if(rotatedmins[1] > u[1]) rotatedmins[1] = u[1]; if(rotatedmins[2] > u[2]) rotatedmins[2] = u[2];
                          		if(rotatedmaxs[0] < u[0]) rotatedmaxs[0] = u[0]; if(rotatedmaxs[1] < u[1]) rotatedmaxs[1] = u[1]; if(rotatedmaxs[2] < u[2]) rotatedmaxs[2] = u[2];
                          	v[0] = maxs[0]; v[1] = maxs[1]; v[2] = maxs[2]; Matrix4x4_Transform(&m, v, u);
                          		if(rotatedmins[0] > u[0]) rotatedmins[0] = u[0]; if(rotatedmins[1] > u[1]) rotatedmins[1] = u[1]; if(rotatedmins[2] > u[2]) rotatedmins[2] = u[2];
                          		if(rotatedmaxs[0] < u[0]) rotatedmaxs[0] = u[0]; if(rotatedmaxs[1] < u[1]) rotatedmaxs[1] = u[1]; if(rotatedmaxs[2] < u[2]) rotatedmaxs[2] = u[2];
                          }

                          Comment


                          • #28
                            Well, all those ifs have misleading indentations. They aren't a child of v but they are indented as if they are. It would be really sad if this was the actual problem. This would mean your compiler treats tab as if it has meaning. I would seriously hope something else is the problem.
                            http://www.nextgenquake.com

                            Comment


                            • #29
                              Oddly enough, replacing all
                              if(rotatedmins[0] > u[0]) rotatedmins[0] = u[0];
                              with
                              if(rotatedmins[0] > u[0]) {rotatedmins[0] = u[0];}
                              makes my compiler shut up. Even if I keep identation the same.

                              And if I fix identation, but skip {}, it will complain.

                              Haven't pasted the whole error, my bad. Here it is:

                              warning: this 'if' clause does not guard... [-Wmisleading-indentation]
                              note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'

                              Comment


                              • #30
                                I thought about that as well but argued myself against mentioning it cause ifs should only need brackets if it regards more than one line of code. The environment is too strict. It shouldn't be worried about how the user format's their code... only that every thing between semi-colons is legit. Regarding the users whitespace is silly.

                                You know the first thing every text parser I have ever written does? It sequesters all strings, replaces them with tokens and removes all whitespace. This is because whitespace has no meaning unless it is in a string so, first order is to get rid of all of it.

                                My point being that your compiler should be compiling code that is technically all on one line due to a quick preprocessing of the script.
                                Last edited by MadGypsy; 05-25-2017, 03:17 PM.
                                http://www.nextgenquake.com

                                Comment

                                Working...
                                X