[Scummvm-cvs-logs] CVS: scummvm/saga module.mk,1.7,1.8 objectmap.cpp,1.3,1.4 reinherit.h,1.6,1.7 saga.cpp,1.7,1.8 math.cpp,1.1,NONE math.h,1.1,NONE math_mod.h,1.1,NONE sysio.cpp,1.1,NONE xmidi.cpp,1.3,NONE xmidi.h,1.3,NONE xmidi_mod.h,1.2,NONE

Max Horn fingolfin at users.sourceforge.net
Tue Apr 27 17:32:28 CEST 2004


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

Modified Files:
	module.mk objectmap.cpp reinherit.h saga.cpp 
Removed Files:
	math.cpp math.h math_mod.h sysio.cpp xmidi.cpp xmidi.h 
	xmidi_mod.h 
Log Message:
Removing more files from SAGA. Justification: we already have XMIDI/SMF code; SDL already gets inited by OSystem (which this code should use, too, of course...); no need to have a simple poly hit test in a separate file

Index: module.mk
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/module.mk,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- module.mk	27 Apr 2004 11:47:36 -0000	1.7
+++ module.mk	28 Apr 2004 00:30:15 -0000	1.8
@@ -18,7 +18,6 @@
 	saga/interface.o \
 	saga/isomap.o \
 	saga/ite_introproc.o \
-	saga/math.o \
 	saga/objectmap.o \
 	saga/palanim.o \
 	saga/render.o \
@@ -36,7 +35,6 @@
 	saga/sthread.o \
 	saga/text.o \
 	saga/transitions.o \
-	saga/xmidi.o \
 	saga/ys_binread.o \
 	saga/ys_binwrite.o \
 	saga/ys_dl_list.o \
@@ -44,8 +42,7 @@
 	saga/sysinput.o \
 	saga/systimer.o \
 	saga/sysmusic.o \
-	saga/syssound.o \
-	saga/sysio.o
+	saga/syssound.o
 
 MODULE_DIRS += \
 	saga

Index: objectmap.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/objectmap.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- objectmap.cpp	25 Apr 2004 15:14:46 -0000	1.3
+++ objectmap.cpp	28 Apr 2004 00:30:16 -0000	1.4
@@ -43,7 +43,6 @@
 #include "cvar_mod.h"
 #include "console_mod.h"
 #include "gfx_mod.h"
-#include "math_mod.h"
 #include "font_mod.h"
 
 /*
@@ -465,6 +464,39 @@
 	return R_SUCCESS;
 }
 
+static bool
+MATH_HitTestPoly(R_POINT * points, unsigned int npoints, R_POINT test_point)
+{
+	int yflag0;
+	int yflag1;
+	bool inside_flag = false;
+	unsigned int pt;
+
+	R_POINT *vtx0 = &points[npoints - 1];
+	R_POINT *vtx1 = &points[0];
+
+	yflag0 = (vtx0->y >= test_point.y);
+
+	for (pt = 0; pt < npoints; pt++, vtx1++) {
+
+		yflag1 = (vtx1->y >= test_point.y);
+
+		if (yflag0 != yflag1) {
+
+			if (((vtx1->y - test_point.y) * (vtx0->x - vtx1->x) >=
+				(vtx1->x - test_point.x) * (vtx0->y -
+				    vtx1->y)) == yflag1) {
+
+				inside_flag = !inside_flag;
+			}
+		}
+		yflag0 = yflag1;
+		vtx0 = vtx1;
+	}
+
+	return inside_flag;
+}
+
 int OBJECTMAP_HitTest(R_POINT * imouse_pt, int *object_num)
 {
 

Index: reinherit.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/reinherit.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- reinherit.h	27 Apr 2004 11:44:17 -0000	1.6
+++ reinherit.h	28 Apr 2004 00:30:16 -0000	1.7
@@ -173,13 +173,6 @@
 \*--------------------------------------------------------------------------*/
 
 /*
- * System : IO
-\*--------------------------------------------------------------------------*/
-
-int SYSIO_Init(void);
-int SYSIO_Shutdown(void);
-
-/*
  * System : Sound
 \*--------------------------------------------------------------------------*/
 int SYSSOUND_Init(int enabled);

Index: saga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- saga.cpp	27 Apr 2004 11:22:13 -0000	1.7
+++ saga.cpp	28 Apr 2004 00:30:16 -0000	1.8
@@ -231,11 +231,6 @@
 	/* System initialization
 	 * \*------------------------------------------------------------- */
 
-	if (SYSIO_Init() != R_SUCCESS) {
-
-		return;
-	}
-
 	/* Must initialize system timer module first */
 	if (SYSTIMER_InitMSCounter() != R_SUCCESS) {
 
@@ -329,8 +324,6 @@
 	SYSMUSIC_Shutdown();
 	SYSSOUND_Shutdown();
 
-	SYSIO_Shutdown();
-
 	/*  exit(param); */
 }
 

--- math.cpp DELETED ---

--- math.h DELETED ---

--- math_mod.h DELETED ---

--- sysio.cpp DELETED ---

--- xmidi.cpp DELETED ---

--- xmidi.h DELETED ---

--- xmidi_mod.h DELETED ---





More information about the Scummvm-git-logs mailing list