Install af allegro
Hejsa ekspter!Jeg er ved at instalere allegro men har et lille problem :)
Det der står på ders hjemmeside lyder sådan her:
Quick Start Guide
Getting Allegro# working is a simple process.
Source Distribution
Ingredients:
* 1 copy of Visual Studio 2005 or 2008
* 1 source distribution of Allegro#
* (Optional) Doxygen installed
Unzip the Allegro# distribution to an easily-accessible location where your projects can link to it. It is possible to link with the library itself rather than the project, but that will sacrifice the in-line documentation
Make a new solution for your game. Under your newly-created project, find References. Right-click and add a reference to the project AllegroSharp.
All you need to do now is toss using AllegroSharp; wherever you want to use Allegro# code.
Binary Distribution
Ingredients:
* 1 copy of Visual Studio 2005 or 2008
* 1 binary distribution of Allegro#
Unzip the Allegro# distribution to an easily-accessible location where your projects can link to it.
Make a new solution for your game. Under your newly-created project, find References. Right-click and add a reference to AllegroSharp.dll.
All you need to do now is toss using AllegroSharp; wherever you want to use Allegro# code.
Skeleton Code
Here's a simple template to get you started:
using AllegroSharp;
namespace MyGame
{
class Program
{
static void Main(string[] args)
{
Allegro.Init();
Keyboard.Install();
Graphics.SetMode(GraphicsDriver.AutoDetect, 640, 480);
Bitmap buffer = new Bitmap(Screen.W, Screen.H);
Bitmap me = new Bitmap(20, 20);
Point pos = new Point();
Primitives.Circle(me, new Point(10, 10), 10, Color.PureBlue, true);
while (!Keyboard.KeyPressed)
{
if (Keyboard.Key[Key.Up] && pos.Y > 0)
{
pos.Y--;
}
if (Keyboard.Key[Key.Down] && pos.Y < Screen.H)
{
pos.Y++;
}
if (Keyboard.Key[Key.Right] && pos.X < Screen.W)
{
pos.X++;
}
if (Keyboard.Key[Key.Left] && pos.X > 0)
{
pos.X--;
}
buffer.Clear();
me.Draw(buffer, pos);
buffer.Blit(Graphics.Screen);
}
me.Destroy();
buffer.Destroy();
}
}
}
Jeg syndes så ikke det er så let som de skriver :P
Jeg tror det er fordi jeg ikke kan finde ud af at opprette en sti.
Så vil i ikke godt hjælpe mig?