glob2-devel
[Top][All Lists]
Advanced

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

Re: [glob2-devel] Cleanups...


From: simon schuler
Subject: Re: [glob2-devel] Cleanups...
Date: Sun, 23 Jan 2005 18:16:44 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041229

another trivial patch, that shouldn't change anything in the Game (just for readability and coding style): If NO_RES_TYPE is already defined, it should be used; no need to set the other members, as they're undefined after setting type=NO_RES_TYPE.

simon


--- glob2/src/Ressource.h       2005-01-23 17:43:36.069312456 +0000
+++ glob2/src/Ressource.h.bck~  2005-01-23 17:42:25.000000000 +0000
@@ -37,7 +37,7 @@
        Uint8 amount;
        Uint8 animation;
        
-       void clear() {type=NO_RES_TYPE; }
+       void clear() {type=0xFF; variety=0xFF;  amount=0xFF;  animation=0xFF; }
        //void setUint32(Uint32 i) { animation=i&0xFF; amount=(i>>8)&0xFF; 
variety=(i>>16)&0xFF; type=(i>>24)&0xFF; }
        Uint32 getUint32() { return animation | (amount<<8) | (variety<<16) | 
(type<<24); }
 };

reply via email to

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