Selaa lähdekoodia

Added pigtail command

Thomas Buck 11 vuotta sitten
vanhempi
commit
5644dac47a
2 muutettua tiedostoa jossa 26 lisäystä ja 3 poistoa
  1. 1
    1
      include/Render.h
  2. 25
    2
      src/OpenRaider.cpp

+ 1
- 1
include/Render.h Näytä tiedosto

108
         fGL_Lights              = (1 << 9),
108
         fGL_Lights              = (1 << 9),
109
         fOneRoom                = (1 << 10),
109
         fOneRoom                = (1 << 10),
110
         fRenderPonytail         = (1 << 11),
110
         fRenderPonytail         = (1 << 11),
111
-        fMultiTexture           = (1 << 12),
111
+        // fMultiTexture           = (1 << 12), //! \todo Whats up with Multitexture stuff? Where is it needed?
112
         fUpdateRoomListPerFrame = (1 << 13),
112
         fUpdateRoomListPerFrame = (1 << 13),
113
         fAnimateAllModels       = (1 << 14),
113
         fAnimateAllModels       = (1 << 14),
114
         fAllRooms               = (1 << 15)
114
         fAllRooms               = (1 << 15)

+ 25
- 2
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
+
27
 OpenRaider::OpenRaider() {
29
 OpenRaider::OpenRaider() {
28
     mRunning = false;
30
     mRunning = false;
29
     mFPS = false;
31
     mFPS = false;
549
             getConsole().print("Invalid use of ponytail-command!");
551
             getConsole().print("Invalid use of ponytail-command!");
550
             return -45;
552
             return -45;
551
         }
553
         }
554
+    } else if (strcmp(command, "pigtail") == 0) {
555
+        if (args->size() > 0) {
556
+            bool b;
557
+            if (readBool(args->at(0), &b) < 0) {
558
+                getConsole().print("Pass BOOL to pigtail command!");
559
+                return -46;
560
+            }
561
+            gLaraModel->pigtails = b;
562
+            if (b) {
563
+                gLaraModel->ponyOff -= 20;
564
+                gLaraModel->ponytail[1] -= 32;
565
+            } else {
566
+                gLaraModel->ponyOff += 20;
567
+                gLaraModel->ponytail[1] += 32;
568
+            }
569
+            getConsole().print("Pigtail is now %s", b ? "on" : "off");
570
+        } else {
571
+            getConsole().print("Invalid use of pigtail-command!");
572
+            return -47;
573
+        }
552
     } else if (strcmp(command, "help") == 0) {
574
     } else if (strcmp(command, "help") == 0) {
553
         if (args->size() == 0) {
575
         if (args->size() == 0) {
554
             getConsole().print("Available commands:");
576
             getConsole().print("Available commands:");
577
             getConsole().print("  oneroom   - BOOL");
599
             getConsole().print("  oneroom   - BOOL");
578
             getConsole().print("  allrooms  - BOOL");
600
             getConsole().print("  allrooms  - BOOL");
579
             getConsole().print("  ponytail  - BOOL");
601
             getConsole().print("  ponytail  - BOOL");
602
+            getConsole().print("  pigtail   - BOOL");
580
             getConsole().print("  help      - print command help");
603
             getConsole().print("  help      - print command help");
581
             getConsole().print("  quit      - exit OpenRaider");
604
             getConsole().print("  quit      - exit OpenRaider");
582
             getConsole().print("Use help COMMAND to get additional info");
605
             getConsole().print("Use help COMMAND to get additional info");
584
             return help(args->at(0));
607
             return help(args->at(0));
585
         } else {
608
         } else {
586
             getConsole().print("Invalid use of help-command");
609
             getConsole().print("Invalid use of help-command");
587
-            return -46;
610
+            return -48;
588
         }
611
         }
589
     } else {
612
     } else {
590
         getConsole().print("Unknown command: %s ", command);
613
         getConsole().print("Unknown command: %s ", command);
591
-        return -47;
614
+        return -49;
592
     }
615
     }
593
 
616
 
594
     return 0;
617
     return 0;

Loading…
Peruuta
Tallenna