• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Currently making a GBA Pokemon ROM Hacking tool, any idea what's wrong with this code? (C#)

Momoro

I'm gonna put some dirt in your eye..
269
Posts
4
Years
Hello 😃

I recently revisited an old project of mine called Advance Edit (no idea if that name's taken 🤔 hope it isn't!), and I was going to make a sprite editor, but I've hit a roadblock 😕

I program mainly in Windows Forms C#, so this is the code I wrote:

Code:
BinaryReader br = new BinaryReader(File.OpenRead(filename));

br.BaseStream.Seek(0x728B04, SeekOrigin.Begin);

byte[] bitmap = br.ReadBytes(Convert.ToInt32(br.BaseStream.Length));

Bitmap myBitmap = new Bitmap(new MemoryStream(bitmap));

pictureBox1.Image = myBitmap;

br.Close();

It should work to get the image from the ROM, but for some reason, it doesn't.

The image I'm trying to get is Bulbasaur, and from a Firered ROM.

Any ideas? Thanks 😄

*Sorry if this is the wrong place to post this, I'm not good at forum areas 😛
 
Back
Top