You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(11) |
Apr
(47) |
May
(14) |
Jun
|
Jul
(73) |
Aug
(4) |
Sep
(2) |
Oct
(60) |
Nov
(48) |
Dec
(66) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(1) |
Mar
(27) |
Apr
(82) |
May
(89) |
Jun
(91) |
Jul
(44) |
Aug
(53) |
Sep
(113) |
Oct
(20) |
Nov
(37) |
Dec
(10) |
2008 |
Jan
|
Feb
(2) |
Mar
|
Apr
(2) |
May
(21) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
(76) |
Feb
(89) |
Mar
(52) |
Apr
(11) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(27) |
2010 |
Jan
(11) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(9) |
Sep
|
Oct
|
Nov
|
Dec
(14) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(11) |
Oct
(3) |
Nov
|
Dec
|
2013 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <eg...@us...> - 2006-05-03 09:32:26
|
Revision: 60 Author: egore Date: 2006-05-03 02:32:14 -0700 (Wed, 03 May 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=60&view=rev Log Message: ----------- complete the ranking matrix Modified Paths: -------------- data/Ships/Octavius/octavius_rankings.xml Modified: data/Ships/Octavius/octavius_rankings.xml =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-05-01 16:02:35
|
Revision: 59 Author: egore Date: 2006-05-01 08:59:17 -0700 (Mon, 01 May 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=59&view=rev Log Message: ----------- start working on interiour of bases Added Paths: ----------- data/BaseInterior/ data/BaseInterior/solrain.wings data/BaseInterior/utils_barrel.wings data/BaseInterior/utils_barrel_auv.png data/BaseInterior/utils_barrel_auv.svg data/BaseInterior/utils_box.wings data/BaseInterior/utils_box_box_auv.png data/BaseInterior/utils_box_box_auv.svg Added: data/BaseInterior/solrain.wings =================================================================== (Binary files differ) Property changes on: data/BaseInterior/solrain.wings ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/BaseInterior/utils_barrel.wings =================================================================== (Binary files differ) Property changes on: data/BaseInterior/utils_barrel.wings ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/BaseInterior/utils_barrel_auv.png =================================================================== (Binary files differ) Property changes on: data/BaseInterior/utils_barrel_auv.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/BaseInterior/utils_barrel_auv.svg =================================================================== (Binary files differ) Property changes on: data/BaseInterior/utils_barrel_auv.svg ___________________________________________________________________ Name: svn:mime-type + image/svg+xml Added: data/BaseInterior/utils_box.wings =================================================================== (Binary files differ) Property changes on: data/BaseInterior/utils_box.wings ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/BaseInterior/utils_box_box_auv.png =================================================================== (Binary files differ) Property changes on: data/BaseInterior/utils_box_box_auv.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/BaseInterior/utils_box_box_auv.svg =================================================================== (Binary files differ) Property changes on: data/BaseInterior/utils_box_box_auv.svg ___________________________________________________________________ Name: svn:mime-type + image/svg+xml This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-16 17:21:50
|
Revision: 58 Author: egore Date: 2006-04-16 10:20:46 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=58&view=rev Log Message: ----------- add some data copied from ogre Modified Paths: -------------- opengate.pws Added Paths: ----------- data/Makefile.am data/Makefile.in data/Menus/ data/Menus/ogre_menu.zip data/Misc/ Added: data/Makefile.am =================================================================== --- data/Makefile.am (rev 0) +++ data/Makefile.am 2006-04-16 17:20:46 UTC (rev 58) @@ -0,0 +1,20 @@ +## Process this file with automake to produce Makefile.in + +## Created by Anjuta - will be overwritten +## If you don't want it to overwrite it, +## Please disable it in the Anjuta project configuration + +opengate_datadir = $(prefix)/@NO_PREFIX_PACKAGE_DATA_DIR@/@PACKAGE@ + +opengate_data_DATA = \ + Ships/Octavius/Apteryx/octavius_apteryx.mesh\ + Ships/Quantar/Storm/quantar_storm.mesh\ + Menus/mainmenu.scheme\ + Materials/common.material\ + Materials/octavius_apteryx_auv.material\ + Materials/octavius_apteryx_auv.png\ + Materials/quantar_storm_auv.material\ + Materials/quantar_storm_auv.png\ + Materials/skybox.zip + +EXTRA_DIST = $(opengate_data_DATA) Property changes on: data/Makefile.am ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: data/Makefile.in =================================================================== --- data/Makefile.in (rev 0) +++ data/Makefile.in 2006-04-16 17:20:46 UTC (rev 58) @@ -0,0 +1,383 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = data +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(opengate_datadir)" +opengate_dataDATA_INSTALL = $(INSTALL_DATA) +DATA = $(opengate_data_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +NO_PREFIX_PACKAGE_DATA_DIR = @NO_PREFIX_PACKAGE_DATA_DIR@ +NO_PREFIX_PACKAGE_DOC_DIR = @NO_PREFIX_PACKAGE_DOC_DIR@ +NO_PREFIX_PACKAGE_HELP_DIR = @NO_PREFIX_PACKAGE_HELP_DIR@ +NO_PREFIX_PACKAGE_MENU_DIR = @NO_PREFIX_PACKAGE_MENU_DIR@ +NO_PREFIX_PACKAGE_PIXMAPS_DIR = @NO_PREFIX_PACKAGE_PIXMAPS_DIR@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_DATA_DIR = @PACKAGE_DATA_DIR@ +PACKAGE_DOC_DIR = @PACKAGE_DOC_DIR@ +PACKAGE_HELP_DIR = @PACKAGE_HELP_DIR@ +PACKAGE_MENU_DIR = @PACKAGE_MENU_DIR@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +opengate_datadir = $(prefix)/@NO_PREFIX_PACKAGE_DATA_DIR@/@PACKAGE@ +opengate_data_DATA = \ + Ships/Octavius/Apteryx/octavius_apteryx.mesh\ + Ships/Quantar/Storm/quantar_storm.mesh\ + Menus/mainmenu.scheme\ + Materials/common.material\ + Materials/octavius_apteryx_auv.material\ + Materials/octavius_apteryx_auv.png\ + Materials/quantar_storm_auv.material\ + Materials/quantar_storm_auv.png\ + Materials/skybox.zip + +EXTRA_DIST = $(opengate_data_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu data/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-opengate_dataDATA: $(opengate_data_DATA) + @$(NORMAL_INSTALL) + test -z "$(opengate_datadir)" || $(mkdir_p) "$(DESTDIR)$(opengate_datadir)" + @list='$(opengate_data_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(opengate_dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(opengate_datadir)/$$f'"; \ + $(opengate_dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(opengate_datadir)/$$f"; \ + done + +uninstall-opengate_dataDATA: + @$(NORMAL_UNINSTALL) + @list='$(opengate_data_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(opengate_datadir)/$$f'"; \ + rm -f "$(DESTDIR)$(opengate_datadir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + $(mkdir_p) $(distdir)/Materials $(distdir)/Menus $(distdir)/Ships/Octavius/Apteryx $(distdir)/Ships/Quantar/Storm + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(opengate_datadir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-opengate_dataDATA + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-opengate_dataDATA + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man \ + install-opengate_dataDATA install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am uninstall-opengate_dataDATA + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Property changes on: data/Makefile.in ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: data/Menus/ogre_menu.zip =================================================================== (Binary files differ) Property changes on: data/Menus/ogre_menu.zip ___________________________________________________________________ Name: svn:mime-type + application/zip Modified: opengate.pws =================================================================== --- opengate.pws 2006-04-16 16:46:32 UTC (rev 57) +++ opengate.pws 2006-04-16 17:20:46 UTC (rev 58) @@ -38,25 +38,8 @@ [Project State] clean before build=false -[filelist] -0=/home/egore/source/opengate/src/mouse.cpp -1=/home/egore/source/opengate/src/keyboard.cpp -2=/home/egore/source/opengate/include/avatar.h -3=/home/egore/source/opengate/src/avatar.cpp -4=/home/egore/source/opengate/include/keyboard.h -5=/home/egore/source/opengate/include/mouse.h -6=/home/egore/source/opengate/src/application.cpp -7=/home/egore/source/opengate/include/camera.h -8=/home/egore/source/opengate/src/camera.cpp -9=/home/egore/source/opengate/src/framelistener.cpp -10=/home/egore/source/opengate/include/application.h -11=/home/egore/source/opengate/include/framelistener.h - [Project Tree] 0=0 -1=0:0 -2=0:1 -3=0:2 [File Tree] 0=0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-16 16:46:42
|
Revision: 57 Author: egore Date: 2006-04-16 09:46:32 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=57&view=rev Log Message: ----------- bump project file, bump ChangeLog Modified Paths: -------------- ChangeLog opengate.prj opengate.pws po/POTFILES.in Modified: ChangeLog =================================================================== --- ChangeLog 2006-04-16 16:45:02 UTC (rev 56) +++ ChangeLog 2006-04-16 16:46:32 UTC (rev 57) @@ -1,3 +1,20 @@ +2006-04-16 Christoph Brill <eg...@us...> + + * src/movable_object.cpp, include/movable_object.h: introduce an + abstract class for moving objects by keyboard/mouse(/joystick) + +2006-04-15 Christoph Brill <eg...@us...> + + * src/gamestate.cpp, include/gamestate.h: add a simple gamestate for + introducing a CEGUI based UI + + * src/camera.cpp, include/camera.h, src/framelistener.cpp, + framelistner.h: split the camera into own files to strip the + framelistener down to a minimum + + * srC/keyboard.cpp, include/keyboard.h, src/mouse.cpp, src/mouse.h, + src/framelistener.cpp: split the keyboard and mouse to separate files + 2006-04-10 Christoph Brill <eg...@us...> * src/framelistener.cpp: add keybindings to movement @@ -2,4 +19,4 @@ - * src/avatar.cpp, src/avatar.h: implement movement based on orientation of - the ship + * src/avatar.cpp, src/avatar.h: implement movement based on orientation + of the ship @@ -23,8 +40,8 @@ * include/application.h, src/application.cpp: No longer derive from the ExampleFrameapplication - * include/framelistener.h, src/framelistener.cpp: No longer derive from the - ExampleFramelistener + * include/framelistener.h, src/framelistener.cpp: No longer derive from + the ExampleFramelistener 2006-04-08 Christoph Brill <eg...@us...> Modified: opengate.prj =================================================================== --- opengate.prj 2006-04-16 16:45:02 UTC (rev 56) +++ opengate.prj 2006-04-16 16:46:32 UTC (rev 57) @@ -70,8 +70,12 @@ application.h\ framelistener.h\ constants.h\ - optimize.h\ - avatar.h + avatar.h\ + keyboard.h\ + mouse.h\ + camera.h\ + gamestate.h\ + movable_object.h module.source.name=src module.source.type= @@ -79,7 +83,12 @@ main.cpp\ application.cpp\ framelistener.cpp\ - avatar.cpp + avatar.cpp\ + keyboard.cpp\ + mouse.cpp\ + camera.cpp\ + gamestate.cpp\ + movable_object.cpp module.pixmap.name=pixmaps module.pixmap.type= @@ -89,7 +98,14 @@ module.data.type= module.data.files=\ Ships/Octavius/Apteryx/octavius_apteryx.mesh\ - Ships/Quantar/Storm/quantar_storm.mesh + Ships/Quantar/Storm/quantar_storm.mesh\ + Menus/mainmenu.scheme\ + Materials/common.material\ + Materials/octavius_apteryx_auv.material\ + Materials/octavius_apteryx_auv.png\ + Materials/quantar_storm_auv.material\ + Materials/quantar_storm_auv.png\ + Materials/skybox.zip module.help.name=help module.help.type= Modified: opengate.pws =================================================================== --- opengate.pws 2006-04-16 16:45:02 UTC (rev 56) +++ opengate.pws 2006-04-16 16:46:32 UTC (rev 57) @@ -1,12 +1,17 @@ [filenumbers] -0=86 -1=1 -2=112 -3=86 -4=43 -5=58 -6=1 +0=37 +1=76 +2=1 +3=79 +4=41 +5=40 +6=163 +7=38 +8=74 +9=136 +10=98 +11=54 [filemarkers] 0= @@ -16,6 +21,11 @@ 4= 5= 6= +7= +8= +9= +10= +11= [File View] filter.file.unmatch=*.so *.o *.a *.la @@ -29,8 +39,18 @@ clean before build=false [filelist] -0=/home/egore/source/opengate/src/application.cpp -1=/home/egore/source/opengate/src/main.cpp +0=/home/egore/source/opengate/src/mouse.cpp +1=/home/egore/source/opengate/src/keyboard.cpp +2=/home/egore/source/opengate/include/avatar.h +3=/home/egore/source/opengate/src/avatar.cpp +4=/home/egore/source/opengate/include/keyboard.h +5=/home/egore/source/opengate/include/mouse.h +6=/home/egore/source/opengate/src/application.cpp +7=/home/egore/source/opengate/include/camera.h +8=/home/egore/source/opengate/src/camera.cpp +9=/home/egore/source/opengate/src/framelistener.cpp +10=/home/egore/source/opengate/include/application.h +11=/home/egore/source/opengate/include/framelistener.h [Project Tree] 0=0 Modified: po/POTFILES.in =================================================================== --- po/POTFILES.in 2006-04-16 16:45:02 UTC (rev 56) +++ po/POTFILES.in 2006-04-16 16:46:32 UTC (rev 57) @@ -9,5 +9,10 @@ src/application.cpp src/framelistener.cpp src/avatar.cpp +src/keyboard.cpp +src/mouse.cpp +src/camera.cpp +src/gamestate.cpp +src/movable_object.cpp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-16 16:45:24
|
Revision: 56 Author: egore Date: 2006-04-16 09:45:02 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=56&view=rev Log Message: ----------- break everything by splitting Modified Paths: -------------- src/Makefile.am src/Makefile.in src/application.cpp src/avatar.cpp src/framelistener.cpp src/resources.cfg Added Paths: ----------- src/camera.cpp src/gamestate.cpp src/keyboard.cpp src/mouse.cpp src/movable_object.cpp Modified: src/Makefile.am =================================================================== --- src/Makefile.am 2006-04-16 16:43:53 UTC (rev 55) +++ src/Makefile.am 2006-04-16 16:45:02 UTC (rev 56) @@ -18,7 +18,12 @@ main.cpp\ application.cpp\ framelistener.cpp\ - avatar.cpp + avatar.cpp\ + keyboard.cpp\ + mouse.cpp\ + camera.cpp\ + gamestate.cpp\ + movable_object.cpp opengate_LDFLAGS = \ -L/usr/local/lib Modified: src/Makefile.in =================================================================== --- src/Makefile.in 2006-04-16 16:43:53 UTC (rev 55) +++ src/Makefile.in 2006-04-16 16:45:02 UTC (rev 56) @@ -51,7 +51,9 @@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_opengate_OBJECTS = main.$(OBJEXT) application.$(OBJEXT) \ - framelistener.$(OBJEXT) avatar.$(OBJEXT) + framelistener.$(OBJEXT) avatar.$(OBJEXT) keyboard.$(OBJEXT) \ + mouse.$(OBJEXT) camera.$(OBJEXT) gamestate.$(OBJEXT) \ + movable_object.$(OBJEXT) opengate_OBJECTS = $(am_opengate_OBJECTS) opengate_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) @@ -207,7 +209,12 @@ main.cpp\ application.cpp\ framelistener.cpp\ - avatar.cpp + avatar.cpp\ + keyboard.cpp\ + mouse.cpp\ + camera.cpp\ + gamestate.cpp\ + movable_object.cpp opengate_LDFLAGS = \ -L/usr/local/lib @@ -288,8 +295,13 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avatar.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camera.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framelistener.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamestate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyboard.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mouse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movable_object.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ Modified: src/application.cpp =================================================================== --- src/application.cpp 2006-04-16 16:43:53 UTC (rev 55) +++ src/application.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -21,20 +21,43 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - + +#include <OgreNode.h> +#include <OgreEntity.h> +#include <OgreTextureManager.h> +#include <OgreViewport.h> +#include <CEGUI/elements/CEGUIPushButton.h> #include "application.h" #include "constants.h" -OpengateApp::OpengateApp() { - mFrameListener = 0; - mRoot = 0; +OpengateApp::OpengateApp() : mGUIRenderer(NULL), + mGUISystem(NULL), + mEditorGuiSheet(NULL){ + mFrameListener = NULL; + mRoot = NULL; } OpengateApp::~OpengateApp() { - if (mFrameListener) + if(mEditorGuiSheet) { + CEGUI::WindowManager::getSingleton().destroyWindow(mEditorGuiSheet); + } + if(mGUISystem) { + delete mGUISystem; + mGUISystem = 0; + } + if(mGUIRenderer) { + delete mGUIRenderer; + mGUIRenderer = 0; + } + if (mFrameListener) { delete mFrameListener; - if (mRoot) + } + if (mCamera) { + delete mCamera; + } + if (mRoot) { delete mRoot; + } } void OpengateApp::go(void) { @@ -48,8 +71,8 @@ } bool OpengateApp::setup(void) { - mRoot = new Root(); - + mRoot = new Ogre::Root(); + setupResources(); if (!configure()) @@ -58,7 +81,7 @@ chooseSceneManager(); // Set default mipmap level (NB some APIs ignore this) - TextureManager::getSingleton().setDefaultNumMipmaps(5); + Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5); // Create any resource listeners (for loading screens) createResourceListener(); @@ -67,9 +90,10 @@ // Create the scene createScene(); + + mCamera = new Camera(mSceneMgr, mWindow, mAvatarNode, true); - createCamera(); - createViewports(); + setupEventHandlers(); createFrameListener(); @@ -93,50 +117,41 @@ void OpengateApp::chooseSceneManager(void) { // Get the SceneManager, in this case a generic one - mSceneMgr = mRoot->getSceneManager(ST_GENERIC); + mSceneMgr = mRoot->getSceneManager(Ogre::ST_GENERIC); } -void OpengateApp::createCamera() { - // create the camera - mCamera = mSceneMgr->createCamera("PlayerCam"); +void OpengateApp::createScene() { + // create an ambient light for the scene + mSceneMgr->setAmbientLight(Ogre::ColourValue( 1, 1, 1 )); + mSceneMgr->setShadowTechnique(Ogre::SHADOWTYPE_STENCIL_ADDITIVE); + mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox"); - // set its position, direction - mCamera->setPosition(Vector3(0,10,50)); - mCamera->lookAt(Vector3(0,0,0)); - //mCamera->setAutoTracking (true, mAvatarNode); // The camera will always look at the camera target - //mCamera->setFixedYawAxis (true); // Needed because of auto tracking + // setup GUI system + mGUIRenderer = new CEGUI::OgreCEGUIRenderer(mWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mSceneMgr); + mGUISystem = new CEGUI::System(mGUIRenderer); + CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"TaharezLook.scheme"); + mGUISystem->setDefaultMouseCursor((CEGUI::utf8*)"TaharezLook", (CEGUI::utf8*)"MouseArrow"); + mGUISystem->setDefaultFont((CEGUI::utf8*)"Tahoma-12"); + mEditorGuiSheet= CEGUI::WindowManager::getSingleton().createWindow((CEGUI::utf8*)"DefaultWindow", (CEGUI::utf8*)"Sheet"); + mGUISystem->setGUISheet(mEditorGuiSheet); CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative); - mCamera->setNearClipDistance(5); -} + CEGUI::PushButton* quitButton = (CEGUI::PushButton*)CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/Button", (CEGUI::utf8*)"Quit"); + mEditorGuiSheet->addChildWindow(quitButton); + quitButton->setPosition(CEGUI::Point(1.0f, 1.0f)); + quitButton->setSize(CEGUI::Size(0.3f, 0.1f)); + quitButton->setText("Quit"); -void OpengateApp::createViewports() { - // Create one viewport, entire window - Viewport* vp = mWindow->addViewport(mCamera); - vp->setBackgroundColour(ColourValue(0,0,0)); - - // Alter the camera aspect ratio to match the viewport - mCamera->setAspectRatio(Real(vp->getActualWidth()) / Real(vp->getActualHeight())); -} - -void OpengateApp::createScene() { - // create an ambient light for the scene - mSceneMgr->setAmbientLight( ColourValue( 1, 1, 1 ) ); - mSceneMgr->setShadowTechnique( SHADOWTYPE_STENCIL_ADDITIVE ); - - mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox"); - // Create an entity - Entity* ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); + Ogre::Entity* ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); mAvatarNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); mAvatarNode->attachObject(ent); - mAvatarNode->setPosition(Vector3(0,0,30)); - mAvatarNode->rotate(Vector3(0.,1.,0.),Degree(-90)); - //mSightNode = node->createChildSceneNode ("Octavius Apteryx" + "_sight", Vector3 (0, 0, 100)); + mAvatarNode->setPosition(Ogre::Vector3(0,0,30)); + mAvatarNode->rotate(Ogre::Vector3(0.,1.,0.), Ogre::Degree(-90)); mAvatar = new Avatar(mAvatarNode); - ent = mSceneMgr->createEntity( "Quantar Storm", "Ships/Quantar/Storm/quantar_storm.mesh" ); - SceneNode* node2 = mSceneMgr->getRootSceneNode()->createChildSceneNode(); - node2->attachObject(ent); + //ent = mSceneMgr->createEntity( "Quantar Storm", "Ships/Quantar/Storm/quantar_storm.mesh" ); + //Ogre::SceneNode* node2 = mSceneMgr->getRootSceneNode()->createChildSceneNode(); + //node2->attachObject(ent); } void OpengateApp::destroyScene(void) { @@ -144,30 +159,30 @@ } void OpengateApp::createFrameListener(void) { - mFrameListener = new MyListener(mWindow, mCamera, mAvatar, false, false); + mFrameListener = new OpengateListener(mWindow, mCamera, mAvatar, mGUIRenderer); mFrameListener->showDebugOverlay(true); mRoot->addFrameListener(mFrameListener); } void OpengateApp::setupResources(void) { // Load resource paths from config file - ConfigFile cf; + Ogre::ConfigFile cf; cf.load("resources.cfg"); // Go through all sections & settings in the file - ConfigFile::SectionIterator seci = cf.getSectionIterator(); + Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator(); - String secName, typeName, archName; + Ogre::String secName, typeName, archName; while (seci.hasMoreElements()) { secName = seci.peekNextKey(); - ConfigFile::SettingsMultiMap *settings = seci.getNext(); - ConfigFile::SettingsMultiMap::iterator i; + Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext(); + Ogre::ConfigFile::SettingsMultiMap::iterator i; for (i = settings->begin(); i != settings->end(); ++i) { typeName = i->first; archName = i->second; - ResourceGroupManager::getSingleton().addResourceLocation( + Ogre::ResourceGroupManager::getSingleton().addResourceLocation( archName, typeName, secName); } } @@ -180,6 +195,15 @@ void OpengateApp::loadResources(void) { // Initialise, parse scripts etc - ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); + Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); +} +void OpengateApp::setupEventHandlers(void) { + CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton(); + wmgr.getWindow((CEGUI::utf8*)"Quit")->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&OpengateApp::handleQuit, this)); } + +bool OpengateApp::handleQuit(const CEGUI::EventArgs& e) { + static_cast<OpengateListener*>(mFrameListener)->requestShutdown(); + return true; +} Modified: src/avatar.cpp =================================================================== --- src/avatar.cpp 2006-04-16 16:43:53 UTC (rev 55) +++ src/avatar.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -2,8 +2,8 @@ * avatar.cpp * * Sun Apr 9 14:58:35 2006 - * Copyright 2006 User - * Email + * Copyright 2006 Christoph Brill + * Email <eg...@us...> ****************************************************************************/ /* @@ -24,11 +24,12 @@ #include "avatar.h" -Avatar::Avatar(SceneNode* node) { +Avatar::Avatar(Ogre::SceneNode* node) { mNode = node; - pitch = Radian(0.001396)*100; - roll = Radian(0.001222)*100; - yaw = Radian(0.001396)*100; + pitch = Ogre::Radian(0.001396)*100; + roll = Ogre::Radian(0.001222)*100; + yaw = Ogre::Radian(0.001396)*100; + mMoveEndOfFrame = false; //TODO } Avatar::~Avatar() { @@ -36,50 +37,61 @@ } bool Avatar::move(const int direction, float scale) { - Vector3 translateVector = mNode->getPosition(); - Quaternion newOrientation; + mTranslateVector = mNode->getPosition(); switch(direction) { case Avatar::LEFT: - translateVector += mNode->getOrientation () * Vector3 (0, 0, .1 * scale); + mTranslateVector += mNode->getOrientation () * Ogre::Vector3 (0, 0, .1 * scale); break; case Avatar::RIGHT: - translateVector -= mNode->getOrientation () * Vector3 (0, 0, .1 * scale); + mTranslateVector -= mNode->getOrientation () * Ogre::Vector3 (0, 0, .1 * scale); break; case Avatar::UP: - translateVector += mNode->getOrientation () * Vector3 (0, .1 * scale, 0); + mTranslateVector += mNode->getOrientation () * Ogre::Vector3 (0, .1 * scale, 0); break; case Avatar::DOWN: - translateVector -= mNode->getOrientation () * Vector3 (0, .1 * scale, 0); + mTranslateVector -= mNode->getOrientation () * Ogre::Vector3 (0, .1 * scale, 0); break; case Avatar::FRONT: - translateVector -= mNode->getOrientation () * Vector3 (1 * scale, 0, 0 ); + mTranslateVector -= mNode->getOrientation () * Ogre::Vector3 (1 * scale, 0, 0 ); break; case Avatar::BACK: - translateVector += mNode->getOrientation () * Vector3 (.5 * scale, 0, 0 ); + mTranslateVector += mNode->getOrientation () * Ogre::Vector3 (.5 * scale, 0, 0 ); break; + default: + break; + } + if (!mMoveEndOfFrame) { + mNode->setPosition(mTranslateVector); + } + return true; +} + +bool Avatar::rotate(int direction, Ogre::Degree scale) { + switch(direction) { case Avatar::YAW_LEFT: - newOrientation = Quaternion(yaw, Vector3::UNIT_Y); + mNewOrientation = Ogre::Quaternion(yaw*scale, Ogre::Vector3::UNIT_Y); break; case Avatar::YAW_RIGHT: - newOrientation = Quaternion(-yaw, Vector3::UNIT_Y); + mNewOrientation = Ogre::Quaternion(-yaw*scale, Ogre::Vector3::UNIT_Y); break; case Avatar::ROLL_LEFT: - newOrientation = Quaternion(roll, Vector3::UNIT_X); + mNewOrientation = Ogre::Quaternion(roll*scale, Ogre::Vector3::UNIT_X); break; case Avatar::ROLL_RIGHT: - newOrientation = Quaternion(-roll, Vector3::UNIT_X); + mNewOrientation = Ogre::Quaternion(-roll*scale, Ogre::Vector3::UNIT_X); break; case Avatar::PITCH_DOWN: - newOrientation = Quaternion(pitch, Vector3::UNIT_Z); + mNewOrientation = Ogre::Quaternion(pitch*scale, Ogre::Vector3::UNIT_Z); break; case Avatar::PITCH_UP: - newOrientation = Quaternion(-pitch, Vector3::UNIT_Z); + mNewOrientation = Ogre::Quaternion(-pitch*scale, Ogre::Vector3::UNIT_Z); break; default: - newOrientation = Quaternion(Degree(0), Vector3::UNIT_X); + mNewOrientation = Ogre::Quaternion(Ogre::Degree(0), Ogre::Vector3::UNIT_X); break; } - mNode->setPosition(translateVector); - mNode->rotate(newOrientation); + if (!mMoveEndOfFrame) { + mNode->rotate(mNewOrientation); + } return true; } Added: src/camera.cpp =================================================================== --- src/camera.cpp (rev 0) +++ src/camera.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -0,0 +1,134 @@ +/*************************************************************************** + * camera.cpp + * + * Sat Apr 15 17:51:12 2006 + * Copyright 2006 Christoph Brill + * Email <eg...@us...> + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <OgreViewport.h> +#include <OgreMath.h> +#include "camera.h" + +Camera::Camera(Ogre::SceneManager* sceneManager, Ogre::RenderWindow* window, Ogre::SceneNode* avatarNode, bool moveEndOfFrame) { + this->mMoveEndOfFrame = moveEndOfFrame; + + mCamera = NULL; + mRotX = 0; + mRotY = 0; + mTranslateVector = Ogre::Vector3::ZERO; + + createCamera(sceneManager, avatarNode); + createViewports(window); +} + +void Camera::createCamera(Ogre::SceneManager* sceneManager, Ogre::SceneNode* avatarNode) { + // create the camera + mCamera = sceneManager->createCamera("PlayerCam"); + + // set its position, direction + mCamera->setPosition(Ogre::Vector3(0,10,50)); + mCamera->lookAt(Ogre::Vector3(0,0,0)); + mCamera->setAutoTracking (true, avatarNode); // The camera will always look at the camera target + mCamera->setFixedYawAxis (true); // Needed because of auto tracking + mCamera->setNearClipDistance(5); +} + +void Camera::createViewports(Ogre::RenderWindow* window) { + // Create one viewport, entire window + Ogre::Viewport* vp = window->addViewport(mCamera); + vp->setBackgroundColour(Ogre::ColourValue(0,0,0)); + + // Alter the camera aspect ratio to match the viewport + mCamera->setAspectRatio(Ogre::Real(vp->getActualWidth()) / Ogre::Real(vp->getActualHeight())); +} + +void Camera::performMove() { + // Movement does not happen at once, so don't do it again at the end of the + // frame + if (!mMoveEndOfFrame) + return; + // Make all the changes to the camera + // Note that YAW direction is around a fixed axis (freelook style) rather + // than a natural YAW (e.g. airplane) + mCamera->rotate(mNewOrientation); + mCamera->moveRelative(mTranslateVector); +} + +bool Camera::move(const int direction, float scale) { + if (!mMoveEndOfFrame) { + reset(); + } + switch(direction) { + case Camera::LEFT: + mTranslateVector += Ogre::Vector3 (0, 0, .1 * scale); + break; + case Camera::RIGHT: + mTranslateVector -= Ogre::Vector3 (0, 0, .1 * scale); + break; + case Camera::UP: + mTranslateVector += Ogre::Vector3 (0, .1 * scale, 0); + break; + case Camera::DOWN: + mTranslateVector -= Ogre::Vector3 (0, .1 * scale, 0); + break; + case Camera::FRONT: + mTranslateVector -= Ogre::Vector3 (1 * scale, 0, 0 ); + break; + case Camera::BACK: + mTranslateVector += Ogre::Vector3 (.5 * scale, 0, 0 ); + break; + default: + break; + } + if (!mMoveEndOfFrame) { + mCamera->moveRelative(mTranslateVector); + } + return true; +} + +bool Camera::rotate(int direction, Ogre::Degree scale) { + switch(direction) { + case Camera::YAW_LEFT: + mNewOrientation = Ogre::Quaternion(scale, Ogre::Vector3::UNIT_Y); + break; + case Camera::YAW_RIGHT: + mNewOrientation = Ogre::Quaternion(-scale, Ogre::Vector3::UNIT_Y); + break; + case Camera::ROLL_LEFT: + mNewOrientation = Ogre::Quaternion(scale, Ogre::Vector3::UNIT_X); + break; + case Camera::ROLL_RIGHT: + mNewOrientation = Ogre::Quaternion(-scale, Ogre::Vector3::UNIT_X); + break; + case Camera::PITCH_DOWN: + mNewOrientation = Ogre::Quaternion(scale, Ogre::Vector3::UNIT_Z); + break; + case Camera::PITCH_UP: + mNewOrientation = Ogre::Quaternion(-scale, Ogre::Vector3::UNIT_Z); + break; + default: + mNewOrientation = Ogre::Quaternion(Ogre::Degree(0), Ogre::Vector3::UNIT_X); + break; + } + if (!mMoveEndOfFrame) { + mCamera->rotate(mNewOrientation); + } + return true; +} Property changes on: src/camera.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Modified: src/framelistener.cpp =================================================================== --- src/framelistener.cpp 2006-04-16 16:43:53 UTC (rev 55) +++ src/framelistener.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -23,27 +23,38 @@ */ #include "framelistener.h" +#include <OgreRenderTarget.h> +#include <OgreRenderWindow.h> +#include <OgreOverlayElement.h> +#include <OgreMaterialManager.h> -MyListener::MyListener(RenderWindow* win, Camera* cam, Avatar* avatar, - bool useBufferedInputKeys = false, - bool useBufferedInputMouse = false) { - mDebugOverlay = OverlayManager::getSingleton().getByName("Core/DebugOverlay"); - mUseBufferedInputKeys = useBufferedInputKeys; - mUseBufferedInputMouse = useBufferedInputMouse; - mInputTypeSwitchingOn = mUseBufferedInputKeys || mUseBufferedInputMouse; +CEGUI::MouseButton convertOgreButtonToCegui(int buttonID) { + switch (buttonID) { + case Ogre::MouseEvent::BUTTON0_MASK: + return CEGUI::LeftButton; + case Ogre::MouseEvent::BUTTON1_MASK: + return CEGUI::RightButton; + case Ogre::MouseEvent::BUTTON2_MASK: + return CEGUI::MiddleButton; + case Ogre::MouseEvent::BUTTON3_MASK: + return CEGUI::X1Button; + default: + return CEGUI::LeftButton; + } +} + +OpengateListener::OpengateListener( + Ogre::RenderWindow* win, Camera* cam, Avatar* avatar, CEGUI::Renderer* renderer) : mGUIRenderer(renderer){ + mDebugOverlay = Ogre::OverlayManager::getSingleton().getByName("Core/DebugOverlay"); + mInputTypeSwitchingOn = false; mRotateSpeed = 36; - mMoveSpeed = 100; + mMoveSpeed = 10; + mShutdownRequested = false; - if (mInputTypeSwitchingOn) { - mEventProcessor = new EventProcessor(); - mEventProcessor->initialise(win); - mEventProcessor->startProcessingEvents(); - mEventProcessor->addKeyListener(this); - mInputDevice = mEventProcessor->getInputReader(); - } else { - mInputDevice = PlatformManager::getSingleton().createInputReader(); - mInputDevice->initialise(win, true, true); - } + mInputDevice = Ogre::PlatformManager::getSingleton().createInputReader(); + mInputDevice->initialise(win, true, true); + mKeyboard = new Keyboard(mInputDevice, avatar, cam); + mMouse = new Mouse(mInputDevice, avatar); mCamera = cam; mWindow = win; @@ -52,52 +63,46 @@ mNumScreenShots = 0; mTimeUntilNextToggle = 0; mSceneDetailIndex = 0; - mMoveScale = 0.0f; - mRotScale = 0.0f; - mTranslateVector = Vector3::ZERO; mAniso = 1; - mFiltering = TFO_BILINEAR; + mFiltering = Ogre::TFO_BILINEAR; showDebugOverlay(true); } -MyListener::~MyListener() { - if (mInputTypeSwitchingOn) { - delete mEventProcessor; - } else { - PlatformManager::getSingleton().destroyInputReader( mInputDevice ); - } +OpengateListener::~OpengateListener() { + delete mKeyboard; + Ogre::PlatformManager::getSingleton().destroyInputReader(mInputDevice); } -void MyListener::updateStats() { - static String currFps = "Current FPS: "; - static String avgFps = "Average FPS: "; - static String bestFps = "Best FPS: "; - static String worstFps = "Worst FPS: "; - static String tris = "Triangle Count: "; +void OpengateListener::updateStats() { + static Ogre::String currFps = "Current FPS: "; + static Ogre::String avgFps = "Average FPS: "; + static Ogre::String bestFps = "Best FPS: "; + static Ogre::String worstFps = "Worst FPS: "; + static Ogre::String tris = "Triangle Count: "; // update stats when necessary try { // get the statistics from the window - const RenderTarget::FrameStats& stats = mWindow->getStatistics(); + const Ogre::RenderTarget::FrameStats& stats = mWindow->getStatistics(); // get overlay elements for the statistics - OverlayElement* guiAvg = OverlayManager::getSingleton().getOverlayElement("Core/AverageFps"); - OverlayElement* guiCurr = OverlayManager::getSingleton().getOverlayElement("Core/CurrFps"); - OverlayElement* guiBest = OverlayManager::getSingleton().getOverlayElement("Core/BestFps"); - OverlayElement* guiWorst = OverlayManager::getSingleton().getOverlayElement("Core/WorstFps"); - OverlayElement* guiTris = OverlayManager::getSingleton().getOverlayElement("Core/NumTris"); - OverlayElement* guiDbg = OverlayManager::getSingleton().getOverlayElement("Core/DebugText"); + Ogre::OverlayElement* guiAvg = Ogre::OverlayManager::getSingleton().getOverlayElement("Core/AverageFps"); + Ogre::OverlayElement* guiCurr = Ogre::OverlayManager::getSingleton().getOverlayElement("Core/CurrFps"); + Ogre::OverlayElement* guiBest = Ogre::OverlayManager::getSingleton().getOverlayElement("Core/BestFps"); + Ogre::OverlayElement* guiWorst = Ogre::OverlayManager::getSingleton().getOverlayElement("Core/WorstFps"); + Ogre::OverlayElement* guiTris = Ogre::OverlayManager::getSingleton().getOverlayElement("Core/NumTris"); + Ogre::OverlayElement* guiDbg = Ogre::OverlayManager::getSingleton().getOverlayElement("Core/DebugText"); // add textual context to the overlay elements - guiAvg->setCaption(avgFps + StringConverter::toString(stats.avgFPS)); - guiCurr->setCaption(currFps + StringConverter::toString(stats.lastFPS)); - guiBest->setCaption(bestFps + StringConverter::toString(stats.bestFPS) - +" "+StringConverter::toString(stats.bestFrameTime)+" ms"); - guiWorst->setCaption(worstFps + StringConverter::toString(stats.worstFPS) - +" "+StringConverter::toString(stats.worstFrameTime)+" ms"); - guiTris->setCaption(tris + StringConverter::toString(stats.triangleCount)); + guiAvg->setCaption(avgFps + Ogre::StringConverter::toString(stats.avgFPS)); + guiCurr->setCaption(currFps + Ogre::StringConverter::toString(stats.lastFPS)); + guiBest->setCaption(bestFps + Ogre::StringConverter::toString(stats.bestFPS) + +" "+Ogre::StringConverter::toString(stats.bestFrameTime)+" ms"); + guiWorst->setCaption(worstFps + Ogre::StringConverter::toString(stats.worstFPS) + +" "+Ogre::StringConverter::toString(stats.worstFrameTime)+" ms"); + guiTris->setCaption(tris + Ogre::StringConverter::toString(stats.triangleCount)); guiDbg->setCaption(mWindow->getDebugText()); } catch(...) { @@ -105,210 +110,7 @@ } } -bool MyListener::processUnbufferedKeyInput(const FrameEvent& evt) { - - // Move avatar forwards - if (mInputDevice->isKeyDown(KC_U)) { - mAvatar->move(Avatar::FRONT, mMoveScale); - } - - // Move avatar backwards - if (mInputDevice->isKeyDown(KC_N)) { - mAvatar->move(Avatar::BACK, mMoveScale); - } - - // Move avatar forwards - if (mInputDevice->isKeyDown(KC_I)) { - mAvatar->move(Avatar::PITCH_DOWN, mMoveScale); - } - - // Move avatar backwards - if (mInputDevice->isKeyDown(KC_K)) { - mAvatar->move(Avatar::PITCH_UP, mMoveScale); - } - - // Move avatar left - if (mInputDevice->isKeyDown(KC_J)) { - mAvatar->move(Avatar::YAW_LEFT, mMoveScale); - } - - // Move avatar right - if (mInputDevice->isKeyDown(KC_L)) { - mAvatar->move(Avatar::YAW_RIGHT, mMoveScale); - } - - // Move avatar up - if (mInputDevice->isKeyDown(KC_PERIOD)) { - mAvatar->move(Avatar::ROLL_RIGHT, mMoveScale); - } - - // Move avatar down - if (mInputDevice->isKeyDown(KC_COMMA)) { - mAvatar->move(Avatar::ROLL_LEFT, mMoveScale); - } - - // Move camera left - if (mInputDevice->isKeyDown(KC_A)) { - mTranslateVector.x = -mMoveScale; - } - - // Move camera right - if (mInputDevice->isKeyDown(KC_D)) { - mTranslateVector.x = mMoveScale; - } - - // Move camera forward - if (mInputDevice->isKeyDown(KC_UP) || mInputDevice->isKeyDown(KC_W) ) { - printf("Now\n"); - mTranslateVector.z = -mMoveScale; - } - - // Move camera backwards - if (mInputDevice->isKeyDown(KC_DOWN) || mInputDevice->isKeyDown(KC_S) ) { - mTranslateVector.z = mMoveScale; - } - - // Move camera up - if (mInputDevice->isKeyDown(KC_PGUP)) { - mTranslateVector.y = mMoveScale; - } - - // Move camera down - if (mInputDevice->isKeyDown(KC_PGDOWN)) { - mTranslateVector.y = -mMoveScale; - } - - // Rotate kamera right - if (mInputDevice->isKeyDown(KC_RIGHT)) { - mCamera->yaw(-mRotScale); - } - - // Rotate kamera left - if (mInputDevice->isKeyDown(KC_LEFT)) { - mCamera->yaw(mRotScale); - } - - // quit game - if( mInputDevice->isKeyDown(KC_ESCAPE)) { - return false; - } - - // enable immediate or buffered mouse input - if (mInputTypeSwitchingOn && mInputDevice->isKeyDown(KC_M) && mTimeUntilNextToggle <= 0) { - switchMouseMode(); - mTimeUntilNextToggle = 1; - } - - // enable immediate or buffered keyboard input - if (mInputTypeSwitchingOn && mInputDevice->isKeyDown(KC_K) && mTimeUntilNextToggle <= 0) { - switchKeyMode(); - mTimeUntilNextToggle = 1; - } - - // enable/disable statistics display - if (mInputDevice->isKeyDown(KC_F) && mTimeUntilNextToggle <= 0) { - mStatsOn = !mStatsOn; - showDebugOverlay(mStatsOn); - - mTimeUntilNextToggle = 1; - } - - // switch filtering - if (mInputDevice->isKeyDown(KC_T) && mTimeUntilNextToggle <= 0) { - switch(mFiltering) { - case TFO_BILINEAR: - mFiltering = TFO_TRILINEAR; - mAniso = 1; - break; - case TFO_TRILINEAR: - mFiltering = TFO_ANISOTROPIC; - mAniso = 8; - break; - case TFO_ANISOTROPIC: - mFiltering = TFO_BILINEAR; - mAniso = 1; - break; - default: - break; - } - MaterialManager::getSingleton().setDefaultTextureFiltering(mFiltering); - MaterialManager::getSingleton().setDefaultAnisotropy(mAniso); - - showDebugOverlay(mStatsOn); - - mTimeUntilNextToggle = 1; - } - - // create screenshot - if (mInputDevice->isKeyDown(KC_SYSRQ) && mTimeUntilNextToggle <= 0) { - char tmp[20]; - sprintf(tmp, "screenshot_%d.png", ++mNumScreenShots); - mWindow->writeContentsToFile(tmp); - mTimeUntilNextToggle = 0.5; - mWindow->setDebugText(String("Wrote ") + tmp); - } - - // switch rendermode - if (mInputDevice->isKeyDown(KC_R) && mTimeUntilNextToggle <=0) { - mSceneDetailIndex = (mSceneDetailIndex+1)%3; - switch(mSceneDetailIndex) { - case 0 : mCamera->setDetailLevel(SDL_SOLID) ; break ; - case 1 : mCamera->setDetailLevel(SDL_WIREFRAME) ; break ; - case 2 : mCamera->setDetailLevel(SDL_POINTS) ; break ; - } - mTimeUntilNextToggle = 1; - } - - static bool displayCameraDetails = false; - if (mInputDevice->isKeyDown(KC_P) && mTimeUntilNextToggle <= 0) - { - - displayCameraDetails = !displayCameraDetails; - mTimeUntilNextToggle = 1; - if (!displayCameraDetails) - mWindow->setDebugText(""); - } - if (displayCameraDetails) - { - // Print camera details - mWindow->setDebugText("P: " + StringConverter::toString(mCamera->getDerivedPosition()) + " " + - "O: " + StringConverter::toString(mCamera->getDerivedOrientation())); - } - - // Return true to continue rendering - return true; -} - -bool MyListener::processUnbufferedMouseInput(const FrameEvent& evt) { - /* Rotation factors, may not be used if the second mouse button is pressed. */ - - /* If the second mouse button is pressed, then the mouse movement results in - sliding the camera, otherwise we rotate. */ - if( mInputDevice->getMouseButton(1)) { - mTranslateVector.x += mInputDevice->getMouseRelativeX() * 0.13; - mTranslateVector.y -= mInputDevice->getMouseRelativeY() * 0.13; - } - else { - mRotX = Degree(-mInputDevice->getMouseRelativeX() * 0.13); - mRotY = Degree(-mInputDevice->getMouseRelativeY() * 0.13); - } - - return true; -} - -void MyListener::moveCamera() { - if (mTranslateVector != Vector3::ZERO) - printf("Then\n"); - // Make all the changes to the camera - // Note that YAW direction is around a fixed axis (freelook style) rather - // than a natural YAW (e.g. airplane) - mCamera->yaw(mRotX); - mCamera->pitch(mRotY); - //TODO:mCamera->roll - mCamera->moveRelative(mTranslateVector); -} - -void MyListener::showDebugOverlay(bool show) { +void OpengateListener::showDebugOverlay(bool show) { if (mDebugOverlay) { if (show) { mDebugOverlay->show(); @@ -318,88 +120,66 @@ } } -bool MyListener::frameStarted(const FrameEvent& evt) { +bool OpengateListener::frameStarted(const Ogre::FrameEvent& evt) { if(mWindow->isClosed()) return false; - if (!mInputTypeSwitchingOn) { - mInputDevice->capture(); - } + mInputDevice->capture(); - if ( !mUseBufferedInputMouse || !mUseBufferedInputKeys) { - // one of the input modes is immediate, so setup what is needed for - // immediate mouse/key movement - if (mTimeUntilNextToggle >= 0) { - mTimeUntilNextToggle -= evt.timeSinceLastFrame; - } + // one of the input modes is immediate, so setup what is needed for + // immediate mouse/key movement + if (mTimeUntilNextToggle >= 0) { + mTimeUntilNextToggle -= evt.timeSinceLastFrame; + } - // If this is the first frame, pick a speed - if (evt.timeSinceLastFrame == 0) { - mMoveScale = 1; - mRotScale = 0.1; + // If this is the first frame, pick a speed + if (evt.timeSinceLastFrame == 0) { + mKeyboard->setScale(1.0); + mMouse->setScale(Ogre::Degree(0.1)); - // Otherwise scale movement units by time passed since last frame - } else { - // Move about 100 units per second, - mMoveScale = mMoveSpeed * evt.timeSinceLastFrame; - // Take about 10 seconds for full rotation - mRotScale = mRotateSpeed * evt.timeSinceLastFrame; - } - mRotX = 0; - mRotY = 0; - mTranslateVector = Vector3::ZERO; + // Otherwise scale movement units by time passed since last frame + } else { + // Move about 100 units per second, + mKeyboard->setScale(mMoveSpeed * evt.timeSinceLastFrame); + // Take about 10 seconds for full rotation + mMouse->setScale(mRotateSpeed * evt.timeSinceLastFrame); } + mCamera->reset(); - if (mUseBufferedInputKeys) { - // no need to do any processing here, it is handled by event - // processor and you get the results as KeyEvents - } else { - if (processUnbufferedKeyInput(evt) == false) { - // Game quit - return false; - } - } + if (mKeyboard->processKeyInput(evt) == false) { + // Game quit + return false; + } - if (mUseBufferedInputMouse) { - // no need to do any processing here, it is handled by event - // processor and you get the results as KeyEvents - } else { - if (processUnbufferedMouseInput(evt) == false) { - // Game quit - return false; - } - } + if (mMouse->processMouseInput(evt) == false) { + // Game quit + return false; + } // one of the input modes is immediate, so update the movement vector - if ( !mUseBufferedInputMouse || !mUseBufferedInputKeys) { - moveCamera(); - } + mCamera->performMove(); return true; } -bool MyListener::frameEnded(const FrameEvent& evt) { +bool OpengateListener::frameEnded(const Ogre::FrameEvent& evt) { + if (mShutdownRequested) { + return false; + } updateStats(); return true; } -void MyListener::switchMouseMode() { +void OpengateListener::requestShutdown() { + mShutdownRequested = true; +} + +void OpengateListener::switchMouseMode() { mUseBufferedInputMouse = !mUseBufferedInputMouse; mInputDevice->setBufferedInput(mUseBufferedInputKeys, mUseBufferedInputMouse); } -void MyListener::switchKeyMode() { +void OpengateListener::switchKeyMode() { mUseBufferedInputKeys = !mUseBufferedInputKeys; mInputDevice->setBufferedInput(mUseBufferedInputKeys, mUseBufferedInputMouse); } - -void MyListener::keyClicked(KeyEvent* e) { - if (e->getKeyChar() == 'm') { - switchMouseMode(); - } else if (e->getKeyChar() == 'k') { - switchKeyMode(); - } -} - -void MyListener::keyPressed(KeyEvent* e) {} -void MyListener::keyReleased(KeyEvent* e) {} Added: src/gamestate.cpp =================================================================== --- src/gamestate.cpp (rev 0) +++ src/gamestate.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -0,0 +1,41 @@ +/*************************************************************************** + * gamestate.cpp + * + * Sat Apr 15 18:18:13 2006 + * Copyright 2006 Christoph Brill + * Email <eg...@us...> + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "gamestate.h" + +Gamestate::Gamestate() { + mActivestate = Gamestate::GAME; +} + +bool Gamestate::setGamestate(int state) { + if ((state < Gamestate::MIN) || (state > Gamestate::MAX)) { + return false; + } + mActivestate = state; + return true; +} + +int Gamestate::getGamestate() { + return mActivestate; +} Property changes on: src/gamestate.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Added: src/keyboard.cpp =================================================================== --- src/keyboard.cpp (rev 0) +++ src/keyboard.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -0,0 +1,199 @@ +/*************************************************************************** + * keyboard.cpp + * + * Sat Apr 15 16:31:18 2006 + * Copyright 2006 Christoph Brill + * Email <eg...@us...> + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "keyboard.h" + +Keyboard::Keyboard(Ogre::InputReader* inputDevice, Avatar* avatar, Camera* camera) { + this->mInputDevice = inputDevice; + this->mAvatar = avatar; + this->mCamera = camera; +} + +bool Keyboard::processKeyInput(const Ogre::FrameEvent& evt) { + Ogre::Vector3 translateVector = Ogre::Vector3::ZERO; + //Ogre::Radian rotX = 0; + //Ogre::Radian rotY = 0; + + // Move avatar forwards + if (mInputDevice->isKeyDown(Ogre::KC_U)) { + mAvatar->move(Avatar::FRONT, mMoveScale); + } + + // Move avatar backwards + if (mInputDevice->isKeyDown(Ogre::KC_N)) { + mAvatar->move(Avatar::BACK, mMoveScale); + } + + // Move avatar forwards + if (mInputDevice->isKeyDown(Ogre::KC_I)) { + mAvatar->move(Avatar::PITCH_DOWN, mMoveScale); + } + + // Move avatar backwards + if (mInputDevice->isKeyDown(Ogre::KC_K)) { + mAvatar->move(Avatar::PITCH_UP, mMoveScale); + } + + // Move avatar left + if (mInputDevice->isKeyDown(Ogre::KC_J)) { + mAvatar->move(Avatar::YAW_LEFT, mMoveScale); + } + + // Move avatar right + if (mInputDevice->isKeyDown(Ogre::KC_L)) { + mAvatar->move(Avatar::YAW_RIGHT, mMoveScale); + } + + // Move avatar up + if (mInputDevice->isKeyDown(Ogre::KC_PERIOD)) { + mAvatar->move(Avatar::ROLL_RIGHT, mMoveScale); + } + + // Move avatar down + if (mInputDevice->isKeyDown(Ogre::KC_COMMA)) { + mAvatar->move(Avatar::ROLL_LEFT, mMoveScale); + } + + // Move camera left + if (mInputDevice->isKeyDown(Ogre::KC_A)) { + mCamera->move(Camera::YAW_LEFT, mMoveScale); + } + + // Move camera right + if (mInputDevice->isKeyDown(Ogre::KC_D)) { + mCamera->move(Camera::YAW_RIGHT, mMoveScale); + } + + // Move camera forward + if (mInputDevice->isKeyDown(Ogre::KC_UP) || mInputDevice->isKeyDown(Ogre::KC_W) ) { + mCamera->move(Camera::FRONT, mMoveScale); + } + + // Move camera backwards + if (mInputDevice->isKeyDown(Ogre::KC_DOWN) || mInputDevice->isKeyDown(Ogre::KC_S) ) { + mCamera->move(Camera::BACK, mMoveScale); + } + + // Move camera up + if (mInputDevice->isKeyDown(Ogre::KC_PGUP)) { + mCamera->move(Camera::UP, mMoveScale); + } + + // Move camera down + if (mInputDevice->isKeyDown(Ogre::KC_PGDOWN)) { + mCamera->move(Camera::DOWN, mMoveScale); + } + + // Rotate kamera right + if (mInputDevice->isKeyDown(Ogre::KC_RIGHT)) { + //rotX = -mRotScale; + } + + // Rotate kamera left + if (mInputDevice->isKeyDown(Ogre::KC_LEFT)) { + //rotX = mRotScale; + } + + // quit game + if( mInputDevice->isKeyDown(Ogre::KC_ESCAPE)) { + return false; + } + + /*// enable/disable statistics display + if (mInputDevice->isKeyDown(Ogre::KC_F) && mTimeUntilNextToggle <= 0) { + mStatsOn = !mStatsOn; + showDebugOverlay(mStatsOn); + + mTimeUntilNextToggle = 1; + }TODO*/ + + /*// switch filtering + if (mInputDevice->isKeyDown(Ogre::KC_T) && mTimeUntilNextToggle <= 0) { + switch(mFiltering) { + case TFO_BILINEAR: + mFiltering = TFO_TRILINEAR; + mAniso = 1; + break; + case TFO_TRILINEAR: + mFiltering = TFO_ANISOTROPIC; + mAniso = 8; + break; + case TFO_ANISOTROPIC: + mFiltering = TFO_BILINEAR; + mAniso = 1; + break; + default: + break; + } + MaterialManager::getSingleton().setDefaultTextureFiltering(mFiltering); + MaterialManager::getSingleton().setDefaultAnisotropy(mAniso); + + showDebugOverlay(mStatsOn); + + mTimeUntilNextToggle = 1; + }TODO*/ + + // create screenshot + /*if (mInputDevice->isKeyDown(Ogre::KC_SYSRQ) && mTimeUntilNextToggle <= 0) { + char tmp[20]; + sprintf(tmp, "screenshot_%d.png", ++mNumScreenShots); + mWindow->writeContentsToFile(tmp); + mTimeUntilNextToggle = 0.5; + mWindow->setDebugText(String("Wrote ") + tmp); + }*/ + + // switch rendermode + /*if (mInputDevice->isKeyDown(Ogre::KC_R) && mTimeUntilNextToggle <=0) { + mSceneDetailIndex = (mSceneDetailIndex+1)%3; + switch(mSceneDetailIndex) { + case 0 : mCamera->setDetailLevel(Ogre::SDL_SOLID) ; break ; + case 1 : mCamera->setDetailLevel(Ogre::SDL_WIREFRAME) ; break ; + case 2 : mCamera->setDetailLevel(Ogre::SDL_POINTS) ; break ; + } + mTimeUntilNextToggle = 1; + }*/ + + /*static bool displayCameraDetails = false; + if (mInputDevice->isKeyDown(KC_P) && mTimeUntilNextToggle <= 0) + { + + displayCameraDetails = !displayCameraDetails; + mTimeUntilNextToggle = 1; + if (!displayCameraDetails) + mWindow->setDebugText(""); + } + if (displayCameraDetails) + { + // Print camera details + mWindow->setDebugText("P: " + StringConverter::toString(mCamera->getDerivedPosition()) + " " + + "O: " + StringConverter::toString(mCamera->getDerivedOrientation())); + }*/ + + // Return true to continue rendering + return true; +} + +void Keyboard::setScale(float moveScale) { + mMoveScale = moveScale; +} Property changes on: src/keyboard.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Added: src/mouse.cpp =================================================================== --- src/mouse.cpp (rev 0) +++ src/mouse.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -0,0 +1,50 @@ +/*************************************************************************** + * mouse.cpp + * + * Sat Apr 15 16:55:56 2006 + * Copyright 2006 Christoph Brill + * Email <eg...@us...> + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "mouse.h" + +Mouse::Mouse(Ogre::InputReader* inputDevice, Avatar* avatar) { + this->mInputDevice = inputDevice; + this->mAvatar = avatar; + this->mTranslateVector = Ogre::Vector3::ZERO; +} + +bool Mouse::processMouseInput(const Ogre::FrameEvent& evt) { + /* Rotation factors, may not be used if the second mouse button is pressed. */ + + /* If the second mouse button is pressed, then the mouse movement results in + sliding the camera, otherwise we rotate. */ + if (mInputDevice->getMouseButton(1)) { + mAvatar->move(Avatar::LEFT, (mInputDevice->getMouseRelativeX() * 0.13)); + mAvatar->move(Avatar::DOWN, (mInputDevice->getMouseRelativeY() * 0.13)); + } else { + mAvatar->rotate(Avatar::YAW_RIGHT, Ogre::Degree(mInputDevice->getMouseRelativeX() * 0.13)); + mAvatar->rotate(Avatar::PITCH_DOWN, Ogre::Degree(mInputDevice->getMouseRelativeY() * 0.13)); + } + return true; +} + +void Mouse::setScale(Ogre::Degree rotScale) { + mRotScale = rotScale; +} Property changes on: src/mouse.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Added: src/movable_object.cpp =================================================================== --- src/movable_object.cpp (rev 0) +++ src/movable_object.cpp 2006-04-16 16:45:02 UTC (rev 56) @@ -0,0 +1,31 @@ +/*************************************************************************** + * movable_object.cpp + * + * Sun Apr 16 15:55:48 2006 + * Copyright 2006 Christoph Brill + * Email <eg...@us...> + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "movable_object.h" + +void MovableObject::reset() { + //mRotX = 0; + //mRotY = 0; + mTranslateVector = Ogre::Vector3::ZERO; +} Property changes on: src/movable_object.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Modified: src/resources.cfg =================================================================== --- src/resources.cfg 2006-04-16 16:43:53 UTC (rev 55) +++ src/resources.cfg 2006-04-16 16:45:02 UTC (rev 56) @@ -7,4 +7,5 @@ [General] FileSystem=../data FileSystem=../data/Materials +FileSystem=../data/Menus Zip=../data/Materials/skybox.zip This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-16 16:44:05
|
Revision: 55 Author: egore Date: 2006-04-16 09:43:53 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=55&view=rev Log Message: ----------- reclaim copyrights Modified Paths: -------------- include/avatar.h include/camera.h include/gamestate.h include/keyboard.h include/mouse.h include/movable_object.h Modified: include/avatar.h =================================================================== --- include/avatar.h 2006-04-16 16:35:29 UTC (rev 54) +++ include/avatar.h 2006-04-16 16:43:53 UTC (rev 55) @@ -2,8 +2,8 @@ * avatar.h * * Sun Apr 9 14:58:04 2006 - * Copyright 2006 User - * Email + * Copyright 2006 Christoph Brill + * Email <eg...@us...> ****************************************************************************/ /* Modified: include/camera.h =================================================================== --- include/camera.h 2006-04-16 16:35:29 UTC (rev 54) +++ include/camera.h 2006-04-16 16:43:53 UTC (rev 55) @@ -2,8 +2,8 @@ * camera.h * * Sat Apr 15 17:51:35 2006 - * Copyright 2006 User - * Email + * Copyright 2006 Christoph Brill + * Email <eg...@us...> ****************************************************************************/ /* Modified: include/gamestate.h =================================================================== --- include/gamestate.h 2006-04-16 16:35:29 UTC (rev 54) +++ include/gamestate.h 2006-04-16 16:43:53 UTC (rev 55) @@ -2,8 +2,8 @@ * gamestate.h * * Sat Apr 15 18:17:42 2006 - * Copyright 2006 User - * Email + * Copyright 2006 Christoph Brill + * Email <eg...@us...> ****************************************************************************/ /* Modified: include/keyboard.h =================================================================== --- include/keyboard.h 2006-04-16 16:35:29 UTC (rev 54) +++ include/keyboard.h 2006-04-16 16:43:53 UTC (rev 55) @@ -2,8 +2,8 @@ * keyboard.h * * Sat Apr 15 16:31:36 2006 - * Copyright 2006 User - * Email + * Copyright 2006 Christoph Brill + * Email <eg...@us...> ****************************************************************************/ /* Modified: include/mouse.h =================================================================== --- include/mouse.h 2006-04-16 16:35:29 UTC (rev 54) +++ include/mouse.h 2006-04-16 16:43:53 UTC (rev 55) @@ -2,8 +2,8 @@ * mouse.h * * Sat Apr 15 16:55:15 2006 - * Copyright 2006 User - * Email + * Copyright 2006 Christoph Brill + * Email <eg...@us...> ****************************************************************************/ /* Modified: include/movable_object.h =================================================================== --- include/movable_object.h 2006-04-16 16:35:29 UTC (rev 54) +++ include/movable_object.h 2006-04-16 16:43:53 UTC (rev 55) @@ -2,8 +2,8 @@ * movable_object.h * * Sun Apr 16 15:30:28 2006 - * Copyright 2006 Christoph Brill <eg...@us...> - * Email + * Copyright 2006 Christoph Brill + * Email <eg...@us...> ****************************************************************************/ /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-16 16:35:59
|
Revision: 54 Author: egore Date: 2006-04-16 09:35:29 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=54&view=rev Log Message: ----------- split the game even further into more object oriented stuff, breaks pretty much everything Modified Paths: -------------- include/Makefile.am include/Makefile.in include/application.h include/avatar.h include/framelistener.h Added Paths: ----------- include/camera.h include/gamestate.h include/keyboard.h include/mouse.h include/movable_object.h Modified: include/Makefile.am =================================================================== --- include/Makefile.am 2006-04-14 14:29:31 UTC (rev 53) +++ include/Makefile.am 2006-04-16 16:35:29 UTC (rev 54) @@ -10,7 +10,11 @@ application.h\ framelistener.h\ constants.h\ - optimize.h\ - avatar.h + avatar.h\ + keyboard.h\ + mouse.h\ + camera.h\ + gamestate.h\ + movable_object.h EXTRA_DIST = $(opengate_include_DATA) Modified: include/Makefile.in =================================================================== --- include/Makefile.in 2006-04-14 14:29:31 UTC (rev 53) +++ include/Makefile.in 2006-04-16 16:35:29 UTC (rev 54) @@ -187,7 +187,13 @@ opengate_include_DATA = \ application.h\ framelistener.h\ - constants.h + constants.h\ + avatar.h\ + keyboard.h\ + mouse.h\ + camera.h\ + gamestate.h\ + movable_object.h EXTRA_DIST = $(opengate_include_DATA) all: all-am Modified: include/application.h =================================================================== --- include/application.h 2006-04-14 14:29:31 UTC (rev 53) +++ include/application.h 2006-04-16 16:35:29 UTC (rev 54) @@ -25,10 +25,13 @@ #ifndef _APPLICATION_H #define _APPLICATION_H -#include <Ogre.h> #include <OgreConfigFile.h> +#include <OgreRoot.h> +#include <OgreCamera.h> +#include <OgreRenderWindow.h> #include "framelistener.h" #include "avatar.h" +#include "camera.h" #ifdef __cplusplus extern "C" @@ -60,15 +63,22 @@ protected: + CEGUI::OgreCEGUIRenderer* mGUIRenderer; + CEGUI::System* mGUISystem; + CEGUI::Window* mEditorGuiSheet; + Avatar* mAvatar; - SceneNode* mAvatarNode; + Ogre::SceneNode* mAvatarNode; - Root* mRoot; - Camera* mCamera; - SceneManager* mSceneMgr; - MyListener* mFrameListener; - RenderWindow* mWindow; + Ogre::Root* mRoot; + Camera* mCamera; + Ogre::SceneManager* mSceneMgr; + OpengateListener* mFrameListener; + Ogre::RenderWindow* mWindow; + + Ogre::SceneManager* mGuiSceneMgr; + /** Sets up the application - returns false if the user chooses to abandon configuration. */ bool setup(void); @@ -86,14 +96,6 @@ */ void createCamera(); - /*! \brief Creates a viewport with the given cameras for the scene - * - * This method creates the viewport to the scene. This is what the user will - * actually see when playing the game. The viewport uses the given cameras - * to get its picture. - */ - virtual void createViewports(void); - /*! \brief Define what is in the scene * * This method created an initial scene. So here some common things will be @@ -120,6 +122,9 @@ /// Must at least do ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); virtual void loadResources(void); + void setupEventHandlers(void); + + bool handleQuit(const CEGUI::EventArgs& e); }; #ifdef __cplusplus Modified: include/avatar.h =================================================================== --- include/avatar.h 2006-04-14 14:29:31 UTC (rev 53) +++ include/avatar.h 2006-04-16 16:35:29 UTC (rev 54) @@ -26,23 +26,24 @@ #define _AVATAR_H #include <OgreSceneNode.h> +#include "movable_object.h" #ifdef __cplusplus extern "C" { #endif -using namespace Ogre; - -class Avatar { +class Avatar : public MovableObject { public: /*! \brief Creates the avatar (not the graphical representation, the real - * one + * one) */ - Avatar(SceneNode* node); + Avatar(Ogre::SceneNode* node); + /*! \brief Destroys the avatar */ ~Avatar(); + /*! \brief Moves the avatar * * \param direction The direction the avatar is moving (i.e. Avatar::LEFT) @@ -51,39 +52,29 @@ * * This method moves the avatar in a given direction with a given scale */ - bool move(const int direction, float scale); + virtual bool move(const int direction, float scale); - /*! Direction: left */ - static const int LEFT = 1; - /*! Direction: left */ - static const int RIGHT = 2; - /*! Direction: left */ - static const int FRONT = 3; - /*! Direction: left */ - static const int BACK = 4; - /*! Direction: left */ - static const int UP = 5; - /*! Direction: left */ - static const int DOWN = 6; - - static const int YAW_LEFT = 7; - static const int YAW_RIGHT = 8; - static const int ROLL_LEFT = 9; - static const int ROLL_RIGHT = 10; - static const int PITCH_UP = 11; - static const int PITCH_DOWN = 12; - -private: - /*! Handle to the node the avatar is attached to + /*! \brief Rotates the avatar + * + * This method rotates the avatar in a given direction with a given scale + * + * \param direction The direction the avatar is rotating (i.e. + * Avatar::YAW_LEFT) + * \param scale The degree the avatar is direction (based on the time + * elapsed since the last frame) */ - SceneNode* mNode; + virtual bool rotate(int direction, Ogre::Degree scale); - /*! Value that the players avatar can pitch */ - Radian pitch; - /*! Value that the players avatar can yaw */ - Radian yaw; - /*! Value that the players avatar can roll */ - Radian roll; + virtual void performMove() {}; +private: + /*! Handle to the node the avatar is attached to */ + Ogre::SceneNode* mNode; + /*! Value that the players avatar can pitch in one frame */ + Ogre::Radian pitch; + /*! Value that the players avatar can yaw in one frame */ + Ogre::Radian yaw; + /*! Value that the players avatar can roll in one frame */ + Ogre::Radian roll; }; #ifdef __cplusplus Added: include/camera.h =================================================================== --- include/camera.h (rev 0) +++ include/camera.h 2006-04-16 16:35:29 UTC (rev 54) @@ -0,0 +1,103 @@ +/*************************************************************************** + * camera.h + * + * Sat Apr 15 17:51:35 2006 + * Copyright 2006 User + * Email + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _CAMERA_H +#define _CAMERA_H + +#include <OgreMath.h> +#include <OgreSceneManager.h> +#include <OgreCamera.h> +#include <OgreVector3.h> +#include <OgreRenderWindow.h> +#include "movable_object.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +class Camera : public MovableObject { +public: + Camera(Ogre::SceneManager* sceneManager, Ogre::RenderWindow* window, Ogre::SceneNode* avatarNode, bool moveEndOfFrame); + + /*! \brief Moves the avatar + * + * \param direction The direction the avatar is moving (i.e. Avatar::LEFT) + * \param scale The distance the avatar is moving (based on the time elapsed + * since the last frame + * + * This method moves the avatar in a given direction with a given scale + */ + virtual bool move(const int direction, float scale); + + /*! \brief Rotates the avatar + * + * This method rotates the avatar in a given direction with a given scale + * + * \param direction The direction the avatar is rotating (i.e. + * Avatar::YAW_LEFT) + * \param scale The degree the avatar is direction (based on the time + * elapsed since the last frame) + */ + virtual bool rotate(int direction, Ogre::Degree scale); + + virtual void performMove(); + +private: + /*! Handle to the players camera so we can move it on mouse or keyboard + * input + */ + Ogre::Camera* mCamera; + + /*! Value to rotate the camera by X (=yaw) + */ + Ogre::Radian mRotX; + + /*! Value to rotate the camera by Y (=pitch) + */ + Ogre::Radian mRotY; + + /*! \brief Creates a camera for the scene + * + * This method creates the necessary cameras for the game. Since we have a + * first person camera and a third person camera, we will use 2 cameras to + * do that. It would be possible to do that with one camera, but the concept + * in OGRE3D is to use 2 cameras. + */ + void createCamera(Ogre::SceneManager* sceneManager, Ogre::SceneNode* avatarNode); + + /*! \brief Creates a viewport with the given cameras for the scene + * + * This method creates the viewport to the scene. This is what the user will + * actually see when playing the game. The viewport uses the given cameras + * to get its picture. + */ + void createViewports(Ogre::RenderWindow* window); +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _CAMERA_H */ Property changes on: include/camera.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Modified: include/framelistener.h =================================================================== --- include/framelistener.h 2006-04-14 14:29:31 UTC (rev 53) +++ include/framelistener.h 2006-04-16 16:35:29 UTC (rev 54) @@ -25,22 +25,41 @@ #ifndef _FRAMELISTENER_H #define _FRAMELISTENER_H -#include <Ogre.h> +//Work around for memory manager problems between CEGUI and Ogre +#include <OgreNoMemoryMacros.h> +#include <CEGUI/CEGUIImageset.h> +#include <CEGUI/CEGUISystem.h> +#include <CEGUI/CEGUILogger.h> +#include <CEGUI/CEGUISchemeManager.h> +#include <CEGUI/CEGUIWindowManager.h> +#include <CEGUI/CEGUIWindow.h> +#include <OgreCEGUIRenderer.h> +#include <OgreCEGUIResourceProvider.h> +//regular mem handler +#include <OgreMemoryMacros.h> +//End of workaround +#include <OgreFrameListener.h> +#include <OgreEventProcessor.h> +#include <OgrePlatformManager.h> +#include <OgreCamera.h> +#include <OgreInput.h> +#include <OgreOverlayManager.h> #include <OgreKeyEvent.h> #include <OgreEventListeners.h> #include <OgreStringConverter.h> #include <OgreException.h> #include "avatar.h" +#include "keyboard.h" +#include "camera.h" +#include "mouse.h" #ifdef __cplusplus extern "C" { #endif -using namespace Ogre; - // Declare a subclass of the ExampleFrameListener class -class MyListener : public FrameListener, public KeyListener { +class OpengateListener : public Ogre::FrameListener { public: /*! \brief The constructor that creates the object that reacts to user input @@ -54,15 +73,14 @@ * \param useBufferedInputMouse Flag to set if the mouse input should be * buffered or not */ - MyListener(RenderWindow* win, Camera* cam, Avatar* avatar, - bool useBufferedInputKeys, bool useBufferedInputMouse); + OpengateListener(Ogre::RenderWindow* win, Camera* cam, Avatar* avatar, CEGUI::Renderer* renderer); /*! \brief The destructor to free the input readers * * It will destroy either the reader for buffered or unbuffered input, * depending on what was chosen in the constructor */ - ~MyListener(); + ~OpengateListener(); /*! \brief This method processes the keyboard events * @@ -72,7 +90,7 @@ * * \param evt The frame event from frameStarted() */ - bool processUnbufferedKeyInput(const FrameEvent& evt); + bool processUnbufferedKeyInput(const Ogre::FrameEvent& evt); /*! \brief This method processes the mouse events * @@ -82,15 +100,8 @@ * * \param evt The frame event from frameStarted() */ - bool processUnbufferedMouseInput(const FrameEvent& evt); + bool processUnbufferedMouseInput(const Ogre::FrameEvent& evt); - /*! \brief Make all the camera movement - * - * This method is called after the unbuffered input events are processed - * and have modified the translation vector, yaw and pitch - */ - void moveCamera(); - /*! \brief Enable or disbale the debug overlay * * This method changes the visibility status of the debug overlay which was @@ -104,14 +115,14 @@ * keyboard and mouse events). It is called before the actual rendering * happens. */ - bool frameStarted(const FrameEvent& evt); + bool frameStarted(const Ogre::FrameEvent& evt); /*! \brief Update statistics * * This method is called after the frame is rendered and refreshes the * statistics. */ - bool frameEnded(const FrameEvent& evt); + bool frameEnded(const Ogre::FrameEvent& evt); /*! \brief Switch mousemode from buffered<->immediate */ @@ -121,33 +132,14 @@ */ void switchKeyMode(); - /*! \brief Performes updates when a key was pressed AND released - * - * This method is part of the KeyListener interface of OGRE - * - * It is called by the buffered KeyListener when a key was klicked (pressed - * and afterwards released + /*! Tell the frame listener to exit at the end of the next frame */ - void keyClicked(KeyEvent* e); + void requestShutdown(); - /*! \brief Performes updates when a key was released - * - * This method is part of the KeyListener interface of OGRE - * - * It is called by the buffered KeyListener when a key was released - */ - void keyPressed(KeyEvent* e); +protected: - /*! \brief Performes updates when a key was pressed - * - * This method is part of the KeyListener interface of OGRE - * - * It is called by the buffered KeyListener when a key was pressed - */ - void keyReleased(KeyEvent* e); + bool mShutdownRequested; -protected: - /*! \brief This method updates the status (FPS,Triangles,etc.) * * This method is called at the end of every frame to update the statistics @@ -158,74 +150,84 @@ */ void updateStats(); - /*! Value used to cycle thorugh the scene details */ int mSceneDetailIndex; + /*! Movement speed of the camera */ - Real mMoveSpeed; + Ogre::Real mMoveSpeed; + /*! Rotation speed of the camera */ - Degree mRotateSpeed; + Ogre::Degree mRotateSpeed; + /*! Handle to the debug overlay (which displays the OGRE logo and stats */ - Overlay* mDebugOverlay; + Ogre::Overlay* mDebugOverlay; + /*! An event processor used, if the mouse or the keyboard input is buffered */ - EventProcessor* mEventProcessor; - /*! An input reader for unbuffered mouse and keyboard input */ - InputReader* mInputDevice; - /*! Handle to the players camera so we can move it on mouse or keyboard - * input + Ogre::EventProcessor* mEventProcessor; + + /*! An input reader for unbuffered mouse and keyboard input */ - Camera* mCamera; + Ogre::InputReader* mInputDevice; + /*! Vector used to modify the movement of the camera */ - Vector3 mTranslateVector; + Ogre::Vector3 mTranslateVector; + /*! Handle to the window where the contents is shown (used for statistics * updates */ - RenderWindow* mWindow; + Ogre::RenderWindow* mWindow; + /*! Flag to determine whether the stats should be displayed or not */ bool mStatsOn; + /*! Flag to determine if the input of the keyboard is buffered or * unbuffered */ bool mUseBufferedInputKeys; + /*! Flag to determine if the input of the mouse is buffered or unbuffered */ bool mUseBufferedInputMouse; + /*! Flag to determine if the input can be switched from buffered to * unbuffered. This is only possible if we created an instance of this * class with at least one buffered input */ bool mInputTypeSwitchingOn; + /*! Variable holding the current number of screenshots made (used to create * the filename of the screenshot */ unsigned int mNumScreenShots; - /*! Value to move the camera */ - float mMoveScale; - /*! Value to rotate the camera */ - Degree mRotScale; + /*! Value to stop flickering of toggles */ - Real mTimeUntilNextToggle; - /*! Value to rotate the camera by X (=yaw) - */ - Radian mRotX; - /*! Value to rotate the camera by Y (=pitch) - */ - Radian mRotY; + Ogre::Real mTimeUntilNextToggle; + /*! Filtering method for the scene */ - TextureFilterOptions mFiltering; + Ogre::TextureFilterOptions mFiltering; + /*! Number of anisotropic filtering processes */ int mAniso; + /*! Handle to the avatar */ Avatar* mAvatar; + + /*! Handle to a CEGUI Renderer */ + CEGUI::Renderer* mGUIRenderer; + + + Keyboard* mKeyboard; + Camera* mCamera; + Mouse* mMouse; }; #ifdef __cplusplus Added: include/gamestate.h =================================================================== --- include/gamestate.h (rev 0) +++ include/gamestate.h 2006-04-16 16:35:29 UTC (rev 54) @@ -0,0 +1,56 @@ +/*************************************************************************** + * gamestate.h + * + * Sat Apr 15 18:17:42 2006 + * Copyright 2006 User + * Email + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _GAMESTATE_H +#define _GAMESTATE_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +class Gamestate { +public: + Gamestate(); + + bool setGamestate(int state); + + int getGamestate(); + + + static const int GAME = 0; + static const int MENU = 1; + static const int MIN = GAME; + static const int MAX = MENU; + +private: + + int mActivestate; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _GAMESTATE_H */ Property changes on: include/gamestate.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Added: include/keyboard.h =================================================================== --- include/keyboard.h (rev 0) +++ include/keyboard.h 2006-04-16 16:35:29 UTC (rev 54) @@ -0,0 +1,60 @@ +/*************************************************************************** + * keyboard.h + * + * Sat Apr 15 16:31:36 2006 + * Copyright 2006 User + * Email + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _KEYBOARD_H +#define _KEYBOARD_H + +#include <OgreInput.h> +#include <OgreFrameListener.h> +#include "avatar.h" +#include "camera.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +class Keyboard { +public: + Keyboard(Ogre::InputReader* mInputDevice, Avatar* avatar, Camera* camera); + bool processKeyInput(const Ogre::FrameEvent& evt); + void setScale(float moveScale); +private: + /*! Handle to the input device, which will give us keyboard states */ + Ogre::InputReader* mInputDevice; + /*! Handle to the players avatar */ + Avatar* mAvatar; + /*! Value to move the camera */ + float mMoveScale; + /*! Handle to the camera chasing the avatar (will be removed once the movement + * is completed) + */ + Camera* mCamera; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _KEYBOARD_H */ Property changes on: include/keyboard.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Added: include/mouse.h =================================================================== --- include/mouse.h (rev 0) +++ include/mouse.h 2006-04-16 16:35:29 UTC (rev 54) @@ -0,0 +1,89 @@ +/*************************************************************************** + * mouse.h + * + * Sat Apr 15 16:55:15 2006 + * Copyright 2006 User + * Email + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _MOUSE_H +#define _MOUSE_H + +#include <OgreInput.h> +#include <OgreFrameListener.h> +#include <OgreMath.h> +#include "avatar.h" +#include "camera.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +class Mouse { +public: + /*! \brief Creates a new camera to chase the players avatar + * + * This constructor saves the given avatar and the input device to translate + * mouse movement and button clicks into actions on the player. So if the + * mouse was moved the players avatar will move accordingly. + * \param mInputDevice an inputdevice to get the current mousestates from + * \param avatar the players avatar + */ + Mouse(Ogre::InputReader* mInputDevice, Avatar* avatar); + + /*! \brief This method performs actions depending on the mousestate + * + * This method reads the state from the input device (which were set at the + * begin of the current frame) and depending on the states it performs + * actions. + * \param evt the FrameEvent that happened (i.e. for getting the time since + * the last frame + */ + bool processMouseInput(const Ogre::FrameEvent& evt); + + /*! \brief Sets the amount the players avatar can rotate in this frame + * + * This method is called at the begin of the frame. Depending on the time + * passed since the last frame, the players avatar can rotate for a specific + * degree. This degree also depends on the ships details. + * \param rotScale the degree the ship can rotate + */ + void setScale(Ogre::Degree rotScale); + +private: + + /*! Handle to the players avatar so we can perform rotation actions to it */ + Avatar* mAvatar; + /*! Handle to the input device, which will give us mouse states */ + Ogre::InputReader* mInputDevice; + /*! Value to rotate the camera */ + Ogre::Degree mRotScale; + + Camera* mCamera; + Ogre::Vector3 mTranslateVector; + Ogre::Degree mRotX; + Ogre::Degree mRotY; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _MOUSE_H */ Property changes on: include/mouse.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Added: include/movable_object.h =================================================================== --- include/movable_object.h (rev 0) +++ include/movable_object.h 2006-04-16 16:35:29 UTC (rev 54) @@ -0,0 +1,104 @@ +/*************************************************************************** + * movable_object.h + * + * Sun Apr 16 15:30:28 2006 + * Copyright 2006 Christoph Brill <eg...@us...> + * Email + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _MOVABLE_OBJECT_H +#define _MOVABLE_OBJECT_H + +#include <OgreVector3.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +/*! \brief interface for objects that can be moved by player input + * \author Christoph Brill + */ +class MovableObject { +public: + + virtual ~MovableObject() {}; + + /*! \brief Moves the object + * + * This method moves the object in a given direction with a given scale + * + * \param direction The direction the object is moving (i.e. + * MovableObject::LEFT) + * \param scale The distance the object is moving (based on the time elapsed + * since the last frame) + */ + virtual bool move(const int direction, float scale) = 0; + + /*! \brief Rotates the object + * + * This method rotates the object in a given direction with a given scale + * + * \param direction The direction the object is rotating (i.e. + * MovableObject::YAW_LEFT) + * \param scale The degree the object is direction (based on the time + * elapsed since the last frame) + */ + virtual bool rotate(int direction, Ogre::Degree scale) = 0; + + void reset(); + + virtual void performMove() = 0; + + /*! Direction: left */ + static const int LEFT = 1; + /*! Direction: right */ + static const int RIGHT = 2; + /*! Direction: forward */ + static const int FRONT = 3; + /*! Direction: backward */ + static const int BACK = 4; + /*! Direction: up */ + static const int UP = 5; + /*! Direction: down */ + static const int DOWN = 6; + /*! Yaw: left */ + static const int YAW_LEFT = 7; + /*! Yaw: right */ + static const int YAW_RIGHT = 8; + /*! Roll: left */ + static const int ROLL_LEFT = 9; + /*! Roll: right */ + static const int ROLL_RIGHT = 10; + /*! Pitch: up */ + static const int PITCH_UP = 11; + /*! Pitch: down */ + static const int PITCH_DOWN = 12; + +protected: + bool mMoveEndOfFrame; + Ogre::Vector3 mTranslateVector; + Ogre::Quaternion mNewOrientation; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _MOVABLE_OBJECT_H */ Property changes on: include/movable_object.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-14 14:29:53
|
Revision: 53 Author: egore Date: 2006-04-14 07:29:31 -0700 (Fri, 14 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=53&view=rev Log Message: ----------- get rid of default OGRE stuff we don't want and don't need Modified Paths: -------------- opengate.pws src/application.cpp src/resources.cfg Added Paths: ----------- data/Materials/common.material data/Materials/skybox.zip data/Materials/tat/ Removed Paths: ------------- src/media.cfg src/quake3settings.cfg src/terrain.cfg src/world.cfg Added: data/Materials/common.material =================================================================== --- data/Materials/common.material (rev 0) +++ data/Materials/common.material 2006-04-14 14:29:31 UTC (rev 53) @@ -0,0 +1,17 @@ +material Examples/SpaceSkyBox +{ + technique + { + pass + { + lighting off + depth_write off + + texture_unit + { + cubic_texture stevecube.jpg separateUV + tex_address_mode clamp + } + } + } +} Property changes on: data/Materials/common.material ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: data/Materials/skybox.zip =================================================================== (Binary files differ) Property changes on: data/Materials/skybox.zip ___________________________________________________________________ Name: svn:mime-type + application/zip Modified: opengate.pws =================================================================== --- opengate.pws 2006-04-14 12:52:46 UTC (rev 52) +++ opengate.pws 2006-04-14 14:29:31 UTC (rev 53) @@ -1,10 +1,10 @@ [filenumbers] -0=589 -1=209 -2=134 -3=173 -4=28 +0=86 +1=1 +2=112 +3=86 +4=43 5=58 6=1 @@ -29,12 +29,8 @@ clean before build=false [filelist] -0=/home/egore/ogrekram/src/c_PhysicalObject.cpp -1=/home/egore/ogrekram/src/c_SimpleBody.cpp -2=/home/egore/source/opengate/src/application.cpp -3=/home/egore/source/opengate/src/framelistener.cpp -4=/home/egore/source/opengate/include/avatar.h -5=/home/egore/source/opengate/src/avatar.cpp +0=/home/egore/source/opengate/src/application.cpp +1=/home/egore/source/opengate/src/main.cpp [Project Tree] 0=0 Modified: src/application.cpp =================================================================== --- src/application.cpp 2006-04-14 12:52:46 UTC (rev 52) +++ src/application.cpp 2006-04-14 14:29:31 UTC (rev 53) @@ -52,8 +52,8 @@ setupResources(); - bool carryOn = configure(); - if (!carryOn) return false; + if (!configure()) + return false; chooseSceneManager(); @@ -81,15 +81,12 @@ // Show the configuration dialog and initialise the system // You can skip this and use root.restoreConfig() to load configuration // settings if you were sure there are valid ones saved in ogre.cfg - if(mRoot->showConfigDialog()) - { + if(mRoot->restoreConfig()) { // If returned true, user clicked OK so initialise // Here we choose to let the system create a default rendering window by passing 'true' mWindow = mRoot->initialise(true); return true; - } - else - { + } else { return false; } } @@ -125,7 +122,9 @@ // create an ambient light for the scene mSceneMgr->setAmbientLight( ColourValue( 1, 1, 1 ) ); mSceneMgr->setShadowTechnique( SHADOWTYPE_STENCIL_ADDITIVE ); - + + mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox"); + // Create an entity Entity* ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); mAvatarNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); Deleted: src/media.cfg =================================================================== --- src/media.cfg 2006-04-14 12:52:46 UTC (rev 52) +++ src/media.cfg 2006-04-14 14:29:31 UTC (rev 53) @@ -1,16 +0,0 @@ -Mesh=ogrehead.mesh -Mesh=geosphere4500.mesh -Mesh=razor.mesh -Mesh=knot.mesh -Mesh=RZR-002.mesh -Mesh=geosphere8000.mesh -Mesh=sphere.mesh - -CubeMap=cubescene.jpg -CubeMap=early_morning.jpg -CubeMap=cubemap.jpg -CubeMap=morning.jpg -CubeMap=cloudy_noon.jpg -CubeMap=evening.jpg -CubeMap=stormy.jpg -CubeMap=stevecube.jpg Deleted: src/quake3settings.cfg =================================================================== --- src/quake3settings.cfg 2006-04-14 12:52:46 UTC (rev 52) +++ src/quake3settings.cfg 2006-04-14 14:29:31 UTC (rev 53) @@ -1,2 +0,0 @@ -Pak0Location: /usr/local/games/quake3/baseq3/pak0.pk3 -Map: maps/q3dm3.bsp Modified: src/resources.cfg =================================================================== --- src/resources.cfg 2006-04-14 12:52:46 UTC (rev 52) +++ src/resources.cfg 2006-04-14 14:29:31 UTC (rev 53) @@ -1,24 +1,10 @@ # Resource locations to be added to the 'boostrap' path # This also contains the minimum you need to use the Ogre example framework -[Bootstrap] -Zip=../media/packs/OgreCore.zip +#[Bootstrap] +#Zip=../media/packs/OgreCore.zip # Resource locations to be added to the default path [General] FileSystem=../data FileSystem=../data/Materials -FileSystem=../media -FileSystem=../media/fonts -FileSystem=../media/materials/programs -FileSystem=../media/materials/scripts -FileSystem=../media/materials/textures -FileSystem=../media/models -FileSystem=../media/overlays -FileSystem=../media/particle -FileSystem=../media/gui -Zip=../media/packs/cubemap.zip -Zip=../media/packs/cubemapsJS.zip -Zip=../media/packs/dragon.zip -Zip=../media/packs/fresneldemo.zip -Zip=../media/packs/ogretestmap.zip -Zip=../media/packs/skybox.zip +Zip=../data/Materials/skybox.zip Deleted: src/terrain.cfg =================================================================== --- src/terrain.cfg 2006-04-14 12:52:46 UTC (rev 52) +++ src/terrain.cfg 2006-04-14 14:29:31 UTC (rev 53) @@ -1,71 +0,0 @@ -# The main world texture (if you wish the terrain manager to create a material for you) -WorldTexture=terrain_texture.jpg - -# The detail texture (if you wish the terrain manager to create a material for you) -DetailTexture=terrain_detail.jpg - -#number of times the detail texture will tile in a terrain tile -DetailTile=3 - -# Heightmap source -PageSource=Heightmap - -# Heightmap-source specific settings -Heightmap.image=terrain.png - -# If you use RAW, fill in the below too -# RAW-specific setting - size (horizontal/vertical) -#Heightmap.raw.size=513 -# RAW-specific setting - bytes per pixel (1 = 8bit, 2=16bit) -#Heightmap.raw.bpp=2 - -# How large is a page of tiles (in vertices)? Must be (2^n)+1 -PageSize=513 - -# How large is each tile? Must be (2^n)+1 and be smaller than PageSize -TileSize=65 - -# The maximum error allowed when determining which LOD to use -MaxPixelError=3 - -# The size of a terrain page, in world units -PageWorldX=1500 -PageWorldZ=1500 -# Maximum height of the terrain -MaxHeight=100 - -# Upper LOD limit -MaxMipMapLevel=5 - -#VertexNormals=yes -#VertexColors=yes -#UseTriStrips=yes - -# Use vertex program to morph LODs, if available -VertexProgramMorph=yes - -# The proportional distance range at which the LOD morph starts to take effect -# This is as a proportion of the distance between the current LODs effective range, -# and the effective range of the next lower LOD -LODMorphStart=0.2 - -# This following section is for if you want to provide your own terrain shading routine -# Note that since you define your textures within the material this makes the -# WorldTexture and DetailTexture settings redundant - -# The name of the vertex program parameter you wish to bind the morph LOD factor to -# this is 0 when there is no adjustment (highest) to 1 when the morph takes it completely -# to the same position as the next lower LOD -# USE THIS IF YOU USE HIGH-LEVEL VERTEX PROGRAMS WITH LOD MORPHING -#MorphLODFactorParamName=morphFactor - -# The index of the vertex program parameter you wish to bind the morph LOD factor to -# this is 0 when there is no adjustment (highest) to 1 when the morph takes it completely -# to the same position as the next lower LOD -# USE THIS IF YOU USE ASSEMBLER VERTEX PROGRAMS WITH LOD MORPHING -#MorphLODFactorParamIndex=4 - -# The name of the material you will define to shade the terrain -#CustomMaterialName=TestTerrainMaterial - - Deleted: src/world.cfg =================================================================== --- src/world.cfg 2006-04-14 12:52:46 UTC (rev 52) +++ src/world.cfg 2006-04-14 14:29:31 UTC (rev 53) @@ -1,6 +0,0 @@ -HeightMap=2049x2049_map.png -Scale.x=2.0 -Scale.y=0.6 -Scale.z=2.0 -WorldTexture=terrain_texture.jpg -DetailTexture=terrain_detail.jpg This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-14 12:52:52
|
Revision: 52 Author: egore Date: 2006-04-14 05:52:46 -0700 (Fri, 14 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=52&view=rev Log Message: ----------- readd Condor Modified Paths: -------------- website/screenshots.php Modified: website/screenshots.php =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-14 12:46:08
|
Revision: 51 Author: egore Date: 2006-04-14 05:45:10 -0700 (Fri, 14 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=51&view=rev Log Message: ----------- add material for quantar storm and fix the one for the apteryx Modified Paths: -------------- data/Materials/octavius_apteryx_auv.material Added Paths: ----------- data/Materials/quantar_storm_auv.material data/Materials/quantar_storm_auv.png Property Changed: ---------------- data/Materials/octavius_apteryx_auv.png Modified: data/Materials/octavius_apteryx_auv.material =================================================================== --- data/Materials/octavius_apteryx_auv.material 2006-04-14 12:42:12 UTC (rev 50) +++ data/Materials/octavius_apteryx_auv.material 2006-04-14 12:45:10 UTC (rev 51) @@ -6,7 +6,8 @@ { texture_unit { - octavius_apteryx_auv.png + texture octavius_apteryx_auv.png + //scale 0.1 0.1 } } } Property changes on: data/Materials/octavius_apteryx_auv.png ___________________________________________________________________ Name: svn:mime-type - application/octet-stream + image/png Added: data/Materials/quantar_storm_auv.material =================================================================== --- data/Materials/quantar_storm_auv.material (rev 0) +++ data/Materials/quantar_storm_auv.material 2006-04-14 12:45:10 UTC (rev 51) @@ -0,0 +1,13 @@ +material quantar_storm_auv +{ + technique + { + pass + { + texture_unit + { + texture quantar_storm_auv.png + } + } + } +} Property changes on: data/Materials/quantar_storm_auv.material ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: data/Materials/quantar_storm_auv.png =================================================================== (Binary files differ) Property changes on: data/Materials/quantar_storm_auv.png ___________________________________________________________________ Name: svn:mime-type + image/png This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-14 12:42:26
|
Revision: 50 Author: egore Date: 2006-04-14 05:42:12 -0700 (Fri, 14 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=50&view=rev Log Message: ----------- add ingame screenshot Added Paths: ----------- website/images/screenshots/ website/images/screenshots/01_apteryx_vs_storm.jpg website/images/screenshots/thumbs/ website/images/screenshots/thumbs/01_apteryx_vs_storm.jpg Added: website/images/screenshots/01_apteryx_vs_storm.jpg =================================================================== (Binary files differ) Property changes on: website/images/screenshots/01_apteryx_vs_storm.jpg ___________________________________________________________________ Name: svn:mime-type + image/jpeg Added: website/images/screenshots/thumbs/01_apteryx_vs_storm.jpg =================================================================== (Binary files differ) Property changes on: website/images/screenshots/thumbs/01_apteryx_vs_storm.jpg ___________________________________________________________________ Name: svn:mime-type + image/jpeg This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-14 12:41:15
|
Revision: 49 Author: egore Date: 2006-04-14 05:41:03 -0700 (Fri, 14 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=49&view=rev Log Message: ----------- fix screenshot Modified Paths: -------------- website/screenshots.php Modified: website/screenshots.php =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-14 12:28:41
|
Revision: 48 Author: egore Date: 2006-04-14 05:28:32 -0700 (Fri, 14 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=48&view=rev Log Message: ----------- rename screenshots to models Modified Paths: -------------- website/contact.php Added Paths: ----------- website/images/models/ Removed Paths: ------------- website/images/screenshots/ Modified: website/contact.php =================================================================== (Binary files differ) Copied: website/images/models (from rev 47, website/images/screenshots) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-10 20:41:31
|
Revision: 47 Author: egore Date: 2006-04-10 13:41:23 -0700 (Mon, 10 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=47&view=rev Log Message: ----------- add missing data from jossh Modified Paths: -------------- data/Ships/Octavius/Phoenix/octavius_phoenix.xml Modified: data/Ships/Octavius/Phoenix/octavius_phoenix.xml =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-10 20:40:53
|
Revision: 46 Author: egore Date: 2006-04-10 13:40:36 -0700 (Mon, 10 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=46&view=rev Log Message: ----------- add Octavius Condor Added Paths: ----------- data/Ships/Octavius/Condor/ data/Ships/Octavius/Condor/octavius_condor.jpg data/Ships/Octavius/Condor/octavius_condor.wings data/Ships/Octavius/Condor/octavius_condor.xml Added: data/Ships/Octavius/Condor/octavius_condor.jpg =================================================================== (Binary files differ) Property changes on: data/Ships/Octavius/Condor/octavius_condor.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Ships/Octavius/Condor/octavius_condor.wings =================================================================== (Binary files differ) Property changes on: data/Ships/Octavius/Condor/octavius_condor.wings ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: data/Ships/Octavius/Condor/octavius_condor.xml =================================================================== (Binary files differ) Property changes on: data/Ships/Octavius/Condor/octavius_condor.xml ___________________________________________________________________ Name: svn:mime-type + application/xml This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-10 20:32:25
|
Revision: 45 Author: egore Date: 2006-04-10 13:32:10 -0700 (Mon, 10 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=45&view=rev Log Message: ----------- add screenshots of Octavius Condor Modified Paths: -------------- website/screenshots.php Added Paths: ----------- website/images/screenshots/octavius_condor.jpg website/images/screenshots/thumbs/octavius_condor.jpg Added: website/images/screenshots/octavius_condor.jpg =================================================================== (Binary files differ) Property changes on: website/images/screenshots/octavius_condor.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: website/images/screenshots/thumbs/octavius_condor.jpg =================================================================== (Binary files differ) Property changes on: website/images/screenshots/thumbs/octavius_condor.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: website/screenshots.php =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-10 18:39:12
|
Revision: 44 Author: egore Date: 2006-04-10 11:39:00 -0700 (Mon, 10 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=44&view=rev Log Message: ----------- empty TODO file Modified Paths: -------------- TODO Modified: TODO =================================================================== --- TODO 2006-04-10 18:36:48 UTC (rev 43) +++ TODO 2006-04-10 18:39:00 UTC (rev 44) @@ -1,2432 +1 @@ -Index: src/framelistener.cpp -=================================================================== ---- src/framelistener.cpp (Revision 40) -+++ src/framelistener.cpp (Arbeitskopie) -@@ -2,8 +2,8 @@ - * framelistener.cpp - * - * Sat Apr 8 10:51:05 2006 -- * Copyright 2006 User -- * Email -+ * Copyright 2006 Christoph Brill -+ * Email <eg...@us...> - ****************************************************************************/ - - /* -@@ -24,13 +24,382 @@ - - #include "framelistener.h" - --MyListener::MyListener(RenderWindow* win, Camera* cam) : ExampleFrameListener(win, cam) { -+MyListener::MyListener(RenderWindow* win, Camera* cam, Avatar* avatar, -+ bool useBufferedInputKeys = false, -+ bool useBufferedInputMouse = false) { -+ mDebugOverlay = OverlayManager::getSingleton().getByName("Core/DebugOverlay"); -+ mUseBufferedInputKeys = useBufferedInputKeys; -+ mUseBufferedInputMouse = useBufferedInputMouse; -+ mInputTypeSwitchingOn = mUseBufferedInputKeys || mUseBufferedInputMouse; -+ mRotateSpeed = 36; -+ mMoveSpeed = 100; -+ -+ if (mInputTypeSwitchingOn) { -+ mEventProcessor = new EventProcessor(); -+ mEventProcessor->initialise(win); -+ mEventProcessor->startProcessingEvents(); -+ mEventProcessor->addKeyListener(this); -+ mInputDevice = mEventProcessor->getInputReader(); -+ } else { -+ mInputDevice = PlatformManager::getSingleton().createInputReader(); -+ mInputDevice->initialise(win, true, true); -+ } -+ -+ mCamera = cam; -+ mWindow = win; -+ mAvatar = avatar; -+ mStatsOn = true; -+ mNumScreenShots = 0; -+ mTimeUntilNextToggle = 0; -+ mSceneDetailIndex = 0; -+ mMoveScale = 0.0f; -+ mRotScale = 0.0f; -+ mTranslateVector = Vector3::ZERO; -+ mAniso = 1; -+ mFiltering = TFO_BILINEAR; -+ -+ showDebugOverlay(true); - } - -+MyListener::~MyListener() { -+ if (mInputTypeSwitchingOn) { -+ delete mEventProcessor; -+ } else { -+ PlatformManager::getSingleton().destroyInputReader( mInputDevice ); -+ } -+} -+ -+void MyListener::updateStats() { -+ static String currFps = "Current FPS: "; -+ static String avgFps = "Average FPS: "; -+ static String bestFps = "Best FPS: "; -+ static String worstFps = "Worst FPS: "; -+ static String tris = "Triangle Count: "; -+ -+ // update stats when necessary -+ try { -+ -+ // get the statistics from the window -+ const RenderTarget::FrameStats& stats = mWindow->getStatistics(); -+ -+ // get overlay elements for the statistics -+ OverlayElement* guiAvg = OverlayManager::getSingleton().getOverlayElement("Core/AverageFps"); -+ OverlayElement* guiCurr = OverlayManager::getSingleton().getOverlayElement("Core/CurrFps"); -+ OverlayElement* guiBest = OverlayManager::getSingleton().getOverlayElement("Core/BestFps"); -+ OverlayElement* guiWorst = OverlayManager::getSingleton().getOverlayElement("Core/WorstFps"); -+ OverlayElement* guiTris = OverlayManager::getSingleton().getOverlayElement("Core/NumTris"); -+ OverlayElement* guiDbg = OverlayManager::getSingleton().getOverlayElement("Core/DebugText"); -+ -+ // add textual context to the overlay elements -+ guiAvg->setCaption(avgFps + StringConverter::toString(stats.avgFPS)); -+ guiCurr->setCaption(currFps + StringConverter::toString(stats.lastFPS)); -+ guiBest->setCaption(bestFps + StringConverter::toString(stats.bestFPS) -+ +" "+StringConverter::toString(stats.bestFrameTime)+" ms"); -+ guiWorst->setCaption(worstFps + StringConverter::toString(stats.worstFPS) -+ +" "+StringConverter::toString(stats.worstFrameTime)+" ms"); -+ guiTris->setCaption(tris + StringConverter::toString(stats.triangleCount)); -+ guiDbg->setCaption(mWindow->getDebugText()); -+ -+ } catch(...) { -+ // ignore all errors, because in worst case the statistics are not shown -+ } -+} -+ -+bool MyListener::processUnbufferedKeyInput(const FrameEvent& evt) { -+ -+ // Move avatar forwards -+ if (mInputDevice->isKeyDown(KC_U)) { -+ mAvatar->move(Avatar::FRONT, mMoveScale); -+ } -+ -+ // Move avatar backwards -+ if (mInputDevice->isKeyDown(KC_N)) { -+ mAvatar->move(Avatar::BACK, mMoveScale); -+ } -+ -+ // Move avatar forwards -+ if (mInputDevice->isKeyDown(KC_I)) { -+ mAvatar->move(Avatar::PITCH_DOWN, mMoveScale); -+ } -+ -+ // Move avatar backwards -+ if (mInputDevice->isKeyDown(KC_K)) { -+ mAvatar->move(Avatar::PITCH_UP, mMoveScale); -+ } -+ -+ // Move avatar left -+ if (mInputDevice->isKeyDown(KC_J)) { -+ mAvatar->move(Avatar::YAW_LEFT, mMoveScale); -+ } -+ -+ // Move avatar right -+ if (mInputDevice->isKeyDown(KC_L)) { -+ mAvatar->move(Avatar::YAW_RIGHT, mMoveScale); -+ } -+ -+ // Move avatar up -+ if (mInputDevice->isKeyDown(KC_PERIOD)) { -+ mAvatar->move(Avatar::ROLL_RIGHT, mMoveScale); -+ } -+ -+ // Move avatar down -+ if (mInputDevice->isKeyDown(KC_COMMA)) { -+ mAvatar->move(Avatar::ROLL_LEFT, mMoveScale); -+ } -+ -+ // Move camera left -+ if (mInputDevice->isKeyDown(KC_A)) { -+ mTranslateVector.x = -mMoveScale; -+ } -+ -+ // Move camera right -+ if (mInputDevice->isKeyDown(KC_D)) { -+ mTranslateVector.x = mMoveScale; -+ } -+ -+ // Move camera forward -+ if (mInputDevice->isKeyDown(KC_UP) || mInputDevice->isKeyDown(KC_W) ) { -+ printf("Now\n"); -+ mTranslateVector.z = -mMoveScale; -+ } -+ -+ // Move camera backwards -+ if (mInputDevice->isKeyDown(KC_DOWN) || mInputDevice->isKeyDown(KC_S) ) { -+ mTranslateVector.z = mMoveScale; -+ } -+ -+ // Move camera up -+ if (mInputDevice->isKeyDown(KC_PGUP)) { -+ mTranslateVector.y = mMoveScale; -+ } -+ -+ // Move camera down -+ if (mInputDevice->isKeyDown(KC_PGDOWN)) { -+ mTranslateVector.y = -mMoveScale; -+ } -+ -+ // Rotate kamera right -+ if (mInputDevice->isKeyDown(KC_RIGHT)) { -+ mCamera->yaw(-mRotScale); -+ } -+ -+ // Rotate kamera left -+ if (mInputDevice->isKeyDown(KC_LEFT)) { -+ mCamera->yaw(mRotScale); -+ } -+ -+ // quit game -+ if( mInputDevice->isKeyDown(KC_ESCAPE)) { -+ return false; -+ } -+ -+ // enable immediate or buffered mouse input -+ if (mInputTypeSwitchingOn && mInputDevice->isKeyDown(KC_M) && mTimeUntilNextToggle <= 0) { -+ switchMouseMode(); -+ mTimeUntilNextToggle = 1; -+ } -+ -+ // enable immediate or buffered keyboard input -+ if (mInputTypeSwitchingOn && mInputDevice->isKeyDown(KC_K) && mTimeUntilNextToggle <= 0) { -+ switchKeyMode(); -+ mTimeUntilNextToggle = 1; -+ } -+ -+ // enable/disable statistics display -+ if (mInputDevice->isKeyDown(KC_F) && mTimeUntilNextToggle <= 0) { -+ mStatsOn = !mStatsOn; -+ showDebugOverlay(mStatsOn); -+ -+ mTimeUntilNextToggle = 1; -+ } -+ -+ // switch filtering -+ if (mInputDevice->isKeyDown(KC_T) && mTimeUntilNextToggle <= 0) { -+ switch(mFiltering) { -+ case TFO_BILINEAR: -+ mFiltering = TFO_TRILINEAR; -+ mAniso = 1; -+ break; -+ case TFO_TRILINEAR: -+ mFiltering = TFO_ANISOTROPIC; -+ mAniso = 8; -+ break; -+ case TFO_ANISOTROPIC: -+ mFiltering = TFO_BILINEAR; -+ mAniso = 1; -+ break; -+ default: -+ break; -+ } -+ MaterialManager::getSingleton().setDefaultTextureFiltering(mFiltering); -+ MaterialManager::getSingleton().setDefaultAnisotropy(mAniso); -+ -+ showDebugOverlay(mStatsOn); -+ -+ mTimeUntilNextToggle = 1; -+ } -+ -+ // create screenshot -+ if (mInputDevice->isKeyDown(KC_SYSRQ) && mTimeUntilNextToggle <= 0) { -+ char tmp[20]; -+ sprintf(tmp, "screenshot_%d.png", ++mNumScreenShots); -+ mWindow->writeContentsToFile(tmp); -+ mTimeUntilNextToggle = 0.5; -+ mWindow->setDebugText(String("Wrote ") + tmp); -+ } -+ -+ // switch rendermode -+ if (mInputDevice->isKeyDown(KC_R) && mTimeUntilNextToggle <=0) { -+ mSceneDetailIndex = (mSceneDetailIndex+1)%3; -+ switch(mSceneDetailIndex) { -+ case 0 : mCamera->setDetailLevel(SDL_SOLID) ; break ; -+ case 1 : mCamera->setDetailLevel(SDL_WIREFRAME) ; break ; -+ case 2 : mCamera->setDetailLevel(SDL_POINTS) ; break ; -+ } -+ mTimeUntilNextToggle = 1; -+ } -+ -+ static bool displayCameraDetails = false; -+ if (mInputDevice->isKeyDown(KC_P) && mTimeUntilNextToggle <= 0) -+ { -+ -+ displayCameraDetails = !displayCameraDetails; -+ mTimeUntilNextToggle = 1; -+ if (!displayCameraDetails) -+ mWindow->setDebugText(""); -+ } -+ if (displayCameraDetails) -+ { -+ // Print camera details -+ mWindow->setDebugText("P: " + StringConverter::toString(mCamera->getDerivedPosition()) + " " + -+ "O: " + StringConverter::toString(mCamera->getDerivedOrientation())); -+ } -+ -+ // Return true to continue rendering -+ return true; -+} -+ -+bool MyListener::processUnbufferedMouseInput(const FrameEvent& evt) { -+ /* Rotation factors, may not be used if the second mouse button is pressed. */ -+ -+ /* If the second mouse button is pressed, then the mouse movement results in -+ sliding the camera, otherwise we rotate. */ -+ if( mInputDevice->getMouseButton(1)) { -+ mTranslateVector.x += mInputDevice->getMouseRelativeX() * 0.13; -+ mTranslateVector.y -= mInputDevice->getMouseRelativeY() * 0.13; -+ } -+ else { -+ mRotX = Degree(-mInputDevice->getMouseRelativeX() * 0.13); -+ mRotY = Degree(-mInputDevice->getMouseRelativeY() * 0.13); -+ } -+ -+ return true; -+} -+ -+void MyListener::moveCamera() { -+ if (mTranslateVector != Vector3::ZERO) -+ printf("Then\n"); -+ // Make all the changes to the camera -+ // Note that YAW direction is around a fixed axis (freelook style) rather -+ // than a natural YAW (e.g. airplane) -+ mCamera->yaw(mRotX); -+ mCamera->pitch(mRotY); -+ //TODO:mCamera->roll -+ mCamera->moveRelative(mTranslateVector); -+} -+ -+void MyListener::showDebugOverlay(bool show) { -+ if (mDebugOverlay) { -+ if (show) { -+ mDebugOverlay->show(); -+ } else { -+ mDebugOverlay->hide(); -+ } -+ } -+} -+ - bool MyListener::frameStarted(const FrameEvent& evt) { -- return ExampleFrameListener::frameStarted(evt); -+ if(mWindow->isClosed()) -+ return false; -+ -+ if (!mInputTypeSwitchingOn) { -+ mInputDevice->capture(); -+ } -+ -+ if ( !mUseBufferedInputMouse || !mUseBufferedInputKeys) { -+ // one of the input modes is immediate, so setup what is needed for -+ // immediate mouse/key movement -+ if (mTimeUntilNextToggle >= 0) { -+ mTimeUntilNextToggle -= evt.timeSinceLastFrame; -+ } -+ -+ // If this is the first frame, pick a speed -+ if (evt.timeSinceLastFrame == 0) { -+ mMoveScale = 1; -+ mRotScale = 0.1; -+ -+ // Otherwise scale movement units by time passed since last frame -+ } else { -+ // Move about 100 units per second, -+ mMoveScale = mMoveSpeed * evt.timeSinceLastFrame; -+ // Take about 10 seconds for full rotation -+ mRotScale = mRotateSpeed * evt.timeSinceLastFrame; -+ } -+ mRotX = 0; -+ mRotY = 0; -+ mTranslateVector = Vector3::ZERO; -+ } -+ -+ if (mUseBufferedInputKeys) { -+ // no need to do any processing here, it is handled by event -+ // processor and you get the results as KeyEvents -+ } else { -+ if (processUnbufferedKeyInput(evt) == false) { -+ // Game quit -+ return false; -+ } -+ } -+ -+ if (mUseBufferedInputMouse) { -+ // no need to do any processing here, it is handled by event -+ // processor and you get the results as KeyEvents -+ } else { -+ if (processUnbufferedMouseInput(evt) == false) { -+ // Game quit -+ return false; -+ } -+ } -+ -+ // one of the input modes is immediate, so update the movement vector -+ if ( !mUseBufferedInputMouse || !mUseBufferedInputKeys) { -+ moveCamera(); -+ } -+ -+ return true; - } - - bool MyListener::frameEnded(const FrameEvent& evt) { -- return ExampleFrameListener::frameEnded(evt); -+ updateStats(); -+ return true; - } -+ -+void MyListener::switchMouseMode() { -+ mUseBufferedInputMouse = !mUseBufferedInputMouse; -+ mInputDevice->setBufferedInput(mUseBufferedInputKeys, mUseBufferedInputMouse); -+} -+ -+void MyListener::switchKeyMode() { -+ mUseBufferedInputKeys = !mUseBufferedInputKeys; -+ mInputDevice->setBufferedInput(mUseBufferedInputKeys, mUseBufferedInputMouse); -+} -+ -+void MyListener::keyClicked(KeyEvent* e) { -+ if (e->getKeyChar() == 'm') { -+ switchMouseMode(); -+ } else if (e->getKeyChar() == 'k') { -+ switchKeyMode(); -+ } -+} -+ -+void MyListener::keyPressed(KeyEvent* e) {} -+void MyListener::keyReleased(KeyEvent* e) {} -Index: src/Makefile.in -=================================================================== ---- src/Makefile.in (Revision 40) -+++ src/Makefile.in (Arbeitskopie) -@@ -51,7 +51,7 @@ - binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) - PROGRAMS = $(bin_PROGRAMS) - am_opengate_OBJECTS = main.$(OBJEXT) application.$(OBJEXT) \ -- framelistener.$(OBJEXT) -+ framelistener.$(OBJEXT) avatar.$(OBJEXT) - opengate_OBJECTS = $(am_opengate_OBJECTS) - opengate_DEPENDENCIES = - DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -@@ -196,7 +196,7 @@ - sysconfdir = @sysconfdir@ - target_alias = @target_alias@ - INCLUDES = \ -- -I/usr/include/OGRE -I/usr/include/CEGUI -I/usr/share/doc/ogre-1.0.7/Samples/Common/include -I../include -+ -I/usr/include/OGRE -I/usr/include/CEGUI -I../include - - AM_CXXFLAGS = \ - -g -DEXT_HASH\ -@@ -206,7 +206,8 @@ - opengate_SOURCES = \ - main.cpp\ - application.cpp\ -- framelistener.cpp -+ framelistener.cpp\ -+ avatar.cpp - - opengate_LDFLAGS = \ - -L/usr/local/lib -@@ -286,6 +287,7 @@ - -rm -f *.tab.c - - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avatar.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framelistener.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ - -Index: src/application.cpp -=================================================================== ---- src/application.cpp (Revision 40) -+++ src/application.cpp (Arbeitskopie) -@@ -26,13 +26,79 @@ - #include "constants.h" - - OpengateApp::OpengateApp() { -- -+ mFrameListener = 0; -+ mRoot = 0; - } - - OpengateApp::~OpengateApp() { -+ if (mFrameListener) -+ delete mFrameListener; -+ if (mRoot) -+ delete mRoot; -+} - -+void OpengateApp::go(void) { -+ if (!setup()) -+ return; -+ -+ mRoot->startRendering(); -+ -+ // clean up -+ destroyScene(); - } - -+bool OpengateApp::setup(void) { -+ mRoot = new Root(); -+ -+ setupResources(); -+ -+ bool carryOn = configure(); -+ if (!carryOn) return false; -+ -+ chooseSceneManager(); -+ -+ // Set default mipmap level (NB some APIs ignore this) -+ TextureManager::getSingleton().setDefaultNumMipmaps(5); -+ -+ // Create any resource listeners (for loading screens) -+ createResourceListener(); -+ // Load resources -+ loadResources(); -+ -+ // Create the scene -+ createScene(); -+ -+ createCamera(); -+ createViewports(); -+ -+ createFrameListener(); -+ -+ return true; -+ -+} -+ -+bool OpengateApp::configure(void) { -+ // Show the configuration dialog and initialise the system -+ // You can skip this and use root.restoreConfig() to load configuration -+ // settings if you were sure there are valid ones saved in ogre.cfg -+ if(mRoot->showConfigDialog()) -+ { -+ // If returned true, user clicked OK so initialise -+ // Here we choose to let the system create a default rendering window by passing 'true' -+ mWindow = mRoot->initialise(true); -+ return true; -+ } -+ else -+ { -+ return false; -+ } -+} -+ -+void OpengateApp::chooseSceneManager(void) { -+ // Get the SceneManager, in this case a generic one -+ mSceneMgr = mRoot->getSceneManager(ST_GENERIC); -+} -+ - void OpengateApp::createCamera() { - // create the camera - mCamera = mSceneMgr->createCamera("PlayerCam"); -@@ -40,11 +106,13 @@ - // set its position, direction - mCamera->setPosition(Vector3(0,10,50)); - mCamera->lookAt(Vector3(0,0,0)); -+ //mCamera->setAutoTracking (true, mAvatarNode); // The camera will always look at the camera target -+ //mCamera->setFixedYawAxis (true); // Needed because of auto tracking - - mCamera->setNearClipDistance(5); - } - --void OpengateApp::createViewports(void) { -+void OpengateApp::createViewports() { - // Create one viewport, entire window - Viewport* vp = mWindow->addViewport(mCamera); - vp->setBackgroundColour(ColourValue(0,0,0)); -@@ -53,21 +121,66 @@ - mCamera->setAspectRatio(Real(vp->getActualWidth()) / Real(vp->getActualHeight())); - } - --void OpengateApp::createScene(void) { -- Entity* ent; -- -+void OpengateApp::createScene() { - // create an ambient light for the scene - mSceneMgr->setAmbientLight( ColourValue( 1, 1, 1 ) ); - mSceneMgr->setShadowTechnique( SHADOWTYPE_STENCIL_ADDITIVE ); - - // Create an entity -- ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); -- mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent); -+ Entity* ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); -+ mAvatarNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); -+ mAvatarNode->attachObject(ent); -+ mAvatarNode->setPosition(Vector3(0,0,30)); -+ mAvatarNode->rotate(Vector3(0.,1.,0.),Degree(-90)); -+ //mSightNode = node->createChildSceneNode ("Octavius Apteryx" + "_sight", Vector3 (0, 0, 100)); -+ mAvatar = new Avatar(mAvatarNode); -+ - ent = mSceneMgr->createEntity( "Quantar Storm", "Ships/Quantar/Storm/quantar_storm.mesh" ); -- mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent); -+ SceneNode* node2 = mSceneMgr->getRootSceneNode()->createChildSceneNode(); -+ node2->attachObject(ent); - } -+ -+void OpengateApp::destroyScene(void) { -+ -+} - - void OpengateApp::createFrameListener(void) { -- mFrameListener = new MyListener(mWindow, mCamera); -+ mFrameListener = new MyListener(mWindow, mCamera, mAvatar, false, false); -+ mFrameListener->showDebugOverlay(true); - mRoot->addFrameListener(mFrameListener); - } -+ -+void OpengateApp::setupResources(void) { -+ // Load resource paths from config file -+ ConfigFile cf; -+ cf.load("resources.cfg"); -+ -+ // Go through all sections & settings in the file -+ ConfigFile::SectionIterator seci = cf.getSectionIterator(); -+ -+ String secName, typeName, archName; -+ while (seci.hasMoreElements()) -+ { -+ secName = seci.peekNextKey(); -+ ConfigFile::SettingsMultiMap *settings = seci.getNext(); -+ ConfigFile::SettingsMultiMap::iterator i; -+ for (i = settings->begin(); i != settings->end(); ++i) -+ { -+ typeName = i->first; -+ archName = i->second; -+ ResourceGroupManager::getSingleton().addResourceLocation( -+ archName, typeName, secName); -+ } -+ } -+} -+ -+void OpengateApp::createResourceListener(void) -+{ -+ -+} -+ -+void OpengateApp::loadResources(void) { -+ // Initialise, parse scripts etc -+ ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); -+ -+} -Index: src/main.cpp -=================================================================== ---- src/main.cpp (Revision 40) -+++ src/main.cpp (Arbeitskopie) -@@ -1,3 +1,27 @@ -+/*************************************************************************** -+ * main.cpp -+ * -+ * Sat Apr 8 10:51:05 2006 -+ * Copyright 2006 Christoph Brill -+ * Email <eg...@us...> -+ ****************************************************************************/ -+ -+/* -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ */ -+ - #include "application.h" - - #ifdef __cplusplus -Index: src/resources.cfg -=================================================================== ---- src/resources.cfg (Revision 40) -+++ src/resources.cfg (Arbeitskopie) -@@ -6,6 +6,7 @@ - # Resource locations to be added to the default path - [General] - FileSystem=../data -+FileSystem=../data/Materials - FileSystem=../media - FileSystem=../media/fonts - FileSystem=../media/materials/programs -Index: src/Makefile.am -=================================================================== ---- src/Makefile.am (Revision 40) -+++ src/Makefile.am (Arbeitskopie) -@@ -5,7 +5,7 @@ - ## Please disable it in the Anjuta project configuration - - INCLUDES =\ -- -I/usr/include/OGRE -I/usr/include/CEGUI -I/usr/share/doc/ogre-1.0.7/Samples/Common/include -I../include -+ -I/usr/include/OGRE -I/usr/include/CEGUI -I../include - - AM_CXXFLAGS =\ - -g -DEXT_HASH\ -@@ -17,7 +17,8 @@ - opengate_SOURCES = \ - main.cpp\ - application.cpp\ -- framelistener.cpp -+ framelistener.cpp\ -+ avatar.cpp - - opengate_LDFLAGS = \ - -L/usr/local/lib -Index: src/ogre.cfg -=================================================================== ---- src/ogre.cfg (Revision 32) -+++ src/ogre.cfg (Arbeitskopie) -@@ -1,4 +1,4 @@ - Render System OpenGL Rendering Subsystem - FSAA 0 - Full Screen No --Video Mode 800 x 600 -+Video Mode 640 x 480 -Index: data/Materials/octavius_apteryx_auv.material -=================================================================== ---- data/Materials/octavius_apteryx_auv.material (Revision 0) -+++ data/Materials/octavius_apteryx_auv.material (Revision 0) -@@ -0,0 +1,13 @@ -+material octavius_apteryx_auv -+{ -+ technique -+ { -+ pass -+ { -+ texture_unit -+ { -+ octavius_apteryx_auv.png -+ } -+ } -+ } -+} -Index: data/Materials/octavius_apteryx_auv.png -=================================================================== -Kann nicht anzeigen: Dateityp ist als bin\xE4r angegeben. -svn:mime-type = application/octet-stream -Eigenschafts\xE4nderungen: data/Materials/octavius_apteryx_auv.png -___________________________________________________________________ -Name: svn:mime-type - + application/octet-stream - -Index: opengate.pws -=================================================================== ---- opengate.pws (Revision 41) -+++ opengate.pws (Arbeitskopie) -@@ -1,11 +1,11 @@ - - [filenumbers] --0=28 --1=8 --2=25 --3=25 --4=41 --5=66 -+0=589 -+1=209 -+2=134 -+3=173 -+4=28 -+5=58 - 6=1 - - [filemarkers] -@@ -29,13 +29,12 @@ - clean before build=false - - [filelist] --0=/home/egore/source/opengate/include/constants.h --1=/home/egore/source/opengate/src/resources.cfg --2=/home/egore/source/opengate/include/application.h -+0=/home/egore/ogrekram/src/c_PhysicalObject.cpp -+1=/home/egore/ogrekram/src/c_SimpleBody.cpp -+2=/home/egore/source/opengate/src/application.cpp - 3=/home/egore/source/opengate/src/framelistener.cpp --4=/home/egore/source/opengate/include/framelistener.h --5=/home/egore/source/opengate/src/application.cpp --6=/home/egore/source/opengate/src/main.cpp -+4=/home/egore/source/opengate/include/avatar.h -+5=/home/egore/source/opengate/src/avatar.cpp - - [Project Tree] - 0=0 -Index: NEWS -=================================================================== ---- NEWS (Revision 32) -+++ NEWS (Arbeitskopie) -@@ -1,2 +1,5 @@ -+2006-04-10 -+- implement basic movement and rotation -+ - 2006-04-01 - - add code tests -Index: po/POTFILES.in -=================================================================== ---- po/POTFILES.in (Revision 41) -+++ po/POTFILES.in (Arbeitskopie) -@@ -8,5 +8,6 @@ - src/main.cpp - src/application.cpp - src/framelistener.cpp -+src/avatar.cpp - - -Index: include/constants.h -=================================================================== ---- include/constants.h (Revision 39) -+++ include/constants.h (Arbeitskopie) -@@ -2,8 +2,8 @@ - * constants.h - * - * Sat Apr 8 13:13:56 2006 -- * Copyright 2006 User -- * Email -+ * Copyright 2006 Christoph Brill -+ * Email <eg...@us...> - ****************************************************************************/ - - /* -Index: include/framelistener.h -=================================================================== ---- include/framelistener.h (Revision 39) -+++ include/framelistener.h (Arbeitskopie) -@@ -2,8 +2,8 @@ - * framelistener.h - * - * Sat Apr 8 10:50:05 2006 -- * Copyright 2006 User -- * Email -+ * Copyright 2006 Christoph Brill -+ * Email <eg...@us...> - ****************************************************************************/ - - /* -@@ -25,22 +25,207 @@ - #ifndef _FRAMELISTENER_H - #define _FRAMELISTENER_H - --#include <ExampleFrameListener.h> -+#include <Ogre.h> -+#include <OgreKeyEvent.h> -+#include <OgreEventListeners.h> -+#include <OgreStringConverter.h> -+#include <OgreException.h> -+#include "avatar.h" - - #ifdef __cplusplus - extern "C" - { - #endif - -+using namespace Ogre; -+ - // Declare a subclass of the ExampleFrameListener class --class MyListener : public ExampleFrameListener { -+class MyListener : public FrameListener, public KeyListener { - public: -- MyListener(RenderWindow* win, Camera* cam); - -+ /*! \brief The constructor that creates the object that reacts to user input -+ * -+ * \param win This constructor takes a RenderWindow because it uses that to -+ * determine input context -+ * \param cam A handle to the camera so we can move it on keyboard or mouse -+ * input -+ * \param useBufferedInputKeys Flag to set if the keyboard input should be -+ * buffered or not -+ * \param useBufferedInputMouse Flag to set if the mouse input should be -+ * buffered or not -+ */ -+ MyListener(RenderWindow* win, Camera* cam, Avatar* avatar, -+ bool useBufferedInputKeys, bool useBufferedInputMouse); -+ -+ /*! \brief The destructor to free the input readers -+ * -+ * It will destroy either the reader for buffered or unbuffered input, -+ * depending on what was chosen in the constructor -+ */ -+ ~MyListener(); -+ -+ /*! \brief This method processes the keyboard events -+ * -+ * This method is called during frameStarted() and only processes unbuffered -+ * keyboard events (if buffered keyboard events are used the are processed -+ * by the InputReader) -+ * -+ * \param evt The frame event from frameStarted() -+ */ -+ bool processUnbufferedKeyInput(const FrameEvent& evt); -+ -+ /*! \brief This method processes the mouse events -+ * -+ * This method is called during frameStarted() and only processes unbuffered -+ * mouse events (if buffered mouse events are used the are processed by the -+ * InputReader calling keyClicked()) -+ * -+ * \param evt The frame event from frameStarted() -+ */ -+ bool processUnbufferedMouseInput(const FrameEvent& evt); -+ -+ /*! \brief Make all the camera movement -+ * -+ * This method is called after the unbuffered input events are processed -+ * and have modified the translation vector, yaw and pitch -+ */ -+ void moveCamera(); -+ -+ /*! \brief Enable or disbale the debug overlay -+ * -+ * This method changes the visibility status of the debug overlay which was -+ * retrieved in the constructor from the overlay manager -+ */ -+ void showDebugOverlay(bool show); -+ -+ /*! \brief Perform user interaction -+ * -+ * This method updates the camera depending on the user interaction (i.e. -+ * keyboard and mouse events). It is called before the actual rendering -+ * happens. -+ */ - bool frameStarted(const FrameEvent& evt); - -- bool frameEnded(const FrameEvent& evt); -+ /*! \brief Update statistics -+ * -+ * This method is called after the frame is rendered and refreshes the -+ * statistics. -+ */ -+ bool frameEnded(const FrameEvent& evt); - -+ /*! \brief Switch mousemode from buffered<->immediate -+ */ -+ void switchMouseMode(); -+ -+ /*! \brief Switch keymode from buffered<->immediate -+ */ -+ void switchKeyMode(); -+ -+ /*! \brief Performes updates when a key was pressed AND released -+ * -+ * This method is part of the KeyListener interface of OGRE -+ * -+ * It is called by the buffered KeyListener when a key was klicked (pressed -+ * and afterwards released -+ */ -+ void keyClicked(KeyEvent* e); -+ -+ /*! \brief Performes updates when a key was released -+ * -+ * This method is part of the KeyListener interface of OGRE -+ * -+ * It is called by the buffered KeyListener when a key was released -+ */ -+ void keyPressed(KeyEvent* e); -+ -+ /*! \brief Performes updates when a key was pressed -+ * -+ * This method is part of the KeyListener interface of OGRE -+ * -+ * It is called by the buffered KeyListener when a key was pressed -+ */ -+ void keyReleased(KeyEvent* e); -+ -+protected: -+ -+ /*! \brief This method updates the status (FPS,Triangles,etc.) -+ * -+ * This method is called at the end of every frame to update the statistics -+ * that are shown on screen (in the statistics area of the window). It will -+ * retrieve the stats (RenderTarget::FrameStats) from the window, get the -+ * according overlays of the statistics (provided by the OverlayManager) -+ * and print the stats to the overlays. -+ */ -+ void updateStats(); -+ -+ -+ /*! Value used to cycle thorugh the scene details -+ */ -+ int mSceneDetailIndex; -+ /*! Movement speed of the camera -+ */ -+ Real mMoveSpeed; -+ /*! Rotation speed of the camera -+ */ -+ Degree mRotateSpeed; -+ /*! Handle to the debug overlay (which displays the OGRE logo and stats -+ */ -+ Overlay* mDebugOverlay; -+ /*! An event processor used, if the mouse or the keyboard input is buffered -+ */ -+ EventProcessor* mEventProcessor; -+ /*! An input reader for unbuffered mouse and keyboard input */ -+ InputReader* mInputDevice; -+ /*! Handle to the players camera so we can move it on mouse or keyboard -+ * input -+ */ -+ Camera* mCamera; -+ /*! Vector used to modify the movement of the camera -+ */ -+ Vector3 mTranslateVector; -+ /*! Handle to the window where the contents is shown (used for statistics -+ * updates -+ */ -+ RenderWindow* mWindow; -+ /*! Flag to determine whether the stats should be displayed or not -+ */ -+ bool mStatsOn; -+ /*! Flag to determine if the input of the keyboard is buffered or -+ * unbuffered -+ */ -+ bool mUseBufferedInputKeys; -+ /*! Flag to determine if the input of the mouse is buffered or unbuffered -+ */ -+ bool mUseBufferedInputMouse; -+ /*! Flag to determine if the input can be switched from buffered to -+ * unbuffered. This is only possible if we created an instance of this -+ * class with at least one buffered input -+ */ -+ bool mInputTypeSwitchingOn; -+ /*! Variable holding the current number of screenshots made (used to create -+ * the filename of the screenshot -+ */ -+ unsigned int mNumScreenShots; -+ /*! Value to move the camera */ -+ float mMoveScale; -+ /*! Value to rotate the camera */ -+ Degree mRotScale; -+ /*! Value to stop flickering of toggles */ -+ Real mTimeUntilNextToggle; -+ /*! Value to rotate the camera by X (=yaw) -+ */ -+ Radian mRotX; -+ /*! Value to rotate the camera by Y (=pitch) -+ */ -+ Radian mRotY; -+ /*! Filtering method for the scene -+ */ -+ TextureFilterOptions mFiltering; -+ /*! Number of anisotropic filtering processes -+ */ -+ int mAniso; -+ /*! Handle to the avatar */ -+ Avatar* mAvatar; - }; - - #ifdef __cplusplus -Index: include/application.h -=================================================================== ---- include/application.h (Revision 39) -+++ include/application.h (Arbeitskopie) -@@ -2,8 +2,8 @@ - * application.h - * - * Sat Apr 8 10:26:58 2006 -- * Copyright 2006 User -- * Email -+ * Copyright 2006 Christoph Brill -+ * Email <eg...@us...> - ****************************************************************************/ - - /* -@@ -25,8 +25,10 @@ - #ifndef _APPLICATION_H - #define _APPLICATION_H - --#include <ExampleApplication.h> -+#include <Ogre.h> -+#include <OgreConfigFile.h> - #include "framelistener.h" -+#include "avatar.h" - - #ifdef __cplusplus - extern "C" -@@ -36,7 +38,7 @@ - /*! - * - */ --class OpengateApp : public ExampleApplication { -+class OpengateApp { - public: - - /*! \brief This default constructor instantiates an Application -@@ -52,9 +54,29 @@ - * - * When this destructor is called, the game is done and will quit. - */ -- ~OpengateApp(); -+ virtual ~OpengateApp(); - -+ virtual void go(void); -+ - protected: -+ -+ Avatar* mAvatar; -+ SceneNode* mAvatarNode; -+ -+ Root* mRoot; -+ Camera* mCamera; -+ SceneManager* mSceneMgr; -+ MyListener* mFrameListener; -+ RenderWindow* mWindow; -+ -+ /** Sets up the application - returns false if the user chooses to abandon configuration. */ -+ bool setup(void); -+ -+ /** Configures the application - returns false if the user chooses to abandon configuration. */ -+ bool configure(void); -+ -+ void chooseSceneManager(void); -+ - /*! \brief Creates a camera for the scene - * - * This method creates the necessary cameras for the game. Since we have a -@@ -62,7 +84,7 @@ - * do that. It would be possible to do that with one camera, but the concept - * in OGRE3D is to use 2 cameras. - */ -- virtual void createCamera(); -+ void createCamera(); - - /*! \brief Creates a viewport with the given cameras for the scene - * -@@ -80,11 +102,24 @@ - */ - virtual void createScene(void); - -+ virtual void destroyScene(void); -+ - /*! \biref Create the frame listener for the game - * - * This method creates the framelistener necessary to render a scene - */ - void createFrameListener(void); -+ -+ /// Method which will define the source of resources (other than current folder) -+ virtual void setupResources(void); -+ -+ /// Optional override method where you can create resource listeners (e.g. for loading screens) -+ virtual void createResourceListener(void); -+ -+ /// Optional override method where you can perform resource group loading -+ /// Must at least do ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); -+ virtual void loadResources(void); -+ - }; - - #ifdef __cplusplus -Index: include/Makefile.am -=================================================================== ---- include/Makefile.am (Revision 39) -+++ include/Makefile.am (Arbeitskopie) -@@ -9,6 +9,8 @@ - opengate_include_DATA = \ - application.h\ - framelistener.h\ -- constants.h -+ constants.h\ -+ optimize.h\ -+ avatar.h - - EXTRA_DIST = $(opengate_include_DATA) -Index: ChangeLog -=================================================================== ---- ChangeLog (Revision 41) -+++ ChangeLog (Arbeitskopie) -@@ -1,3 +1,31 @@ -+2006-04-10 Christoph Brill <eg...@us...> -+ -+ * src/framelistener.cpp: add keybindings to movement -+ -+ * src/avatar.cpp, src/avatar.h: implement movement based on orientation of -+ the ship -+ -+ * src/avatar.cpp, src/avatar.h: implement rotation based on quaternions -+ -+ * src/avatar.cpp, src/avatar.h: implement movement to system axis -+ -+2006-04-09 Christoph Brill <eg...@us...> -+ -+ * src/framelistener.cpp: add initial tries to move the avatar -+ -+ * src/avatar.cpp, include/avatar.h: add object to represent -+ interaction with the player, a so called "player avatar" -+ -+ * src/framelistener.cpp: comment the source and format it -+ -+ * include/framelistener.h: create proper doxygen comments for the class -+ -+ * include/application.h, src/application.cpp: No longer derive from the -+ ExampleFrameapplication -+ -+ * include/framelistener.h, src/framelistener.cpp: No longer derive from the -+ ExampleFramelistener -+ - 2006-04-08 Christoph Brill <eg...@us...> - - * data/Ships/Octavius/Apteryx/octavius_aptery.mesh.xml, -Index: opengate.prj -=================================================================== ---- opengate.prj (Revision 41) -+++ opengate.prj (Arbeitskopie) -@@ -69,14 +69,17 @@ - module.include.files=\ - application.h\ - framelistener.h\ -- constants.h -+ constants.h\ -+ optimize.h\ -+ avatar.h - - module.source.name=src - module.source.type= - module.source.files=\ - main.cpp\ - application.cpp\ -- framelistener.cpp -+ framelistener.cpp\ -+ avatar.cpp - - module.pixmap.name=pixmaps - module.pixmap.type= -@@ -102,7 +105,6 @@ - compiler.options.include.paths=\ - /usr/include/OGRE\ - /usr/include/CEGUI\ -- /usr/share/doc/ogre-1.0.7/Samples/Common/include\ - ../include - compiler.options.library.paths=\ - /usr/local/lib -Index: TODO -=================================================================== ---- TODO (Revision 32) -+++ TODO (Arbeitskopie) -@@ -0,0 +1,1207 @@ -+Index: src/framelistener.cpp -+=================================================================== -+--- src/framelistener.cpp (Revision 40) -++++ src/framelistener.cpp (Arbeitskopie) -+@@ -2,8 +2,8 @@ -+ * framelistener.cpp -+ * -+ * Sat Apr 8 10:51:05 2006 -+- * Copyright 2006 User -+- * Email -++ * Copyright 2006 Christoph Brill -++ * Email <eg...@us...> -+ ****************************************************************************/ -+ -+ /* -+@@ -24,13 +24,382 @@ -+ -+ #include "framelistener.h" -+ -+-MyListener::MyListener(RenderWindow* win, Camera* cam) : ExampleFrameListener(win, cam) { -++MyListener::MyListener(RenderWindow* win, Camera* cam, Avatar* avatar, -++ bool useBufferedInputKeys = false, -++ bool useBufferedInputMouse = false) { -++ mDebugOverlay = OverlayManager::getSingleton().getByName("Core/DebugOverlay"); -++ mUseBufferedInputKeys = useBufferedInputKeys; -++ mUseBufferedInputMouse = useBufferedInputMouse; -++ mInputTypeSwitchingOn = mUseBufferedInputKeys || mUseBufferedInputMouse; -++ mRotateSpeed = 36; -++ mMoveSpeed = 100; -++ -++ if (mInputTypeSwitchingOn) { -++ mEventProcessor = new EventProcessor(); -++ mEventProcessor->initialise(win); -++ mEventProcessor->startProcessingEvents(); -++ mEventProcessor->addKeyListener(this); -++ mInputDevice = mEventProcessor->getInputReader(); -++ } else { -++ mInputDevice = PlatformManager::getSingleton().createInputReader(); -++ mInputDevice->initialise(win, true, true); -++ } -++ -++ mCamera = cam; -++ mWindow = win; -++ mAvatar = avatar; -++ mStatsOn = true; -++ mNumScreenShots = 0; -++ mTimeUntilNextToggle = 0; -++ mSceneDetailIndex = 0; -++ mMoveScale = 0.0f; -++ mRotScale = 0.0f; -++ mTranslateVector = Vector3::ZERO; -++ mAniso = 1; -++ mFiltering = TFO_BILINEAR; -++ -++ showDebugOverlay(true); -+ } -+ -++MyListener::~MyListener() { -++ if (mInputTypeSwitchingOn) { -++ delete mEventProcessor; -++ } else { -++ PlatformManager::getSingleton().destroyInputReader( mInputDevice ); -++ } -++} -++ -++void MyListener::updateStats() { -++ static String currFps = "Current FPS: "; -++ static String avgFps = "Average FPS: "; -++ static String bestFps = "Best FPS: "; -++ static String worstFps = "Worst FPS: "; -++ static String tris = "Triangle Count: "; -++ -++ // update stats when necessary -++ try { -++ -++ // get the statistics from the window -++ const RenderTarget::FrameStats& stats = mWindow->getStatistics(); -++ -++ // get overlay elements for the statistics -++ OverlayElement* guiAvg = OverlayManager::getSingleton().getOverlayElement("Core/AverageFps"); -++ OverlayElement* guiCurr = OverlayManager::getSingleton().getOverlayElement("Core/CurrFps"); -++ OverlayElement* guiBest = OverlayManager::getSingleton().getOverlayElement("Core/BestFps"); -++ OverlayElement* guiWorst = OverlayManager::getSingleton().getOverlayElement("Core/WorstFps"); -++ OverlayElement* guiTris = OverlayManager::getSingleton().getOverlayElement("Core/NumTris"); -++ OverlayElement* guiDbg = OverlayManager::getSingleton().getOverlayElement("Core/DebugText"); -++ -++ // add textual context to the overlay elements -++ guiAvg->setCaption(avgFps + StringConverter::toString(stats.avgFPS)); -++ guiCurr->setCaption(currFps + StringConverter::toString(stats.lastFPS)); -++ guiBest->setCaption(bestFps + StringConverter::toString(stats.bestFPS) -++ +" "+StringConverter::toString(stats.bestFrameTime)+" ms"); -++ guiWorst->setCaption(worstFps + StringConverter::toString(stats.worstFPS) -++ +" "+StringConverter::toString(stats.worstFrameTime)+" ms"); -++ guiTris->setCaption(tris + StringConverter::toString(stats.triangleCount)); -++ guiDbg->setCaption(mWindow->getDebugText()); -++ -++ } catch(...) { -++ // ignore all errors, because in worst case the statistics are not shown -++ } -++} -++ -++bool MyListener::processUnbufferedKeyInput(const FrameEvent& evt) { -++ -++ // Move avatar forwards -++ if (mInputDevice->isKeyDown(KC_U)) { -++ mAvatar->move(Avatar::FRONT, mMoveScale); -++ } -++ -++ // Move avatar backwards -++ if (mInputDevice->isKeyDown(KC_N)) { -++ mAvatar->move(Avatar::BACK, mMoveScale); -++ } -++ -++ // Move avatar forwards -++ if (mInputDevice->isKeyDown(KC_I)) { -++ mAvatar->move(Avatar::PITCH_DOWN, mMoveScale); -++ } -++ -++ // Move avatar backwards -++ if (mInputDevice->isKeyDown(KC_K)) { -++ mAvatar->move(Avatar::PITCH_UP, mMoveScale); -++ } -++ -++ // Move avatar left -++ if (mInputDevice->isKeyDown(KC_J)) { -++ mAvatar->move(Avatar::YAW_LEFT, mMoveScale); -++ } -++ -++ // Move avatar right -++ if (mInputDevice->isKeyDown(KC_L)) { -++ mAvatar->move(Avatar::YAW_RIGHT, mMoveScale); -++ } -++ -++ // Move avatar up -++ if (mInputDevice->isKeyDown(KC_PERIOD)) { -++ mAvatar->move(Avatar::ROLL_RIGHT, mMoveScale); -++ } -++ -++ // Move avatar down -++ if (mInputDevice->isKeyDown(KC_COMMA)) { -++ mAvatar->move(Avatar::ROLL_LEFT, mMoveScale); -++ } -++ -++ // Move camera left -++ if (mInputDevice->isKeyDown(KC_A)) { -++ mTranslateVector.x = -mMoveScale; -++ } -++ -++ // Move camera right -++ if (mInputDevice->isKeyDown(KC_D)) { -++ mTranslateVector.x = mMoveScale; -++ } -++ -++ // Move camera forward -++ if (mInputDevice->isKeyDown(KC_UP) || mInputDevice->isKeyDown(KC_W) ) { -++ printf("Now\n"); -++ mTranslateVector.z = -mMoveScale; -++ } -++ -++ // Move camera backwards -++ if (mInputDevice->isKeyDown(KC_DOWN) || mInputDevice->isKeyDown(KC_S) ) { -++ mTranslateVector.z = mMoveScale; -++ } -++ -++ // Move camera up -++ if (mInputDevice->isKeyDown(KC_PGUP)) { -++ mTranslateVector.y = mMoveScale; -++ } -++ -++ // Move camera down -++ if (mInputDevice->isKeyDown(KC_PGDOWN)) { -++ mTranslateVector.y = -mMoveScale; -++ } -++ -++ // Rotate kamera right -++ if (mInputDevice->isKeyDown(KC_RIGHT)) { -++ mCamera->yaw(-mRotScale); -++ } -++ -++ // Rotate kamera left -++ if (mInputDevice->isKeyDown(KC_LEFT)) { -++ mCamera->yaw(mRotScale); -++ } -++ -++ // quit game -++ if( mInputDevice->isKeyDown(KC_ESCAPE)) { -++ return false; -++ } -++ -++ // enable immediate or buffered mouse input -++ if (mInputTypeSwitchingOn && mInputDevice->isKeyDown(KC_M) && mTimeUntilNextToggle <= 0) { -++ switchMouseMode(); -++ mTimeUntilNextToggle = 1; -++ } -++ -++ // enable immediate or buffered keyboard input -++ if (mInputTypeSwitchingOn && mInputDevice->isKeyDown(KC_K) && mTimeUntilNextToggle <= 0) { -++ switchKeyMode(); -++ mTimeUntilNextToggle = 1; -++ } -++ -++ // enable/disable statistics display -++ if (mInputDevice->isKeyDown(KC_F) && mTimeUntilNextToggle <= 0) { -++ mStatsOn = !mStatsOn; -++ showDebugOverlay(mStatsOn); -++ -++ mTimeUntilNextToggle = 1; -++ } -++ -++ // switch filtering -++ if (mInputDevice->isKeyDown(KC_T) && mTimeUntilNextToggle <= 0) { -++ switch(mFiltering) { -++ case TFO_BILINEAR: -++ mFiltering = TFO_TRILINEAR; -++ mAniso = 1; -++ break; -++ case TFO_TRILINEAR: -++ mFiltering = TFO_ANISOTROPIC; -++ mAniso = 8; -++ break; -++ case TFO_ANISOTROPIC: -++ mFiltering = TFO_BILINEAR; -++ mAniso = 1; -++ break; -++ default: -++ break; -++ } -++ MaterialManager::getSingleton().setDefaultTextureFiltering(mFiltering); -++ MaterialManager::getSingleton().setDefaultAnisotropy(mAniso); -++ -++ showDebugOverlay(mStatsOn); -++ -++ mTimeUntilNextToggle = 1; -++ } -++ -++ // create screenshot -++ if (mInputDevice->isKeyDown(KC_SYSRQ) && mTimeUntilNextToggle <= 0) { -++ char tmp[20]; -++ sprintf(tmp, "screenshot_%d.png", ++mNumScreenShots); -++ mWindow->writeContentsToFile(tmp); -++ mTimeUntilNextToggle = 0.5; -++ mWindow->setDebugText(String("Wrote ") + tmp); -++ } -++ -++ // switch rendermode -++ if (mInputDevice->isKeyDown(KC_R) && mTimeUntilNextToggle <=0) { -++ mSceneDetailIndex = (mSceneDetailIndex+1)%3; -++ switch(mSceneDetailIndex) { -++ case 0 : mCamera->setDetailLevel(SDL_SOLID) ; break ; -++ case 1 : mCamera->setDetailLevel(SDL_WIREFRAME) ; break ; -++ case 2 : mCamera->setDetailLevel(SDL_POINTS) ; break ; -++ } -++ mTimeUntilNextToggle = 1; -++ } -++ -++ static bool displayCameraDetails = false; -++ if (mInputDevice->isKeyDown(KC_P) && mTimeUntilNextToggle <= 0) -++ { -++ -++ displayCameraDetails = !displayCameraDetails; -++ mTimeUntilNextToggle = 1; -++ if (!displayCameraDetails) -++ mWindow->setDebugText(""); -++ } -++ if (displayCameraDetails) -++ { -++ // Print camera details -++ mWindow->setDebugText("P: " + StringConverter::toString(mCamera->getDerivedPosition()) + " " + -++ "O: " + StringConverter::toString(mCamera->getDerivedOrientation())); -++ } -++ -++ // Return true to continue rendering -++ return true; -++} -++ -++bool MyListener::processUnbufferedMouseInput(const FrameEvent& evt) { -++ /* Rotation factors, may not be used if the second mouse button is pressed. */ -++ -++ /* If the second mouse button is pressed, then the mouse movement results in -++ sliding the camera, otherwise we rotate. */ -++ if( mInputDevice->getMouseButton(1)) { -++ mTranslateVector.x += mInputDevice->getMouseRelativeX() * 0.13; -++ mTranslateVector.y -= mInputDevice->getMouseRelativeY() * 0.13; -++ } -++ else { -++ mRotX = Degree(-mInputDevice->getMouseRelativeX() * 0.13); -++ mRotY = Degree(-mInputDevice->getMouseRelativeY() * 0.13); -++ } -++ -++ return true; -++} -++ -++void MyListener::moveCamera() { -++ if (mTranslateVector != Vector3::ZERO) -++ printf("Then\n"); -++ // Make all the changes to the camera -++ // Note that YAW direction is around a fixed axis (freelook style) rather -++ // than a natural YAW (e.g. airplane) -++ mCamera->yaw(mRotX); -++ mCamera->pitch(mRotY); -++ //TODO:mCamera->roll -++ mCamera->moveRelative(mTranslateVector); -++} -++ -++void MyListener::showDebugOverlay(bool show) { -++ if (mDebugOverlay) { -++ if (show) { -++ mDebugOverlay->show(); -++ } else { -++ mDebugOverlay->hide(); -++ } -++ } -++} -++ -+ bool MyListener::frameStarted(const FrameEvent& evt) { -+- return ExampleFrameListener::frameStarted(evt); -++ if(mWindow->isClosed()) -++ return false; -++ -++ if (!mInputTypeSwitchingOn) { -++ mInputDevice->capture(); -++ } -++ -++ if ( !mUseBufferedInputMouse || !mUseBufferedInputKeys) { -++ // one of the input modes is immediate, so setup what is needed for -++ // immediate mouse/key movement -++ if (mTimeUntilNextToggle >= 0) { -++ mTimeUntilNextToggle -= evt.timeSinceLastFrame; -++ } -++ -++ // If this is the first frame, pick a speed -++ if (evt.timeSinceLastFrame == 0) { -++ mMoveScale = 1; -++ mRotScale = 0.1; -++ -++ // Otherwise scale movement units by time passed since last frame -++ } else { -++ // Move about 100 units per second, -++ mMoveScale = mMoveSpeed * evt.timeSinceLastFrame; -++ // Take about 10 seconds for full rotation -++ mRotScale = mRotateSpeed * evt.timeSinceLastFrame; -++ } -++ mRotX = 0; -++ mRotY = 0; -++ mTranslateVector = Vector3::ZERO; -++ } -++ -++ if (mUseBufferedInputKeys) { -++ // no need to do any processing here, it is handled by event -++ // processor and you get the results as KeyEvents -++ } else { -++ if (processUnbufferedKeyInput(evt) == false) { -++ // Game quit -++ return false; -++ } -++ } -++ -++ if (mUseBufferedInputMouse) { -++ // no need to do any processing here, it is handled by event -++ // processor and you get the results as KeyEvents -++ } else { -++ if (processUnbufferedMouseInput(evt) == false) { -++ // Game quit -++ return false; -++ } -++ } -++ -++ // one of the input modes is immediate, so update the movement vector -++ if ( !mUseBufferedInputMouse || !mUseBufferedInputKeys) { -++ moveCamera(); -++ } -++ -++ return true; -+ } -+ -+ bool MyListener::frameEnded(const FrameEvent& evt) { -+- return ExampleFrameListener::frameEnded(evt); -++ updateStats(); -++ return true; -+ } -++ -++void MyListener::switchMouseMode() { -++ mUseBufferedInputMouse = !mUseBufferedInputMouse; -++ mInputDevice->setBufferedInput(mUseBufferedInputKeys, mUseBufferedInputMouse); -++} -++ -++void MyListener::switchKeyMode() { -++ mUseBufferedInputKeys = !mUseBufferedInputKeys; -++ mInputDevice->setBufferedInput(mUseBufferedInputKeys, mUseBufferedInputMouse); -++} -++ -++void MyListener::keyClicked(KeyEvent* e) { -++ if (e->getKeyChar() == 'm') { -++ switchMouseMode(); -++ } else if (e->getKeyChar() == 'k') { -++ switchKeyMode(); -++ } -++} -++ -++void MyListener::keyPressed(KeyEvent* e) {} -++void MyListener::keyReleased(KeyEvent* e) {} -+Index: src/Makefile.in -+=================================================================== -+--- src/Makefile.in (Revision 40) -++++ src/Makefile.in (Arbeitskopie) -+@@ -51,7 +51,7 @@ -+ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -+ PROGRAMS = $(bin_PROGRAMS) -+ am_opengate_OBJECTS = main.$(OBJEXT) application.$(OBJEXT) \ -+- framelistener.$(OBJEXT) -++ framelistener.$(OBJEXT) avatar.$(OBJEXT) -+ opengate_OBJECTS = $(am_opengate_OBJECTS) -+ opengate_DEPENDENCIES = -+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -+@@ -196,7 +196,7 @@ -+ sysconfdir = @sysconfdir@ -+ target_alias = @target_alias@ -+ INCLUDES = \ -+- -I/usr/include/OGRE -I/usr/include/CEGUI -I/usr/share/doc/ogre-1.0.7/Samples/Common/include -I../include -++ -I/usr/include/OGRE -I/usr/include/CEGUI -I../include -+ -+ AM_CXXFLAGS = \ -+ -g -DEXT_HASH\ -+@@ -206,7 +206,8 @@ -+ opengate_SOURCES = \ -+ main.cpp\ -+ application.cpp\ -+- framelistener.cpp -++ framelistener.cpp\ -++ avatar.cpp -+ -+ opengate_LDFLAGS = \ -+ -L/usr/local/lib -+@@ -286,6 +287,7 @@ -+ -rm -f *.tab.c -+ -+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Po@am__quote@ -++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avatar.Po@am__quote@ -+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framelistener.Po@am__quote@ -+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ -+ -+Index: src/application.cpp -+=================================================================== -+--- src/application.cpp (Revision 40) -++++ src/application.cpp (Arbeitskopie) -+@@ -26,13 +26,79 @@ -+ #include "constants.h" -+ -+ OpengateApp::OpengateApp() { -+- -++ mFrameListener = 0; -++ mRoot = 0; -+ } -+ -+ OpengateApp::~OpengateApp() { -++ if (mFrameListener) -++ delete mFrameListener; -++ if (mRoot) -++ delete mRoot; -++} -+ -++void OpengateApp::go(void) { -++ if (!setup()) -++ return; -++ -++ mRoot->startRendering(); -++ -++ // clean up -++ destroyScene(); -+ } -+ -++bool OpengateApp::setup(void) { -++ mRoot = new Root(); -++ -++ setupResources(); -++ -++ bool carryOn = configure(); -++ if (!carryOn) return false; -++ -++ chooseSceneManager(); -++ -++ // Set default mipmap level (NB some APIs ignore this) -++ TextureManager::getSingleton().setDefaultNumMipmaps(5); -++ -++ // Create any resource listeners (for loading screens) -++ createResourceListener(); -++ // Load resources -++ loadResources(); -++ -++ // Create the scene -++ createScene(); -++ -++ createCamera(); -++ createViewports(); -++ -++ createFrameListener(); -++ -++ return true; -++ -++} -++ -++bool OpengateApp::configure(void) { -++ // Show the configuration dialog and initialise the system -++ // You can skip this and use root.restoreConfig() to load configuration -++ // settings if you were sure there are valid ones saved in ogre.cfg -++ if(mRoot->showConfigDialog()) -++ { -++ // If returned true, user clicked OK so initialise -++ // Here we choose to let the system create a default rendering window by passing 'true' -++ mWindow = mRoot->initialise(true); -++ return true; -++ } -++ else -++ { -++ return false; -++ } -++} -++ -++void OpengateApp::chooseSceneManager(void) { -++ // Get the SceneManager, in this case a generic one -++ mSceneMgr = mRoot->getSceneManager(ST_GENERIC); -++} -++ -+ void OpengateApp::createCamera() { -+ // create the camera -+ mCamera = mSceneMgr->createCamera("PlayerCam"); -+@@ -40,11 +106,13 @@ -+ // set its position, direction -+ mCamera->setPosition(Vector3(0,10,50)); -+ mCamera->lookAt(Vector3(0,0,0)); -++ //mCamera->setAutoTracking (true, mAvatarNode); // The camera will always look at the camera target -++ //mCamera->setFixedYawAxis (true); // Needed because of auto tracking -+ -+ mCamera->setNearClipDistance(5); -+ } -+ -+-void OpengateApp::createViewports(void) { -++void OpengateApp::createViewports() { -+ // Create one viewport, entire window -+ Viewport* vp = mWindow->addViewport(mCamera); -+ vp->setBackgroundColour(ColourValue(0,0,0)); -+@@ -53,21 +121,66 @@ -+ mCamera->setAspectRatio(Real(vp->getActualWidth()) / Real(vp->getActualHeight())); -+ } -+ -+-void OpengateApp::createScene(void) { -+- Entity* ent; -+- -++void OpengateApp::createScene() { -+ // create an ambient light for the scene -+ mSceneMgr->setAmbientLight( ColourValue( 1, 1, 1 ) ); -+ mSceneMgr->setShadowTechnique( SHADOWTYPE_STENCIL_ADDITIVE ); -+ -+ // Create an entity -+- ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); -+- mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent); -++ Entity* ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); -++ mAvatarNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); -++ mAvatarNode->attachObject(ent); -++ mAvatarNode->setPosition(Vector3(0,0,30)); -++ mAvatarNode->rotate(Vector3(0.,1.,0.),Degree(-90)); -++ //mSightNode = node->createChildSceneNode ("Octavius Apteryx" + "_sight", Vector3 (0, 0, 100)); -++ mAvatar = new Avatar(mAvatarNode); -++ -+ ent = mSceneMgr->createEntity( "Quantar Storm", "Ships/Quantar/Storm/quantar_storm.mesh" ); -+- mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent); -++ SceneNode* node2 = mSceneMgr->getRootSceneNode()->createChildSceneNode(); -++ node2->attachObject(ent); -+ } -++ -++void OpengateApp::destroyScene(void) { -++ -++} -+ -+ void OpengateApp::createFrameListener(void) { -+- mFrameListener = new MyListener(mWindow, mCamera); -++ mFrameListener = new MyListener(mWindow, mCamera, mAvatar, false, false); -++ mFrameListener->showDebugOverlay(true); -+ mRoot->addFrameListener(mFrameListener); -+ } -++ -++void OpengateApp::setupResources(void) { -++ // Load resource paths from config file -++ ConfigFile cf; -++ cf.load("resources.cfg"); -++ -++ // Go through all sections & settings in the file -++ ConfigFile::SectionIterator seci = cf.getSectionIterator(); -++ -++ String secName, typeName, archName; -++ while (seci.hasMoreElements()) -++ { -++ secName = seci.peekNextKey(); -++ ConfigFile::SettingsMultiMap *settings = seci.getNext(); -++ ConfigFile::SettingsMultiMap::iterator i; -++ for (i = settings->begin(); i != settings->end(); ++i) -++ { -++ typeName = i->first; -++ archName = i->second; -++ ResourceGroupManager::getSingleton().addResourceLocation( -++ archName, typeName, secName); -++ } -++ } -++} -++ -++void OpengateApp::createResourceListener(void) -++{ -++ -++} -++ -++void OpengateApp::loadResources(void) { -++ // Initialise, parse scripts etc -++ ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); -++ -++} -+Index: src/main.cpp -+=================================================================== -+--- src/main.cpp (Revision 40) -++++ src/main.cpp (Arbeitskopie) -+@@ -1,3 +1,27 @@ -++/*************************************************************************** -++ * main.cpp -++ * -++ * Sat Apr 8 10:51:05 2006 -++ * Copyright 2006 Christoph Brill -++ * Email <eg...@us...> -++ ****************************************************************************/ -++ -++/* -++ * This program is free software; you can redistribute it and/or modify -++ * it under the terms of the GNU General Public License as published by -++ * the Free Software Foundation; either version 2 of the License, or -++ * (at your option) any later version. -++ * -++ * This program is distributed in the hope that it will be useful, -++ * but WITHOUT ANY WARRANTY; without even the implied warranty of -++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -++ * GNU General Public License for more details. -++ * -++ * You should have received a copy of the GNU General Public License -++ * along with this program; if not, write to the Free Software -++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -++ */ -++ -+ #include "application.h" -+ -+ #ifdef __cplusplus -+Index: src/resources.cfg -+=================================================================== -+--- src/resources.cfg (Revision 40) -++++ src/resources.cfg (Arbeitskopie) -+@@ -6,6 +6,7 @@ -+ # Resource locations to be added to the default path -+ [General] -+ FileSystem=../data -++FileSystem=../data/Materials -+ FileSystem=../media -+ FileSystem=../media/fonts -+ FileSystem=../media/materials/programs -+Index: src/Makefile.am -+=================================================================== -+--- src/Makefile.am (Revision 40) -++++ src/Makefile.am (Arbeitskopie) -+@@ -5,7 +5,7 @@ -+ ## Please disable it in the Anjuta project configuration -+ -+ INCLUDES =\ -+- -I/usr/include/OGRE -I/usr/include/CEGUI -I/usr/share/doc/ogre-1.0.7/Samples/Common/include -I../include -++ -I/usr/include/OGRE -I/usr/include/CEGUI -I../include -+ -+ AM_CXXFLAGS =\ -+ -g -DEXT_HASH\ -+@@ -17,7 +17,8 @@ -+ opengate_SOURCES = \ -+ main.cpp\ -+ application.cpp\ -+- framelistener.cpp -++ framelistener.cpp\ -++ avatar.cpp -+ -+ opengate_LDFLAGS = \ -+ -L/usr/local/lib -+Index: src/ogre.cfg -+=================================================================== -+--- src/ogre.cfg (Revision 32) -++++ src/ogre.cfg (Arbeitskopie) -+@@ -1,4 +1,4 @@ -+ Render System OpenGL Rendering Subsystem -+ FSAA 0 -+ Full Screen No -+-Video Mode 800 x 600 -++Video Mode 640 x 480 -+Index: data/Materials/octavius_apteryx_auv.material -+=================================================================== -+--- data/Materials/octavius_apteryx_auv.material (Revision 0) -++++ data/Materials/octavius_apteryx_auv.material (Revision 0) -+@@ -0,0 +1,13 @@ -++material octavius_apteryx_auv -++{ -++ technique -++ { -++ pass -++ { -++ texture_unit -++ { -++ octavius_apteryx_auv.png -++ } -++ } -++ } -++} -+Index: data/Materials/octavius_apteryx_auv.png -+=================================================================== -+Kann nicht anzeigen: Dateityp ist als bin\xE4r angegeben. -+svn:mime-type = application/octet-stream -+ -+Eigenschafts\xE4nderungen: data/Materials/octavius_apteryx_auv.png -+___________________________________________________________________ -+Name: svn:mime-type -+ + application/octet-stream -+ -+Index: opengate.pws -+=================================================================== -+--- opengate.pws (Revision 41) -++++ opengate.pws (Arbeitskopie) -+@@ -1,11 +1,11 @@ -+ -+ [filenumbers] -+-0=28 -+-1=8 -+-2=25 -+-3=25 -+-4=41 -+-5=66 -++0=589 -++1=209 -++2=134 -++3=173 -++4=28 -++5=58 -+ 6=1 -+ -+ [filemarkers] -+@@ -29,13 +29,12 @@ -+ clean before build=false -+ -+ [filelist] -+-0=/home/egore/source/opengate/include/constants.h -+-1=/home/egore/source/opengate/src/resources.cfg -+-2=/home/egore/source/opengate/include/application.h -++0=/home/egore/ogrekram/src/c_PhysicalObject.cpp -++1=/home/egore/ogrekram/src/c_SimpleBody.cpp -++2=/home/e... [truncated message content] |
From: <eg...@us...> - 2006-04-10 18:37:57
|
Revision: 43 Author: egore Date: 2006-04-10 11:36:48 -0700 (Mon, 10 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=43&view=rev Log Message: ----------- implement player avatar plus movement Modified Paths: -------------- ChangeLog Makefile.am NEWS TODO include/Makefile.am include/application.h include/constants.h include/framelistener.h opengate.prj opengate.pws po/POTFILES.in src/Makefile.am src/Makefile.in src/application.cpp src/framelistener.cpp src/main.cpp src/ogre.cfg src/resources.cfg Added Paths: ----------- data/Materials/ data/Materials/octavius_apteryx_auv.material data/Materials/octavius_apteryx_auv.png include/avatar.h src/avatar.cpp Modified: ChangeLog =================================================================== --- ChangeLog 2006-04-10 15:04:49 UTC (rev 42) +++ ChangeLog 2006-04-10 18:36:48 UTC (rev 43) @@ -1,3 +1,31 @@ +2006-04-10 Christoph Brill <eg...@us...> + + * src/framelistener.cpp: add keybindings to movement + + * src/avatar.cpp, src/avatar.h: implement movement based on orientation of + the ship + + * src/avatar.cpp, src/avatar.h: implement rotation based on quaternions + + * src/avatar.cpp, src/avatar.h: implement movement to system axis + +2006-04-09 Christoph Brill <eg...@us...> + + * src/framelistener.cpp: add initial tries to move the avatar + + * src/avatar.cpp, include/avatar.h: add object to represent + interaction with the player, a so called "player avatar" + + * src/framelistener.cpp: comment the source and format it + + * include/framelistener.h: create proper doxygen comments for the class + + * include/application.h, src/application.cpp: No longer derive from the + ExampleFrameapplication + + * include/framelistener.h, src/framelistener.cpp: No longer derive from the + ExampleFramelistener + 2006-04-08 Christoph Brill <eg...@us...> * data/Ships/Octavius/Apteryx/octavius_aptery.mesh.xml, Modified: Makefile.am =================================================================== --- Makefile.am 2006-04-10 15:04:49 UTC (rev 42) +++ Makefile.am 2006-04-10 18:36:48 UTC (rev 43) @@ -17,8 +17,6 @@ EXTRA_DIST = $(opengatedoc_DATA) - - # Copy all the spec files. Of cource, only one is actually used. dist-hook: for specfile in *.spec; do \ Modified: NEWS =================================================================== --- NEWS 2006-04-10 15:04:49 UTC (rev 42) +++ NEWS 2006-04-10 18:36:48 UTC (rev 43) @@ -1,2 +1,5 @@ +2006-04-10 +- implement basic movement and rotation + 2006-04-01 - add code tests Modified: TODO =================================================================== --- TODO 2006-04-10 15:04:49 UTC (rev 42) +++ TODO 2006-04-10 18:36:48 UTC (rev 43) @@ -0,0 +1,2432 @@ +Index: src/framelistener.cpp +=================================================================== +--- src/framelistener.cpp (Revision 40) ++++ src/framelistener.cpp (Arbeitskopie) +@@ -2,8 +2,8 @@ + * framelistener.cpp + * + * Sat Apr 8 10:51:05 2006 +- * Copyright 2006 User +- * Email ++ * Copyright 2006 Christoph Brill ++ * Email <eg...@us...> + ****************************************************************************/ + + /* +@@ -24,13 +24,382 @@ + + #include "framelistener.h" + +-MyListener::MyListener(RenderWindow* win, Camera* cam) : ExampleFrameListener(win, cam) { ++MyListener::MyListener(RenderWindow* win, Camera* cam, Avatar* avatar, ++ bool useBufferedInputKeys = false, ++ bool useBufferedInputMouse = false) { ++ mDebugOverlay = OverlayManager::getSingleton().getByName("Core/DebugOverlay"); ++ mUseBufferedInputKeys = useBufferedInputKeys; ++ mUseBufferedInputMouse = useBufferedInputMouse; ++ mInputTypeSwitchingOn = mUseBufferedInputKeys || mUseBufferedInputMouse; ++ mRotateSpeed = 36; ++ mMoveSpeed = 100; ++ ++ if (mInputTypeSwitchingOn) { ++ mEventProcessor = new EventProcessor(); ++ mEventProcessor->initialise(win); ++ mEventProcessor->startProcessingEvents(); ++ mEventProcessor->addKeyListener(this); ++ mInputDevice = mEventProcessor->getInputReader(); ++ } else { ++ mInputDevice = PlatformManager::getSingleton().createInputReader(); ++ mInputDevice->initialise(win, true, true); ++ } ++ ++ mCamera = cam; ++ mWindow = win; ++ mAvatar = avatar; ++ mStatsOn = true; ++ mNumScreenShots = 0; ++ mTimeUntilNextToggle = 0; ++ mSceneDetailIndex = 0; ++ mMoveScale = 0.0f; ++ mRotScale = 0.0f; ++ mTranslateVector = Vector3::ZERO; ++ mAniso = 1; ++ mFiltering = TFO_BILINEAR; ++ ++ showDebugOverlay(true); + } + ++MyListener::~MyListener() { ++ if (mInputTypeSwitchingOn) { ++ delete mEventProcessor; ++ } else { ++ PlatformManager::getSingleton().destroyInputReader( mInputDevice ); ++ } ++} ++ ++void MyListener::updateStats() { ++ static String currFps = "Current FPS: "; ++ static String avgFps = "Average FPS: "; ++ static String bestFps = "Best FPS: "; ++ static String worstFps = "Worst FPS: "; ++ static String tris = "Triangle Count: "; ++ ++ // update stats when necessary ++ try { ++ ++ // get the statistics from the window ++ const RenderTarget::FrameStats& stats = mWindow->getStatistics(); ++ ++ // get overlay elements for the statistics ++ OverlayElement* guiAvg = OverlayManager::getSingleton().getOverlayElement("Core/AverageFps"); ++ OverlayElement* guiCurr = OverlayManager::getSingleton().getOverlayElement("Core/CurrFps"); ++ OverlayElement* guiBest = OverlayManager::getSingleton().getOverlayElement("Core/BestFps"); ++ OverlayElement* guiWorst = OverlayManager::getSingleton().getOverlayElement("Core/WorstFps"); ++ OverlayElement* guiTris = OverlayManager::getSingleton().getOverlayElement("Core/NumTris"); ++ OverlayElement* guiDbg = OverlayManager::getSingleton().getOverlayElement("Core/DebugText"); ++ ++ // add textual context to the overlay elements ++ guiAvg->setCaption(avgFps + StringConverter::toString(stats.avgFPS)); ++ guiCurr->setCaption(currFps + StringConverter::toString(stats.lastFPS)); ++ guiBest->setCaption(bestFps + StringConverter::toString(stats.bestFPS) ++ +" "+StringConverter::toString(stats.bestFrameTime)+" ms"); ++ guiWorst->setCaption(worstFps + StringConverter::toString(stats.worstFPS) ++ +" "+StringConverter::toString(stats.worstFrameTime)+" ms"); ++ guiTris->setCaption(tris + StringConverter::toString(stats.triangleCount)); ++ guiDbg->setCaption(mWindow->getDebugText()); ++ ++ } catch(...) { ++ // ignore all errors, because in worst case the statistics are not shown ++ } ++} ++ ++bool MyListener::processUnbufferedKeyInput(const FrameEvent& evt) { ++ ++ // Move avatar forwards ++ if (mInputDevice->isKeyDown(KC_U)) { ++ mAvatar->move(Avatar::FRONT, mMoveScale); ++ } ++ ++ // Move avatar backwards ++ if (mInputDevice->isKeyDown(KC_N)) { ++ mAvatar->move(Avatar::BACK, mMoveScale); ++ } ++ ++ // Move avatar forwards ++ if (mInputDevice->isKeyDown(KC_I)) { ++ mAvatar->move(Avatar::PITCH_DOWN, mMoveScale); ++ } ++ ++ // Move avatar backwards ++ if (mInputDevice->isKeyDown(KC_K)) { ++ mAvatar->move(Avatar::PITCH_UP, mMoveScale); ++ } ++ ++ // Move avatar left ++ if (mInputDevice->isKeyDown(KC_J)) { ++ mAvatar->move(Avatar::YAW_LEFT, mMoveScale); ++ } ++ ++ // Move avatar right ++ if (mInputDevice->isKeyDown(KC_L)) { ++ mAvatar->move(Avatar::YAW_RIGHT, mMoveScale); ++ } ++ ++ // Move avatar up ++ if (mInputDevice->isKeyDown(KC_PERIOD)) { ++ mAvatar->move(Avatar::ROLL_RIGHT, mMoveScale); ++ } ++ ++ // Move avatar down ++ if (mInputDevice->isKeyDown(KC_COMMA)) { ++ mAvatar->move(Avatar::ROLL_LEFT, mMoveScale); ++ } ++ ++ // Move camera left ++ if (mInputDevice->isKeyDown(KC_A)) { ++ mTranslateVector.x = -mMoveScale; ++ } ++ ++ // Move camera right ++ if (mInputDevice->isKeyDown(KC_D)) { ++ mTranslateVector.x = mMoveScale; ++ } ++ ++ // Move camera forward ++ if (mInputDevice->isKeyDown(KC_UP) || mInputDevice->isKeyDown(KC_W) ) { ++ printf("Now\n"); ++ mTranslateVector.z = -mMoveScale; ++ } ++ ++ // Move camera backwards ++ if (mInputDevice->isKeyDown(KC_DOWN) || mInputDevice->isKeyDown(KC_S) ) { ++ mTranslateVector.z = mMoveScale; ++ } ++ ++ // Move camera up ++ if (mInputDevice->isKeyDown(KC_PGUP)) { ++ mTranslateVector.y = mMoveScale; ++ } ++ ++ // Move camera down ++ if (mInputDevice->isKeyDown(KC_PGDOWN)) { ++ mTranslateVector.y = -mMoveScale; ++ } ++ ++ // Rotate kamera right ++ if (mInputDevice->isKeyDown(KC_RIGHT)) { ++ mCamera->yaw(-mRotScale); ++ } ++ ++ // Rotate kamera left ++ if (mInputDevice->isKeyDown(KC_LEFT)) { ++ mCamera->yaw(mRotScale); ++ } ++ ++ // quit game ++ if( mInputDevice->isKeyDown(KC_ESCAPE)) { ++ return false; ++ } ++ ++ // enable immediate or buffered mouse input ++ if (mInputTypeSwitchingOn && mInputDevice->isKeyDown(KC_M) && mTimeUntilNextToggle <= 0) { ++ switchMouseMode(); ++ mTimeUntilNextToggle = 1; ++ } ++ ++ // enable immediate or buffered keyboard input ++ if (mInputTypeSwitchingOn && mInputDevice->isKeyDown(KC_K) && mTimeUntilNextToggle <= 0) { ++ switchKeyMode(); ++ mTimeUntilNextToggle = 1; ++ } ++ ++ // enable/disable statistics display ++ if (mInputDevice->isKeyDown(KC_F) && mTimeUntilNextToggle <= 0) { ++ mStatsOn = !mStatsOn; ++ showDebugOverlay(mStatsOn); ++ ++ mTimeUntilNextToggle = 1; ++ } ++ ++ // switch filtering ++ if (mInputDevice->isKeyDown(KC_T) && mTimeUntilNextToggle <= 0) { ++ switch(mFiltering) { ++ case TFO_BILINEAR: ++ mFiltering = TFO_TRILINEAR; ++ mAniso = 1; ++ break; ++ case TFO_TRILINEAR: ++ mFiltering = TFO_ANISOTROPIC; ++ mAniso = 8; ++ break; ++ case TFO_ANISOTROPIC: ++ mFiltering = TFO_BILINEAR; ++ mAniso = 1; ++ break; ++ default: ++ break; ++ } ++ MaterialManager::getSingleton().setDefaultTextureFiltering(mFiltering); ++ MaterialManager::getSingleton().setDefaultAnisotropy(mAniso); ++ ++ showDebugOverlay(mStatsOn); ++ ++ mTimeUntilNextToggle = 1; ++ } ++ ++ // create screenshot ++ if (mInputDevice->isKeyDown(KC_SYSRQ) && mTimeUntilNextToggle <= 0) { ++ char tmp[20]; ++ sprintf(tmp, "screenshot_%d.png", ++mNumScreenShots); ++ mWindow->writeContentsToFile(tmp); ++ mTimeUntilNextToggle = 0.5; ++ mWindow->setDebugText(String("Wrote ") + tmp); ++ } ++ ++ // switch rendermode ++ if (mInputDevice->isKeyDown(KC_R) && mTimeUntilNextToggle <=0) { ++ mSceneDetailIndex = (mSceneDetailIndex+1)%3; ++ switch(mSceneDetailIndex) { ++ case 0 : mCamera->setDetailLevel(SDL_SOLID) ; break ; ++ case 1 : mCamera->setDetailLevel(SDL_WIREFRAME) ; break ; ++ case 2 : mCamera->setDetailLevel(SDL_POINTS) ; break ; ++ } ++ mTimeUntilNextToggle = 1; ++ } ++ ++ static bool displayCameraDetails = false; ++ if (mInputDevice->isKeyDown(KC_P) && mTimeUntilNextToggle <= 0) ++ { ++ ++ displayCameraDetails = !displayCameraDetails; ++ mTimeUntilNextToggle = 1; ++ if (!displayCameraDetails) ++ mWindow->setDebugText(""); ++ } ++ if (displayCameraDetails) ++ { ++ // Print camera details ++ mWindow->setDebugText("P: " + StringConverter::toString(mCamera->getDerivedPosition()) + " " + ++ "O: " + StringConverter::toString(mCamera->getDerivedOrientation())); ++ } ++ ++ // Return true to continue rendering ++ return true; ++} ++ ++bool MyListener::processUnbufferedMouseInput(const FrameEvent& evt) { ++ /* Rotation factors, may not be used if the second mouse button is pressed. */ ++ ++ /* If the second mouse button is pressed, then the mouse movement results in ++ sliding the camera, otherwise we rotate. */ ++ if( mInputDevice->getMouseButton(1)) { ++ mTranslateVector.x += mInputDevice->getMouseRelativeX() * 0.13; ++ mTranslateVector.y -= mInputDevice->getMouseRelativeY() * 0.13; ++ } ++ else { ++ mRotX = Degree(-mInputDevice->getMouseRelativeX() * 0.13); ++ mRotY = Degree(-mInputDevice->getMouseRelativeY() * 0.13); ++ } ++ ++ return true; ++} ++ ++void MyListener::moveCamera() { ++ if (mTranslateVector != Vector3::ZERO) ++ printf("Then\n"); ++ // Make all the changes to the camera ++ // Note that YAW direction is around a fixed axis (freelook style) rather ++ // than a natural YAW (e.g. airplane) ++ mCamera->yaw(mRotX); ++ mCamera->pitch(mRotY); ++ //TODO:mCamera->roll ++ mCamera->moveRelative(mTranslateVector); ++} ++ ++void MyListener::showDebugOverlay(bool show) { ++ if (mDebugOverlay) { ++ if (show) { ++ mDebugOverlay->show(); ++ } else { ++ mDebugOverlay->hide(); ++ } ++ } ++} ++ + bool MyListener::frameStarted(const FrameEvent& evt) { +- return ExampleFrameListener::frameStarted(evt); ++ if(mWindow->isClosed()) ++ return false; ++ ++ if (!mInputTypeSwitchingOn) { ++ mInputDevice->capture(); ++ } ++ ++ if ( !mUseBufferedInputMouse || !mUseBufferedInputKeys) { ++ // one of the input modes is immediate, so setup what is needed for ++ // immediate mouse/key movement ++ if (mTimeUntilNextToggle >= 0) { ++ mTimeUntilNextToggle -= evt.timeSinceLastFrame; ++ } ++ ++ // If this is the first frame, pick a speed ++ if (evt.timeSinceLastFrame == 0) { ++ mMoveScale = 1; ++ mRotScale = 0.1; ++ ++ // Otherwise scale movement units by time passed since last frame ++ } else { ++ // Move about 100 units per second, ++ mMoveScale = mMoveSpeed * evt.timeSinceLastFrame; ++ // Take about 10 seconds for full rotation ++ mRotScale = mRotateSpeed * evt.timeSinceLastFrame; ++ } ++ mRotX = 0; ++ mRotY = 0; ++ mTranslateVector = Vector3::ZERO; ++ } ++ ++ if (mUseBufferedInputKeys) { ++ // no need to do any processing here, it is handled by event ++ // processor and you get the results as KeyEvents ++ } else { ++ if (processUnbufferedKeyInput(evt) == false) { ++ // Game quit ++ return false; ++ } ++ } ++ ++ if (mUseBufferedInputMouse) { ++ // no need to do any processing here, it is handled by event ++ // processor and you get the results as KeyEvents ++ } else { ++ if (processUnbufferedMouseInput(evt) == false) { ++ // Game quit ++ return false; ++ } ++ } ++ ++ // one of the input modes is immediate, so update the movement vector ++ if ( !mUseBufferedInputMouse || !mUseBufferedInputKeys) { ++ moveCamera(); ++ } ++ ++ return true; + } + + bool MyListener::frameEnded(const FrameEvent& evt) { +- return ExampleFrameListener::frameEnded(evt); ++ updateStats(); ++ return true; + } ++ ++void MyListener::switchMouseMode() { ++ mUseBufferedInputMouse = !mUseBufferedInputMouse; ++ mInputDevice->setBufferedInput(mUseBufferedInputKeys, mUseBufferedInputMouse); ++} ++ ++void MyListener::switchKeyMode() { ++ mUseBufferedInputKeys = !mUseBufferedInputKeys; ++ mInputDevice->setBufferedInput(mUseBufferedInputKeys, mUseBufferedInputMouse); ++} ++ ++void MyListener::keyClicked(KeyEvent* e) { ++ if (e->getKeyChar() == 'm') { ++ switchMouseMode(); ++ } else if (e->getKeyChar() == 'k') { ++ switchKeyMode(); ++ } ++} ++ ++void MyListener::keyPressed(KeyEvent* e) {} ++void MyListener::keyReleased(KeyEvent* e) {} +Index: src/Makefile.in +=================================================================== +--- src/Makefile.in (Revision 40) ++++ src/Makefile.in (Arbeitskopie) +@@ -51,7 +51,7 @@ + binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) + PROGRAMS = $(bin_PROGRAMS) + am_opengate_OBJECTS = main.$(OBJEXT) application.$(OBJEXT) \ +- framelistener.$(OBJEXT) ++ framelistener.$(OBJEXT) avatar.$(OBJEXT) + opengate_OBJECTS = $(am_opengate_OBJECTS) + opengate_DEPENDENCIES = + DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +@@ -196,7 +196,7 @@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ + INCLUDES = \ +- -I/usr/include/OGRE -I/usr/include/CEGUI -I/usr/share/doc/ogre-1.0.7/Samples/Common/include -I../include ++ -I/usr/include/OGRE -I/usr/include/CEGUI -I../include + + AM_CXXFLAGS = \ + -g -DEXT_HASH\ +@@ -206,7 +206,8 @@ + opengate_SOURCES = \ + main.cpp\ + application.cpp\ +- framelistener.cpp ++ framelistener.cpp\ ++ avatar.cpp + + opengate_LDFLAGS = \ + -L/usr/local/lib +@@ -286,6 +287,7 @@ + -rm -f *.tab.c + + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avatar.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framelistener.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ + +Index: src/application.cpp +=================================================================== +--- src/application.cpp (Revision 40) ++++ src/application.cpp (Arbeitskopie) +@@ -26,13 +26,79 @@ + #include "constants.h" + + OpengateApp::OpengateApp() { +- ++ mFrameListener = 0; ++ mRoot = 0; + } + + OpengateApp::~OpengateApp() { ++ if (mFrameListener) ++ delete mFrameListener; ++ if (mRoot) ++ delete mRoot; ++} + ++void OpengateApp::go(void) { ++ if (!setup()) ++ return; ++ ++ mRoot->startRendering(); ++ ++ // clean up ++ destroyScene(); + } + ++bool OpengateApp::setup(void) { ++ mRoot = new Root(); ++ ++ setupResources(); ++ ++ bool carryOn = configure(); ++ if (!carryOn) return false; ++ ++ chooseSceneManager(); ++ ++ // Set default mipmap level (NB some APIs ignore this) ++ TextureManager::getSingleton().setDefaultNumMipmaps(5); ++ ++ // Create any resource listeners (for loading screens) ++ createResourceListener(); ++ // Load resources ++ loadResources(); ++ ++ // Create the scene ++ createScene(); ++ ++ createCamera(); ++ createViewports(); ++ ++ createFrameListener(); ++ ++ return true; ++ ++} ++ ++bool OpengateApp::configure(void) { ++ // Show the configuration dialog and initialise the system ++ // You can skip this and use root.restoreConfig() to load configuration ++ // settings if you were sure there are valid ones saved in ogre.cfg ++ if(mRoot->showConfigDialog()) ++ { ++ // If returned true, user clicked OK so initialise ++ // Here we choose to let the system create a default rendering window by passing 'true' ++ mWindow = mRoot->initialise(true); ++ return true; ++ } ++ else ++ { ++ return false; ++ } ++} ++ ++void OpengateApp::chooseSceneManager(void) { ++ // Get the SceneManager, in this case a generic one ++ mSceneMgr = mRoot->getSceneManager(ST_GENERIC); ++} ++ + void OpengateApp::createCamera() { + // create the camera + mCamera = mSceneMgr->createCamera("PlayerCam"); +@@ -40,11 +106,13 @@ + // set its position, direction + mCamera->setPosition(Vector3(0,10,50)); + mCamera->lookAt(Vector3(0,0,0)); ++ //mCamera->setAutoTracking (true, mAvatarNode); // The camera will always look at the camera target ++ //mCamera->setFixedYawAxis (true); // Needed because of auto tracking + + mCamera->setNearClipDistance(5); + } + +-void OpengateApp::createViewports(void) { ++void OpengateApp::createViewports() { + // Create one viewport, entire window + Viewport* vp = mWindow->addViewport(mCamera); + vp->setBackgroundColour(ColourValue(0,0,0)); +@@ -53,21 +121,66 @@ + mCamera->setAspectRatio(Real(vp->getActualWidth()) / Real(vp->getActualHeight())); + } + +-void OpengateApp::createScene(void) { +- Entity* ent; +- ++void OpengateApp::createScene() { + // create an ambient light for the scene + mSceneMgr->setAmbientLight( ColourValue( 1, 1, 1 ) ); + mSceneMgr->setShadowTechnique( SHADOWTYPE_STENCIL_ADDITIVE ); + + // Create an entity +- ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); +- mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent); ++ Entity* ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); ++ mAvatarNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); ++ mAvatarNode->attachObject(ent); ++ mAvatarNode->setPosition(Vector3(0,0,30)); ++ mAvatarNode->rotate(Vector3(0.,1.,0.),Degree(-90)); ++ //mSightNode = node->createChildSceneNode ("Octavius Apteryx" + "_sight", Vector3 (0, 0, 100)); ++ mAvatar = new Avatar(mAvatarNode); ++ + ent = mSceneMgr->createEntity( "Quantar Storm", "Ships/Quantar/Storm/quantar_storm.mesh" ); +- mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent); ++ SceneNode* node2 = mSceneMgr->getRootSceneNode()->createChildSceneNode(); ++ node2->attachObject(ent); + } ++ ++void OpengateApp::destroyScene(void) { ++ ++} + + void OpengateApp::createFrameListener(void) { +- mFrameListener = new MyListener(mWindow, mCamera); ++ mFrameListener = new MyListener(mWindow, mCamera, mAvatar, false, false); ++ mFrameListener->showDebugOverlay(true); + mRoot->addFrameListener(mFrameListener); + } ++ ++void OpengateApp::setupResources(void) { ++ // Load resource paths from config file ++ ConfigFile cf; ++ cf.load("resources.cfg"); ++ ++ // Go through all sections & settings in the file ++ ConfigFile::SectionIterator seci = cf.getSectionIterator(); ++ ++ String secName, typeName, archName; ++ while (seci.hasMoreElements()) ++ { ++ secName = seci.peekNextKey(); ++ ConfigFile::SettingsMultiMap *settings = seci.getNext(); ++ ConfigFile::SettingsMultiMap::iterator i; ++ for (i = settings->begin(); i != settings->end(); ++i) ++ { ++ typeName = i->first; ++ archName = i->second; ++ ResourceGroupManager::getSingleton().addResourceLocation( ++ archName, typeName, secName); ++ } ++ } ++} ++ ++void OpengateApp::createResourceListener(void) ++{ ++ ++} ++ ++void OpengateApp::loadResources(void) { ++ // Initialise, parse scripts etc ++ ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); ++ ++} +Index: src/main.cpp +=================================================================== +--- src/main.cpp (Revision 40) ++++ src/main.cpp (Arbeitskopie) +@@ -1,3 +1,27 @@ ++/*************************************************************************** ++ * main.cpp ++ * ++ * Sat Apr 8 10:51:05 2006 ++ * Copyright 2006 Christoph Brill ++ * Email <eg...@us...> ++ ****************************************************************************/ ++ ++/* ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ */ ++ + #include "application.h" + + #ifdef __cplusplus +Index: src/resources.cfg +=================================================================== +--- src/resources.cfg (Revision 40) ++++ src/resources.cfg (Arbeitskopie) +@@ -6,6 +6,7 @@ + # Resource locations to be added to the default path + [General] + FileSystem=../data ++FileSystem=../data/Materials + FileSystem=../media + FileSystem=../media/fonts + FileSystem=../media/materials/programs +Index: src/Makefile.am +=================================================================== +--- src/Makefile.am (Revision 40) ++++ src/Makefile.am (Arbeitskopie) +@@ -5,7 +5,7 @@ + ## Please disable it in the Anjuta project configuration + + INCLUDES =\ +- -I/usr/include/OGRE -I/usr/include/CEGUI -I/usr/share/doc/ogre-1.0.7/Samples/Common/include -I../include ++ -I/usr/include/OGRE -I/usr/include/CEGUI -I../include + + AM_CXXFLAGS =\ + -g -DEXT_HASH\ +@@ -17,7 +17,8 @@ + opengate_SOURCES = \ + main.cpp\ + application.cpp\ +- framelistener.cpp ++ framelistener.cpp\ ++ avatar.cpp + + opengate_LDFLAGS = \ + -L/usr/local/lib +Index: src/ogre.cfg +=================================================================== +--- src/ogre.cfg (Revision 32) ++++ src/ogre.cfg (Arbeitskopie) +@@ -1,4 +1,4 @@ + Render System OpenGL Rendering Subsystem + FSAA 0 + Full Screen No +-Video Mode 800 x 600 ++Video Mode 640 x 480 +Index: data/Materials/octavius_apteryx_auv.material +=================================================================== +--- data/Materials/octavius_apteryx_auv.material (Revision 0) ++++ data/Materials/octavius_apteryx_auv.material (Revision 0) +@@ -0,0 +1,13 @@ ++material octavius_apteryx_auv ++{ ++ technique ++ { ++ pass ++ { ++ texture_unit ++ { ++ octavius_apteryx_auv.png ++ } ++ } ++ } ++} +Index: data/Materials/octavius_apteryx_auv.png +=================================================================== +Kann nicht anzeigen: Dateityp ist als bin\xE4r angegeben. +svn:mime-type = application/octet-stream + +Eigenschafts\xE4nderungen: data/Materials/octavius_apteryx_auv.png +___________________________________________________________________ +Name: svn:mime-type + + application/octet-stream + +Index: opengate.pws +=================================================================== +--- opengate.pws (Revision 41) ++++ opengate.pws (Arbeitskopie) +@@ -1,11 +1,11 @@ + + [filenumbers] +-0=28 +-1=8 +-2=25 +-3=25 +-4=41 +-5=66 ++0=589 ++1=209 ++2=134 ++3=173 ++4=28 ++5=58 + 6=1 + + [filemarkers] +@@ -29,13 +29,12 @@ + clean before build=false + + [filelist] +-0=/home/egore/source/opengate/include/constants.h +-1=/home/egore/source/opengate/src/resources.cfg +-2=/home/egore/source/opengate/include/application.h ++0=/home/egore/ogrekram/src/c_PhysicalObject.cpp ++1=/home/egore/ogrekram/src/c_SimpleBody.cpp ++2=/home/egore/source/opengate/src/application.cpp + 3=/home/egore/source/opengate/src/framelistener.cpp +-4=/home/egore/source/opengate/include/framelistener.h +-5=/home/egore/source/opengate/src/application.cpp +-6=/home/egore/source/opengate/src/main.cpp ++4=/home/egore/source/opengate/include/avatar.h ++5=/home/egore/source/opengate/src/avatar.cpp + + [Project Tree] + 0=0 +Index: NEWS +=================================================================== +--- NEWS (Revision 32) ++++ NEWS (Arbeitskopie) +@@ -1,2 +1,5 @@ ++2006-04-10 ++- implement basic movement and rotation ++ + 2006-04-01 + - add code tests +Index: po/POTFILES.in +=================================================================== +--- po/POTFILES.in (Revision 41) ++++ po/POTFILES.in (Arbeitskopie) +@@ -8,5 +8,6 @@ + src/main.cpp + src/application.cpp + src/framelistener.cpp ++src/avatar.cpp + + +Index: include/constants.h +=================================================================== +--- include/constants.h (Revision 39) ++++ include/constants.h (Arbeitskopie) +@@ -2,8 +2,8 @@ + * constants.h + * + * Sat Apr 8 13:13:56 2006 +- * Copyright 2006 User +- * Email ++ * Copyright 2006 Christoph Brill ++ * Email <eg...@us...> + ****************************************************************************/ + + /* +Index: include/framelistener.h +=================================================================== +--- include/framelistener.h (Revision 39) ++++ include/framelistener.h (Arbeitskopie) +@@ -2,8 +2,8 @@ + * framelistener.h + * + * Sat Apr 8 10:50:05 2006 +- * Copyright 2006 User +- * Email ++ * Copyright 2006 Christoph Brill ++ * Email <eg...@us...> + ****************************************************************************/ + + /* +@@ -25,22 +25,207 @@ + #ifndef _FRAMELISTENER_H + #define _FRAMELISTENER_H + +-#include <ExampleFrameListener.h> ++#include <Ogre.h> ++#include <OgreKeyEvent.h> ++#include <OgreEventListeners.h> ++#include <OgreStringConverter.h> ++#include <OgreException.h> ++#include "avatar.h" + + #ifdef __cplusplus + extern "C" + { + #endif + ++using namespace Ogre; ++ + // Declare a subclass of the ExampleFrameListener class +-class MyListener : public ExampleFrameListener { ++class MyListener : public FrameListener, public KeyListener { + public: +- MyListener(RenderWindow* win, Camera* cam); + ++ /*! \brief The constructor that creates the object that reacts to user input ++ * ++ * \param win This constructor takes a RenderWindow because it uses that to ++ * determine input context ++ * \param cam A handle to the camera so we can move it on keyboard or mouse ++ * input ++ * \param useBufferedInputKeys Flag to set if the keyboard input should be ++ * buffered or not ++ * \param useBufferedInputMouse Flag to set if the mouse input should be ++ * buffered or not ++ */ ++ MyListener(RenderWindow* win, Camera* cam, Avatar* avatar, ++ bool useBufferedInputKeys, bool useBufferedInputMouse); ++ ++ /*! \brief The destructor to free the input readers ++ * ++ * It will destroy either the reader for buffered or unbuffered input, ++ * depending on what was chosen in the constructor ++ */ ++ ~MyListener(); ++ ++ /*! \brief This method processes the keyboard events ++ * ++ * This method is called during frameStarted() and only processes unbuffered ++ * keyboard events (if buffered keyboard events are used the are processed ++ * by the InputReader) ++ * ++ * \param evt The frame event from frameStarted() ++ */ ++ bool processUnbufferedKeyInput(const FrameEvent& evt); ++ ++ /*! \brief This method processes the mouse events ++ * ++ * This method is called during frameStarted() and only processes unbuffered ++ * mouse events (if buffered mouse events are used the are processed by the ++ * InputReader calling keyClicked()) ++ * ++ * \param evt The frame event from frameStarted() ++ */ ++ bool processUnbufferedMouseInput(const FrameEvent& evt); ++ ++ /*! \brief Make all the camera movement ++ * ++ * This method is called after the unbuffered input events are processed ++ * and have modified the translation vector, yaw and pitch ++ */ ++ void moveCamera(); ++ ++ /*! \brief Enable or disbale the debug overlay ++ * ++ * This method changes the visibility status of the debug overlay which was ++ * retrieved in the constructor from the overlay manager ++ */ ++ void showDebugOverlay(bool show); ++ ++ /*! \brief Perform user interaction ++ * ++ * This method updates the camera depending on the user interaction (i.e. ++ * keyboard and mouse events). It is called before the actual rendering ++ * happens. ++ */ + bool frameStarted(const FrameEvent& evt); + +- bool frameEnded(const FrameEvent& evt); ++ /*! \brief Update statistics ++ * ++ * This method is called after the frame is rendered and refreshes the ++ * statistics. ++ */ ++ bool frameEnded(const FrameEvent& evt); + ++ /*! \brief Switch mousemode from buffered<->immediate ++ */ ++ void switchMouseMode(); ++ ++ /*! \brief Switch keymode from buffered<->immediate ++ */ ++ void switchKeyMode(); ++ ++ /*! \brief Performes updates when a key was pressed AND released ++ * ++ * This method is part of the KeyListener interface of OGRE ++ * ++ * It is called by the buffered KeyListener when a key was klicked (pressed ++ * and afterwards released ++ */ ++ void keyClicked(KeyEvent* e); ++ ++ /*! \brief Performes updates when a key was released ++ * ++ * This method is part of the KeyListener interface of OGRE ++ * ++ * It is called by the buffered KeyListener when a key was released ++ */ ++ void keyPressed(KeyEvent* e); ++ ++ /*! \brief Performes updates when a key was pressed ++ * ++ * This method is part of the KeyListener interface of OGRE ++ * ++ * It is called by the buffered KeyListener when a key was pressed ++ */ ++ void keyReleased(KeyEvent* e); ++ ++protected: ++ ++ /*! \brief This method updates the status (FPS,Triangles,etc.) ++ * ++ * This method is called at the end of every frame to update the statistics ++ * that are shown on screen (in the statistics area of the window). It will ++ * retrieve the stats (RenderTarget::FrameStats) from the window, get the ++ * according overlays of the statistics (provided by the OverlayManager) ++ * and print the stats to the overlays. ++ */ ++ void updateStats(); ++ ++ ++ /*! Value used to cycle thorugh the scene details ++ */ ++ int mSceneDetailIndex; ++ /*! Movement speed of the camera ++ */ ++ Real mMoveSpeed; ++ /*! Rotation speed of the camera ++ */ ++ Degree mRotateSpeed; ++ /*! Handle to the debug overlay (which displays the OGRE logo and stats ++ */ ++ Overlay* mDebugOverlay; ++ /*! An event processor used, if the mouse or the keyboard input is buffered ++ */ ++ EventProcessor* mEventProcessor; ++ /*! An input reader for unbuffered mouse and keyboard input */ ++ InputReader* mInputDevice; ++ /*! Handle to the players camera so we can move it on mouse or keyboard ++ * input ++ */ ++ Camera* mCamera; ++ /*! Vector used to modify the movement of the camera ++ */ ++ Vector3 mTranslateVector; ++ /*! Handle to the window where the contents is shown (used for statistics ++ * updates ++ */ ++ RenderWindow* mWindow; ++ /*! Flag to determine whether the stats should be displayed or not ++ */ ++ bool mStatsOn; ++ /*! Flag to determine if the input of the keyboard is buffered or ++ * unbuffered ++ */ ++ bool mUseBufferedInputKeys; ++ /*! Flag to determine if the input of the mouse is buffered or unbuffered ++ */ ++ bool mUseBufferedInputMouse; ++ /*! Flag to determine if the input can be switched from buffered to ++ * unbuffered. This is only possible if we created an instance of this ++ * class with at least one buffered input ++ */ ++ bool mInputTypeSwitchingOn; ++ /*! Variable holding the current number of screenshots made (used to create ++ * the filename of the screenshot ++ */ ++ unsigned int mNumScreenShots; ++ /*! Value to move the camera */ ++ float mMoveScale; ++ /*! Value to rotate the camera */ ++ Degree mRotScale; ++ /*! Value to stop flickering of toggles */ ++ Real mTimeUntilNextToggle; ++ /*! Value to rotate the camera by X (=yaw) ++ */ ++ Radian mRotX; ++ /*! Value to rotate the camera by Y (=pitch) ++ */ ++ Radian mRotY; ++ /*! Filtering method for the scene ++ */ ++ TextureFilterOptions mFiltering; ++ /*! Number of anisotropic filtering processes ++ */ ++ int mAniso; ++ /*! Handle to the avatar */ ++ Avatar* mAvatar; + }; + + #ifdef __cplusplus +Index: include/application.h +=================================================================== +--- include/application.h (Revision 39) ++++ include/application.h (Arbeitskopie) +@@ -2,8 +2,8 @@ + * application.h + * + * Sat Apr 8 10:26:58 2006 +- * Copyright 2006 User +- * Email ++ * Copyright 2006 Christoph Brill ++ * Email <eg...@us...> + ****************************************************************************/ + + /* +@@ -25,8 +25,10 @@ + #ifndef _APPLICATION_H + #define _APPLICATION_H + +-#include <ExampleApplication.h> ++#include <Ogre.h> ++#include <OgreConfigFile.h> + #include "framelistener.h" ++#include "avatar.h" + + #ifdef __cplusplus + extern "C" +@@ -36,7 +38,7 @@ + /*! + * + */ +-class OpengateApp : public ExampleApplication { ++class OpengateApp { + public: + + /*! \brief This default constructor instantiates an Application +@@ -52,9 +54,29 @@ + * + * When this destructor is called, the game is done and will quit. + */ +- ~OpengateApp(); ++ virtual ~OpengateApp(); + ++ virtual void go(void); ++ + protected: ++ ++ Avatar* mAvatar; ++ SceneNode* mAvatarNode; ++ ++ Root* mRoot; ++ Camera* mCamera; ++ SceneManager* mSceneMgr; ++ MyListener* mFrameListener; ++ RenderWindow* mWindow; ++ ++ /** Sets up the application - returns false if the user chooses to abandon configuration. */ ++ bool setup(void); ++ ++ /** Configures the application - returns false if the user chooses to abandon configuration. */ ++ bool configure(void); ++ ++ void chooseSceneManager(void); ++ + /*! \brief Creates a camera for the scene + * + * This method creates the necessary cameras for the game. Since we have a +@@ -62,7 +84,7 @@ + * do that. It would be possible to do that with one camera, but the concept + * in OGRE3D is to use 2 cameras. + */ +- virtual void createCamera(); ++ void createCamera(); + + /*! \brief Creates a viewport with the given cameras for the scene + * +@@ -80,11 +102,24 @@ + */ + virtual void createScene(void); + ++ virtual void destroyScene(void); ++ + /*! \biref Create the frame listener for the game + * + * This method creates the framelistener necessary to render a scene + */ + void createFrameListener(void); ++ ++ /// Method which will define the source of resources (other than current folder) ++ virtual void setupResources(void); ++ ++ /// Optional override method where you can create resource listeners (e.g. for loading screens) ++ virtual void createResourceListener(void); ++ ++ /// Optional override method where you can perform resource group loading ++ /// Must at least do ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); ++ virtual void loadResources(void); ++ + }; + + #ifdef __cplusplus +Index: include/Makefile.am +=================================================================== +--- include/Makefile.am (Revision 39) ++++ include/Makefile.am (Arbeitskopie) +@@ -9,6 +9,8 @@ + opengate_include_DATA = \ + application.h\ + framelistener.h\ +- constants.h ++ constants.h\ ++ optimize.h\ ++ avatar.h + + EXTRA_DIST = $(opengate_include_DATA) +Index: ChangeLog +=================================================================== +--- ChangeLog (Revision 41) ++++ ChangeLog (Arbeitskopie) +@@ -1,3 +1,31 @@ ++2006-04-10 Christoph Brill <eg...@us...> ++ ++ * src/framelistener.cpp: add keybindings to movement ++ ++ * src/avatar.cpp, src/avatar.h: implement movement based on orientation of ++ the ship ++ ++ * src/avatar.cpp, src/avatar.h: implement rotation based on quaternions ++ ++ * src/avatar.cpp, src/avatar.h: implement movement to system axis ++ ++2006-04-09 Christoph Brill <eg...@us...> ++ ++ * src/framelistener.cpp: add initial tries to move the avatar ++ ++ * src/avatar.cpp, include/avatar.h: add object to represent ++ interaction with the player, a so called "player avatar" ++ ++ * src/framelistener.cpp: comment the source and format it ++ ++ * include/framelistener.h: create proper doxygen comments for the class ++ ++ * include/application.h, src/application.cpp: No longer derive from the ++ ExampleFrameapplication ++ ++ * include/framelistener.h, src/framelistener.cpp: No longer derive from the ++ ExampleFramelistener ++ + 2006-04-08 Christoph Brill <eg...@us...> + + * data/Ships/Octavius/Apteryx/octavius_aptery.mesh.xml, +Index: opengate.prj +=================================================================== +--- opengate.prj (Revision 41) ++++ opengate.prj (Arbeitskopie) +@@ -69,14 +69,17 @@ + module.include.files=\ + application.h\ + framelistener.h\ +- constants.h ++ constants.h\ ++ optimize.h\ ++ avatar.h + + module.source.name=src + module.source.type= + module.source.files=\ + main.cpp\ + application.cpp\ +- framelistener.cpp ++ framelistener.cpp\ ++ avatar.cpp + + module.pixmap.name=pixmaps + module.pixmap.type= +@@ -102,7 +105,6 @@ + compiler.options.include.paths=\ + /usr/include/OGRE\ + /usr/include/CEGUI\ +- /usr/share/doc/ogre-1.0.7/Samples/Common/include\ + ../include + compiler.options.library.paths=\ + /usr/local/lib +Index: TODO +=================================================================== +--- TODO (Revision 32) ++++ TODO (Arbeitskopie) +@@ -0,0 +1,1207 @@ ++Index: src/framelistener.cpp ++=================================================================== ++--- src/framelistener.cpp (Revision 40) +++++ src/framelistener.cpp (Arbeitskopie) ++@@ -2,8 +2,8 @@ ++ * framelistener.cpp ++ * ++ * Sat Apr 8 10:51:05 2006 ++- * Copyright 2006 User ++- * Email +++ * Copyright 2006 Christoph Brill +++ * Email <eg...@us...> ++ ****************************************************************************/ ++ ++ /* ++@@ -24,13 +24,382 @@ ++ ++ #include "framelistener.h" ++ ++-MyListener::MyListener(RenderWindow* win, Camera* cam) : ExampleFrameListener(win, cam) { +++MyListener::MyListener(RenderWindow* win, Camera* cam, Avatar* avatar, +++ bool useBufferedInputKeys = false, +++ bool useBufferedInputMouse = false) { +++ mDebugOverlay = OverlayManager::getSingleton().getByName("Core/DebugOverlay"); +++ mUseBufferedInputKeys = useBufferedInputKeys; +++ mUseBufferedInputMouse = useBufferedInputMouse; +++ mInputTypeSwitchingOn = mUseBufferedInputKeys || mUseBufferedInputMouse; +++ mRotateSpeed = 36; +++ mMoveSpeed = 100; +++ +++ if (mInputTypeSwitchingOn) { +++ mEventProcessor = new EventProcessor(); +++ mEventProcessor->initialise(win); +++ mEventProcessor->startProcessingEvents(); +++ mEventProcessor->addKeyListener(this); +++ mInputDevice = mEventProcessor->getInputReader(); +++ } else { +++ mInputDevice = PlatformManager::getSingleton().createInputReader(); +++ mInputDevice->initialise(win, true, true); +++ } +++ +++ mCamera = cam; +++ mWindow = win; +++ mAvatar = avatar; +++ mStatsOn = true; +++ mNumScreenShots = 0; +++ mTimeUntilNextToggle = 0; +++ mSceneDetailIndex = 0; +++ mMoveScale = 0.0f; +++ mRotScale = 0.0f; +++ mTranslateVector = Vector3::ZERO; +++ mAniso = 1; +++ mFiltering = TFO_BILINEAR; +++ +++ showDebugOverlay(true); ++ } ++ +++MyListener::~MyListener() { +++ if (mInputTypeSwitchingOn) { +++ delete mEventProcessor; +++ } else { +++ PlatformManager::getSingleton().destroyInputReader( mInputDevice ); +++ } +++} +++ +++void MyListener::updateStats() { +++ static String currFps = "Current FPS: "; +++ static String avgFps = "Average FPS: "; +++ static String bestFps = "Best FPS: "; +++ static String worstFps = "Worst FPS: "; +++ static String tris = "Triangle Count: "; +++ +++ // update stats when necessary +++ try { +++ +++ // get the statistics from the window +++ const RenderTarget::FrameStats& stats = mWindow->getStatistics(); +++ +++ // get overlay elements for the statistics +++ OverlayElement* guiAvg = OverlayManager::getSingleton().getOverlayElement("Core/AverageFps"); +++ OverlayElement* guiCurr = OverlayManager::getSingleton().getOverlayElement("Core/CurrFps"); +++ OverlayElement* guiBest = OverlayManager::getSingleton().getOverlayElement("Core/BestFps"); +++ OverlayElement* guiWorst = OverlayManager::getSingleton().getOverlayElement("Core/WorstFps"); +++ OverlayElement* guiTris = OverlayManager::getSingleton().getOverlayElement("Core/NumTris"); +++ OverlayElement* guiDbg = OverlayManager::getSingleton().getOverlayElement("Core/DebugText"); +++ +++ // add textual context to the overlay elements +++ guiAvg->setCaption(avgFps + StringConverter::toString(stats.avgFPS)); +++ guiCurr->setCaption(currFps + StringConverter::toString(stats.lastFPS)); +++ guiBest->setCaption(bestFps + StringConverter::toString(stats.bestFPS) +++ +" "+StringConverter::toString(stats.bestFrameTime)+" ms"); +++ guiWorst->setCaption(worstFps + StringConverter::toString(stats.worstFPS) +++ +" "+StringConverter::toString(stats.worstFrameTime)+" ms"); +++ guiTris->setCaption(tris + StringConverter::toString(stats.triangleCount)); +++ guiDbg->setCaption(mWindow->getDebugText()); +++ +++ } catch(...) { +++ // ignore all errors, because in worst case the statistics are not shown +++ } +++} +++ +++bool MyListener::processUnbufferedKeyInput(const FrameEvent& evt) { +++ +++ // Move avatar forwards +++ if (mInputDevice->isKeyDown(KC_U)) { +++ mAvatar->move(Avatar::FRONT, mMoveScale); +++ } +++ +++ // Move avatar backwards +++ if (mInputDevice->isKeyDown(KC_N)) { +++ mAvatar->move(Avatar::BACK, mMoveScale); +++ } +++ +++ // Move avatar forwards +++ if (mInputDevice->isKeyDown(KC_I)) { +++ mAvatar->move(Avatar::PITCH_DOWN, mMoveScale); +++ } +++ +++ // Move avatar backwards +++ if (mInputDevice->isKeyDown(KC_K)) { +++ mAvatar->move(Avatar::PITCH_UP, mMoveScale); +++ } +++ +++ // Move avatar left +++ if (mInputDevice->isKeyDown(KC_J)) { +++ mAvatar->move(Avatar::YAW_LEFT, mMoveScale); +++ } +++ +++ // Move avatar right +++ if (mInputDevice->isKeyDown(KC_L)) { +++ mAvatar->move(Avatar::YAW_RIGHT, mMoveScale); +++ } +++ +++ // Move avatar up +++ if (mInputDevice->isKeyDown(KC_PERIOD)) { +++ mAvatar->move(Avatar::ROLL_RIGHT, mMoveScale); +++ } +++ +++ // Move avatar down +++ if (mInputDevice->isKeyDown(KC_COMMA)) { +++ mAvatar->move(Avatar::ROLL_LEFT, mMoveScale); +++ } +++ +++ // Move camera left +++ if (mInputDevice->isKeyDown(KC_A)) { +++ mTranslateVector.x = -mMoveScale; +++ } +++ +++ // Move camera right +++ if (mInputDevice->isKeyDown(KC_D)) { +++ mTranslateVector.x = mMoveScale; +++ } +++ +++ // Move camera forward +++ if (mInputDevice->isKeyDown(KC_UP) || mInputDevice->isKeyDown(KC_W) ) { +++ printf("Now\n"); +++ mTranslateVector.z = -mMoveScale; +++ } +++ +++ // Move camera backwards +++ if (mInputDevice->isKeyDown(KC_DOWN) || mInputDevice->isKeyDown(KC_S) ) { +++ mTranslateVector.z = mMoveScale; +++ } +++ +++ // Move camera up +++ if (mInputDevice->isKeyDown(KC_PGUP)) { +++ mTranslateVector.y = mMoveScale; +++ } +++ +++ // Move camera down +++ if (mInputDevice->isKeyDown(KC_PGDOWN)) { +++ mTranslateVector.y = -mMoveScale; +++ } +++ +++ // Rotate kamera right +++ if (mInputDevice->isKeyDown(KC_RIGHT)) { +++ mCamera->yaw(-mRotScale); +++ } +++ +++ // Rotate kamera left +++ if (mInputDevice->isKeyDown(KC_LEFT)) { +++ mCamera->yaw(mRotScale); +++ } +++ +++ // quit game +++ if( mInputDevice->isKeyDown(KC_ESCAPE)) { +++ return false; +++ } +++ +++ // enable immediate or buffered mouse input +++ if (mInputTypeSwitchingOn && mInputDevice->isKeyDown(KC_M) && mTimeUntilNextToggle <= 0) { +++ switchMouseMode(); +++ mTimeUntilNextToggle = 1; +++ } +++ +++ // enable immediate or buffered keyboard input +++ if (mInputTypeSwitchingOn && mInputDevice->isKeyDown(KC_K) && mTimeUntilNextToggle <= 0) { +++ switchKeyMode(); +++ mTimeUntilNextToggle = 1; +++ } +++ +++ // enable/disable statistics display +++ if (mInputDevice->isKeyDown(KC_F) && mTimeUntilNextToggle <= 0) { +++ mStatsOn = !mStatsOn; +++ showDebugOverlay(mStatsOn); +++ +++ mTimeUntilNextToggle = 1; +++ } +++ +++ // switch filtering +++ if (mInputDevice->isKeyDown(KC_T) && mTimeUntilNextToggle <= 0) { +++ switch(mFiltering) { +++ case TFO_BILINEAR: +++ mFiltering = TFO_TRILINEAR; +++ mAniso = 1; +++ break; +++ case TFO_TRILINEAR: +++ mFiltering = TFO_ANISOTROPIC; +++ mAniso = 8; +++ break; +++ case TFO_ANISOTROPIC: +++ mFiltering = TFO_BILINEAR; +++ mAniso = 1; +++ break; +++ default: +++ break; +++ } +++ MaterialManager::getSingleton().setDefaultTextureFiltering(mFiltering); +++ MaterialManager::getSingleton().setDefaultAnisotropy(mAniso); +++ +++ showDebugOverlay(mStatsOn); +++ +++ mTimeUntilNextToggle = 1; +++ } +++ +++ // create screenshot +++ if (mInputDevice->isKeyDown(KC_SYSRQ) && mTimeUntilNextToggle <= 0) { +++ char tmp[20]; +++ sprintf(tmp, "screenshot_%d.png", ++mNumScreenShots); +++ mWindow->writeContentsToFile(tmp); +++ mTimeUntilNextToggle = 0.5; +++ mWindow->setDebugText(String("Wrote ") + tmp); +++ } +++ +++ // switch rendermode +++ if (mInputDevice->isKeyDown(KC_R) && mTimeUntilNextToggle <=0) { +++ mSceneDetailIndex = (mSceneDetailIndex+1)%3; +++ switch(mSceneDetailIndex) { +++ case 0 : mCamera->setDetailLevel(SDL_SOLID) ; break ; +++ case 1 : mCamera->setDetailLevel(SDL_WIREFRAME) ; break ; +++ case 2 : mCamera->setDetailLevel(SDL_POINTS) ; break ; +++ } +++ mTimeUntilNextToggle = 1; +++ } +++ +++ static bool displayCameraDetails = false; +++ if (mInputDevice->isKeyDown(KC_P) && mTimeUntilNextToggle <= 0) +++ { +++ +++ displayCameraDetails = !displayCameraDetails; +++ mTimeUntilNextToggle = 1; +++ if (!displayCameraDetails) +++ mWindow->setDebugText(""); +++ } +++ if (displayCameraDetails) +++ { +++ // Print camera details +++ mWindow->setDebugText("P: " + StringConverter::toString(mCamera->getDerivedPosition()) + " " + +++ "O: " + StringConverter::toString(mCamera->getDerivedOrientation())); +++ } +++ +++ // Return true to continue rendering +++ return true; +++} +++ +++bool MyListener::processUnbufferedMouseInput(const FrameEvent& evt) { +++ /* Rotation factors, may not be used if the second mouse button is pressed. */ +++ +++ /* If the second mouse button is pressed, then the mouse movement results in +++ sliding the camera, otherwise we rotate. */ +++ if( mInputDevice->getMouseButton(1)) { +++ mTranslateVector.x += mInputDevice->getMouseRelativeX() * 0.13; +++ mTranslateVector.y -= mInputDevice->getMouseRelativeY() * 0.13; +++ } +++ else { +++ mRotX = Degree(-mInputDevice->getMouseRelativeX() * 0.13); +++ mRotY = Degree(-mInputDevice->getMouseRelativeY() * 0.13); +++ } +++ +++ return true; +++} +++ +++void MyListener::moveCamera() { +++ if (mTranslateVector != Vector3::ZERO) +++ printf("Then\n"); +++ // Make all the changes to the camera +++ // Note that YAW direction is around a fixed axis (freelook style) rather +++ // than a natural YAW (e.g. airplane) +++ mCamera->yaw(mRotX); +++ mCamera->pitch(mRotY); +++ //TODO:mCamera->roll +++ mCamera->moveRelative(mTranslateVector); +++} +++ +++void MyListener::showDebugOverlay(bool show) { +++ if (mDebugOverlay) { +++ if (show) { +++ mDebugOverlay->show(); +++ } else { +++ mDebugOverlay->hide(); +++ } +++ } +++} +++ ++ bool MyListener::frameStarted(const FrameEvent& evt) { ++- return ExampleFrameListener::frameStarted(evt); +++ if(mWindow->isClosed()) +++ return false; +++ +++ if (!mInputTypeSwitchingOn) { +++ mInputDevice->capture(); +++ } +++ +++ if ( !mUseBufferedInputMouse || !mUseBufferedInputKeys) { +++ // one of the input modes is immediate, so setup what is needed for +++ // immediate mouse/key movement +++ if (mTimeUntilNextToggle >= 0) { +++ mTimeUntilNextToggle -= evt.timeSinceLastFrame; +++ } +++ +++ // If this is the first frame, pick a speed +++ if (evt.timeSinceLastFrame == 0) { +++ mMoveScale = 1; +++ mRotScale = 0.1; +++ +++ // Otherwise scale movement units by time passed since last frame +++ } else { +++ // Move about 100 units per second, +++ mMoveScale = mMoveSpeed * evt.timeSinceLastFrame; +++ // Take about 10 seconds for full rotation +++ mRotScale = mRotateSpeed * evt.timeSinceLastFrame; +++ } +++ mRotX = 0; +++ mRotY = 0; +++ mTranslateVector = Vector3::ZERO; +++ } +++ +++ if (mUseBufferedInputKeys) { +++ // no need to do any processing here, it is handled by event +++ // processor and you get the results as KeyEvents +++ } else { +++ if (processUnbufferedKeyInput(evt) == false) { +++ // Game quit +++ return false; +++ } +++ } +++ +++ if (mUseBufferedInputMouse) { +++ // no need to do any processing here, it is handled by event +++ // processor and you get the results as KeyEvents +++ } else { +++ if (processUnbufferedMouseInput(evt) == false) { +++ // Game quit +++ return false; +++ } +++ } +++ +++ // one of the input modes is immediate, so update the movement vector +++ if ( !mUseBufferedInputMouse || !mUseBufferedInputKeys) { +++ moveCamera(); +++ } +++ +++ return true; ++ } ++ ++ bool MyListener::frameEnded(const FrameEvent& evt) { ++- return ExampleFrameListener::frameEnded(evt); +++ updateStats(); +++ return true; ++ } +++ +++void MyListener::switchMouseMode() { +++ mUseBufferedInputMouse = !mUseBufferedInputMouse; +++ mInputDevice->setBufferedInput(mUseBufferedInputKeys, mUseBufferedInputMouse); +++} +++ +++void MyListener::switchKeyMode() { +++ mUseBufferedInputKeys = !mUseBufferedInputKeys; +++ mInputDevice->setBufferedInput(mUseBufferedInputKeys, mUseBufferedInputMouse); +++} +++ +++void MyListener::keyClicked(KeyEvent* e) { +++ if (e->getKeyChar() == 'm') { +++ switchMouseMode(); +++ } else if (e->getKeyChar() == 'k') { +++ switchKeyMode(); +++ } +++} +++ +++void MyListener::keyPressed(KeyEvent* e) {} +++void MyListener::keyReleased(KeyEvent* e) {} ++Index: src/Makefile.in ++=================================================================== ++--- src/Makefile.in (Revision 40) +++++ src/Makefile.in (Arbeitskopie) ++@@ -51,7 +51,7 @@ ++ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) ++ PROGRAMS = $(bin_PROGRAMS) ++ am_opengate_OBJECTS = main.$(OBJEXT) application.$(OBJEXT) \ ++- framelistener.$(OBJEXT) +++ framelistener.$(OBJEXT) avatar.$(OBJEXT) ++ opengate_OBJECTS = $(am_opengate_OBJECTS) ++ opengate_DEPENDENCIES = ++ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) ++@@ -196,7 +196,7 @@ ++ sysconfdir = @sysconfdir@ ++ target_alias = @target_alias@ ++ INCLUDES = \ ++- -I/usr/include/OGRE -I/usr/include/CEGUI -I/usr/share/doc/ogre-1.0.7/Samples/Common/include -I../include +++ -I/usr/include/OGRE -I/usr/include/CEGUI -I../include ++ ++ AM_CXXFLAGS = \ ++ -g -DEXT_HASH\ ++@@ -206,7 +206,8 @@ ++ opengate_SOURCES = \ ++ main.cpp\ ++ application.cpp\ ++- framelistener.cpp +++ framelistener.cpp\ +++ avatar.cpp ++ ++ opengate_LDFLAGS = \ ++ -L/usr/local/lib ++@@ -286,6 +287,7 @@ ++ -rm -f *.tab.c ++ ++ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Po@am__quote@ +++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avatar.Po@am__quote@ ++ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framelistener.Po@am__quote@ ++ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ ++ ++Index: src/application.cpp ++=================================================================== ++--- src/application.cpp (Revision 40) +++++ src/application.cpp (Arbeitskopie) ++@@ -26,13 +26,79 @@ ++ #include "constants.h" ++ ++ OpengateApp::OpengateApp() { ++- +++ mFrameListener = 0; +++ mRoot = 0; ++ } ++ ++ OpengateApp::~OpengateApp() { +++ if (mFrameListener) +++ delete mFrameListener; +++ if (mRoot) +++ delete mRoot; +++} ++ +++void OpengateApp::go(void) { +++ if (!setup()) +++ return; +++ +++ mRoot->startRendering(); +++ +++ // clean up +++ destroyScene(); ++ } ++ +++bool OpengateApp::setup(void) { +++ mRoot = new Root(); +++ +++ setupResources(); +++ +++ bool carryOn = configure(); +++ if (!carryOn) return false; +++ +++ chooseSceneManager(); +++ +++ // Set default mipmap level (NB some APIs ignore this) +++ TextureManager::getSingleton().setDefaultNumMipmaps(5); +++ +++ // Create any resource listeners (for loading screens) +++ createResourceListener(); +++ // Load resources +++ loadResources(); +++ +++ // Create the scene +++ createScene(); +++ +++ createCamera(); +++ createViewports(); +++ +++ createFrameListener(); +++ +++ return true; +++ +++} +++ +++bool OpengateApp::configure(void) { +++ // Show the configuration dialog and initialise the system +++ // You can skip this and use root.restoreConfig() to load configuration +++ // settings if you were sure there are valid ones saved in ogre.cfg +++ if(mRoot->showConfigDialog()) +++ { +++ // If returned true, user clicked OK so initialise +++ // Here we choose to let the system create a default rendering window by passing 'true' +++ mWindow = mRoot->initialise(true); +++ return true; +++ } +++ else +++ { +++ return false; +++ } +++} +++ +++void OpengateApp::chooseSceneManager(void) { +++ // Get the SceneManager, in this case a generic one +++ mSceneMgr = mRoot->getSceneManager(ST_GENERIC); +++} +++ ++ void OpengateApp::createCamera() { ++ // create the camera ++ mCamera = mSceneMgr->createCamera("PlayerCam"); ++@@ -40,11 +106,13 @@ ++ // set its position, direction ++ mCamera->setPosition(Vector3(0,10,50)); ++ mCamera->lookAt(Vector3(0,0,0)); +++ //mCamera->setAutoTracking (true, mAvatarNode); // The camera will always look at the camera target +++ //mCamera->setFixedYawAxis (true); // Needed because of auto tracking ++ ++ mCamera->setNearClipDistance(5); ++ } ++ ++-void OpengateApp::createViewports(void) { +++void OpengateApp::createViewports() { ++ // Create one viewport, entire window ++ Viewport* vp = mWindow->addViewport(mCamera); ++ vp->setBackgroundColour(ColourValue(0,0,0)); ++@@ -53,21 +121,66 @@ ++ mCamera->setAspectRatio(Real(vp->getActualWidth()) / Real(vp->getActualHeight())); ++ } ++ ++-void OpengateApp::createScene(void) { ++- Entity* ent; ++- +++void OpengateApp::createScene() { ++ // create an ambient light for the scene ++ mSceneMgr->setAmbientLight( ColourValue( 1, 1, 1 ) ); ++ mSceneMgr->setShadowTechnique( SHADOWTYPE_STENCIL_ADDITIVE ); ++ ++ // Create an entity ++- ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); ++- mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent); +++ Entity* ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); +++ mAvatarNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); +++ mAvatarNode->attachObject(ent); +++ mAvatarNode->setPosition(Vector3(0,0,30)); +++ mAvatarNode->rotate(Vector3(0.,1.,0.),Degree(-90)); +++ //mSightNode = node->createChildSceneNode ("Octavius Apteryx" + "_sight", Vector3 (0, 0, 100)); +++ mAvatar = new Avatar(mAvatarNode); +++ ++ ent = mSceneMgr->createEntity( "Quantar Storm", "Ships/Quantar/Storm/quantar_storm.mesh" ); ++- mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent); +++ SceneNode* node2 = mSceneMgr->getRootSceneNode()->createChildSceneNode(); +++ node2->attachObject(ent); ++ } +++ +++void OpengateApp::destroyScene(void) { +++ +++} ++ ++ void OpengateApp::createFrameListener(void) { ++- mFrameListener = new MyListener(mWindow, mCamera); +++ mFrameListener = new MyListener(mWindow, mCamera, mAvatar, false, false); +++ mFrameListener->showDebugOverlay(true); ++ mRoot->addFrameListener(mFrameListener); ++ } +++ +++void OpengateApp::setupResources(void) { +++ // Load resource paths from config file +++ ConfigFile cf; +++ cf.load("resources.cfg"); +++ +++ // Go through all sections & settings in the file +++ ConfigFile::SectionIterator seci = cf.getSectionIterator(); +++ +++ String secName, typeName, archName; +++ while (seci.hasMoreElements()) +++ { +++ secName = seci.peekNextKey(); +++ ConfigFile::SettingsMultiMap *settings = seci.getNext(); +++ ConfigFile::SettingsMultiMap::iterator i; +++ for (i = settings->begin(); i != settings->end(); ++i) +++ { +++ typeName = i->first; +++ archName = i->second; +++ ResourceGroupManager::getSingleton().addResourceLocation( +++ archName, typeName, secName); +++ } +++ } +++} +++ +++void OpengateApp::createResourceListener(void) +++{ +++ +++} +++ +++void OpengateApp::loadResources(void) { +++ // Initialise, parse scripts etc +++ ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); +++ +++} ++Index: src/main.cpp ++=================================================================== ++--- src/main.cpp (Revision 40) +++++ src/main.cpp (Arbeitskopie) ++@@ -1,3 +1,27 @@ +++/*************************************************************************** +++ * main.cpp +++ * +++ * Sat Apr 8 10:51:05 2006 +++ * Copyright 2006 Christoph Brill +++ * Email <eg...@us...> +++ ****************************************************************************/ +++ +++/* +++ * This program is free software; you can redistribute it and/or modify +++ * it under the terms of the GNU General Public License as published by +++ * the Free Software Foundation; either version 2 of the License, or +++ * (at your option) any later version. +++ * +++ * This program is distributed in the hope that it will be useful, +++ * but WITHOUT ANY WARRANTY; without even the implied warranty of +++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +++ * GNU General Public License for more details. +++ * +++ * You should have received a copy of the GNU General Public License +++ * along with this program; if not, write to the Free Software +++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +++ */ +++ ++ #include "application.h" ++ ++ #ifdef __cplusplus ++Index: src/resources.cfg ++=================================================================== ++--- src/resources.cfg (Revision 40) +++++ src/resources.cfg (Arbeitskopie) ++@@ -6,6 +6,7 @@ ++ # Resource locations to be added to the default path ++ [General] ++ FileSystem=../data +++FileSystem=../data/Materials ++ FileSystem=../media ++ FileSystem=../media/fonts ++ FileSystem=../media/materials/programs ++Index: src/Makefile.am ++============... [truncated message content] |
From: <eg...@us...> - 2006-04-10 15:04:58
|
Revision: 42 Author: egore Date: 2006-04-10 08:04:49 -0700 (Mon, 10 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=42&view=rev Log Message: ----------- add contacts to website Modified Paths: -------------- website/frame.php Added Paths: ----------- website/contact.php Added: website/contact.php =================================================================== (Binary files differ) Property changes on: website/contact.php ___________________________________________________________________ Name: svn:mime-type + application/x-httpd-php Modified: website/frame.php =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-08 13:36:20
|
Revision: 41 Author: egore Date: 2006-04-08 06:35:48 -0700 (Sat, 08 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=41&view=rev Log Message: ----------- rename some internal targets Modified Paths: -------------- ChangeLog Makefile.am Makefile.in config.guess config.sub configure configure.in opengate.prj opengate.pws po/POTFILES.in Modified: ChangeLog =================================================================== --- ChangeLog 2006-04-08 13:12:24 UTC (rev 40) +++ ChangeLog 2006-04-08 13:35:48 UTC (rev 41) @@ -1,3 +1,17 @@ +2006-04-08 Christoph Brill <eg...@us...> + + * data/Ships/Octavius/Apteryx/octavius_aptery.mesh.xml, + data/Ships/Octavius/Apteryx/octavius_aptery.mesh, + data/ships/Quantar/Storm/quantar_storm.mesh.xml, + data/ships/Quantar/Storm/quantar_storm.mesh : add ogre-mesh of + the ships to use them ingame + + * src/framelistener.cpp, src/application.cpp, src/main.cpp, + include/framelistener.h, include/application.h: split out classes + to separate files + + * data/Ships: create ships folder + 2006-04-01 Christoph Brill <eg...@us...> * all: initial import Modified: Makefile.am =================================================================== --- Makefile.am 2006-04-08 13:12:24 UTC (rev 40) +++ Makefile.am 2006-04-08 13:35:48 UTC (rev 41) @@ -3,10 +3,10 @@ ## If you don't want it to overwrite it, ## Please disable it in the Anjuta project configuration -SUBDIRS = po src data +SUBDIRS = po include src data -osjgdocdir = ${prefix}/doc/osjg -osjgdoc_DATA = \ +opengatedocdir = ${prefix}/doc/opengate +opengatedoc_DATA = \ README\ COPYING\ AUTHORS\ @@ -15,8 +15,10 @@ NEWS\ TODO -EXTRA_DIST = $(osjgdoc_DATA) +EXTRA_DIST = $(opengatedoc_DATA) + + # Copy all the spec files. Of cource, only one is actually used. dist-hook: for specfile in *.spec; do \ Modified: Makefile.in =================================================================== --- Makefile.in 2006-04-08 13:12:24 UTC (rev 40) +++ Makefile.in 2006-04-08 13:35:48 UTC (rev 41) @@ -66,9 +66,9 @@ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(osjgdocdir)" -osjgdocDATA_INSTALL = $(INSTALL_DATA) -DATA = $(osjgdoc_DATA) +am__installdirs = "$(DESTDIR)$(opengatedocdir)" +opengatedocDATA_INSTALL = $(INSTALL_DATA) +DATA = $(opengatedoc_DATA) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -208,9 +208,9 @@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -SUBDIRS = po src -osjgdocdir = ${prefix}/doc/osjg -osjgdoc_DATA = \ +SUBDIRS = po include src data +opengatedocdir = ${prefix}/doc/opengate +opengatedoc_DATA = \ README\ COPYING\ AUTHORS\ @@ -219,7 +219,7 @@ NEWS\ TODO -EXTRA_DIST = $(osjgdoc_DATA) +EXTRA_DIST = $(opengatedoc_DATA) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -284,22 +284,22 @@ distclean-libtool: -rm -f libtool uninstall-info-am: -install-osjgdocDATA: $(osjgdoc_DATA) +install-opengatedocDATA: $(opengatedoc_DATA) @$(NORMAL_INSTALL) - test -z "$(osjgdocdir)" || $(mkdir_p) "$(DESTDIR)$(osjgdocdir)" - @list='$(osjgdoc_DATA)'; for p in $$list; do \ + test -z "$(opengatedocdir)" || $(mkdir_p) "$(DESTDIR)$(opengatedocdir)" + @list='$(opengatedoc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ - echo " $(osjgdocDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(osjgdocdir)/$$f'"; \ - $(osjgdocDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(osjgdocdir)/$$f"; \ + echo " $(opengatedocDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(opengatedocdir)/$$f'"; \ + $(opengatedocDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(opengatedocdir)/$$f"; \ done -uninstall-osjgdocDATA: +uninstall-opengatedocDATA: @$(NORMAL_UNINSTALL) - @list='$(osjgdoc_DATA)'; for p in $$list; do \ + @list='$(opengatedoc_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(osjgdocdir)/$$f'"; \ - rm -f "$(DESTDIR)$(osjgdocdir)/$$f"; \ + echo " rm -f '$(DESTDIR)$(opengatedocdir)/$$f'"; \ + rm -f "$(DESTDIR)$(opengatedocdir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd @@ -584,7 +584,7 @@ all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(osjgdocdir)"; do \ + for dir in "$(DESTDIR)$(opengatedocdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive @@ -631,7 +631,7 @@ info-am: -install-data-am: install-osjgdocDATA +install-data-am: install-opengatedocDATA install-exec-am: @@ -659,7 +659,7 @@ ps-am: -uninstall-am: uninstall-info-am uninstall-osjgdocDATA +uninstall-am: uninstall-info-am uninstall-opengatedocDATA uninstall-info: uninstall-info-recursive @@ -672,12 +672,13 @@ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ - install-osjgdocDATA install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ + install-opengatedocDATA install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-info-am uninstall-osjgdocDATA + uninstall uninstall-am uninstall-info-am \ + uninstall-opengatedocDATA # Copy all the spec files. Of cource, only one is actually used. Modified: config.guess =================================================================== --- config.guess 2006-04-08 13:12:24 UTC (rev 40) +++ config.guess 2006-04-08 13:35:48 UTC (rev 41) @@ -1,9 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2005-12-23' +timestamp='2006-02-27' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -106,7 +107,7 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -223,6 +224,9 @@ *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit ;; @@ -794,6 +798,9 @@ i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS_NT-*:*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 @@ -802,8 +809,11 @@ echo ${UNAME_MACHINE}-pc-pw32 exit ;; x86:Interix*:[345]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + echo i586-pc-interix${UNAME_RELEASE} exit ;; + EM64T:Interix*:[345]*) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; @@ -873,7 +883,11 @@ #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; mips64:Linux:*:*) @@ -892,7 +906,11 @@ #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or32:Linux:*:*) @@ -991,7 +1009,7 @@ LIBC=gnulibc1 # endif #else - #if defined(__INTEL_COMPILER) || defined(__PGI) + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun) LIBC=gnu #else LIBC=gnuaout @@ -1001,7 +1019,11 @@ LIBC=dietlibc #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`" + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit Modified: config.sub =================================================================== --- config.sub 2006-04-08 13:12:24 UTC (rev 40) +++ config.sub 2006-04-08 13:35:48 UTC (rev 41) @@ -1,9 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2005-12-23' +timestamp='2006-02-27' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -268,15 +269,16 @@ | mn10200 | mn10300 \ | mt \ | msp430 \ + | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | shbe | sheb | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ @@ -298,10 +300,6 @@ ms1) basic_machine=mt-unknown ;; - nios2 | nios2-* | nios2 | nios2-*) - basic_machine=nios2-altera - os=-none - ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -354,17 +352,18 @@ | mmix-* \ | mt-* \ | msp430-* \ + | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | shbe-* | sheb-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ @@ -1148,7 +1147,7 @@ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1221,7 +1220,8 @@ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ Modified: configure =================================================================== --- configure 2006-04-08 13:12:24 UTC (rev 40) +++ configure 2006-04-08 13:35:48 UTC (rev 41) @@ -1802,7 +1802,7 @@ # Define the identity of the package. - PACKAGE=osjg + PACKAGE=opengate VERSION=0.1 @@ -5986,7 +5986,7 @@ -GETTEXT_PACKAGE=osjg +GETTEXT_PACKAGE=opengate cat >>confdefs.h <<_ACEOF @@ -22434,7 +22434,7 @@ _ACEOF - ac_config_files="$ac_config_files Makefile po/Makefile.in src/Makefile" + ac_config_files="$ac_config_files Makefile po/Makefile.in include/Makefile src/Makefile data/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -23015,7 +23015,9 @@ # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; + "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "data/Makefile" ) CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; Modified: configure.in =================================================================== --- configure.in 2006-04-08 13:12:24 UTC (rev 40) +++ configure.in 2006-04-08 13:35:48 UTC (rev 41) @@ -95,6 +95,7 @@ AC_OUTPUT([ Makefile po/Makefile.in +include/Makefile src/Makefile data/Makefile ]) Modified: opengate.prj =================================================================== --- opengate.prj 2006-04-08 13:12:24 UTC (rev 40) +++ opengate.prj 2006-04-08 13:35:48 UTC (rev 41) @@ -66,12 +66,17 @@ module.include.name=include module.include.type= -module.include.files= +module.include.files=\ + application.h\ + framelistener.h\ + constants.h module.source.name=src module.source.type= module.source.files=\ - main.cc + main.cpp\ + application.cpp\ + framelistener.cpp module.pixmap.name=pixmaps module.pixmap.type= @@ -80,8 +85,8 @@ module.data.name=data module.data.type= module.data.files=\ - Octavius/Apteryx/octavius_apteryx.mesh\ - Octavius/Apteryx/octavius_apteryx.mesh.xml + Ships/Octavius/Apteryx/octavius_apteryx.mesh\ + Ships/Quantar/Storm/quantar_storm.mesh module.help.name=help module.help.type= @@ -97,7 +102,8 @@ compiler.options.include.paths=\ /usr/include/OGRE\ /usr/include/CEGUI\ - /usr/share/doc/ogre-1.0.7/Samples/Common/include + /usr/share/doc/ogre-1.0.7/Samples/Common/include\ + ../include compiler.options.library.paths=\ /usr/local/lib compiler.options.libraries=\ Modified: opengate.pws =================================================================== --- opengate.pws 2006-04-08 13:12:24 UTC (rev 40) +++ opengate.pws 2006-04-08 13:35:48 UTC (rev 41) @@ -1,9 +1,21 @@ [filenumbers] -0=33 +0=28 +1=8 +2=25 +3=25 +4=41 +5=66 +6=1 [filemarkers] 0= +1= +2= +3= +4= +5= +6= [File View] filter.file.unmatch=*.so *.o *.a *.la @@ -17,12 +29,19 @@ clean before build=false [filelist] -0=/home/egore/source/opengate/src/main.cc +0=/home/egore/source/opengate/include/constants.h +1=/home/egore/source/opengate/src/resources.cfg +2=/home/egore/source/opengate/include/application.h +3=/home/egore/source/opengate/src/framelistener.cpp +4=/home/egore/source/opengate/include/framelistener.h +5=/home/egore/source/opengate/src/application.cpp +6=/home/egore/source/opengate/src/main.cpp [Project Tree] 0=0 1=0:0 2=0:1 +3=0:2 [File Tree] 0=0 Modified: po/POTFILES.in =================================================================== --- po/POTFILES.in 2006-04-08 13:12:24 UTC (rev 40) +++ po/POTFILES.in 2006-04-08 13:35:48 UTC (rev 41) @@ -5,6 +5,8 @@ ## Please disable it in the Anjuta project configuration # Source files -src/main.cc +src/main.cpp +src/application.cpp +src/framelistener.cpp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-08 13:12:38
|
Revision: 40 Author: egore Date: 2006-04-08 06:12:24 -0700 (Sat, 08 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=40&view=rev Log Message: ----------- add implemenations of the splittet classes Modified Paths: -------------- src/Makefile.am src/Makefile.in src/main.cpp src/resources.cfg Added Paths: ----------- src/application.cpp src/framelistener.cpp Modified: src/Makefile.am =================================================================== --- src/Makefile.am 2006-04-08 13:10:17 UTC (rev 39) +++ src/Makefile.am 2006-04-08 13:12:24 UTC (rev 40) @@ -5,21 +5,23 @@ ## Please disable it in the Anjuta project configuration INCLUDES =\ - -I/usr/include/OGRE -I/usr/include/CEGUI -I/usr/share/doc/ogre-1.0.7/Samples/Common/include + -I/usr/include/OGRE -I/usr/include/CEGUI -I/usr/share/doc/ogre-1.0.7/Samples/Common/include -I../include AM_CXXFLAGS =\ -g -DEXT_HASH\ -Wall\ -g -bin_PROGRAMS = osjg +bin_PROGRAMS = opengate -osjg_SOURCES = \ - main.cc +opengate_SOURCES = \ + main.cpp\ + application.cpp\ + framelistener.cpp -osjg_LDFLAGS = \ +opengate_LDFLAGS = \ -L/usr/local/lib -osjg_LDADD = \ +opengate_LDADD = \ -lOgreMain -lCEGUIBase -lCEGUIOgreRenderer Modified: src/Makefile.in =================================================================== --- src/Makefile.in 2006-04-08 13:10:17 UTC (rev 39) +++ src/Makefile.in 2006-04-08 13:12:24 UTC (rev 40) @@ -36,7 +36,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = osjg$(EXEEXT) +bin_PROGRAMS = opengate$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -50,9 +50,10 @@ am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) -am_osjg_OBJECTS = main.$(OBJEXT) -osjg_OBJECTS = $(am_osjg_OBJECTS) -osjg_DEPENDENCIES = +am_opengate_OBJECTS = main.$(OBJEXT) application.$(OBJEXT) \ + framelistener.$(OBJEXT) +opengate_OBJECTS = $(am_opengate_OBJECTS) +opengate_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -64,8 +65,8 @@ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(osjg_SOURCES) -DIST_SOURCES = $(osjg_SOURCES) +SOURCES = $(opengate_SOURCES) +DIST_SOURCES = $(opengate_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -195,26 +196,28 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ INCLUDES = \ - -I/usr/include/OGRE -I/usr/include/CEGUI -I/usr/share/doc/ogre-1.0.7/Samples/Common/include + -I/usr/include/OGRE -I/usr/include/CEGUI -I/usr/share/doc/ogre-1.0.7/Samples/Common/include -I../include AM_CXXFLAGS = \ -g -DEXT_HASH\ -Wall\ -g -osjg_SOURCES = \ - main.cc +opengate_SOURCES = \ + main.cpp\ + application.cpp\ + framelistener.cpp -osjg_LDFLAGS = \ +opengate_LDFLAGS = \ -L/usr/local/lib -osjg_LDADD = \ +opengate_LDADD = \ -lOgreMain -lCEGUIBase -lCEGUIOgreRenderer all: all-am .SUFFIXES: -.SUFFIXES: .cc .lo .o .obj +.SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -272,9 +275,9 @@ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done -osjg$(EXEEXT): $(osjg_OBJECTS) $(osjg_DEPENDENCIES) - @rm -f osjg$(EXEEXT) - $(CXXLINK) $(osjg_LDFLAGS) $(osjg_OBJECTS) $(osjg_LDADD) $(LIBS) +opengate$(EXEEXT): $(opengate_OBJECTS) $(opengate_DEPENDENCIES) + @rm -f opengate$(EXEEXT) + $(CXXLINK) $(opengate_LDFLAGS) $(opengate_OBJECTS) $(opengate_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -282,23 +285,25 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framelistener.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ -.cc.o: +.cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< -.cc.obj: +.cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -.cc.lo: +.cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ Added: src/application.cpp =================================================================== --- src/application.cpp (rev 0) +++ src/application.cpp 2006-04-08 13:12:24 UTC (rev 40) @@ -0,0 +1,73 @@ +/*************************************************************************** + * application.cpp + * + * Sat Apr 8 10:24:00 2006 + * Copyright 2006 Christoph Brill + * Email <eg...@us...> + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "application.h" +#include "constants.h" + +OpengateApp::OpengateApp() { + +} + +OpengateApp::~OpengateApp() { + +} + +void OpengateApp::createCamera() { + // create the camera + mCamera = mSceneMgr->createCamera("PlayerCam"); + + // set its position, direction + mCamera->setPosition(Vector3(0,10,50)); + mCamera->lookAt(Vector3(0,0,0)); + + mCamera->setNearClipDistance(5); +} + +void OpengateApp::createViewports(void) { + // Create one viewport, entire window + Viewport* vp = mWindow->addViewport(mCamera); + vp->setBackgroundColour(ColourValue(0,0,0)); + + // Alter the camera aspect ratio to match the viewport + mCamera->setAspectRatio(Real(vp->getActualWidth()) / Real(vp->getActualHeight())); +} + +void OpengateApp::createScene(void) { + Entity* ent; + + // create an ambient light for the scene + mSceneMgr->setAmbientLight( ColourValue( 1, 1, 1 ) ); + mSceneMgr->setShadowTechnique( SHADOWTYPE_STENCIL_ADDITIVE ); + + // Create an entity + ent = mSceneMgr->createEntity( "Octavius Apteryx", "Ships/Octavius/Apteryx/octavius_apteryx.mesh" ); + mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent); + ent = mSceneMgr->createEntity( "Quantar Storm", "Ships/Quantar/Storm/quantar_storm.mesh" ); + mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(ent); +} + +void OpengateApp::createFrameListener(void) { + mFrameListener = new MyListener(mWindow, mCamera); + mRoot->addFrameListener(mFrameListener); +} Property changes on: src/application.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Added: src/framelistener.cpp =================================================================== --- src/framelistener.cpp (rev 0) +++ src/framelistener.cpp 2006-04-08 13:12:24 UTC (rev 40) @@ -0,0 +1,36 @@ +/*************************************************************************** + * framelistener.cpp + * + * Sat Apr 8 10:51:05 2006 + * Copyright 2006 User + * Email + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "framelistener.h" + +MyListener::MyListener(RenderWindow* win, Camera* cam) : ExampleFrameListener(win, cam) { +} + +bool MyListener::frameStarted(const FrameEvent& evt) { + return ExampleFrameListener::frameStarted(evt); +} + +bool MyListener::frameEnded(const FrameEvent& evt) { + return ExampleFrameListener::frameEnded(evt); +} Property changes on: src/framelistener.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Modified: src/main.cpp =================================================================== --- src/main.cpp 2006-04-08 13:10:17 UTC (rev 39) +++ src/main.cpp 2006-04-08 13:12:24 UTC (rev 40) @@ -1,74 +1,5 @@ -#include "ExampleApplication.h" +#include "application.h" -// Declare a subclass of the ExampleFrameListener class -class MyListener : public ExampleFrameListener { -public: - MyListener(RenderWindow* win, Camera* cam) : ExampleFrameListener(win, cam) { - } - - bool frameStarted(const FrameEvent& evt) { - return ExampleFrameListener::frameStarted(evt); - } - - bool frameEnded(const FrameEvent& evt) { - return ExampleFrameListener::frameEnded(evt); - } -}; - -// Declare a subclass of the ExampleApplication class -class SampleApp : public ExampleApplication { -public: - SampleApp() { - } - - ~SampleApp() { - } - -protected: - /** - * Creates a camera for the scene - */ - virtual void createCamera() { - // create the camera - mCamera = mSceneMgr->createCamera("PlayerCam"); - - // set its position, direction - mCamera->setPosition(Vector3(0,10,50)); - mCamera->lookAt(Vector3(0,0,0)); - - mCamera->setNearClipDistance(5); - } - - virtual void createViewports(void) { - // Create one viewport, entire window - Viewport* vp = mWindow->addViewport(mCamera); - vp->setBackgroundColour(ColourValue(0,0,0)); - - // Alter the camera aspect ratio to match the viewport - mCamera->setAspectRatio(Real(vp->getActualWidth()) / Real(vp->getActualHeight())); - } - - // Define what is in the scene - virtual void createScene(void) { - - Entity* ent; - - // create an ambient light for the scene - mSceneMgr->setAmbientLight( ColourValue( 1, 1, 1 ) ); - mSceneMgr->setShadowTechnique( SHADOWTYPE_STENCIL_ADDITIVE ); - - // Create an entity - ent = mSceneMgr->createEntity( "Octavius Apteryx", "octavius_apteryx.mesh" ); - mSceneMgr->getRootSceneNode()->createChildSceneNode( )->attachObject(ent); - } - - // Create new frame listener - void createFrameListener(void) { - mFrameListener = new MyListener(mWindow, mCamera); - mRoot->addFrameListener(mFrameListener); - } -}; - #ifdef __cplusplus extern "C" { #endif @@ -82,7 +13,7 @@ #endif { // Instantiate our subclass - SampleApp myApp; + OpengateApp myApp; try { // ExampleApplication provides a go method, which starts the rendering. Modified: src/resources.cfg =================================================================== --- src/resources.cfg 2006-04-08 13:10:17 UTC (rev 39) +++ src/resources.cfg 2006-04-08 13:12:24 UTC (rev 40) @@ -5,7 +5,7 @@ # Resource locations to be added to the default path [General] -FileSystem=../data/ships +FileSystem=../data FileSystem=../media FileSystem=../media/fonts FileSystem=../media/materials/programs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-08 13:10:34
|
Revision: 39 Author: egore Date: 2006-04-08 06:10:17 -0700 (Sat, 08 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=39&view=rev Log Message: ----------- add headers for the splitted classes Added Paths: ----------- include/ include/Makefile.am include/Makefile.in include/application.h include/constants.h include/framelistener.h Added: include/Makefile.am =================================================================== --- include/Makefile.am (rev 0) +++ include/Makefile.am 2006-04-08 13:10:17 UTC (rev 39) @@ -0,0 +1,14 @@ +## Process this file with automake to produce Makefile.in + +## Created by Anjuta - will be overwritten +## If you don't want it to overwrite it, +## Please disable it in the Anjuta project configuration + +opengate_includedir = $(pkgincludedir) + +opengate_include_DATA = \ + application.h\ + framelistener.h\ + constants.h + +EXTRA_DIST = $(opengate_include_DATA) Property changes on: include/Makefile.am ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: include/Makefile.in =================================================================== --- include/Makefile.in (rev 0) +++ include/Makefile.in 2006-04-08 13:10:17 UTC (rev 39) @@ -0,0 +1,376 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = include +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(opengate_includedir)" +opengate_includeDATA_INSTALL = $(INSTALL_DATA) +DATA = $(opengate_include_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +NO_PREFIX_PACKAGE_DATA_DIR = @NO_PREFIX_PACKAGE_DATA_DIR@ +NO_PREFIX_PACKAGE_DOC_DIR = @NO_PREFIX_PACKAGE_DOC_DIR@ +NO_PREFIX_PACKAGE_HELP_DIR = @NO_PREFIX_PACKAGE_HELP_DIR@ +NO_PREFIX_PACKAGE_MENU_DIR = @NO_PREFIX_PACKAGE_MENU_DIR@ +NO_PREFIX_PACKAGE_PIXMAPS_DIR = @NO_PREFIX_PACKAGE_PIXMAPS_DIR@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_DATA_DIR = @PACKAGE_DATA_DIR@ +PACKAGE_DOC_DIR = @PACKAGE_DOC_DIR@ +PACKAGE_HELP_DIR = @PACKAGE_HELP_DIR@ +PACKAGE_MENU_DIR = @PACKAGE_MENU_DIR@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +opengate_includedir = $(pkgincludedir) +opengate_include_DATA = \ + application.h\ + framelistener.h\ + constants.h + +EXTRA_DIST = $(opengate_include_DATA) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-opengate_includeDATA: $(opengate_include_DATA) + @$(NORMAL_INSTALL) + test -z "$(opengate_includedir)" || $(mkdir_p) "$(DESTDIR)$(opengate_includedir)" + @list='$(opengate_include_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(opengate_includeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(opengate_includedir)/$$f'"; \ + $(opengate_includeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(opengate_includedir)/$$f"; \ + done + +uninstall-opengate_includeDATA: + @$(NORMAL_UNINSTALL) + @list='$(opengate_include_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(opengate_includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(opengate_includedir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(opengate_includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-opengate_includeDATA + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-opengate_includeDATA + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man \ + install-opengate_includeDATA install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am uninstall-opengate_includeDATA + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Property changes on: include/Makefile.in ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: include/application.h =================================================================== --- include/application.h (rev 0) +++ include/application.h 2006-04-08 13:10:17 UTC (rev 39) @@ -0,0 +1,94 @@ +/*************************************************************************** + * application.h + * + * Sat Apr 8 10:26:58 2006 + * Copyright 2006 User + * Email + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _APPLICATION_H +#define _APPLICATION_H + +#include <ExampleApplication.h> +#include "framelistener.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/*! + * + */ +class OpengateApp : public ExampleApplication { +public: + + /*! \brief This default constructor instantiates an Application + * + * The default constructor is used to instantiates the Application. The + * Application can be considered as the object, that holds references to + * everything within the game. So here you can find the Scene, the Viewport + * to the scene, the camera(s) and the FrameListener. + */ + OpengateApp(); + + /*! \brief This destructor closes the application + * + * When this destructor is called, the game is done and will quit. + */ + ~OpengateApp(); + +protected: + /*! \brief Creates a camera for the scene + * + * This method creates the necessary cameras for the game. Since we have a + * first person camera and a third person camera, we will use 2 cameras to + * do that. It would be possible to do that with one camera, but the concept + * in OGRE3D is to use 2 cameras. + */ + virtual void createCamera(); + + /*! \brief Creates a viewport with the given cameras for the scene + * + * This method creates the viewport to the scene. This is what the user will + * actually see when playing the game. The viewport uses the given cameras + * to get its picture. + */ + virtual void createViewports(void); + + /*! \brief Define what is in the scene + * + * This method created an initial scene. So here some common things will be + * loaded, like the space background, or jumpgates (which can be found in + * every sector) etc. + */ + virtual void createScene(void); + + /*! \biref Create the frame listener for the game + * + * This method creates the framelistener necessary to render a scene + */ + void createFrameListener(void); +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _APPLICATION_H */ Property changes on: include/application.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Added: include/constants.h =================================================================== --- include/constants.h (rev 0) +++ include/constants.h 2006-04-08 13:10:17 UTC (rev 39) @@ -0,0 +1,33 @@ +/*************************************************************************** + * constants.h + * + * Sat Apr 8 13:13:56 2006 + * Copyright 2006 User + * Email + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _CONSTANTS_H +#define _CONSTANTS_H + +#define SHIPDIR "Ships" +#define OCTAVIUS "Octavius" +#define QUANTAR "Quantar" +#define SOLRAIN "Solrain" + +#endif /* _CONSTANTS_H */ Property changes on: include/constants.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Added: include/framelistener.h =================================================================== --- include/framelistener.h (rev 0) +++ include/framelistener.h 2006-04-08 13:10:17 UTC (rev 39) @@ -0,0 +1,50 @@ +/*************************************************************************** + * framelistener.h + * + * Sat Apr 8 10:50:05 2006 + * Copyright 2006 User + * Email + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _FRAMELISTENER_H +#define _FRAMELISTENER_H + +#include <ExampleFrameListener.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +// Declare a subclass of the ExampleFrameListener class +class MyListener : public ExampleFrameListener { +public: + MyListener(RenderWindow* win, Camera* cam); + + bool frameStarted(const FrameEvent& evt); + + bool frameEnded(const FrameEvent& evt); + +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _FRAMELISTENER_H */ Property changes on: include/framelistener.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-08 12:54:06
|
Revision: 38 Author: egore Date: 2006-04-08 05:53:27 -0700 (Sat, 08 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=38&view=rev Log Message: ----------- add ogre mesh of the (half) ship Modified Paths: -------------- data/Ships/Octavius/Apteryx/octavius_apteryx.wings Added Paths: ----------- data/Ships/Octavius/Apteryx/octavius_apteryx.mesh data/Ships/Octavius/Apteryx/octavius_apteryx.mesh.xml Added: data/Ships/Octavius/Apteryx/octavius_apteryx.mesh =================================================================== (Binary files differ) Property changes on: data/Ships/Octavius/Apteryx/octavius_apteryx.mesh ___________________________________________________________________ Name: svn:mime-type + model/mesh Added: data/Ships/Octavius/Apteryx/octavius_apteryx.mesh.xml =================================================================== (Binary files differ) Property changes on: data/Ships/Octavius/Apteryx/octavius_apteryx.mesh.xml ___________________________________________________________________ Name: svn:mime-type + application/xml Modified: data/Ships/Octavius/Apteryx/octavius_apteryx.wings =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-08 12:51:22
|
Revision: 37 Author: egore Date: 2006-04-08 05:50:02 -0700 (Sat, 08 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=37&view=rev Log Message: ----------- add ogre mesh of the (half) ship Modified Paths: -------------- data/Ships/Quantar/Storm/quantar_storm.wings Added Paths: ----------- data/Ships/Quantar/Storm/quantar_storm.mesh data/Ships/Quantar/Storm/quantar_storm.mesh.xml Added: data/Ships/Quantar/Storm/quantar_storm.mesh =================================================================== (Binary files differ) Property changes on: data/Ships/Quantar/Storm/quantar_storm.mesh ___________________________________________________________________ Name: svn:mime-type + model/mesh Added: data/Ships/Quantar/Storm/quantar_storm.mesh.xml =================================================================== (Binary files differ) Property changes on: data/Ships/Quantar/Storm/quantar_storm.mesh.xml ___________________________________________________________________ Name: svn:mime-type + application/xml Modified: data/Ships/Quantar/Storm/quantar_storm.wings =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2006-04-08 11:11:16
|
Revision: 36 Author: egore Date: 2006-04-08 04:10:45 -0700 (Sat, 08 Apr 2006) ViewCVS: http://svn.sourceforge.net/opengate/?rev=36&view=rev Log Message: ----------- move Solrain ships to the ships folder Added Paths: ----------- data/Ships/Solrain/ Removed Paths: ------------- data/Solrain/ Copied: data/Ships/Solrain (from rev 32, data/Solrain) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |