patches/assaultcube-02-conflict.diff
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 7832 e3e78f069b82
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7832
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
     1
--- 1.1.0.4/source/src/protos.h	Sun Nov 14 19:46:24 2010
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
     2
+++ 1.1.0.4/source/src/protos.h	Sun Oct 23 19:45:15 2011
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
     3
@@ -243,8 +243,8 @@
2142
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
     4
 extern void dot(int x, int y, float z);
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
     5
 extern void linestyle(float width, int r, int g, int b);
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
     6
 extern void blendbox(int x1, int y1, int x2, int y2, bool border, int tex = -1, color *c = NULL);
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
     7
-extern void quad(GLuint tex, float x, float y, float s, float tx, float ty, float tsx, float tsy = 0);
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
     8
-extern void quad(GLuint tex, vec &c1, vec &c2, float tx, float ty, float tsx, float tsy);
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
     9
+extern void a_quad(GLuint tex, float x, float y, float s, float tx, float ty, float tsx, float tsy = 0);
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    10
+extern void a_quad(GLuint tex, vec &c1, vec &c2, float tx, float ty, float tsx, float tsy);
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    11
 extern void circle(GLuint tex, float x, float y, float r, float tx, float ty, float tr, int subdiv = 32);
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    12
 extern void setperspective(float fovy, float aspect, float nearplane, float farplane);
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    13
 extern void sethudgunperspective(bool on);
7832
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    14
--- 1.1.0.4/source/src/rendergl.cpp	Sun Nov 14 19:46:24 2010
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    15
+++ 1.1.0.4/source/src/rendergl.cpp	Sun Oct 23 19:45:34 2011
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    16
@@ -212,7 +212,7 @@
2142
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    17
     xtraverts += 4;
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    18
 }
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    19
 
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    20
-void quad(GLuint tex, float x, float y, float s, float tx, float ty, float tsx, float tsy)
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    21
+void a_quad(GLuint tex, float x, float y, float s, float tx, float ty, float tsx, float tsy)
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    22
 {
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    23
     if(!tsy) tsy = tsx;
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    24
     glBindTexture(GL_TEXTURE_2D, tex);
7832
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    25
@@ -225,7 +225,7 @@
2142
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    26
     xtraverts += 4;
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    27
 }
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    28
 
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    29
-void quad(GLuint tex, const vec &c1, const vec &c2, float tx, float ty, float tsx, float tsy)
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    30
+void a_quad(GLuint tex, const vec &c1, const vec &c2, float tx, float ty, float tsx, float tsy)
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    31
 {
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    32
     if(!tsy) tsy = tsx;
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    33
     glBindTexture(GL_TEXTURE_2D, tex);
7832
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    34
@@ -378,7 +378,7 @@
2142
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    35
     static Texture *tex = NULL;
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    36
     if(!tex) tex = textureload("packages/misc/com.png");
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    37
     float s = aboveheadiconsize/100.0f;
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    38
-    quad(tex->id, vec(s/2.0f, 0.0f, s), vec(s/-2.0f, 0.0f, 0.0f), 0.0f, 0.0f, 1.0f, 1.0f);
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    39
+    a_quad(tex->id, vec(s/2.0f, 0.0f, s), vec(s/-2.0f, 0.0f, 0.0f), 0.0f, 0.0f, 1.0f, 1.0f);
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    40
     glDisable(GL_BLEND);
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    41
     glPopMatrix();
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    42
 }
7832
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    43
--- 1.1.0.4/source/src/renderhud.cpp	Sun Nov 14 19:46:24 2010
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    44
+++ 1.1.0.4/source/src/renderhud.cpp	Sun Oct 23 19:45:43 2011
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    45
@@ -4,7 +4,7 @@
301
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    46
 
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    47
 void drawicon(Texture *tex, float x, float y, float s, int col, int row, float ts)
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    48
 {
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    49
-    if(tex && tex->xs == tex->ys) quad(tex->id, x, y, s, ts*col, ts*row, ts);
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    50
+    if(tex && tex->xs == tex->ys) a_quad(tex->id, x, y, s, ts*col, ts*row, ts);
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    51
 }
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    52
 
7832
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    53
 inline void turn_on_transparency()
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    54
@@ -439,7 +439,7 @@
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    55
         }
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    56
         glTranslatef(centerpos.x - halfviewsize, centerpos.y - halfviewsize , 0);
301
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    57
         glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_COLOR);
7832
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    58
-        quad(minimaptex, 0, 0, radarviewsize, 0.0f, 0.0f, 1.0f);
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    59
+        a_quad(minimaptex, 0, 0, radarviewsize, 0.0f, 0.0f, 1.0f);
301
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    60
         glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    61
         glDisable(GL_BLEND);
7832
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    62
         vec mdd(mapdims[0], mapdims[1], 0);
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    63
@@ -600,7 +600,7 @@
301
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    64
         glColor3f(1, 1, 1);
2142
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    65
         static Texture *bordertex = NULL;
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    66
         if(!bordertex) bordertex = textureload("packages/misc/compass-base.png", 3);
7832
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    67
-        quad(bordertex->id, centerpos.x-halfviewsize-16, centerpos.y-halfviewsize-16, radarviewsize+32, 0, 0, 1, 1);
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    68
+        a_quad(bordertex->id, centerpos.x-halfviewsize-16, centerpos.y-halfviewsize-16, radarviewsize+32, 0, 0, 1, 1);
2142
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    69
         if(!hidecompass)
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    70
         {
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    71
             static Texture *compasstex = NULL;
7832
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    72
@@ -608,7 +608,7 @@
2142
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    73
             glPushMatrix();
7832
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    74
             glTranslatef(centerpos.x, centerpos.y, 0);
2142
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    75
             glRotatef(-camera1->yaw, 0, 0, 1);
7832
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    76
-            quad(compasstex->id, -halfviewsize-8, -halfviewsize-8, radarviewsize+16, 0, 0, 1, 1);
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    77
+            a_quad(compasstex->id, -halfviewsize-8, -halfviewsize-8, radarviewsize+16, 0, 0, 1, 1);
2142
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    78
             glPopMatrix();
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    79
         }
301
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    80
     }
7832
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    81
@@ -620,7 +620,7 @@
301
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    82
     glColor3f(1, 1, 1);
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    83
     static Texture *icons = NULL;
2142
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    84
     if(!icons) icons = textureload("packages/misc/teamicons.png", 3);
7832
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    85
-    quad(icons->id, VIRTW-VIRTH/12-10, 10, VIRTH/12, team_base(spect ? players[player1->followplayercn]->team : player1->team) ? 0.5f : 0, 0, 0.49f, 1.0f);
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    86
+    a_quad(icons->id, VIRTW-VIRTH/12-10, 10, VIRTH/12, team_base(spect ? players[player1->followplayercn]->team : player1->team) ? 0.5f : 0, 0, 0.49f, 1.0f);
301
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    87
 }
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    88
 
2142
2b7259204db3 2009-09-08 Doug Scott <[email protected]>
drdoug007
parents: 301
diff changeset
    89
 int damageblendmillis = 0;
7832
e3e78f069b82 SFEassaultcube.spec: bump to 1.1.0.4
jurikm
parents: 2142
diff changeset
    90
@@ -1007,7 +1007,7 @@
301
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    91
     loopi(fmt ? 1 : 2)
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    92
     {
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    93
         glClear(GL_COLOR_BUFFER_BIT);
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    94
-        quad(logo->id, (VIRTW-VIRTH)/2, 0, VIRTH, 0, 0, 1);
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    95
+        a_quad(logo->id, (VIRTW-VIRTH)/2, 0, VIRTH, 0, 0, 1);
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    96
         if(fmt)
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    97
         {
cd39a210da5a 2007-06-05 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    98
             glEnable(GL_BLEND);