stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/stratagus player.c


From: address@hidden
Subject: [Stratagus-CVS] stratagus/src/stratagus player.c
Date: 10 Jan 2004 06:18:36 +1100

CVSROOT:        /home/strat
Module name:    stratagus
Changes by:      <address@hidden>       04/01/10 06:18:36

Modified files:
        src/stratagus  : player.c 

Log message:
        Fixed player colors

Patches:
Index: stratagus/src/stratagus/player.c
diff -u stratagus/src/stratagus/player.c:1.109 
stratagus/src/stratagus/player.c:1.110
--- stratagus/src/stratagus/player.c:1.109      Fri Jan  9 16:44:40 2004
+++ stratagus/src/stratagus/player.c    Sat Jan 10 06:18:36 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: player.c,v 1.109 2004/01/09 05:44:40 jsalmon3 Exp $
+//      $Id: player.c,v 1.110 2004/01/09 19:18:36 jsalmon3 Exp $
 
 //@{
 
@@ -223,7 +223,7 @@
        int j;
 
        CLprintf(file, "\n--- -----------------------------------------\n");
-       CLprintf(file, "--- MODULE: players $Id: player.c,v 1.109 2004/01/09 
05:44:40 jsalmon3 Exp $\n\n");
+       CLprintf(file, "--- MODULE: players $Id: player.c,v 1.110 2004/01/09 
19:18:36 jsalmon3 Exp $\n\n");
 
 #if 0
        //
@@ -974,30 +974,38 @@
        switch (VideoBpp) {
        case 8:
                for (i = 0; i < PlayerMax; ++i) {
-                       memcpy(Players[o].UnitColors.Depth8.Pixels, 
PlayerColors[i],
-                               sizeof(VMemType8) * 4);
+                       Players[o].UnitColors.Depth8.Pixels[0] = 
PlayerColors[i][0].D8;
+                       Players[o].UnitColors.Depth8.Pixels[1] = 
PlayerColors[i][1].D8;
+                       Players[o].UnitColors.Depth8.Pixels[2] = 
PlayerColors[i][2].D8;
+                       Players[o].UnitColors.Depth8.Pixels[3] = 
PlayerColors[i][3].D8;
                        o = (o + 1) % PlayerMax;
                }
                break;
        case 15:
        case 16:
                for (i = 0; i < PlayerMax; ++i) {
-                       memcpy(Players[o].UnitColors.Depth16.Pixels, 
PlayerColors[i],
-                               sizeof(VMemType16) * 4);
+                       Players[o].UnitColors.Depth16.Pixels[0] = 
PlayerColors[i][0].D16;
+                       Players[o].UnitColors.Depth16.Pixels[1] = 
PlayerColors[i][1].D16;
+                       Players[o].UnitColors.Depth16.Pixels[2] = 
PlayerColors[i][2].D16;
+                       Players[o].UnitColors.Depth16.Pixels[3] = 
PlayerColors[i][3].D16;
                        o = (o + 1) % PlayerMax;
                }
                break;
        case 24:
                for (i = 0; i < PlayerMax; ++i) {
-                       memcpy(Players[o].UnitColors.Depth24.Pixels, 
PlayerColors[i],
-                               sizeof(VMemType24) * 4);
+                       Players[o].UnitColors.Depth24.Pixels[0] = 
PlayerColors[i][0].D24;
+                       Players[o].UnitColors.Depth24.Pixels[1] = 
PlayerColors[i][1].D24;
+                       Players[o].UnitColors.Depth24.Pixels[2] = 
PlayerColors[i][2].D24;
+                       Players[o].UnitColors.Depth24.Pixels[3] = 
PlayerColors[i][3].D24;
                        o = (o + 1) % PlayerMax;
                }
                break;
        case 32:
                for (i = 0; i < 7; ++i) {
-                       memcpy(Players[o].UnitColors.Depth32.Pixels, 
PlayerColors[i],
-                               sizeof(VMemType32) * 4);
+                       Players[o].UnitColors.Depth32.Pixels[0] = 
PlayerColors[i][0].D32;
+                       Players[o].UnitColors.Depth32.Pixels[1] = 
PlayerColors[i][1].D32;
+                       Players[o].UnitColors.Depth32.Pixels[2] = 
PlayerColors[i][2].D32;
+                       Players[o].UnitColors.Depth32.Pixels[3] = 
PlayerColors[i][3].D32;
                        o = (o + 1) % PlayerMax;
                }
                break;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]