GayLord,
I'm not sure if you're still looking for an answer here but for the sake of other members, here is what I was able to use to solve a similar problem. I've been building a game engine that utilizes a similar graphical structure to what you are describing. The rotation function I use is this:
All of the floats could be replaced by doubles and work perhaps better. I used floats to help with performance on lower end computers.
float cos = (float)Math.cos(-angle);//The angle you are rotating (in radians)
float sin = (float)Math.sin(-angle);//The angle you are rotating (in radians)
float sWidth = screenWidth/2;
float sHeight = screenHeight/2;
float pWidth = pixelArrayWidth/2;
float pHeight = pixelArrayHeight/2;
for each pixel in screen{
int xPosition = pixelIndexX - sWidth;
int yPosition = pixelIndexY - sHeight;
int tx = (int)(xPosition * cos - yPosition * sin);
int ty = (int)(xPosition * sin + yPosition * cos);
xPosition = tx + pWidth;
yPosition = ty + pHeight;
if((xPosition is out of bounds) or (yPosition is out of bounds)) continue;
setPixelAt(screenPixelX, screenPixelY, pixelArray[xPosition + yPosition * pixelArrayWidth] )
}
I know that it is patchy with psuedo code and java code but it should be understandable. If anyone needs some clarification just comment and ask about it.