So, update time! I've been working away, and have made some great progress! A lot of trial and error, but once I figured out CopyBits, everything started flowing nicely, and I'm really happy with the progress I've made! I'm now able to use my CICN resources even on a black and white system, which means I get my masks for transparency. I've made some great speed improvements by loading all of my resources into memory and keeping them there, and I'm really pleased with how fast the game runs. Feeling pretty good!
For a few weeks I've been working on drawing to an offscreen buffer and using CopyBits to blit it to the screen, and finally got it working... sort of. The speed boost is tremendous, and I'm very happy with the speed of my game even on real hardware -- runs great on my Mac Plus.
However, one thing I just can't figure out, is how to increase the size of the GrafPort I created for my offscreen buffer. I've created a GrafPort and a BitMap, and set the port bits to the new bitmap to draw to, but it seems to cut off at the size of my screen resolution. Inside Macintosh tells me that the screen bounds are the default size of a GrafPort, so this is not unexpected, but I can't figure out how to change it! I want to create a bitmap the size of my entire map and draw it when a level loads and then copy the visible portion to the screen. But no matter what I try, I can't seem to figure out how to change the size. I've tried using SetRect to adjust portRect in my GrafPort, but that does nothing.
This is what I get, no matter what I try (I've scrolled down and to the right -- the portion to the left and up is drawn correctly):
The portion of the map that draws correctly is exactly the screen size -- if I use a higher resolution, more of the map draws correctly, and I can scroll further.
Inside Macintosh leads me to believe I can change the size of the GrafPort, but it does not seem to be well documented. It talks about using GrafPorts for offscreen drawing in passing, then tells you to use GWorlds instead, and goes into great detail about that. Since my target is System 6 on a Macintosh Plus, I don't think that's an option for me. IM says you can use GWorlds on Macs that "work with System 7".
I've found a few books that talk about creating a GrafPort for offscreen drawing, and it has brought be to this point, but they were all written after System 7 came out, and don't really spend a lot of time on the topic, instead focusing on GWorlds.
I am truly stumped here. I've managed to overcome many of my dead ends by reading and experimenting, but this one has me totally puzzled. If anyone can offer any advice, it's much appreciated!