[Scummvm-cvs-logs] SF.net SVN: scummvm:[38248] scummvm/trunk/engines/sci

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Feb 15 15:52:52 CET 2009


Revision: 38248
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38248&view=rev
Author:   fingolfin
Date:     2009-02-15 14:52:52 +0000 (Sun, 15 Feb 2009)

Log Message:
-----------
Some more warning fixes

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp
    scummvm/trunk/engines/sci/include/sci_memory.h
    scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp
    scummvm/trunk/engines/sci/sfx/timer/timer_scummvm.cpp

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp	2009-02-15 14:52:51 UTC (rev 38247)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp	2009-02-15 14:52:52 UTC (rev 38248)
@@ -24,10 +24,8 @@
 
 ***************************************************************************/
 
+#include <time.h>	// for time() to seed rand() via srand()
 #include "sci/include/sci_memory.h"
-#include <assert.h>
-#include <math.h>
-#include <time.h>
 #include "sci/include/gfx_resource.h"
 #include "sci/include/gfx_tools.h"
 
@@ -577,7 +575,8 @@
 #ifdef GFXR_DEBUG_PIC0
 #define p0printf sciprintf
 #else
-#define p0printf if (0)
+void do_nothing(...) { }
+#define p0printf do_nothing
 #endif
 
 

Modified: scummvm/trunk/engines/sci/include/sci_memory.h
===================================================================
--- scummvm/trunk/engines/sci/include/sci_memory.h	2009-02-15 14:52:51 UTC (rev 38247)
+++ scummvm/trunk/engines/sci/include/sci_memory.h	2009-02-15 14:52:52 UTC (rev 38248)
@@ -68,8 +68,7 @@
 #ifndef _SCI_MEMORY_H
 #define _SCI_MEMORY_H
 
-#include <stdio.h>
-#include <assert.h>
+#include "common/scummsys.h"
 #include "sci/include/resource.h"
 
 #ifdef _WIN32

Modified: scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp	2009-02-15 14:52:51 UTC (rev 38247)
+++ scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp	2009-02-15 14:52:52 UTC (rev 38248)
@@ -78,26 +78,6 @@
 };
 static guint8 sci_adlib_vol_tables[16][64];
 
-/* ripped out of the linux kernel, of all places. */
-static gint8 fm_volume_table[128] = {
-  -64, -48, -40, -35, -32, -29, -27, -26,
-  -24, -23, -21, -20, -19, -18, -18, -17,
-  -16, -15, -15, -14, -13, -13, -12, -12,
-  -11, -11, -10, -10, -10, -9, -9, -8,
-  -8, -8, -7, -7, -7, -6, -6, -6,
-  -5, -5, -5, -5, -4, -4, -4, -4,
-  -3, -3, -3, -3, -2, -2, -2, -2,
-  -2, -1, -1, -1, -1, 0, 0, 0,
-  0, 0, 0, 1, 1, 1, 1, 1,
-  1, 2, 2, 2, 2, 2, 2, 2,
-  3, 3, 3, 3, 3, 3, 3, 4,
-  4, 4, 4, 4, 4, 4, 4, 5,
-  5, 5, 5, 5, 5, 5, 5, 5,
-  6, 6, 6, 6, 6, 6, 6, 6,
-  6, 7, 7, 7, 7, 7, 7, 7,
-  7, 7, 7, 8, 8, 8, 8, 8
-};
-
 /* back to your regularly scheduled definitions */
 
 static guint8 instr[MIDI_CHANNELS];
@@ -274,31 +254,32 @@
 
 void synth_setnote (int voice, int note, int bend)
 {
-    int n, fre, oct;
-    float delta;
+	int n, fre, oct;
+	float delta;
 
-    delta = 0;
+	delta = 0;
 
-    n = note % 12;
+	n = note % 12;
 
-    if (bend < 8192)
-      bend = 8192-bend;
-    delta = pow(2, (float) (bend%8192)/8192.0);
+	if (bend < 8192)
+	  bend = 8192-bend;
+	delta = pow(2, (float) (bend%8192)/8192.0);
 
-    if (bend > 8192)
-	    fre = ym3812_note[n]*delta; else
-		    fre = ym3812_note[n]/delta;
+	if (bend > 8192)
+		fre = (int)(ym3812_note[n]*delta);
+	else
+		fre = (int)(ym3812_note[n]/delta);
 
-    oct = note / 12 - 1;
+	oct = note / 12 - 1;
 
-    if (oct < 0)
-      oct = 0;
+	if (oct < 0)
+	  oct = 0;
 
-    opl_write(0xa0 + voice, fre & 0xff);
-    opl_write(0xb0 + voice,
-        0x20 | ((oct << 2) & 0x1c) | ((fre >> 8) & 0x03));
+	opl_write(0xa0 + voice, fre & 0xff);
+	opl_write(0xb0 + voice,
+		0x20 | ((oct << 2) & 0x1c) | ((fre >> 8) & 0x03));
 #ifdef DEBUG_ADLIB
-    printf("-- %02x %02x\n", adlib_reg_L[0xa0+voice], adlib_reg_L[0xb0+voice]);
+	printf("-- %02x %02x\n", adlib_reg_L[0xa0+voice], adlib_reg_L[0xb0+voice]);
 #endif
 
 }

Modified: scummvm/trunk/engines/sci/sfx/timer/timer_scummvm.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/timer/timer_scummvm.cpp	2009-02-15 14:52:51 UTC (rev 38247)
+++ scummvm/trunk/engines/sci/sfx/timer/timer_scummvm.cpp	2009-02-15 14:52:52 UTC (rev 38248)
@@ -48,5 +48,7 @@
 	DELAY/1000, 0,
 	NULL,
 	&scummvm_timer_start,
-	&scummvm_timer_stop
+	&scummvm_timer_stop,
+	0,
+	0
 	};


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list