[Scummvm-cvs-logs] CVS: scummvm Makefile.x11,NONE,1.1 gameDetector.cpp,1.24,1.25 script_v1.cpp,1.88,1.89 scummsys.h,1.29,1.30 sound.cpp,1.50,1.51 system.h,1.13,1.14 x11.cpp,1.13,1.14

Lionel Ulmer bbrox at users.sourceforge.net
Sat Apr 20 10:42:04 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv30845

Modified Files:
	gameDetector.cpp script_v1.cpp scummsys.h sound.cpp system.h 
	x11.cpp 
Added Files:
	Makefile.x11 
Log Message:
Commit of the X11 driver using the new OSystem interface. Plus some warning fixes and gameDetector hacks.


--- NEW FILE: Makefile.x11 ---
# $Header: /cvsroot/scummvm/scummvm/Makefile.x11,v 1.1 2002/04/20 17:41:41 bbrox Exp $

CC      = gcc
CFLAGS  = -g -O -Wall -Wstrict-prototypes -Wuninitialized -Wno-long-long -Wno-multichar -DCOMPRESSED_SOUND_FILE
DEFINES = -DUNIX_X11
LDFLAGS := -L/usr/X11R6/lib -L/usr/local/lib
INCLUDES:= -I/usr/X11R6/include -I./ -I./sound -I/usr/local/include
CPPFLAGS= $(DEFINES) $(INCLUDES)

# Add -lmad for -DCOMPRESSED_SOUND_FILE
LIBS	= -lXext -lX11 -lncurses -lm -lmad -lpthread
ZIPFILE := scummvm-`date '+%Y-%m-%d'`.zip

INCS	= scumm.h scummsys.h stdafx.h

OBJS	= actor.o boxes.o costume.o gfx.o object.o resource.o \
	saveload.o script.o scummvm.o sound.o string.o \
	sys.o verbs.o script_v1.o script_v2.o debug.o gui.o \
	sound/imuse.o sound/fmopl.o sound/mixer.o debugrl.o \
        akos.o vars.o insane.o gameDetector.o init.o mp3_cd.o\
	v3/resource_v3.o v4/resource_v4.o 2xsai.o main.o \
	simon/midi.o simon/simon.o simon/simonsys.o sound/mididrv.o x11.o

DISTFILES=$(OBJS:.o=.cpp) Makefile scumm.h scummsys.h stdafx.h stdafx.cpp \
	windows.cpp debugrl.h whatsnew.txt readme.txt copying.txt \
	scummvm.dsp scummvm.dsw sound/fmopl.h gui.h sound.h

.cpp.o:
	$(CC) $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o

all: scummvm

scummvm: $(OBJS)
	$(CC) $(LDFLAGS) -o $(@) $(OBJS) $(LIBS)

$(OBJS): Makefile

clean:
	rm -f $(OBJS) scummvm

dist:
	rm -f $(ZIPFILE)
	zip -q $(ZIPFILE) $(DISTFILES)

check:
$(OBJS): $(INCS)

Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gameDetector.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** gameDetector.cpp	19 Apr 2002 15:02:14 -0000	1.24
--- gameDetector.cpp	20 Apr 2002 17:41:41 -0000	1.25
***************
*** 341,350 ****
  
  	_gfx_mode = GFX_DOUBLESIZE;
- 	_gfx_driver = GD_AUTO;
- 
  	_sfx_volume = 100;
  
! #ifdef USE_NULL_DRIVER
  	_gfx_driver = GD_NULL;
  #endif
  
--- 341,359 ----
  
  	_gfx_mode = GFX_DOUBLESIZE;
  	_sfx_volume = 100;
  
! #if defined(USE_NULL_DRIVER)
  	_gfx_driver = GD_NULL;
+ #elif defined(__DC__)
+ 	_gfx_driver = GD_DC;
+ #elif defined(UNIX_X11)
+ 	_gfx_driver = GD_X;
+ #elif defined(__MORPHOS__)
+ 	_gfx_driver = GD_MORPHOS;
+ #elif defined(WIN32_WCE)
+ 	_gfx_driver = GD_WINCE;
+ #else
+ 	/* SDL is the default driver for now */
+ 	_gfx_driver = GD_SDL;
  #endif
  
***************
*** 397,435 ****
  
  OSystem *GameDetector::createSystem() {
- #ifdef __MORPHOS__
- 	_gfx_driver = GD_MORPHOS;
- #endif
  	/* auto is to use SDL */
  	switch(_gfx_driver) {
! #ifdef __DC__
! 	case GD_AUTO:
  		return OSystem_Dreamcast_create();
! #else
! 	case GD_SDL:
! 	case GD_AUTO:
! #ifdef _WIN32_WCE
  		return OSystem_WINCE3_create();
! #endif
! #if !defined(__MORPHOS__)
! 		return OSystem_SDL_create(_gfx_mode, _fullScreen);
! #endif
! 	case GD_WIN32:
! 		/* not implemented yet */
! 		break;
! 
! 	case GD_X:
! 		/* not implemented yet */
! 		break;
! 
  	case GD_MORPHOS:
- #if defined(__MORPHOS__)
  		return OSystem_MorphOS_create(_gameId, _gfx_mode, _fullScreen);
! #endif
! 		break;
! 
! #ifdef USE_NULL_DRIVER
  	case GD_NULL:
  		return OSystem_NULL_create();
! #endif
  #endif
  	}
--- 406,429 ----
  
  OSystem *GameDetector::createSystem() {
  	/* auto is to use SDL */
  	switch(_gfx_driver) {
! #if defined(UNIX_X11)
! 	case GD_X:
! 		return OSystem_X11_create();
! #elif defined(__DC__)
! 	case GD_DC:
  		return OSystem_Dreamcast_create();
! #elif defined(WIN32_WCE)
! 	case GD_WINCE:
  		return OSystem_WINCE3_create();
! #elif defined(__MORPHOS__)
  	case GD_MORPHOS:
  		return OSystem_MorphOS_create(_gameId, _gfx_mode, _fullScreen);
! #elif defined(USE_NULL_DRIVER)
  	case GD_NULL:
  		return OSystem_NULL_create();
! #else
! 	case GD_SDL:
! 		return OSystem_SDL_create(_gfx_mode, _fullScreen);
  #endif
  	}

Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.88
retrieving revision 1.89
diff -C2 -d -r1.88 -r1.89
*** script_v1.cpp	20 Apr 2002 10:10:35 -0000	1.88
--- script_v1.cpp	20 Apr 2002 17:41:41 -0000	1.89
***************
*** 912,916 ****
  	int i, j, k;
  	int16 table[16];
- 	byte origop = _opcode;
  	switch ((_opcode = fetchScriptByte()) & 0x1F) {
  	case 1:											/* cursor show */
--- 912,915 ----

Index: scummsys.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummsys.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** scummsys.h	20 Apr 2002 04:09:02 -0000	1.29
--- scummsys.h	20 Apr 2002 17:41:42 -0000	1.30
***************
*** 103,107 ****
  #define END_PACK_STRUCTS   pack(pop)
  
! #elif (defined(UNIX) || defined(__APPLE__))
  
  #define scumm_stricmp strcasecmp
--- 103,107 ----
  #define END_PACK_STRUCTS   pack(pop)
  
! #elif (defined(UNIX) || defined(__APPLE__) || defined(UNIX_X11))
  
  #define scumm_stricmp strcasecmp
***************
*** 109,112 ****
--- 109,119 ----
  #define CHECK_HEAP
  
+ #ifdef UNIX_X11
+ 
+ /* You need to set those manually */
+ #define SCUMM_LITTLE_ENDIAN
+ /* #define SCUMM_NEED_ALIGNMENT */
+ 
+ #else
  /* need this for the SDL_BYTEORDER define */
  #include <SDL_byteorder.h>
***************
*** 119,122 ****
--- 126,130 ----
  #else
  #error Neither SDL_BIG_ENDIAN nor SDL_LITTLE_ENDIAN is set.
+ #endif
  #endif
  

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51

Index: system.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/system.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** system.h	19 Apr 2002 06:23:48 -0000	1.13
--- system.h	20 Apr 2002 17:41:42 -0000	1.14
***************
*** 123,126 ****
--- 123,127 ----
  OSystem *OSystem_Dreamcast_create();
  OSystem *OSystem_WINCE3_create();
+ OSystem *OSystem_X11_create();
  
  enum {
***************
*** 136,146 ****
  /* Graphics drivers */
  enum {
! 	GD_AUTO = 0,
! 	GD_SDL = 1,
! 	GD_WIN32 = 2,
! 	GD_X = 3,
! 	GD_NULL = 4,
! 	GD_MORPHOS = 5,
! 	GD_WINCE = 6
  };
  
--- 137,146 ----
  /* Graphics drivers */
  enum {
! 	GD_NULL = 0,
! 	GD_SDL,
! 	GD_X,
! 	GD_MORPHOS,
! 	GD_WINCE,
! 	GD_DC
  };
  

Index: x11.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/x11.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** x11.cpp	17 Apr 2002 20:22:22 -0000	1.13
--- x11.cpp	20 Apr 2002 17:41:42 -0000	1.14
***************
*** 24,29 ****
  #include "stdafx.h"
  #include "scumm.h"
! #include "gui.h"
! #include "cdmusic.h"
  
  #include <sys/time.h>
--- 24,29 ----
  #include "stdafx.h"
  #include "scumm.h"
! #include "mididrv.h"
[...1290 lines suppressed...]
! 		case ConfigureNotify:{
! 			if ((window_width != event.xconfigure.width) ||
! 			    (window_height != event.xconfigure.height)) {
! 				window_width = event.xconfigure.width;
! 				window_height = event.xconfigure.height;
! 				scumm_x = (window_width - 320) / 2;
! 				scumm_y = (window_height - 200) / 2;
! 				XFillRectangle(display, window, black_gc, 0, 0, window_width, window_height);
! 			}
! 		}
! 		break;
  
! 		default:
! 			printf("Unhandled event : %d\n", event.type);
! 			break;
  		}
  	}
  
! 	return false;
  }





More information about the Scummvm-git-logs mailing list