xboxscene.org forums

Author Topic: Schism2 (patches)  (Read 312 times)

openxdkman

  • Archived User
  • Hero Member
  • *
  • Posts: 550
Schism2 (patches)
« on: December 12, 2006, 02:25:00 PM »

To start in windowed mode and avoid possible black screen, in Game1.cs, at line 70, replace

                graphics.PreferredBackBufferWidth = 1024;
                graphics.PreferredBackBufferHeight = 768;
                graphics.ToggleFullScreen();
with
                graphics.PreferredBackBufferWidth = 800;
                graphics.PreferredBackBufferHeight = 600;
                graphics.ToggleFullScreen();
                graphics.ToggleFullScreen();


Then, fix an insane error due to Convert.ToSingle that seem broken in xna gse final (amazing!)
In XNAFont.cs, at line 94, replace

                    ret.UVData.Add(c,  new XNAFontUV  (
                                                Convert.ToSingle(tr.GetAttribute("u")),
                                                Convert.ToSingle(tr.GetAttribute("v")),
                                                Convert.ToInt32(tr.GetAttribute("width"))));


with

                    //Convert.ToSingle seems to be broken in xba gse final, at least in this source...
                    float u, v;
                    int Width;                  
                    str = tr.GetAttribute("u");
                    str = str.Replace("0.","");                    
                    u = (float)(((double)Convert.ToInt32(str)) / (Math.Exp(Math.Log(10.0f) * ((double)str.Length))));
                    str = tr.GetAttribute("v");
                    str = str.Replace("0.", "");                    
                    v = (float)(((double)Convert.ToInt32(str)) / (Math.Exp(Math.Log(10.0f) * ((double)str.Length))));                    
                    str = tr.GetAttribute("width");
                    Width = Convert.ToInt32(str);
                    ret.UVData.Add(c, new XNAFontUV(u, v, Width));





I have no idea what this game is about, and what keyboard controls are... and I don't care (2D)...
Logged