generated from sigonasr2/CPlusPlusProjectTemplate
Fix setting plant status
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
2a452571c8
commit
541c3823e9
@ -7,8 +7,8 @@
|
||||
|
||||
using namespace olc;
|
||||
|
||||
#define TEST_MAP1 //Toggle to just play around on map 1.
|
||||
//#define TEST_MAP2 //Toggle on to just play around on map 2.
|
||||
//#define TEST_MAP1 //Toggle to just play around on map 1.
|
||||
#define TEST_MAP2 //Toggle on to just play around on map 2.
|
||||
|
||||
#define STARTING_MAP "assets/maps/map1"
|
||||
#define STARTING_STATE CUTSCENE_1
|
||||
@ -1420,10 +1420,10 @@ public:
|
||||
}
|
||||
|
||||
void setPlantStatus(int x,int y,char state) {
|
||||
int numb=0b11111111111111111111111111111111;
|
||||
int numb2=0;
|
||||
numb-=3<<getPlantId(x,y)*2;
|
||||
plantState&=numb;
|
||||
int mask=0b11111111111111111111111111111111;
|
||||
mask-=3<<getPlantId(x,y)*2;
|
||||
plantState&=mask;
|
||||
plantState|=state<<getPlantId(x,y)*2;
|
||||
}
|
||||
|
||||
void DrawDialogBox(const vi2d &pos, const vi2d &size, Pixel p = WHITE, Pixel p2 = DARK_GREY, Pixel p3 = VERY_DARK_GREY) {
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user