Original Post
🔒 Locked
Splitting BMPs
Advertisement
If you write your own custom loading function then it''s relativly simple.
It''s like linar memory access.
It''s like linar memory access.
Hey I had to do this once too I did a small tile engine and such but now I''m trying to experiment on BSP''s and see how that works for settings like castles in rpgs and caves and such but I might go back and work on my tile engine again since I liked it
heres my modification off Nehe''s .tga loader basically its the same thing though
you can mess around with that as long as you have the buffer saved that you read in it works so like in your class keep like a unsigned char *buffer; where all the image data is kept only thing that is weird on this that I havent figured out really why it is is that lets say you have a 2 rows of cells and 3 colums
1 2 3
4 5 6
the cell 4 is located at 0,0 so you would call the function like
Extract(0,0,32,32) //if the tiles are 32x32 and that will give you the image of cell 4 if you want cell 1 you call Extract(0,1,32,32) yeah its weird like taht but I havent figured out why it does it...if anyone knows please tell
|
you can mess around with that as long as you have the buffer saved that you read in it works so like in your class keep like a unsigned char *buffer; where all the image data is kept only thing that is weird on this that I havent figured out really why it is is that lets say you have a 2 rows of cells and 3 colums
1 2 3
4 5 6
the cell 4 is located at 0,0 so you would call the function like
Extract(0,0,32,32) //if the tiles are 32x32 and that will give you the image of cell 4 if you want cell 1 you call Extract(0,1,32,32) yeah its weird like taht but I havent figured out why it does it...if anyone knows please tell
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement