Changeset 263
- Timestamp:
- Jan 23, 2011, 2:21:15 PM (10 years ago)
- Location:
- trunk/monsterz
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/monsterz/board.cpp
r261 r263 217 217 b->Goto(cell_a * 48, 0.3f); 218 218 219 /* Remove matching tiles */ 220 do for (int j = 8; j--;) for (int i = 0; i < 8; i++) 221 { 222 if (list[i][j]) 223 { 219 /* Remove matching pieces */ 220 do 221 { 222 // Mash *mash = new Mash(data->game); 223 // Ticker::Ref(mash); 224 225 for (int j = 8; j--;) for (int i = 0; i < 8; i++) 226 { 227 if (!list[i][j]) 228 continue; 229 230 /* The mash becomes the new owner of the disappearing piece */ 231 // mash->AddPiece(data->pieces[i][j], Int2(i, j)); 224 232 Ticker::Unref(data->pieces[i][j]); 233 234 Int2 newpos = data->pieces[i][7]->GetPos() + Int2(0, 48); 235 225 236 for (int j2 = j + 1; j2 < 8; j2++) 226 237 { … … 231 242 } 232 243 data->pieces[i][7] = new Piece(data->game, Int2(i, 7), 25 + 5 * (rand() % 7)); 244 data->pieces[i][7]->SetPos(newpos); 245 data->pieces[i][7]->Goto(Int2(i, 7) * 48, 0.1f); 233 246 Ticker::Ref(data->pieces[i][7]); 234 247 list[i][7] = 0; -
trunk/monsterz/piece.cpp
r261 r263 65 65 { 66 66 data->cell = cell; 67 } 68 69 Int2 Piece::GetCell() const 70 { 71 return data->cell; 72 } 73 74 void Piece::SetPos(Int2 pos) 75 { 76 data->pos = pos; 67 77 } 68 78 -
trunk/monsterz/piece.h
r261 r263 24 24 25 25 void SetCell(Int2 cell); 26 Int2 GetCell() const; 27 void SetPos(Int2 pos); 26 28 Int2 GetPos() const; 27 29 int GetId() const;
Note: See TracChangeset
for help on using the changeset viewer.