コード例 #1
0
ファイル: CPUem.cs プロジェクト: Binamrad/ProgCom
        private void init()
        {
            //various non-emulation related initialisation
            errorMessages = new LinkedList <String>();
            hasErrors     = false;

            //initialise cpu-emulator
            pc                = 128;//is this really right?
            memory            = new CacheManager();
            floatStack        = new float[2, 4];
            fss               = 0;
            fsp               = new int[2];
            fsp[0]            = -1;
            fsp[1]            = -1;
            fsbc              = new int[2];
            interruptsPending = new Queue <Int32>();

            memory.Memory[41] = 1024;//see if we can't move this to the boot code
            register          = new Int32[32];

            //init hardware
            hardware = new LinkedList <IPCHardware>();

            //initialise the timer
            hwConnect(new PCTimer());

            //initialise interrupt manager
            interruptStatus = new IntStatus();
            hwConnect(interruptStatus);
        }
コード例 #2
0
    private void UpdateItem(string itemName, IntStatus status)
    {
        var text = upgradeMenu.transform.Find(itemName + "/value").GetComponent <Text>();

        text.text = $"{status.currentValue}";

        var button = upgradeMenu.transform.Find(itemName + "/Button").GetComponent <Button>();

        button.interactable = status.maxLevel == -1 || status.currentLevel < status.maxLevel;
    }
コード例 #3
0
    private void InitItem(string itemName, IntStatus status)
    {
        var text = upgradeMenu.transform.Find(itemName + "/Button/Text").GetComponent <Text>();

        text.text = $"{status.stepValue:+0.####;-0.####}";

        var button = upgradeMenu.transform.Find(itemName + "/Button").GetComponent <Button>();

        button.onClick.AddListener(() =>
        {
            if (playerStatus.rarePerks >= 1)
            {
                playerStatus.normalPerks--;
                status.currentLevel++;
            }
        });
    }
コード例 #4
0
ファイル: CPUem.cs プロジェクト: Binamrad/ProgCom
        private void init()
        {
            //various non-emulation related initialisation
            errorMessages = new LinkedList<String>();
            hasErrors = false;

            //initialise cpu-emulator
            pc = 128;//is this really right?
            memory = new CacheManager();
            floatStack = new float[2, 4];
            fss = 0;
            fsp = new int[2];
            fsp[0] = -1;
            fsp[1] = -1;
            fsbc = new int[2];
            interruptsPending = new Queue<Int32>();

            memory.Memory[41] = 1024;//see if we can't move this to the boot code
            register = new Int32[32];

            //init hardware
            hardware = new LinkedList<IPCHardware>();

            //initialise the timer
            hwConnect(new PCTimer());

            //initialise interrupt manager
            interruptStatus = new IntStatus();
            hwConnect(interruptStatus);
        }
コード例 #5
0
 public Intersection(IntStatus v)
 {
     Points = new List <CADPoint>();
     Status = v;
 }