void registerExtensions (Compiler::Extensions& extensions)
        {
            std::string enable ("enable");
            std::string disable ("disable");

            for (int i=0; i<numberOfControls; ++i)
            {
                extensions.registerInstruction (enable + controls[i], "", opcodeEnable+i);
                extensions.registerInstruction (disable + controls[i], "", opcodeDisable+i);
            }

            extensions.registerInstruction ("togglecollision", "", opcodeToggleCollision);
        }
Exemple #2
0
 void registerExtensions (Compiler::Extensions& extensions)
 {
     extensions.registerFunction ("cellchanged", 'l', "", opcodeCellChanged);
     extensions.registerInstruction ("coc", "S", opcodeCOC);
     extensions.registerInstruction ("centeroncell", "S", opcodeCOC);
     extensions.registerInstruction ("coe", "ll", opcodeCOE);
     extensions.registerInstruction ("centeronexterior", "ll", opcodeCOE);
     extensions.registerInstruction ("setwaterlevel", "f", opcodeSetWaterLevel);
     extensions.registerInstruction ("modwaterlevel", "f", opcodeModWaterLevel);
     extensions.registerFunction ("getinterior", 'l', "", opcodeGetInterior);
     extensions.registerFunction ("getpccell", 'l', "c", opcodeGetPCCell);
     extensions.registerFunction ("getwaterlevel", 'f', "", opcodeGetWaterLevel);
 }
Exemple #3
0
 void registerExtensions (Compiler::Extensions& extensions)
 {
     extensions.registerInstruction ("additem", "cl", opcodeAddItem, opcodeAddItemExplicit);
     extensions.registerFunction ("getitemcount", 'l', "c", opcodeGetItemCount,
         opcodeGetItemCountExplicit);
     extensions.registerInstruction ("removeitem", "cl", opcodeRemoveItem,
         opcodeRemoveItemExplicit);
     extensions.registerInstruction ("equip", "c", opcodeEquip, opcodeEquipExplicit);
     extensions.registerFunction ("getarmortype", 'l', "l", opcodeGetArmorType, opcodeGetArmorTypeExplicit);
     extensions.registerFunction ("hasitemequipped", 'l', "c", opcodeHasItemEquipped, opcodeHasItemEquippedExplicit);
     extensions.registerFunction ("hassoulgem", 'l', "c", opcodeHasSoulGem, opcodeHasSoulGemExplicit);
     extensions.registerFunction ("getweapontype", 'l', "", opcodeGetWeaponType, opcodeGetWeaponTypeExplicit);
 }
Exemple #4
0
 void registerExtensions (Compiler::Extensions& extensions)
 {
     extensions.registerFunction ("xbox", 'l', "", opcodeXBox);
     extensions.registerFunction ("onactivate", 'l', "", opcodeOnActivate);
     extensions.registerInstruction ("activate", "", opcodeActivate);
     extensions.registerInstruction ("lock", "/l", opcodeLock, opcodeLockExplicit);
     extensions.registerInstruction ("unlock", "", opcodeUnlock, opcodeUnlockExplicit);
     extensions.registerInstruction ("togglecollisionboxes", "", opcodeToggleCollisionDebug);
     extensions.registerInstruction ("togglecollisiongrid", "", opcodeToggleCollisionDebug);
     extensions.registerInstruction ("tcb", "", opcodeToggleCollisionDebug);
     extensions.registerInstruction ("tcg", "", opcodeToggleCollisionDebug);
     extensions.registerInstruction ("twf", "", opcodeToggleWireframe);
     extensions.registerInstruction ("togglewireframe", "", opcodeToggleWireframe);
     extensions.registerInstruction ("fadein", "f", opcodeFadeIn);
     extensions.registerInstruction ("fadeout", "f", opcodeFadeOut);
     extensions.registerInstruction ("fadeto", "ff", opcodeFadeTo);
     extensions.registerInstruction ("togglewater", "", opcodeToggleWater);
     extensions.registerInstruction ("twa", "", opcodeToggleWater);
     extensions.registerInstruction ("togglepathgrid", "", opcodeTogglePathgrid);
     extensions.registerInstruction ("tpg", "", opcodeTogglePathgrid);
     extensions.registerInstruction ("dontsaveobject", "", opcodeDontSaveObject);
     extensions.registerInstruction ("togglevanitymode", "", opcodeToggleVanityMode);
     extensions.registerInstruction ("tvm", "", opcodeToggleVanityMode);
     extensions.registerFunction ("getpcsleep", 'l', "", opcodeGetPcSleep);
     extensions.registerInstruction ("wakeuppc", "", opcodeWakeUpPc);
 }
 void registerExtensions (Compiler::Extensions& extensions)
 {
     extensions.registerInstruction ("say", "SS", opcodeSay, opcodeSayExplicit);
     extensions.registerFunction ("saydone", 'l', "", opcodeSayDone, opcodeSayDoneExplicit);
     extensions.registerInstruction ("streammusic", "S", opcodeStreamMusic);
     extensions.registerInstruction ("playsound", "c", opcodePlaySound);
     extensions.registerInstruction ("playsoundvp", "cff", opcodePlaySoundVP);
     extensions.registerInstruction ("playsound3d", "c", opcodePlaySound3D,
         opcodePlaySound3DExplicit);
     extensions.registerInstruction ("playsound3dvp", "cff", opcodePlaySound3DVP,
         opcodePlaySound3DVPExplicit);
     extensions.registerInstruction ("playloopsound3d", "c", opcodePlayLoopSound3D,
         opcodePlayLoopSound3DExplicit);
     extensions.registerInstruction ("playloopsound3dvp", "cff", opcodePlayLoopSound3DVP,
         opcodePlayLoopSound3DVPExplicit);
     extensions.registerInstruction ("stopsound", "c", opcodeStopSound,
         opcodeStopSoundExplicit);
     extensions.registerFunction ("getsoundplaying", 'l', "c", opcodeGetSoundPlaying,
         opcodeGetSoundPlayingExplicit);
 }
 void registerExtensions (Compiler::Extensions& extensions)
 {
     extensions.registerInstruction("setscale","f",opcodeSetScale,opcodeSetScaleExplicit);
     extensions.registerFunction("getscale",'f',"",opcodeGetScale,opcodeGetScaleExplicit);
     extensions.registerInstruction("setangle","cf",opcodeSetAngle,opcodeSetAngleExplicit);
     extensions.registerFunction("getangle",'f',"c",opcodeGetAngle,opcodeGetAngleExplicit);
     extensions.registerInstruction("setpos","cf",opcodeSetPos,opcodeSetPosExplicit);
     extensions.registerFunction("getpos",'f',"c",opcodeGetPos,opcodeGetPosExplicit);
     extensions.registerFunction("getstartingpos",'f',"c",opcodeGetStartingPos,opcodeGetStartingPosExplicit);
     extensions.registerInstruction("position","ffff",opcodePosition,opcodePositionExplicit);
     extensions.registerInstruction("positioncell","ffffc",opcodePositionCell,opcodePositionCellExplicit);
     extensions.registerInstruction("placeitemcell","ccffff",opcodePlaceItemCell);
     extensions.registerInstruction("placeitem","cffff",opcodePlaceItem);
     extensions.registerInstruction("placeatpc","clfl",opcodePlaceAtPc);
     extensions.registerInstruction("placeatme","clfl",opcodePlaceAtMe,opcodePlaceAtMeExplicit);
     extensions.registerInstruction("modscale","f",opcodeModScale,opcodeModScaleExplicit);
 }
        void registerExtensions (Compiler::Extensions& extensions)
        {
            std::string enable ("enable");
            std::string disable ("disable");

            for (int i=0; i<numberOfControls; ++i)
            {
                extensions.registerInstruction (enable + controls[i], "", opcodeEnable+i);
                extensions.registerInstruction (disable + controls[i], "", opcodeDisable+i);
                extensions.registerFunction (std::string("get") + controls[i] + std::string("disabled"), 'l', "", opcodeGetDisabled+i);
            }

            extensions.registerInstruction ("togglecollision", "", opcodeToggleCollision);
            extensions.registerInstruction ("tcl", "", opcodeToggleCollision);

            extensions.registerInstruction ("clearforcerun", "", opcodeClearForceRun,
                opcodeClearForceRunExplicit);
            extensions.registerInstruction ("forcerun", "", opcodeForceRun,
                opcodeForceRunExplicit);

            extensions.registerInstruction ("clearforcesneak", "", opcodeClearForceSneak,
                opcodeClearForceSneakExplicit);
            extensions.registerInstruction ("forcesneak", "", opcodeForceSneak,
                opcodeForceSneakExplicit);
            extensions.registerFunction ("getpcrunning", 'l', "", opcodeGetPcRunning);
            extensions.registerFunction ("getpcsneaking", 'l', "", opcodeGetPcSneaking);
            extensions.registerFunction ("getforcerun", 'l', "", opcodeGetForceRun, opcodeGetForceRunExplicit);
            extensions.registerFunction ("getforcesneak", 'l', "", opcodeGetForceSneak, opcodeGetForceSneakExplicit);
        }
Exemple #8
0
        void registerExtensions (Compiler::Extensions& extensions)
        {
            static const char *attributes[numberOfAttributes] =
            {
                "strength", "intelligence", "willpower", "agility", "speed", "endurance",
                "personality", "luck"
            };

            static const char *dynamics[numberOfDynamics] =
            {
                "health", "magicka", "fatigue"
            };

            static const char *skills[numberOfSkills] =
            {
                "block", "armorer", "mediumarmor", "heavyarmor", "bluntweapon",
                "longblade", "axe", "spear", "athletics", "enchant", "destruction",
                "alteration", "illusion", "conjuration", "mysticism",
                "restoration", "alchemy", "unarmored", "security", "sneak",
                "acrobatics", "lightarmor", "shortblade", "marksman",
                "merchantile", "speechcraft", "handtohand"
            };

            std::string get ("get");
            std::string set ("set");
            std::string mod ("mod");
            std::string modCurrent ("modcurrent");
            std::string getRatio ("getratio");

            for (int i=0; i<numberOfAttributes; ++i)
            {
                extensions.registerFunction (get + attributes[i], 'l', "",
                    opcodeGetAttribute+i, opcodeGetAttributeExplicit+i);

                extensions.registerInstruction (set + attributes[i], "l",
                    opcodeSetAttribute+i, opcodeSetAttributeExplicit+i);

                extensions.registerInstruction (mod + attributes[i], "l",
                    opcodeModAttribute+i, opcodeModAttributeExplicit+i);
            }

            for (int i=0; i<numberOfDynamics; ++i)
            {
                extensions.registerFunction (get + dynamics[i], 'l', "",
                    opcodeGetDynamic+i, opcodeGetDynamicExplicit+i);

                extensions.registerInstruction (set + dynamics[i], "l",
                    opcodeSetDynamic+i, opcodeSetDynamicExplicit+i);

                extensions.registerInstruction (mod + dynamics[i], "l",
                    opcodeModDynamic+i, opcodeModDynamicExplicit+i);

                extensions.registerInstruction (modCurrent + dynamics[i], "l",
                    opcodeModCurrentDynamic+i, opcodeModCurrentDynamicExplicit+i);

                extensions.registerFunction (get + dynamics[i] + getRatio, 'f', "",
                    opcodeGetDynamicGetRatio+i, opcodeGetDynamicGetRatioExplicit+i);
            }

            for (int i=0; i<numberOfSkills; ++i)
            {
                extensions.registerFunction (get + skills[i], 'l', "",
                    opcodeGetSkill+i, opcodeGetSkillExplicit+i);

                extensions.registerInstruction (set + skills[i], "l",
                    opcodeSetSkill+i, opcodeSetSkillExplicit+i);

                extensions.registerInstruction (mod + skills[i], "l",
                    opcodeModSkill+i, opcodeModSkillExplicit+i);
            }

            extensions.registerInstruction ("addspell", "c", opcodeAddSpell, opcodeAddSpellExplicit);
            extensions.registerInstruction ("removespell", "c", opcodeRemoveSpell,
                opcodeRemoveSpellExplicit);
            extensions.registerFunction ("getspell", 'l', "c", opcodeGetSpell, opcodeGetSpellExplicit);

            extensions.registerInstruction("pcraiserank","/S",opcodePCRaiseRank);
            extensions.registerInstruction("pclowerrank","/S",opcodePCLowerRank);
            extensions.registerInstruction("pcjoinfaction","/S",opcodePCJoinFaction);
            extensions.registerInstruction("moddisposition","l",opcodeModDisposition,
                opcodeModDispositionExplicit);
            extensions.registerFunction("getpcrank",'l',"/S",opcodeGetPCRank,opcodeGetPCRankExplicit);
        }
        void registerExtensions (Compiler::Extensions& extensions)
        {
            extensions.registerInstruction ("enablebirthmenu", "", opcodeEnableBirthMenu);
            extensions.registerInstruction ("enableclassmenu", "", opcodeEnableClassMenu);
            extensions.registerInstruction ("enablenamemenu", "", opcodeEnableNameMenu);
            extensions.registerInstruction ("enableracemenu", "", opcodeEnableRaceMenu);
            extensions.registerInstruction ("enablestatreviewmenu", "",
opcodeEnableStatsReviewMenu);

            extensions.registerInstruction ("enableinventorymenu", "", opcodeEnableInventoryMenu);
            extensions.registerInstruction ("enablemagicmenu", "", opcodeEnableMagicMenu);
            extensions.registerInstruction ("enablemapmenu", "", opcodeEnableMapMenu);
            extensions.registerInstruction ("enablestatsmenu", "", opcodeEnableStatsMenu);

            extensions.registerInstruction ("enablerestmenu", "", opcodeEnableRest);
            extensions.registerInstruction ("enablelevelupmenu", "", opcodeEnableRest);

            extensions.registerInstruction ("showrestmenu", "", opcodeShowRestMenu);

            extensions.registerFunction ("getbuttonpressed", 'l', "", opcodeGetButtonPressed);

            extensions.registerInstruction ("togglefogofwar", "", opcodeToggleFogOfWar);
            extensions.registerInstruction ("tfow", "", opcodeToggleFogOfWar);

            extensions.registerInstruction ("togglefullhelp", "", opcodeToggleFullHelp);
            extensions.registerInstruction ("tfh", "", opcodeToggleFullHelp);

            extensions.registerInstruction ("showmap", "S", opcodeShowMap);
            extensions.registerInstruction ("fillmap", "", opcodeFillMap);
        }
Exemple #10
0
 void registerExtensions (Compiler::Extensions& extensions)
 {
     extensions.registerFunction ("xbox", 'l', "", opcodeXBox);
     extensions.registerFunction ("onactivate", 'l', "", opcodeOnActivate);
 }
Exemple #11
0
 void registerExtensions (Compiler::Extensions& extensions)
 {
     extensions.registerInstruction ("aiactivate", "c/l", opcodeAIActivate,
         opcodeAIActivateExplicit);
     extensions.registerInstruction ("aitravel", "fff/l", opcodeAiTravel,
         opcodeAiTravelExplicit);
     extensions.registerInstruction ("aiescort", "cffff/l", opcodeAiEscort,
         opcodeAiEscortExplicit);
     extensions.registerInstruction ("aiescortcell", "ccffff/l", opcodeAiEscortCell,
         opcodeAiEscortCellExplicit);
     extensions.registerInstruction ("aiwander", "fff/llllllllll", opcodeAiWander,
         opcodeAiWanderExplicit);
     extensions.registerInstruction ("aifollow", "cffff/l", opcodeAiFollow,
         opcodeAiFollowExplicit);
     extensions.registerInstruction ("aifollowcell", "ccffff/l", opcodeAiFollowCell,
         opcodeAiFollowCellExplicit);
     extensions.registerFunction ("getaipackagedone", 'l', "", opcodeGetAiPackageDone,
         opcodeGetAiPackageDoneExplicit);
     extensions.registerFunction ("getcurrentaipackage", 'l', "", opcodeGetCurrentAiPackage,
         opcodeGetAiPackageDoneExplicit);
     extensions.registerFunction ("getdetected", 'l', "c", opcodeGetDetected,
         opcodeGetDetectedExplicit);
     extensions.registerInstruction ("sethello", "l", opcodeSetHello, opcodeSetHelloExplicit);
     extensions.registerInstruction ("setfight", "l", opcodeSetFight, opcodeSetFightExplicit);
     extensions.registerInstruction ("setflee", "l", opcodeSetFlee, opcodeSetFleeExplicit);
     extensions.registerInstruction ("setalarm", "l", opcodeSetAlarm, opcodeSetAlarmExplicit);
     extensions.registerInstruction ("modhello", "l", opcodeModHello, opcodeModHelloExplicit);
     extensions.registerInstruction ("modfight", "l", opcodeModFight, opcodeModFightExplicit);
     extensions.registerInstruction ("modflee", "l", opcodeModFlee, opcodeModFleeExplicit);
     extensions.registerInstruction ("modalarm", "l", opcodeModAlarm, opcodeModAlarmExplicit);
     extensions.registerFunction ("gethello", 'l', "", opcodeGetHello, opcodeGetHelloExplicit);
     extensions.registerFunction ("getfight", 'l', "", opcodeGetFight, opcodeGetFightExplicit);
     extensions.registerFunction ("getflee", 'l', "", opcodeGetFlee, opcodeGetFleeExplicit);
     extensions.registerFunction ("getalarm", 'l', "", opcodeGetAlarm, opcodeGetAlarmExplicit);
 }
Exemple #12
0
        void registerExtensions (Compiler::Extensions& extensions)
        {
            extensions.registerInstruction ("enablebirthmenu", "", opcodeEnableBirthMenu);
            extensions.registerInstruction ("enableclassmenu", "", opcodeEnableClassMenu);
            extensions.registerInstruction ("enablenamemenu", "", opcodeEnableNameMenu);
            extensions.registerInstruction ("enableracemenu", "", opcodeEnableRaceMenu);
            extensions.registerInstruction ("enablestatsreviewmenu", "",
                opcodeEnableStatsReviewMenu);

            extensions.registerInstruction ("enableinventorymenu", "", opcodeEnableInventoryMenu);
            extensions.registerInstruction ("enablemagicmenu", "", opcodeEnableMagicMenu);
            extensions.registerInstruction ("enablemapmenu", "", opcodeEnableMapMenu);
            extensions.registerInstruction ("enablestatsmenu", "", opcodeEnableStatsMenu);

            extensions.registerInstruction ("enablerestmenu", "", opcodeEnableRest);
            extensions.registerInstruction ("enablelevelupmenu", "", opcodeEnableRest);

            extensions.registerInstruction ("showrestmenu", "", opcodeShowRestMenu);

            extensions.registerFunction ("getbuttonpressed", 'l', "", opcodeGetButtonPressed);
        }