Pages: 1
Posted on 08-03-11, 01:12 am
Banned for being a complete idiot.

Karma: 529
Posts: 85/987
Since: 07-09-11
Hey guys,
Does anyone know how to add a sprite image into NSMBe? I'm trying to add the VS. Battle Star.

Help will be appreciated.
Posted on 08-03-11, 03:06 am
Fuzzy
Full mod

Karma: 1183
Posts: 87/785
Since: 06-28-11
You have to modify the code in NSMBSprite.Render(Graphics g).
Add a new case in the large switch case block for the sprite number. Then you will need to add the code to draw the sprite in that case. For simply drawing an image use g.DrawImage(Properties.Resources.YourImage, RenderX, RenderY, YourImageWidth, YourImageHeight);

You will also need to modify NSMBSprite.GetRect().
Add the case for the sprite number and modify the variables x, y, width, and height to fit the new image. Look at the sprites that are already there for examples.
Posted on 08-03-11, 06:17 am
Banned for being a complete idiot.

Karma: 529
Posts: 92/987
Since: 07-09-11
Thanks, Piranhaplant.

You forgot to mention that I also had to add the .png to the Resources.resx file too. But that's alright.

Created r180 with the new VS. Battle Star icon!
Pages: 1