git » fp-git.git » commit a461a94

added functions to get height and width of any image. Renamed screen size functions.

author ecalot
2004-07-22 14:22:13 UTC
committer ecalot
2004-07-22 14:22:13 UTC
parent cf1e22f982191ba002d268229f5e5b141bc258b0

added functions to get height and width of any image. Renamed screen size functions.

FP/src/out/output.c +13 -3

diff --git a/FP/src/out/output.c b/FP/src/out/output.c
index d7b1367..7baec90 100644
--- a/FP/src/out/output.c
+++ b/FP/src/out/output.c
@@ -122,7 +122,7 @@ outputLoadBitmap(const unsigned char* data, int size,
 			exit(1);
 		}
 	}
-	if (!invert) { /* TODO: serialized lines bugfix */
+	if (!invert) {
 		for (i = 0; i < w; i++) {
 			for (j = 0; j < result->h; j++) {
 				putpixel(result, i<<1, j, (data[i+j*w])>>4);
@@ -194,16 +194,26 @@ int outputInit()
 	return 0;
 }
 
-int getHeight()
+int outputGetScreenHeight()
 {
 	return DEF_SCREEN_HEIGHT;
 }
 
-int getWidth()
+int outputGetScreenWidth()
 {
 	return DEF_SCREEN_WIDTH;
 }
 
+int outputGetHeight(void* image)
+{
+	return ((SDL_Surface*)image)->h;
+}
+
+int outputGetWidth(void* image)
+{
+	return ((SDL_Surface*)image)->w;
+}
+
 /* Finish all output modes, including the screen mode */
 void outputStop()
 {