Ejemplo n.º 1
0
 public void RMENU_SetWindow(string menusetwindow_params)
 {
     string[] param;
     StringToolkit.CutParam(menusetwindow_params, ',', out param);
     this.text_height  = int.Parse(param[0]);
     this.text_width   = int.Parse(param[1]);
     this.text_spacing = int.Parse(param[2]);
     this.line_spacing = int.Parse(param[3]);
     if (param[4] == "0")
     {
         IsBorder = false;
     }
     else
     {
         IsBorder = true;
     }
     if (param[5] == "0")
     {
         IsBlack = false;
     }
     else
     {
         IsBlack = false;
     }
 }
Ejemplo n.º 2
0
 public void RMENU_Add(string rmenu_params)
 {
     string[] param;
     StringToolkit.CutParam(rmenu_params, ',', out param);
     for (int i = 0; i < param.Length / 2; i++)
     {
         Add(new RMENU(StringToolkit.GetInside(param[2 * i], '\"'), param[2 * i + 1]));
     }
 }
Ejemplo n.º 3
0
        public void RMENU_SaveName(string savename_params)
        {
            string[] param;
            StringToolkit.CutParam(savename_params, ',', out param);

/*            if (GamePage.useNative)
 *          {
 *              StringToolkitNative.GetInside(param[0], '\"', out this.savename);
 *              StringToolkitNative.GetInside(param[1], '\"', out this.readname);
 *              StringToolkitNative.GetInside(param[2], '\"', out this.dataname);
 *          }
 *          else
 *          {*/
//                StringToolkit.CutParam(savename_params, ',', out param);
            this.savename = StringToolkit.GetInside(param[0], '\"');
            this.readname = StringToolkit.GetInside(param[1], '\"');
            this.dataname = StringToolkit.GetInside(param[2], '\"');
//            }
        }
Ejemplo n.º 4
0
        public void ParseScript()
        {
            for (int i = 0; i < 1000; i++)
            {
                num[i] = new VAR_NUM(0);
                str[i] = new VAR_STR("");
            }
            int tempsubcount = 0;

            Sub[] tempsub = new Sub[1000];
            for (int i = 0, area = 0; i < buf.Length; i++)
            {
                if (StringToolkit.GetBefore(buf[i], ' ') == "*define")
                {
                    area = 1;
                }
                else if (StringToolkit.GetBefore(buf[i], ' ') == "game")
                {
                    area     = 0;
                    this.sub = new Sub[tempsubcount];
                    for (int j = 0; j < tempsubcount; j++)
                    {
                        this.sub[j] = tempsub[j];
                    }
                }
                else if (StringToolkit.GetBefore(buf[i], ' ') == "*start")
                {
                    area = 2;
                }

                if (area == 1)
                {
                    switch (StringToolkit.GetBefore(buf[i], ' '))
                    {
                    case "defsub":
                        tempsub[tempsubcount] = new Sub(buf[i].Remove(0, 7), this);
                        tempsubcount++;
                        break;

                    case "numalias":
                        string[] param;
                        StringToolkit.CutParam(buf[i].Remove(0, 9), ',', out param);
                        defas.Add(new DEF(param[0], false, double.Parse(param[1])));
                        break;

                    case "stralias":
                        StringToolkit.CutParam(buf[i].Remove(0, 9), ',', out param);
                        defas.Add(new DEF(param[0], true, param[1]));
                        break;

                    case "menusetwindow":
                        rmenu.RMENU_SetWindow(buf[i].Remove(0, 14));
                        break;

                    case "rmenu":
                        rmenu.Clear();
                        rmenu.RMENU_Add(buf[i].Remove(0, 6));
                        break;

                    case "savename":
                        rmenu.RMENU_SaveName(buf[i].Remove(0, 9));
                        break;

                    case "savenumber":
                        GamePage.savenumber = int.Parse(buf[i].Remove(0, 11));
                        break;
                    }
                }
                else if (area == 2)
                {
                    int      mainscriptcount = 0;
                    string[] tempscr         = new string[2000000];
                    for (; i < buf.Length; i++, mainscriptcount++)
                    {
                        tempscr[mainscriptcount] = buf[i];
                    }
                    scriptmain = new string[mainscriptcount];
                    for (int j = 0; j < scriptmain.Length; j++)
                    {
                        scriptmain[j] = tempscr[j];
                    }
                    Label.GetLabel(this, ref lab);
                }
            }
        }