Project modernization (#630)
* Fixed boats falling and a TP glitch #266 * Replaced every C-style cast with C++ ones * Replaced every C-style cast with C++ ones * Fixed boats falling and a TP glitch #266 * Updated NULL to nullptr and fixing some type issues * Modernized and fixed a few bugs - Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances. * Fixing more conflicts * Replace int loops with size_t and start work on overrides
This commit is contained in:
@@ -14,20 +14,20 @@ BoatModel::BoatModel() : Model()
|
||||
int h = 20;
|
||||
int yOff = 4;
|
||||
|
||||
cubes[0]->addBox((float)(-w / 2), (float)(-h / 2 + 2), -3, w, h - 4, 4, 0);
|
||||
cubes[0]->setPos(0, (float)(0 + yOff), 0);
|
||||
cubes[0]->addBox(static_cast<float>(-w / 2), static_cast<float>(-h / 2 + 2), -3, w, h - 4, 4, 0);
|
||||
cubes[0]->setPos(0, static_cast<float>(0 + yOff), 0);
|
||||
|
||||
cubes[1]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0);
|
||||
cubes[1]->setPos((float)(-w / 2 + 1), (float)(0 + yOff), 0);
|
||||
cubes[1]->addBox(static_cast<float>(-w / 2 + 2), static_cast<float>(-d - 1), -1, w - 4, d, 2, 0);
|
||||
cubes[1]->setPos(static_cast<float>(-w / 2 + 1), static_cast<float>(0 + yOff), 0);
|
||||
|
||||
cubes[2]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0);
|
||||
cubes[2]->setPos((float)(+w / 2 - 1), (float)(0 + yOff), 0);
|
||||
cubes[2]->addBox(static_cast<float>(-w / 2 + 2), static_cast<float>(-d - 1), -1, w - 4, d, 2, 0);
|
||||
cubes[2]->setPos(static_cast<float>(+w / 2 - 1), static_cast<float>(0 + yOff), 0);
|
||||
|
||||
cubes[3]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0);
|
||||
cubes[3]->setPos(0, (float)(0 + yOff), (float)(-h / 2 + 1));
|
||||
cubes[3]->addBox(static_cast<float>(-w / 2 + 2), static_cast<float>(-d - 1), -1, w - 4, d, 2, 0);
|
||||
cubes[3]->setPos(0, static_cast<float>(0 + yOff), static_cast<float>(-h / 2 + 1));
|
||||
|
||||
cubes[4]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0);
|
||||
cubes[4]->setPos(0, (float)(0 + yOff), (float)(+h / 2 - 1));
|
||||
cubes[4]->addBox(static_cast<float>(-w / 2 + 2), static_cast<float>(-d - 1), -1, w - 4, d, 2, 0);
|
||||
cubes[4]->setPos(0, static_cast<float>(0 + yOff), static_cast<float>(+h / 2 - 1));
|
||||
|
||||
cubes[0]->xRot = PI / 2;
|
||||
cubes[1]->yRot = PI / 2 * 3;
|
||||
|
||||
Reference in New Issue
Block a user