David Rose пре 25 година
родитељ
комит
a0ed36e4c0
2 измењених фајлова са 8 додато и 8 уклоњено
  1. 1 1
      pandatool/src/egg-palettize/Sources.pp
  2. 7 7
      pandatool/src/egg-palettize/attribFile.cxx

+ 1 - 1
pandatool/src/egg-palettize/Sources.pp

@@ -3,7 +3,7 @@
   #define LOCAL_LIBS \
     eggbase progbase
   #define OTHER_LIBS \
-    egg:c linmath:c putil:c express:c pnmimagetypes:c \
+    egg:c linmath:c putil:c express:c pnmimage:c pnmimagetypes:c \
     pandaegg:m panda:m pandaexpress:m \
     dtoolutil:c dconfig:c dtool:m pystub
 

+ 7 - 7
pandatool/src/egg-palettize/attribFile.cxx

@@ -907,8 +907,8 @@ parse_params(const vector<string> &words, istream &infile,
 bool AttribFile::
 parse_packing(const vector<string> &words, istream &infile, 
 	      string &line, int &line_num) {
-  if (words.size() != 3 || words[1] != "is" ||
-      (words[2] != "optimal" && words[2] != "suboptimal")) {
+  if (!(words.size() == 3 && words[1] == "is" &&
+	(words[2] == "optimal" || words[2] == "suboptimal"))) {
     nout << "Expected 'packing is {optimal|suboptimal}'\n";
     return false;
   }
@@ -1073,7 +1073,7 @@ parse_palette(const vector<string> &words, istream &infile,
   }
 
   string filename = words[1];
-  if (words[2] != "size") {
+  if (!(words[2] == "size")) {
     nout << "Expected keyword 'size'\n";
     return false;
   }
@@ -1096,21 +1096,21 @@ parse_palette(const vector<string> &words, istream &infile,
 
     Texture *texture = get_texture(twords[0]);
     
-    if (twords[1] != "at") {
+    if (!(twords[1] == "at")) {
       nout << "Expected keyword 'at'\n";
       return false;
     }
     int left = atoi(twords[2].c_str());
     int top = atoi(twords[3].c_str());
     
-    if (twords[4] != "size") {
+    if (!(twords[4] == "size")) {
       nout << "Expected keyword 'size'\n";
       return false;
     }
     int xsize = atoi(twords[5].c_str());
     int ysize = atoi(twords[6].c_str());
     
-    if (twords[7] != "margin") {
+    if (!(twords[7] == "margin")) {
       nout << "Expected keyword 'margin'\n";
       return false;
     }
@@ -1138,7 +1138,7 @@ parse_unplaced(const vector<string> &words, istream &infile,
 
   Texture *texture = get_texture(words[1]);
 
-  if (words[2] != "because") {
+  if (!(words[2] == "because")) {
     nout << "Expected keyword 'because'\n";
     return false;
   }