[Scummvm-cvs-logs] CVS: scummvm/saga image.cpp,1.1,1.2 module.mk,1.5,1.6 reinherit.h,1.5,1.6 misc.cpp,1.1,NONE

Max Horn fingolfin at users.sourceforge.net
Tue Apr 27 04:45:02 CEST 2004


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9796

Modified Files:
	image.cpp module.mk reinherit.h 
Removed Files:
	misc.cpp 
Log Message:
Remove yet another file

Index: image.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/image.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- image.cpp	12 Apr 2004 21:40:47 -0000	1.1
+++ image.cpp	27 Apr 2004 11:44:17 -0000	1.2
@@ -45,6 +45,27 @@
 
 namespace Saga {
 
+static int granulate(int value, int granularity)
+{
+
+	int remainder;
+
+	if (value == 0)
+		return 0;
+
+	if (granularity == 0)
+		return 0;
+
+	remainder = value % granularity;
+
+	if (remainder == 0) {
+		return value;
+	} else {
+		return (granularity - remainder + value);
+	}
+
+}
+
 int
 IMG_DecodeBGImage(const uchar * image_data,
     size_t image_size,
@@ -78,7 +99,7 @@
 	RLE_data_ptr = image_data + SAGA_IMAGE_DATA_OFFSET;
 	RLE_data_len = image_size - SAGA_IMAGE_DATA_OFFSET;
 
-	modex_height = Granulate(hdr.height, 4);
+	modex_height = granulate(hdr.height, 4);
 
 	decode_buf_len = hdr.width * modex_height;
 	decode_buf = (uchar *)malloc(decode_buf_len);

Index: module.mk
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/module.mk,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- module.mk	27 Apr 2004 11:22:13 -0000	1.5
+++ module.mk	27 Apr 2004 11:44:17 -0000	1.6
@@ -19,7 +19,6 @@
 	saga/isomap.o \
 	saga/ite_introproc.o \
 	saga/math.o \
-	saga/misc.o \
 	saga/objectmap.o \
 	saga/palanim.o \
 	saga/render.o \

Index: reinherit.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/reinherit.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- reinherit.h	27 Apr 2004 11:22:13 -0000	1.5
+++ reinherit.h	27 Apr 2004 11:44:17 -0000	1.6
@@ -161,11 +161,6 @@
 void R_Shutdown(int param);
 
 /*
- * r_misc.c
-\*--------------------------------------------------------------------------*/
-int Granulate(int value, int granularity);
-
-/*
  * r_transitions.c
 \*--------------------------------------------------------------------------*/
 int TRANSITION_Dissolve(uchar * dst_img,

--- misc.cpp DELETED ---





More information about the Scummvm-git-logs mailing list