/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (SullyGame game = new SullyGame()) { game.Run(); } }
public Textbox( int screen_width, int screen_height, Texture2D speechPorts, SullyGame g ) { game = g; boxes_of_text = new List<object>(); currently_rendering_text = new List<string>(); vertical_padding = 2; horizontal_padding = 7; long_step = 2; short_step = 1; full_reset(); //textbox.image = Content.Load<Texture2D>( "textbox" ); image = _.MakeBox( 317, 50, _.sg.boxcolors ); speechPortraits = speechPorts; bounds = new Rectangle( 0, 0, image.Width, image.Height ); int yloc = screen_height - bounds.Height - 4; bounds.Offset( ( screen_width - bounds.Width ) / 2, yloc ); speech_bounds = new Rectangle( 2, yloc - 33, 32, 32 ); inner_bounds = bounds; // copy value color_bounds = bounds; inner_bounds.Inflate( -horizontal_padding, -vertical_padding ); color_bounds.Inflate( -2, -2 ); bgColor = new Texture2D( _.sg.GraphicsDevice, 1, 1, false, SurfaceFormat.Color ); bgColor.SetData(new[] { new Color(140, 0, 140) }); McgLayer l = game.renderstack.GetLayer( "textbox" ); RenderDelegate a1 = ( int x, int y ) => { //game.spritebatch.Draw( inactiveBgColor, mainBox.color_bounds, Color.White * .5f ); //game.spritebatch.Draw( mainBox.image, mainBox.bounds, Color.White ); Draw(); }; l.AddNode( new McgNode( a1, l, 0, 0, 300, 300, 3000 ) ); }
private static void initBox(SullyGame sg) { PrimitiveVertexDeclaration = new VertexDeclaration( new VertexElement(0, VertexElementFormat.Vector2, VertexElementUsage.Position, 0), new VertexElement(8, VertexElementFormat.Color, VertexElementUsage.Color, 0) ); PrimitiveEffect = new BasicEffect(sg.GraphicsDevice); }
public static void init( SullyGame sg ) { _.sg = sg; _.flags = new int[NUM_FLAGS]; _.pixel = new Texture2D( _.sg.GraphicsDevice, 1, 1, false, SurfaceFormat.Color ); _.pixel.SetData(new[] { new Color(255, 255, 255) }); initBox(sg); }
public SaveManager(SullyGame game) { this.game = game; headers = new List<SaveHeader>(); read_headers(); }
public SullyGlobalScripts( SullyGame sg ) { this.sg = sg; }