[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [glob2-devel] Re: what was the cause of repair bug?
From: |
Kai Antweiler |
Subject: |
Re: [glob2-devel] Re: what was the cause of repair bug? |
Date: |
Tue, 17 Apr 2007 09:16:52 +0200 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.20 (linux) |
> Level 1 building construction site: 0
> Level 1 building completed: 1
> Level 2 building construction site: 2
> Level 2 building completed: 3
> Level 3 building construction site: 4
> Level 3 building completed: 5
>
> When a completeted level 1 building goes into construction, its
> "technical level" goes from 1 to 0. If we take prev level when its at
> 0, this is -1, which means invalid.
The difference between construction site and building seems to be
just the first bit. Swapping that seems to be safer.
"level ^=1;"
^ is binary xor, right?
Better would be using different functions:
newBuildingLevel:
assert (level <=4);
level &= 0xfe;
level+=2;
convertToConstructionSite:
level |= 1;
convertToBuilding:
level &=0xfe;
We could use 0xe or 0x7 instead of 0x7e, but that is not the point.
--
Kai Antweiler
- Re: what was the cause of repair bug? (was: [glob2-devel] bugfixes), (continued)
- Re: what was the cause of repair bug? (was: [glob2-devel] bugfixes), Kieran P, 2007/04/16
- [glob2-devel] Re: what was the cause of repair bug?, Kai Antweiler, 2007/04/16
- Re: [glob2-devel] Re: what was the cause of repair bug?, Kieran P, 2007/04/16
- Re: [glob2-devel] Re: what was the cause of repair bug?, Joe Wells, 2007/04/16
- Re: [glob2-devel] Re: what was the cause of repair bug?, Joe Wells, 2007/04/16
- Re: [glob2-devel] Re: what was the cause of repair bug?, Bradley Arsenault, 2007/04/16
- Re: [glob2-devel] Re: what was the cause of repair bug?, Joe Wells, 2007/04/16
- Re: what was the cause of repair bug? (was: [glob2-devel] bugfixes), Bradley Arsenault, 2007/04/16
- [glob2-devel] Re: what was the cause of repair bug?, Joe Wells, 2007/04/16
- Re: [glob2-devel] Re: what was the cause of repair bug?, Bradley Arsenault, 2007/04/16
- Re: [glob2-devel] Re: what was the cause of repair bug?,
Kai Antweiler <=
- Re: [glob2-devel] Re: what was the cause of repair bug?, Joe Wells, 2007/04/17
- Re: [glob2-devel] Re: what was the cause of repair bug?, Kai Antweiler, 2007/04/17
- Re: [glob2-devel] Re: what was the cause of repair bug?, Joe Wells, 2007/04/17
- Re: [glob2-devel] Re: what was the cause of repair bug?, Joe Wells, 2007/04/16
- Re: [glob2-devel] Re: what was the cause of repair bug?, Bradley Arsenault, 2007/04/16