Selaa lähdekoodia

Removed gLaraModel

Thomas Buck 11 vuotta sitten
vanhempi
commit
ce1314859e
2 muutettua tiedostoa jossa 11 lisäystä ja 14 poistoa
  1. 0
    3
      src/Game.cpp
  2. 11
    11
      src/OpenRaider.cpp

+ 0
- 3
src/Game.cpp Näytä tiedosto

24
 
24
 
25
 // Old Code compatibility
25
 // Old Code compatibility
26
 #define TexelScale 256.0f
26
 #define TexelScale 256.0f
27
-skeletal_model_t *gLaraModel;
28
 
27
 
29
 #ifndef EXPERIMENTAL_UNFIFIED_ROOM_GEOMETERY
28
 #ifndef EXPERIMENTAL_UNFIFIED_ROOM_GEOMETERY
30
 #define TextureLimit 24
29
 #define TextureLimit 24
556
     // Gather more info if this is lara
555
     // Gather more info if this is lara
557
     if (moveable[index].object_id == 0)
556
     if (moveable[index].object_id == 0)
558
     {
557
     {
559
-        gLaraModel = r_model; // hack to avoid broken system until new event sys
560
-
561
         lara = true;
558
         lara = true;
562
         getCamera().translate(pos[0], pos[1] - 470, pos[2]);
559
         getCamera().translate(pos[0], pos[1] - 470, pos[2]);
563
         thing->type = 0x02;
560
         thing->type = 0x02;

+ 11
- 11
src/OpenRaider.cpp Näytä tiedosto

24
 #include "utils/time.h"
24
 #include "utils/time.h"
25
 #include "OpenRaider.h"
25
 #include "OpenRaider.h"
26
 
26
 
27
-extern skeletal_model_t *gLaraModel; //! \fixme
28
-
29
 OpenRaider::OpenRaider() {
27
 OpenRaider::OpenRaider() {
30
     mRunning = false;
28
     mRunning = false;
31
     mFPS = false;
29
     mFPS = false;
558
                 getConsole().print("Pass BOOL to pigtail command!");
556
                 getConsole().print("Pass BOOL to pigtail command!");
559
                 return -46;
557
                 return -46;
560
             }
558
             }
561
-            gLaraModel->pigtails = b;
559
+            SkeletalModel *tmp = static_cast<SkeletalModel *>(getGame().mLara->tmpHook);
560
+            tmp->model->pigtails = b;
562
             if (b) {
561
             if (b) {
563
-                gLaraModel->ponyOff -= 20;
564
-                gLaraModel->ponytail[1] -= 32;
562
+                tmp->model->ponyOff -= 20;
563
+                tmp->model->ponytail[1] -= 32;
565
             } else {
564
             } else {
566
-                gLaraModel->ponyOff += 20;
567
-                gLaraModel->ponytail[1] += 32;
565
+                tmp->model->ponyOff += 20;
566
+                tmp->model->ponytail[1] += 32;
568
             }
567
             }
569
             getConsole().print("Pigtail is now %s", b ? "on" : "off");
568
             getConsole().print("Pigtail is now %s", b ? "on" : "off");
570
         } else {
569
         } else {
573
         }
572
         }
574
     } else if (strcmp(command, "ponypos") == 0) {
573
     } else if (strcmp(command, "ponypos") == 0) {
575
         if (args->size() > 3) {
574
         if (args->size() > 3) {
576
-            gLaraModel->ponytail[0] = (float)atof(args->at(0));
577
-            gLaraModel->ponytail[1] = (float)atof(args->at(1));
578
-            gLaraModel->ponytail[2] = (float)atof(args->at(2));
579
-            gLaraModel->ponytailAngle = (float)atof(args->at(3));
575
+            SkeletalModel *tmp = static_cast<SkeletalModel *>(getGame().mLara->tmpHook);
576
+            tmp->model->ponytail[0] = (float)atof(args->at(0));
577
+            tmp->model->ponytail[1] = (float)atof(args->at(1));
578
+            tmp->model->ponytail[2] = (float)atof(args->at(2));
579
+            tmp->model->ponytailAngle = (float)atof(args->at(3));
580
         } else {
580
         } else {
581
             getConsole().print("Invalid use of ponypos-command!");
581
             getConsole().print("Invalid use of ponypos-command!");
582
             return -48;
582
             return -48;

Loading…
Peruuta
Tallenna