clonekeenplus-svn Mailing List for Commander Genius
Commander Keen Interpreter
Brought to you by:
gerstrong
You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(75) |
Aug
(123) |
Sep
(109) |
Oct
(118) |
Nov
(108) |
Dec
(123) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(63) |
Feb
(52) |
Mar
(62) |
Apr
(94) |
May
(113) |
Jun
(130) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ger...@us...> - 2010-07-21 18:07:50
|
Revision: 1294
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1294&view=rev
Author: gerstrong
Date: 2010-07-21 18:07:40 +0000 (Wed, 21 Jul 2010)
Log Message:
-----------
Closing SVN Repo
Removed Paths:
-------------
cgenius/
testing/
web/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <piz...@us...> - 2010-06-29 23:15:56
|
Revision: 1293
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1293&view=rev
Author: pizza2004
Date: 2010-06-29 23:15:50 +0000 (Tue, 29 Jun 2010)
Log Message:
-----------
Changes to SVN
Modified Paths:
--------------
cgenius/trunk/changelog.txt
cgenius/trunk/readme.txt
cgenius/trunk/src/engine/vorticon/CEGASprit.cpp
cgenius/trunk/src/engine/vorticon/ai/ray.cpp
cgenius/trunk/src/graphics/CSprite.cpp
cgenius/trunk/src/graphics/CTilemap.cpp
cgenius/trunk/src/sdl/COpenGL.cpp
cgenius/trunk/src/sdl/COpenGL.h
cgenius/trunk/src/sdl/CVideoDriver.cpp
Modified: cgenius/trunk/changelog.txt
===================================================================
--- cgenius/trunk/changelog.txt 2010-06-28 23:24:29 UTC (rev 1292)
+++ cgenius/trunk/changelog.txt 2010-06-29 23:15:50 UTC (rev 1293)
@@ -3,6 +3,7 @@
v0.3.2:
---------
+- OpenGL improvements especially for iPhone!!
- Faster Game loads!
- Other segfault fixes!!
- Improved Mod support (Especially for Keen X and Yorphius II)
@@ -37,11 +38,11 @@
v0.3.1.0:
---------
-
-01-03-2010
-- Most of the bugs reported on Trac have been fixed.
-- We have finally another release!
+01-03-2010
+- Most of the bugs reported on Trac have been fixed.
+- We have finally another release!
+
31-01-2010
- Improved Bump function, which makes Keen push, when touched by a yorp a similar foe
- Imrpoved the yorp behaviour, when Keen touches him. It should be like in the original also.
Modified: cgenius/trunk/readme.txt
===================================================================
--- cgenius/trunk/readme.txt 2010-06-28 23:24:29 UTC (rev 1292)
+++ cgenius/trunk/readme.txt 2010-06-29 23:15:50 UTC (rev 1293)
@@ -12,7 +12,7 @@
* (c)2003-2010 Caitlin Shaw *
* Released under GNU/GPL *
* *
-* Release v0.3.1.3 *
+* Release v0.3.2 *
* *
**********************************************
@@ -104,13 +104,11 @@
- libsdl1.2-dev
- libgl1-mesa-dev
* extract my source code into "CGenius".
- * cd into the "CGenius/Linux32" or "CGenius/Linux64" subdirectory depending on your system.
+ * cd into the source directory "CGenius"
+ * Run "cmake -DBUILD_TYPE=LINUX32" or "cmake -DBUILD_TYPE=LINUX64"
* Run "make".
- * Then, you can run "CommanderGenius". Copy the files, wherever you want them together
+ * Then, you can run "CGenius". Copy the files, wherever you want them together
with the data directory. "make install" does not work though.
- * We also provide CMake for wiz. If you want to compile it for embedded systems.
- We had support for Linux and Win32, but since there is a bug when build, for
- different Linux build (32-bit or 64-bit) we only use it for embedded systems.
Compiling CG on any Linux/UNIX (other than Ubuntu):
* If you want to compile the game, you need to have all the standard
@@ -119,11 +117,17 @@
* You need to install the "vorbis", "SDL" and "Mesa/OpenGL" development libraries to get
it successfully compiled.
* extract my source code to "cgenius".
- * cd into the "cgenius/Release" subdirectory.
+ * cd into the "cgenius" subdirectory.
+ * Run "cmake -DBUILD_TYPE=LINUX32" or "cmake -DBUILD_TYPE=LINUX64"
* Run "make".
- * Then, you can run "CommanderGenius". Copy the files,
+ * Then, you can run "CGenius". Copy the files,
wherever you want them together with the data directory.
"make install" does not work though.
+
+We also provide CMake for wiz. If you want to compile it for embedded systems.
+We had support for Linux and Win32, but since there is a bug when build, for
+different Linux build (32-bit or 64-bit) we only use it for embedded systems.
+Also check out the CMakeLists.txt for more information.
- VIDEO SYSTEM -
Being cross-platform, there are many methods to detect different resolutions on a system.
@@ -149,10 +153,6 @@
KEY ACTION DESCRIPTION
G+O+D godmode In god mode you are invincible!
C+T+SPACE All Items Gives all items, similar to the original.
-LSHIFT+TAB Skip Level Holding down this key you can skip levels and walk through tiles
- on the map.
-TAB No clipping If you hold down this key you will disable clipping.
- However, you cannot fall though floors.
- SAVE/LOAD GAME -
The game can be saved by pressing F3 at any point during the game or using the menu.
@@ -163,23 +163,10 @@
This feature is disabled for now, but we hope to reenable it soon!
- FAQ -
-Q: When I change to opengl-mode, the screen gets white and I can't do anything! I have to kill the program.
- What can I do to restore the normal mode?
-
-A: You can delete "cgenius.cfg" or change it the way you need it! Just put "opengl = 0" and it should normal
- with your previous settings. We are working on a solution for that! The white screen means, that your
- graphic card doesn't support NPOT Textures, which is required.
- A video card with OpenGL 2.0 or later support should not have that problem.
-
-Q: Why not to use POT-Textures?
-A: Because it requires more memory to write, and the game would get slower than with software rendering.
- We are working on a new method to get it working with POT Textures and faster, but for now we cannot
- support it.
-
Q: Commander Genius is slow? Please help!
A: You can decrease the fps under settings->video what is very
- recommended for any system. OpenGL may also help, but you must have a gfx-card that support NPOT-Textures.
- (OpenGL 2.0 or later). Try to lower the resolution, a lower filter, or decrease some stuff in the sound section.
+ recommended for any system. OpenGL may also help on some systems with ScaleX disabled.
+ Try to lower the resolution, a lower filter, or decrease some stuff in the sound section.
Stereo sound requires additional calculations than mono sound. There are many things you can do, to speed up
the program.
Modified: cgenius/trunk/src/engine/vorticon/CEGASprit.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/CEGASprit.cpp 2010-06-28 23:24:29 UTC (rev 1292)
+++ cgenius/trunk/src/engine/vorticon/CEGASprit.cpp 2010-06-29 23:15:50 UTC (rev 1293)
@@ -402,6 +402,8 @@
if(SDL_MUSTLOCK(src_sfc)) SDL_LockSurface(src_sfc);
+ if(src_sfc->format->BitsPerPixel == 8) return;
+
// The first pixel is usually the transparent one on items. Use it!
Uint8* pixel = (Uint8*)src_sfc->pixels;
Uint32 transparent_colour;
Modified: cgenius/trunk/src/engine/vorticon/ai/ray.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/ai/ray.cpp 2010-06-28 23:24:29 UTC (rev 1292)
+++ cgenius/trunk/src/engine/vorticon/ai/ray.cpp 2010-06-29 23:15:50 UTC (rev 1293)
@@ -46,7 +46,7 @@
// test if it hit a baddie. I hate that code! TODO: think about a way to reduce this
for( it_obj = m_Objvect.begin() ; it_obj!=m_Objvect.end() ; it_obj++)
{
- if( it_obj->exists && it_obj->m_index != object.m_index )
+ if( it_obj->exists && (it_obj->m_index != object.m_index || it_obj->m_type == OBJ_ROPE) )
{
if ( it_obj->onscreen)
{
@@ -59,7 +59,18 @@
object.canbezapped = false;
it_obj->zapped++;
if(g_pVideoDriver->getSpecialFXConfig())
- it_obj->blink(10);
+ {
+ bool allow_blink = false;
+
+ // only enemies which can support multiple hits
+ // will blink.
+ allow_blink = (it_obj->m_type == OBJ_MOTHER) ||
+ (it_obj->m_type == OBJ_NINJA) ||
+ (it_obj->m_type == OBJ_VORT) ||
+ (it_obj->m_type == OBJ_VORTELITE);
+ if(allow_blink)
+ it_obj->blink(10);
+ }
if(it_obj->m_type == OBJ_RAY)
it_obj->ai.ray.state = RAY_STATE_SETZAPZOT;
it_obj->zapd = it_obj->ai.ray.direction;
Modified: cgenius/trunk/src/graphics/CSprite.cpp
===================================================================
--- cgenius/trunk/src/graphics/CSprite.cpp 2010-06-28 23:24:29 UTC (rev 1292)
+++ cgenius/trunk/src/graphics/CSprite.cpp 2010-06-29 23:15:50 UTC (rev 1293)
@@ -79,6 +79,12 @@
Uint8 r,g,b,a;
if(!m_surface) return;
+
+ if(m_surface->format->BitsPerPixel == 8) // In case we did not Displayformat
+ {
+ SDL_BlitSurface(m_masksurface, NULL, m_surface, NULL);
+ return;
+ }
if(SDL_MUSTLOCK(m_surface)) SDL_LockSurface(m_surface);
if(SDL_MUSTLOCK(m_masksurface)) SDL_LockSurface(m_masksurface);
@@ -94,13 +100,13 @@
memcpy( &mask, pixel, m_surface->format->BytesPerPixel );
SDL_GetRGBA( colour, m_surface->format, &r, &g, &b, &a );
-
+
if(*maskpx<16)
a = (255*(*maskpx))/15;
else a = 255;
-
+
colour = SDL_MapRGBA( m_surface->format, r, g, b, a );
-
+
memcpy( pixel, &colour, m_surface->format->BytesPerPixel );
pixel += m_surface->format->BytesPerPixel;
Modified: cgenius/trunk/src/graphics/CTilemap.cpp
===================================================================
--- cgenius/trunk/src/graphics/CTilemap.cpp 2010-06-28 23:24:29 UTC (rev 1292)
+++ cgenius/trunk/src/graphics/CTilemap.cpp 2010-06-29 23:15:50 UTC (rev 1293)
@@ -6,6 +6,7 @@
*/
#include "../fileio/CTileLoader.h"
+#include "../sdl/CVideoDriver.h"
#include "../FindFile.h"
#include "CTilemap.h"
#include "CPalette.h"
@@ -54,6 +55,10 @@
bool CTilemap::optimizeSurface()
{
+ if(g_pVideoDriver->getFiltermode() == 1 && g_pVideoDriver->isOpenGL()
+ )
+ return true;
+
if(m_Tilesurface)
{
SDL_Surface *temp_surface;
Modified: cgenius/trunk/src/sdl/COpenGL.cpp
===================================================================
--- cgenius/trunk/src/sdl/COpenGL.cpp 2010-06-28 23:24:29 UTC (rev 1292)
+++ cgenius/trunk/src/sdl/COpenGL.cpp 2010-06-29 23:15:50 UTC (rev 1293)
@@ -27,6 +27,8 @@
COpenGL::COpenGL(Uint16 Width, Uint16 Height, unsigned char Depth,
unsigned char scalex,SDL_Rect &gamestdrect) :
mp_blitsurface(NULL),
+mp_fgsurface(NULL),
+mp_fxsurface(NULL),
m_opengl_buffer(NULL),
m_Depth(Depth),
m_ScaleX(scalex),
@@ -126,14 +128,19 @@
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);*/
glEnable(m_texparam);
+
createTexture(m_texture, oglfilter, m_GamePOTVideoDim.w, m_GamePOTVideoDim.h);
- //createTexture(m_texBG, oglfilter, m_GamePOTVideoDim.w, m_GamePOTVideoDim.h);
- //createTexture(m_texFG, oglfilter, m_GamePOTVideoDim.w, m_GamePOTVideoDim.h, true);
if(m_ScaleX > 1)
+ {
m_opengl_buffer = new char[m_GamePOTVideoDim.w*m_GamePOTVideoDim.h*m_ScaleX*m_Depth];
+ }
else
+ { // In that case we can do a texture based rendering
+ createTexture(m_texFX, oglfilter, m_GamePOTVideoDim.w, m_GamePOTVideoDim.h, true);
+ createTexture(m_texFG, oglfilter, m_GamePOTVideoDim.w, m_GamePOTVideoDim.h, true);
m_opengl_buffer = NULL;
+ }
// If there were any errors
int error;
@@ -156,7 +163,10 @@
void COpenGL::setFGSurface(SDL_Surface *fgsurface)
{ mp_fgsurface = fgsurface; }
+void COpenGL::setFXSurface(SDL_Surface *fxsurface)
+{ mp_fxsurface = fxsurface; }
+
/*static void loadSurface(GLuint texture, SDL_Surface* surface) {
glBindTexture(GL_TEXTURE_2D, texture);
LockSurface(surface);
@@ -169,8 +179,8 @@
UnlockSurface(surface);
}*/
-void COpenGL::reloadBG(SDL_Surface* surf) {
- loadSurface(m_texBG, surf);
+void COpenGL::reloadFX(SDL_Surface* surf) {
+ loadSurface(m_texFX, surf);
}
void COpenGL::reloadFG(SDL_Surface* surf) {
@@ -227,6 +237,18 @@
{
glBindTexture (m_texparam, texture);
LockSurface(surface);
+ GLint internalFormat, externalFormat;
+ if(surface->format->BitsPerPixel == 24)
+ {
+ internalFormat = GL_RGB;
+ externalFormat = GL_BGR;
+ }
+ else
+ { // we assume RGBA
+ internalFormat = GL_RGBA;
+ externalFormat = GL_BGRA;
+ }
+
if(m_ScaleX > 1) //ScaleX
{
unsigned m_src_slice = m_GamePOTBaseDim.w*surface->format->BytesPerPixel;
@@ -237,29 +259,37 @@
m_src_slice, surface->format->BytesPerPixel,
m_GamePOTBaseDim.w, m_GamePOTBaseDim.h);
- glTexImage2D(m_texparam, 0, GL_RGBA, m_GamePOTBaseDim.w*m_ScaleX, m_GamePOTBaseDim.h*m_ScaleX,
- 0, GL_BGRA, GL_UNSIGNED_BYTE, m_opengl_buffer);
+ glTexImage2D(m_texparam, 0, internalFormat, m_GamePOTBaseDim.w*m_ScaleX, m_GamePOTBaseDim.h*m_ScaleX,
+ 0, externalFormat, GL_UNSIGNED_BYTE, m_opengl_buffer);
}
else
{
- glTexImage2D(m_texparam, 0, GL_RGBA, m_GamePOTBaseDim.w, m_GamePOTBaseDim.h,
- 0, GL_BGRA, GL_UNSIGNED_BYTE, surface->pixels);
+ glTexImage2D(m_texparam, 0, internalFormat, m_GamePOTBaseDim.w, m_GamePOTBaseDim.h,
+ 0, externalFormat, GL_UNSIGNED_BYTE, surface->pixels);
}
UnlockSurface(surface);
}
-void COpenGL::render(bool withFG)
+void COpenGL::render()
{
//glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
loadSurface(m_texture, mp_blitsurface);
renderTexture(m_texture);
- //reloadFG(mp_fgsurface);
- //loadSurface(m_texFG, mp_fgsurface);
- //renderTexture(m_texFG, true);
-
+ if(mp_fgsurface)
+ {
+ reloadFG(mp_fgsurface);
+ renderTexture(m_texFG, true);
+ }
+
+ if(mp_fxsurface)
+ {
+ reloadFX(mp_fgsurface);
+ renderTexture(m_texFG, true);
+ }
+
g_pInput->renderOverlay();
SDL_GL_SwapBuffers();
Modified: cgenius/trunk/src/sdl/COpenGL.h
===================================================================
--- cgenius/trunk/src/sdl/COpenGL.h 2010-06-28 23:24:29 UTC (rev 1292)
+++ cgenius/trunk/src/sdl/COpenGL.h 2010-06-29 23:15:50 UTC (rev 1293)
@@ -39,13 +39,14 @@
void loadSurface(GLuint texture, SDL_Surface* surface);
- void render(bool withFG);
+ void render();
bool initGL(GLint oglfilter);
void setBlitSurface(SDL_Surface *blitsurface);
void setFGSurface(SDL_Surface *fgsurface);
+ void setFXSurface(SDL_Surface *fxsurface);
- void reloadBG(SDL_Surface* surf);
+ void reloadFX(SDL_Surface* surf);
void reloadFG(SDL_Surface* surf);
virtual ~COpenGL();
@@ -53,6 +54,7 @@
private:
SDL_Surface *mp_blitsurface;
SDL_Surface *mp_fgsurface;
+ SDL_Surface *mp_fxsurface;
char* m_opengl_buffer; // Used for internal ScaleX filtering
unsigned char m_Depth;
@@ -66,7 +68,7 @@
GLuint m_texture;
- GLuint m_texBG, m_texFG;
+ GLuint m_texFX, m_texFG;
};
#endif
Modified: cgenius/trunk/src/sdl/CVideoDriver.cpp
===================================================================
--- cgenius/trunk/src/sdl/CVideoDriver.cpp 2010-06-28 23:24:29 UTC (rev 1292)
+++ cgenius/trunk/src/sdl/CVideoDriver.cpp 2010-06-29 23:15:50 UTC (rev 1293)
@@ -330,7 +330,6 @@
else
{
mp_OpenGL->setBlitSurface(BlitSurface);
- mp_OpenGL->setFGSurface(FGLayerSurface);
}
}
#endif
@@ -433,19 +432,6 @@
{
float scalefactor;
SDL_Rect Gamerect;
- /*static const Uint32 RGBA[] = {
-#if SDL_BYTEORDER == SDL_LIL_ENDIAN // OpenGL RGBA masks
- 0x000000FF,
- 0x0000FF00,
- 0x00FF0000,
- 0xFF000000
-#else
- 0xFF000000,
- 0x00FF0000,
- 0x0000FF00,
- 0x000000FF
-#endif
- };*/
Gamerect = game_resolution_rect;
scalefactor = ((float)m_Resolution.width) / ((float)Gamerect.w);
@@ -505,22 +491,46 @@
// The video class must be changed for any further resolutions
game_resolution_rect.x = 0; game_resolution_rect.y = 0;
- FGLayerSurface = createSurface( "FGLayerSurface", false,
+ if(m_opengl && m_ScaleXFilter == 1)
+ {
+ FGLayerSurface = createSurface( "FGLayerSurface", true,
+ getPowerOfTwo(game_resolution_rect.w),
+ getPowerOfTwo(game_resolution_rect.h),
+ m_Resolution.depth,
+ Mode, screen->format );
+ }
+ else
+ {
+ FGLayerSurface = createSurface( "FGLayerSurface", false,
game_resolution_rect.w,
game_resolution_rect.h,
m_Resolution.depth,
Mode, screen->format );
- SDL_SetColorKey( FGLayerSurface, SDL_SRCCOLORKEY,
- SDL_MapRGB(FGLayerSurface->format, 0, 0xFF, 0xFE) );
+ SDL_SetColorKey( FGLayerSurface, SDL_SRCCOLORKEY,
+ SDL_MapRGB(FGLayerSurface->format, 0, 0xFF, 0xFE) );
+
+ }
+
//Set surface alpha
SDL_SetAlpha( FGLayerSurface, SDL_SRCALPHA, 225 );
- FXSurface = createSurface( "FXSurface", false,
+ if(m_opengl && m_ScaleXFilter == 1)
+ {
+ FXSurface = createSurface( "FXSurface", true,
game_resolution_rect.w,
game_resolution_rect.h,
m_Resolution.depth,
Mode, screen->format );
+ }
+ else
+ {
+ FXSurface = createSurface( "FXSurface", false,
+ getPowerOfTwo(game_resolution_rect.w),
+ getPowerOfTwo(game_resolution_rect.h),
+ m_Resolution.depth,
+ Mode, screen->format );
+ }
g_pGfxEngine->Palette.setFXSurface( FXSurface );
@@ -529,22 +539,50 @@
SDL_Surface* CVideoDriver::createSurface( std::string name, bool alpha, int width, int height, int bpp, int mode, SDL_PixelFormat* format )
{
- SDL_Surface *temporary, *optimized;
+ /*if(m_opengl && m_ScaleXFilter == 1)
+ {
+ static const Uint32 RGBA[] = {
+ #if SDL_BYTEORDER == SDL_LIL_ENDIAN // OpenGL RGBA masks
+ 0x000000FF,
+ 0x0000FF00,
+ 0x00FF0000,
+ 0xFF000000
+ #else
+ 0xFF000000,
+ 0x00FF0000,
+ 0x0000FF00,
+ 0x000000FF
+ #endif
+ };
+ SDL_Surface *newsurface;
+ newsurface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, bpp, RGBA[0], RGBA[1], RGBA[2], RGBA[3]);
+ if (!newsurface)
+ {
+ g_pLogFile->textOut(RED,"VideoDriver: Couldn't create surface:" + name +"<br>");
+ return NULL;
+ }
- temporary = SDL_CreateRGBSurface( mode, width, height, bpp, format->Rmask, format->Gmask, format->Bmask, format->Amask);
- if (alpha && bpp==32) {
- optimized = SDL_DisplayFormatAlpha( temporary );
- } else {
- optimized = SDL_DisplayFormat( temporary );
+ return newsurface;
}
- SDL_FreeSurface(temporary);
- if (!optimized)
+ else*/
{
- g_pLogFile->textOut(RED,"VideoDriver: Couldn't create surface:" + name +"<br>");
- return false;
+ SDL_Surface *temporary, *optimized;
+
+ temporary = SDL_CreateRGBSurface( mode, width, height, bpp, format->Rmask, format->Gmask, format->Bmask, format->Amask);
+ if (alpha && bpp==32) {
+ optimized = SDL_DisplayFormatAlpha( temporary );
+ } else {
+ optimized = SDL_DisplayFormat( temporary );
+ }
+ SDL_FreeSurface(temporary);
+ if (!optimized)
+ {
+ g_pLogFile->textOut(RED,"VideoDriver: Couldn't create surface:" + name +"<br>");
+ return NULL;
+ }
+ bpp = optimized->format->BitsPerPixel;
+ return optimized;
}
- bpp = optimized->format->BitsPerPixel;
- return optimized;
}
// defines the scroll-buffer that is used for blitScrollSurface(). It's normally passed by a CMap Object
@@ -661,16 +699,23 @@
void CVideoDriver::collectSurfaces()
{
-/*#ifdef USE_OPENGL
- if(m_opengl)
+#ifdef USE_OPENGL
+ if(m_opengl && m_ScaleXFilter == 1)
{
// TODO: Create a solid concept for rendering more textures instead of just one that is binded
// to BlitSurface. It's not that easy, because doing that and using scaleX will mean, that you
// to scaleX multiple times. So COpenGL must have separate cases. With or without ScaleX.
// It's might only be faster if scaleX is never used in that TODO-case
+
+ mp_OpenGL->setFGSurface(FGLayerSurface);
+
+ if(FXSurface->format->alpha)
+ mp_OpenGL->setFXSurface(FXSurface);
+ else
+ mp_OpenGL->setFXSurface(NULL);
}
else
-#endif*/
+#endif
{
SDL_BlitSurface(FGLayerSurface, NULL, BlitSurface, NULL);
@@ -685,10 +730,13 @@
#ifdef USE_OPENGL
if(m_opengl)
{
- mp_OpenGL->render(false);
+ mp_OpenGL->render();
// Flush the FG-Layer
- SDL_FillRect(FGLayerSurface, NULL, SDL_MapRGB(FGLayerSurface->format, 0, 0xFF, 0xFE));
+ if(m_ScaleXFilter == 1)
+ SDL_FillRect(FGLayerSurface, NULL, SDL_MapRGBA(FGLayerSurface->format, 0, 0, 0, 0));
+ else
+ SDL_FillRect(FGLayerSurface, NULL, SDL_MapRGB(FGLayerSurface->format, 0, 0xFF, 0xFE));
}
else // No OpenGL but Software Rendering
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <piz...@us...> - 2010-06-28 23:24:36
|
Revision: 1292
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1292&view=rev
Author: pizza2004
Date: 2010-06-28 23:24:29 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
Transfer from GIT
Modified Paths:
--------------
cgenius/trunk/src/common/CMap.cpp
cgenius/trunk/src/common/CMap.h
cgenius/trunk/src/common/CObject.h
cgenius/trunk/src/engine/galaxy/CEGAGraphicsGalaxy.cpp
cgenius/trunk/src/engine/galaxy/CEGAGraphicsGalaxy.h
cgenius/trunk/src/engine/galaxy/CMapLoaderGalaxy.cpp
cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.cpp
cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.h
cgenius/trunk/src/fileio/compression/CRLE.cpp
Modified: cgenius/trunk/src/common/CMap.cpp
===================================================================
--- cgenius/trunk/src/common/CMap.cpp 2010-06-28 19:05:09 UTC (rev 1291)
+++ cgenius/trunk/src/common/CMap.cpp 2010-06-28 23:24:29 UTC (rev 1292)
@@ -87,13 +87,22 @@
Uint16 CMap::getObjectat(Uint16 x, Uint16 y)
{ return m_objectlayer[x][y]; }
+/**
+ * \brief Gets the pointer to the plane data of the map
+ * \param PlaneNum number of the requested Plane
+ */
+word *CMap::getData(Uint8 PlaneNum)
+{
+ return m_Plane[PlaneNum].getMapDataPtr();
+}
+
word *CMap::getForegroundData()
-{ //return mp_foreground_data;
+{
return m_Plane[1].getMapDataPtr();
}
word *CMap::getBackgroundData()
-{ //return mp_foreground_data;
+{
return m_Plane[0].getMapDataPtr();
}
Modified: cgenius/trunk/src/common/CMap.h
===================================================================
--- cgenius/trunk/src/common/CMap.h 2010-06-28 19:05:09 UTC (rev 1291)
+++ cgenius/trunk/src/common/CMap.h 2010-06-28 23:24:29 UTC (rev 1292)
@@ -69,6 +69,7 @@
unsigned int getlevelat(unsigned int x, unsigned int y) {
return m_objectlayer[x>>4][y>>4]; }
+ word *getData(Uint8 PlaneNum);
word *getForegroundData();
word *getBackgroundData();
Modified: cgenius/trunk/src/common/CObject.h
===================================================================
--- cgenius/trunk/src/common/CObject.h 2010-06-28 19:05:09 UTC (rev 1291)
+++ cgenius/trunk/src/common/CObject.h 2010-06-28 23:24:29 UTC (rev 1292)
@@ -46,22 +46,18 @@
public:
CObject(CMap *pmap=NULL);
- object_t m_type; // yorp, vorticon, etc.
- unsigned int m_index; // Like an ID for some objects that need this implementation
+ object_t m_type; // yorp, vorticon, etc.
+ unsigned int m_index; // Like an ID for some objects that need this implementation
bool exists;
- bool onscreen; // true=(scrx,scry) position is visible onscreen
+ bool onscreen; // true=(scrx,scry) position is visible onscreen
bool hasbeenonscreen;
unsigned int sprite; // which sprite should this object be drawn with
- int scrx, scry; // x,y pixel position on screen
+ int scrx, scry; // x,y pixel position on screen
// Bouncing Boxes
Uint32 bboxX1, bboxX2;
Uint32 bboxY1, bboxY2;
- // if type is OBJ_PLAYER, this contains the player number that this object
- // is associated with
- int AssociatedWithPlayer;
-
// if zero, priority tiles will not be honored and object will always
// appear in front of the background
bool honorPriority;
@@ -86,11 +82,6 @@
unsigned char touchPlayer; // 1=hit detection with player
unsigned char touchedBy; // which player was hit
- // Y position on this object the hit was detected
- // this is used for the yorps' bonk-on-the-head thing.
- // objects arm_typee scanned bottom to top, and first pixel
- // touching player is what goes in here.
- unsigned char hity;
bool needinit; // 1=new object--requires initilization
bool dead;
@@ -168,8 +159,6 @@
unsigned int getYDownPos();
unsigned int getYMidPos();
- unsigned int x, y; // x,y location in map coords, CSFed
-
void processFalling();
void draw();
@@ -181,6 +170,7 @@
CMap *mp_Map;
Uint16 m_blinktime;
+ unsigned int x, y; // x,y location in map coords, CSFed
static int m_number_of_objects;
};
Modified: cgenius/trunk/src/engine/galaxy/CEGAGraphicsGalaxy.cpp
===================================================================
--- cgenius/trunk/src/engine/galaxy/CEGAGraphicsGalaxy.cpp 2010-06-28 19:05:09 UTC (rev 1291)
+++ cgenius/trunk/src/engine/galaxy/CEGAGraphicsGalaxy.cpp 2010-06-28 23:24:29 UTC (rev 1292)
@@ -137,8 +137,10 @@
if(!readfonts()) return false;
if(!readBitmaps()) return false;
if(!readMaskedBitmaps()) return false;
+
+ g_pGfxEngine->createEmptyTilemap(4);
if(!readTilemaps()) return false;
- //k456_export_masked_tiles();
+ if(!readMaskedTilemaps()) return false;
//k456_export_8_tiles();
//k456_export_8_masked_tiles();
//k456_export_sprites();
@@ -276,6 +278,64 @@
}
/**
+ * \brief This function extracts a tile from the galaxy graphics map, and converts it properly to a
+ * SDL Surface
+ */
+void CEGAGraphicsGalaxy::extractMaskedTile(SDL_Surface *sfc, std::vector<unsigned char> &data,
+ Uint16 size, Uint16 columns, size_t tile)
+{
+ if(!data.empty())
+ {
+ // Decode the image data
+ for(size_t p = 0; p < 4; p++)
+ {
+ // Decode the lines of the bitmap data
+ Uint8 *pointer = &(data[0]) + (p+1) * (size/8) * size;
+ for(size_t y = 0; y < size; y++)
+ {
+ Uint8 *pixel = (Uint8*)sfc->pixels +
+ size*(tile%columns) +
+ size*size*columns*(tile/columns) +
+ (size*columns*y);
+ for(size_t x = 0; x < (size/8); x++)
+ {
+ Uint8 bit,b;
+ for(b=0 ; b<8 ; b++)
+ {
+ bit = getBit(*pointer, 7-b);
+ *pixel |= (bit<<p);
+ pixel++;
+ }
+ pointer++;
+ }
+ }
+ }
+
+ // now apply the mask!
+ Uint8 *pointer = &(data[0]);
+ for(size_t y = 0; y < size; y++)
+ {
+ Uint8 *pixel = (Uint8*)sfc->pixels +
+ size*(tile%columns) +
+ size*size*columns*(tile/columns) +
+ (size*columns*y);
+ for(size_t x = 0; x < (size/8); x++)
+ {
+ Uint8 bit,b;
+ for(b=0 ; b<8 ; b++)
+ {
+ bit = getBit(*pointer, 7-b);
+ if(bit == 1)
+ *pixel = 16;
+ pixel++;
+ }
+ pointer++;
+ }
+ }
+ }
+}
+
+/**
* \brief prepares to load the data. Does a bit of extraction
* \return returns true, if loading was successful
*/
@@ -569,7 +629,6 @@
{
int ep = m_episode - 4;
- g_pGfxEngine->createEmptyTilemap(4);
CTilemap &Tilemap = g_pGfxEngine->getTileMap(0);
Tilemap.CreateSurface( g_pGfxEngine->Palette.m_Palette, SDL_SWSURFACE,
EpisodeInfo[ep].Num16Tiles, 4, 18 );
@@ -587,6 +646,27 @@
return true;
}
+bool CEGAGraphicsGalaxy::readMaskedTilemaps()
+{
+ int ep = m_episode - 4;
+
+ CTilemap &Tilemap = g_pGfxEngine->getTileMap(1);
+ Tilemap.CreateSurface( g_pGfxEngine->Palette.m_Palette, SDL_SWSURFACE,
+ EpisodeInfo[ep].Num16MaskedTiles, 4, 18 );
+ SDL_Surface *sfc = Tilemap.getSDLSurface();
+ SDL_FillRect(sfc,NULL, 0);
+ if(SDL_MUSTLOCK(sfc)) SDL_LockSurface(sfc);
+
+ for(size_t i = 0; i < EpisodeInfo[ep].Num16MaskedTiles; i++)
+ {
+ extractMaskedTile(sfc, m_egagraph.at(EpisodeInfo[ep].Index16MaskedTiles + i).data, 16, 18, i);
+ }
+
+ SDL_UnlockSurface(sfc);
+
+ return true;
+}
+
//
//void k456_export_masked_tiles()
//{
Modified: cgenius/trunk/src/engine/galaxy/CEGAGraphicsGalaxy.h
===================================================================
--- cgenius/trunk/src/engine/galaxy/CEGAGraphicsGalaxy.h 2010-06-28 19:05:09 UTC (rev 1291)
+++ cgenius/trunk/src/engine/galaxy/CEGAGraphicsGalaxy.h 2010-06-28 23:24:29 UTC (rev 1292)
@@ -33,6 +33,8 @@
bool masked=false);
void extractTile(SDL_Surface *sfc, std::vector<unsigned char> &data,
Uint16 size, Uint16 columns, size_t tile);
+ void extractMaskedTile(SDL_Surface *sfc, std::vector<unsigned char> &data,
+ Uint16 size, Uint16 columns, size_t tile);
bool begin();
Uint8 getBit(unsigned char data, Uint8 leftshift);
@@ -40,6 +42,7 @@
bool readBitmaps();
bool readMaskedBitmaps();
bool readTilemaps();
+ bool readMaskedTilemaps();
virtual ~CEGAGraphicsGalaxy();
Modified: cgenius/trunk/src/engine/galaxy/CMapLoaderGalaxy.cpp
===================================================================
--- cgenius/trunk/src/engine/galaxy/CMapLoaderGalaxy.cpp 2010-06-28 19:05:09 UTC (rev 1291)
+++ cgenius/trunk/src/engine/galaxy/CMapLoaderGalaxy.cpp 2010-06-28 23:24:29 UTC (rev 1292)
@@ -67,6 +67,8 @@
longword offset, longword length,
word magic_word)
{
+ size_t initial_pos = MapFile.tellg();
+
std::vector<word> Plane;
MapFile.seekg(offset);
@@ -89,7 +91,7 @@
RLE.expand(Plane, RLE_Plane, magic_word);
RLE_Plane.clear();
- word *ptr = Map.getBackgroundData();
+ word *ptr = Map.getData(PlaneNumber);
for(size_t y=0; y<Map.m_height ; y++)
{
for(size_t x=0; x<Map.m_width ; x++)
@@ -113,6 +115,8 @@
{
g_pLogFile->textOut( "\nERROR Plane Uncompress Carmack Size Failed: Actual " + itoa(RLE_Plane.size()) + " bytes Expected " + itoa(decarmacksize) + " bytes<br>");
}
+
+ MapFile.seekg(initial_pos);
}
@@ -130,7 +134,7 @@
magic_word = READWORD(Maphead);
// Get location of the level data from MAPHEAD Located in the EXE-File.
- Maphead += (level-1)*sizeof(longword);
+ Maphead += level*sizeof(longword);
level_offset = READLONGWORD(Maphead);
// Open the Gamemaps file
@@ -200,6 +204,8 @@
Map.createEmptyDataPlanes(Width*Height);
unpackPlaneData(MapFile, Map, 0, Plane_Offset[0], Plane_Length[0], magic_word);
+ unpackPlaneData(MapFile, Map, 1, Plane_Offset[1], Plane_Length[1], magic_word);
+ unpackPlaneData(MapFile, Map, 2, Plane_Offset[2], Plane_Length[2], magic_word);
}
MapFile.close();
return true;
Modified: cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.cpp
===================================================================
--- cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.cpp 2010-06-28 19:05:09 UTC (rev 1291)
+++ cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.cpp 2010-06-28 23:24:29 UTC (rev 1292)
@@ -11,6 +11,7 @@
#include "../../sdl/CVideoDriver.h"
#include "../../sdl/CInput.h"
#include "../../graphics/CGfxEngine.h"
+#include "../../StringUtils.h"
namespace galaxy
{
@@ -28,6 +29,13 @@
// Setup for the ingame
bool CPlayGameGalaxy::init()
{
+ loadLevel();
+
+ return false;
+}
+
+void CPlayGameGalaxy::loadLevel()
+{
// Load the Level map. We have two modes. Inlevel and game map
// TODO: Lets load the main map for now and create process for this
@@ -36,18 +44,12 @@
m_Map.setTileMap(g_pGfxEngine->getTileMap(0));
m_Map.setScrollSurface(g_pVideoDriver->getScrollSurface());
- MapLoader.loadMap(m_Map, 1); // Map Level?
+ MapLoader.loadMap(m_Map, m_Level); // Map Level?
+ //m_Map.drawAll();
m_Map.gotoPos(0, 0); // Coordinates of star sky
- //m_Map.drawAll();
-
- // We should create this as base and two more classes. One will be for ingame and the other for
- // the map processes
-
- return false;
}
-
// The main ingame process cycle when keen galaxy is up and running
void CPlayGameGalaxy::process()
{
@@ -70,28 +72,37 @@
m_endgame = true;
}
- if(g_pInput->getPressedCommand(IC_LEFT))
+ if(g_pInput->getHoldedCommand(IC_LEFT))
{
if(m_posx>0)
m_posx--;
}
- else if(g_pInput->getPressedCommand(IC_RIGHT))
+ else if(g_pInput->getHoldedCommand(IC_RIGHT))
{
if(m_posx<m_Map.m_width)
m_posx++;
}
- if(g_pInput->getPressedCommand(IC_UP))
+ if(g_pInput->getHoldedCommand(IC_UP))
{
if(m_posy>0)
m_posy--;
}
- else if(g_pInput->getPressedCommand(IC_DOWN))
+ else if(g_pInput->getHoldedCommand(IC_DOWN))
{
if(m_posy<m_Map.m_height)
m_posy++;
}
+
+ if(g_pInput->getPressedCommand(IC_STATUS))
+ {
+ if(m_Level < 20)
+ m_Level++;
+ else
+ m_Level = 0;
+ loadLevel();
+ }
}
void CPlayGameGalaxy::processRendering()
@@ -102,12 +113,14 @@
{
g_pGfxEngine->getTileMap(0).drawTile(g_pVideoDriver->getBlitSurface(),
16*x, 16*y, m_Map.at(m_posx+x,m_posy+y,0) );
- //g_pGfxEngine->getTileMap(0).drawTile(g_pVideoDriver->getBlitSurface(),
- //16*x, 16*y, m_Map.at(m_posx+x,m_posy+y,0) );
+ if(m_Map.at(m_posx+x,m_posy+y,1) != 0)
+ g_pGfxEngine->getTileMap(1).drawTile(g_pVideoDriver->getBlitSurface(),
+ 16*x, 16*y, m_Map.at(m_posx+x,m_posy+y,1) );
}
}
- g_pGfxEngine->getFont(0).drawFont(g_pVideoDriver->getBlitSurface(),"Press Esc to end", 10, 10);
+ g_pGfxEngine->getFont(0).drawFont(g_pVideoDriver->BlitSurface, "Press the arrows to scroll, ESC to quit", 10, 10);
+ g_pGfxEngine->getFont(0).drawFont(g_pVideoDriver->BlitSurface, "Enter to switch Level", 10, 20);
}
Modified: cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.h
===================================================================
--- cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.h 2010-06-28 19:05:09 UTC (rev 1291)
+++ cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.h 2010-06-28 23:24:29 UTC (rev 1292)
@@ -22,6 +22,7 @@
stOption *p_option);
bool loadGameState();
+ void loadLevel();
bool init();
void process();
Modified: cgenius/trunk/src/fileio/compression/CRLE.cpp
===================================================================
--- cgenius/trunk/src/fileio/compression/CRLE.cpp 2010-06-28 19:05:09 UTC (rev 1291)
+++ cgenius/trunk/src/fileio/compression/CRLE.cpp 2010-06-28 23:24:29 UTC (rev 1292)
@@ -49,9 +49,10 @@
word value;
size_t inc;
- finsize = (src.at(1)<<8) + src.at(0);
+ finsize = (src.at(1)<<8) | src.at(0);
finsize /= 2;
+
for(size_t i=WORDSIZE ; dst.size() < finsize ; i+=inc)
{
// Read datum (word)
@@ -89,7 +90,6 @@
finsize = (high_byte<<8) | low_byte;
finsize /= 2;
- //for(size_t i=WORDSIZE; i<src.size(); i+=inc )
for(size_t i=WORDSIZE ; dst.size() < finsize ; i+=inc)
{
// Read datum (word)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <piz...@us...> - 2010-06-28 19:05:15
|
Revision: 1291
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1291&view=rev
Author: pizza2004
Date: 2010-06-28 19:05:09 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
I finally finished up the basis for a new readme that uses html rather than a text file. It needs some work, but this is good enough for now. I am also committing the changes made in GIT.
Modified Paths:
--------------
cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj
cgenius/trunk/changelog.txt
cgenius/trunk/src/common/CObject.cpp
cgenius/trunk/src/common/CObject.h
cgenius/trunk/src/engine/galaxy/CEGAGraphicsGalaxy.cpp
cgenius/trunk/src/engine/vorticon/ai/ray.cpp
cgenius/trunk/src/engine/vorticon/ai/tankep2.cpp
cgenius/trunk/src/graphics/CSprite.cpp
cgenius/trunk/src/graphics/CSprite.h
Added Paths:
-----------
cgenius/trunk/README.html
Added: cgenius/trunk/README.html
===================================================================
--- cgenius/trunk/README.html (rev 0)
+++ cgenius/trunk/README.html 2010-06-28 19:05:09 UTC (rev 1291)
@@ -0,0 +1,233 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+ <meta http-equiv="CONTENT-TYPE" content="text/html; charset=us-ascii">
+ <meta name="collection" content="reference">
+
+ <title>Readme -- Commander Genius Version 0.3.2</title>
+</head>
+
+<body lang="en-US" bgcolor="#FFFFFF">
+ <h1 align="center">Commander Genius<br>
+ Version 0.3.2</h1>
+
+ <h2 align="center">Readme</h2>
+
+ <h2>Contents</h2>
+
+ <ul>
+ <li><a href="#introduction">Introduction</a></li>
+
+ <li><a href="#about">About Commander Genius</a></li>
+
+ <li><a href="#install">Installation Instructions</a></li>
+
+ <li><a href="#change">Change Log</a></li>
+
+ <li><a href="#compatibility">Compatibility</a></li>
+
+ <li><a href="#hqp">High Quality Content</a></li>
+
+ <li><a href="#bugs">Bug Reports and Feedback</a></li>
+
+ <li><a href="#faq">Frequently Asked Questions</a></li>
+ </ul>
+
+ <h2><a name="introduction" id="introduction"></a>Introduction</h2>
+
+ <blockquote>
+ Thanks for downloading Commander Genius!
+ </blockquote>
+
+ <blockquote>
+ Commander Genius is an open-source clone of
+Commander Keen, which allows you to play the
+original three games, and a majority of the mods
+made for them.
+ </blockquote>
+
+ <h2><a name="about" id="about"></a>About Commander Genius</h2>
+
+ <blockquote>
+ Originally named CloneKeen Plus due to the origin of the original code.
+ With the release of version 0.3, much of the base code had changed,
+ and the name was changed as well. Commander Genius is actively developed by
+ a small group of programmers and artists, to fix bugs and improve the overall
+ feel of the game.
+ </blockquote>
+
+ <h2><a name="install" id="install"></a>Installation Instructions</h2>
+
+ <blockquote>
+ Linux:<br>
+ Just copy the files from the zip and run the game! To add more games, just
+ put them inside a folder in the games folder.<br>
+ <br>
+ Mac OSX:<br>
+ You only need the application, but I would suggest copying the other files as
+ well, as they will help with adding games and such.<br>
+ <br>
+ Windows:<br>
+ Basically the same as Linux.<br>
+ <br>
+ Also if you want to use the HQ Audio, you may copy the snd and music files into
+ the global folder with gfx. For graphics, copy the images into the gfx folder
+ inside of the folder for the game.
+ </blockquote>
+
+ <h2><a name="change" id="change"></a>Change Log</h2>
+
+ <ul>
+ <li>Version 0.3.2</li>
+
+ <ul>
+ <li>Faster Game loads!</li>
+
+ <li>Other segfault fixes!!</li>
+
+ <li>Improved Mod support (Especially for Keen X and Yorphius II)</li>
+
+ <li>Now HQ Sprites are supported!</li>
+
+ <li>faster loading maps algorithm and less memory used</li>
+
+ <li>more Galaxy Code!</li>
+
+ <li>Code cleanups!</li>
+
+ <li>Improved Patch-Code</li>
+
+ <li>Improved Garg AI</li>
+
+ <li>Improved Scrub AI</li>
+
+ <li>Teleporter fixes</li>
+
+ <li>Now enemies blink, when they get a hit</li>
+
+ <li>Small improvement of the player physics</li>
+
+ <li>New configuration file parser which makes loading and saving even faster!</li>
+ </ul>
+
+ <li>Version 0.3.1.3</li>
+
+ <ul>
+ <li>Savegames are now separated per game</li>
+
+ <li>bit more galaxy code</li>
+
+ <li>fixed filename search problems</li>
+
+ <li>even faster and more colourful menu</li>
+ </ul>
+
+ <li>Version 0.3.1.2</li>
+
+ <ul>
+ <li>a bit faster and more colourful menu</li>
+ </ul>
+
+ <li>Version 0.3.1.1</li>
+
+ <ul>
+ <li>Volume sliders</li>
+
+ <li>Camera bounds config</li>
+
+ <li>Older savegame compatibility... (to version 0.3.0.4)</li>
+ </ul>
+ </ul>
+
+ <blockquote>
+ For older changes, please refer to the included text file.
+ </blockquote>
+
+ <h2><a name="compatibility" id="compatibility"></a>Compatibility</h2>
+
+ <blockquote>
+ We have compatibilty with many platforms, the most prominent being Linux,
+ Mac, and Windows. It is recommended you use OpenGL v2.0 when trying to run
+ our game, as lower may cause issues. We have a good base for supporting mods,
+ but we are working on improving this area of Commander Genius as well, and
+ would love your input on how to do so.
+ </blockquote>
+
+ <h2><a name="hqp" id="hqp"></a>High Quality Content</h2>
+
+ <blockquote>
+ I would like to dedicate this section to explaining how to make high quality
+ graphics for Commander Genius.<br>
+ If you decide you want to make your own,
+ just take the original bmps, or your already modified ones, and name all the
+ BMP files bitmap#.bmp, all the sprites sprite#.bmp, the tiles ck#tiles.bmp
+ and the fonts fonts.bmp.<br>
+ Once you have done all this, open them up in a graphics editing program and
+ change them to have all colors, then save them as a 24 bit bmp. Then you may
+ modify them with whatever colors you wish, and put the results in the gfx
+ folder of the game you wish to use the graphics.
+ </blockquote>
+
+ <h2><a name="bugs" id="bugs"></a>Bug Reports and Feedback</h2>
+
+ <blockquote>
+ If you have any bugs to report, or features to request, you may do so at
+ <a href="http://sourceforge.net/apps/trac/clonekeenplus/">the trac</a>.
+ </blockquote>
+
+ <blockquote>
+ Come Visit us at our <a href="http://clonekeenplus.neejean.org/">forum</a>
+ if you wish to provide any feedback on what we have done.
+ </blockquote>
+
+ <h2><a name="faq" id="faq"></a>Frequently Asked Questions</h2>
+
+ <blockquote>
+ <b>Q:</b> When I change to opengl-mode, the screen turns white and I can't do anything! How do I change the mode back?
+ </blockquote>
+
+ <blockquote>
+ <b>A:</b> You can either delete "cgenius.cfg" or open it in a text editor and change it manually. Just put "opengl = 0" and it should change just that setting back.<br>
+ The white screen means, that your graphics card doesn't support NPOT Textures. A video card with OpenGL 2.0 or later support should not have that problem.
+ </blockquote>
+
+ <blockquote>
+ <b>Q:</b> Commander Genius is slow! Please help!
+ </blockquote>
+
+ <blockquote>
+ <b>A:</b> OpenGL may help, but you must have a graphics card that supports NPOT-Textures. (OpenGL 2.0 or later).<br>
+ Try to lower the resolution, choose a lower filter, or decrease some sound settings and see if that helps.
+ </blockquote>
+
+ <blockquote>
+ <b>Q:</b> When can I play Keen 4, 5 and 6 on CG?
+ </blockquote>
+
+ <blockquote>
+ <b>A:</b> We are currently working on supporting play of Keens 4-6. Keens 4-5 should be fully functional (although they won't be perfect) by the beginning of 2011. Keen 6 will be added a few months later.
+ </blockquote>
+
+ <blockquote>
+ <b>Q:</b> I have a different question I want to ask! What should I do?
+ </blockquote>
+
+ <blockquote>
+ <b>A:</b> Just come visit us at our <a href="http://www.pckf.com/viewtopic.php?t=1265">Faq Topic</a>, we'll do our best to answer your question.
+ </blockquote>
+
+ <br>
+ <br>
+ <br>
+ <hr>
+
+ <p><font size="2">
+ Copyright © 2003-2010 Caitlin Shaw, © 2008-2010 Gerstrong<br>
+ Copyright © 2009-2010 Albert, Pizza2004, Pickle, Tulip, DaVince<br>
+</font></p>
+<script type="text/javascript" language="JavaScript" src="/js/omi/jsc/s_code_remote.js">
+</script>
+<script language="JavaScript" src="/js/omi/jsc/s_code_remote.js"></script></body>
+</html>
+
Modified: cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj
===================================================================
--- cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj 2010-06-28 11:05:06 UTC (rev 1290)
+++ cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj 2010-06-28 19:05:09 UTC (rev 1291)
@@ -293,7 +293,6 @@
63CD12A211CFF5FD00F60BC8 /* CSound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD11E911CFF5FB00F60BC8 /* CSound.cpp */; };
63CD12A311CFF5FD00F60BC8 /* CSoundChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD11EB11CFF5FB00F60BC8 /* CSoundChannel.cpp */; };
63CD12A411CFF5FD00F60BC8 /* CSoundSlot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD11ED11CFF5FB00F60BC8 /* CSoundSlot.cpp */; };
- 63CD12A511CFF5FD00F60BC8 /* wizgp2x.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD11F111CFF5FB00F60BC8 /* wizgp2x.cpp */; };
63CD12A611CFF5FD00F60BC8 /* colourconvert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD11F411CFF5FB00F60BC8 /* colourconvert.cpp */; };
63CD12A711CFF5FD00F60BC8 /* StringBuf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD11F711CFF5FB00F60BC8 /* StringBuf.cpp */; };
63CD12A811CFF5FD00F60BC8 /* StringUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD11F911CFF5FB00F60BC8 /* StringUtils.cpp */; };
@@ -1022,8 +1021,6 @@
63CD11ED11CFF5FB00F60BC8 /* CSoundSlot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSoundSlot.cpp; sourceTree = "<group>"; };
63CD11EE11CFF5FB00F60BC8 /* CSoundSlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSoundSlot.h; sourceTree = "<group>"; };
63CD11EF11CFF5FB00F60BC8 /* sounds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sounds.h; sourceTree = "<group>"; };
- 63CD11F111CFF5FB00F60BC8 /* wizgp2x.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wizgp2x.cpp; sourceTree = "<group>"; };
- 63CD11F211CFF5FB00F60BC8 /* wizgp2x.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wizgp2x.h; sourceTree = "<group>"; };
63CD11F411CFF5FB00F60BC8 /* colourconvert.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = colourconvert.cpp; sourceTree = "<group>"; };
63CD11F511CFF5FB00F60BC8 /* colourconvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = colourconvert.h; sourceTree = "<group>"; };
63CD11F611CFF5FB00F60BC8 /* SmartPointer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmartPointer.h; sourceTree = "<group>"; };
@@ -1774,7 +1771,6 @@
63CD11E611CFF5FB00F60BC8 /* CVideoDriver.cpp */,
63CD11E711CFF5FB00F60BC8 /* CVideoDriver.h */,
63CD11E811CFF5FB00F60BC8 /* sound */,
- 63CD11F011CFF5FB00F60BC8 /* sys */,
63CD11F311CFF5FB00F60BC8 /* video */,
);
path = sdl;
@@ -1794,15 +1790,6 @@
path = sound;
sourceTree = "<group>";
};
- 63CD11F011CFF5FB00F60BC8 /* sys */ = {
- isa = PBXGroup;
- children = (
- 63CD11F111CFF5FB00F60BC8 /* wizgp2x.cpp */,
- 63CD11F211CFF5FB00F60BC8 /* wizgp2x.h */,
- );
- path = sys;
- sourceTree = "<group>";
- };
63CD11F311CFF5FB00F60BC8 /* video */ = {
isa = PBXGroup;
children = (
@@ -2143,7 +2130,6 @@
63CD12A211CFF5FD00F60BC8 /* CSound.cpp in Sources */,
63CD12A311CFF5FD00F60BC8 /* CSoundChannel.cpp in Sources */,
63CD12A411CFF5FD00F60BC8 /* CSoundSlot.cpp in Sources */,
- 63CD12A511CFF5FD00F60BC8 /* wizgp2x.cpp in Sources */,
63CD12A611CFF5FD00F60BC8 /* colourconvert.cpp in Sources */,
63CD12A711CFF5FD00F60BC8 /* StringBuf.cpp in Sources */,
63CD12A811CFF5FD00F60BC8 /* StringUtils.cpp in Sources */,
Modified: cgenius/trunk/changelog.txt
===================================================================
--- cgenius/trunk/changelog.txt 2010-06-28 11:05:06 UTC (rev 1290)
+++ cgenius/trunk/changelog.txt 2010-06-28 19:05:09 UTC (rev 1291)
@@ -14,6 +14,7 @@
- Improved Garg AI
- Improved Scrub AI
- Teleporter fixes
+- Now enemies blink, when they get a hit
- Small improvement of the player physics
- New configuration file parser which makes loading and saving even faster!
Modified: cgenius/trunk/src/common/CObject.cpp
===================================================================
--- cgenius/trunk/src/common/CObject.cpp 2010-06-28 11:05:06 UTC (rev 1290)
+++ cgenius/trunk/src/common/CObject.cpp 2010-06-28 19:05:09 UTC (rev 1291)
@@ -20,7 +20,8 @@
CObject::CObject(CMap *pmap) :
m_index(m_number_of_objects),
mp_object(NULL),
-mp_Map(pmap)
+mp_Map(pmap),
+m_blinktime(0)
{
m_number_of_objects++;
honorPriority = false;
@@ -673,6 +674,7 @@
return false;
}
+// Just kills the object
void CObject::kill()
{
if ( exists && zapped < 500 && canbezapped )
@@ -682,6 +684,16 @@
}
}
+/**
+ * \brief This function triggers the blinking behavior of an object.
+ * Normally this happens, when an enemy gets shot and can get
+ * multiple hits.
+ * \param frametime amount of drawn blinking frames during the blitting.
+ * Every draw cycle performs one
+ */
+void CObject::blink(Uint16 frametime)
+{ m_blinktime = frametime; }
+
////
// For drawing
////
@@ -699,7 +711,13 @@
if(scry < gameres.w && scry < gameres.h && exists)
{
- Sprite.drawSprite( sfc, scrx, scry );
+ if(m_blinktime > 0)
+ {
+ Sprite.drawBlinkingSprite( sfc, scrx, scry );
+ m_blinktime--;
+ }
+ else
+ Sprite.drawSprite( sfc, scrx, scry );
hasbeenonscreen = true;
if (honorPriority)
Modified: cgenius/trunk/src/common/CObject.h
===================================================================
--- cgenius/trunk/src/common/CObject.h 2010-06-28 11:05:06 UTC (rev 1290)
+++ cgenius/trunk/src/common/CObject.h 2010-06-28 19:05:09 UTC (rev 1291)
@@ -69,7 +69,7 @@
bool canbezapped; // if 0 ray will not stop on hitdetect
int zapped; // number of times got hit by keen's raygun
- int zapx, zapy, zapd; // x,y, and direction of last shot at time of impact
+ int zapd; // x,y, and direction of last shot at time of impact
char zappedbyenemy; // if 1, it was an ENEMYRAY and not keen that shot it
bool inhibitfall; // if true common_enemy_ai will not do falling
@@ -150,6 +150,7 @@
bool hitdetect(CObject &hitobject);
void kill();
+ void blink(Uint16 frametime);
// Collision parts
bool checkSolidR( int x2, int y1, int y2);
@@ -178,6 +179,9 @@
private:
CMap *mp_Map;
+
+ Uint16 m_blinktime;
+
static int m_number_of_objects;
};
Modified: cgenius/trunk/src/engine/galaxy/CEGAGraphicsGalaxy.cpp
===================================================================
--- cgenius/trunk/src/engine/galaxy/CEGAGraphicsGalaxy.cpp 2010-06-28 11:05:06 UTC (rev 1290)
+++ cgenius/trunk/src/engine/galaxy/CEGAGraphicsGalaxy.cpp 2010-06-28 19:05:09 UTC (rev 1291)
@@ -337,32 +337,35 @@
return false;
}
- int egagraphlen;
+ int egagraphlen = 0;
File.seekg(1,std::ios::end);
egagraphlen = File.tellg();
+ if(egagraphlen == 0)
+ {
+ g_pLogFile->textOut(RED,"Error the file \"" + filename + "\" is empty!");
+ return false;
+ }
egagraphlen--;
File.seekg(0,std::ios::beg);
- unsigned char *CompEgaGraphData = new unsigned char[egagraphlen];
+ std::vector<unsigned char> CompEgaGraphData(egagraphlen);
+ File.read((char*)&CompEgaGraphData[0], egagraphlen);
- File.read((char*)CompEgaGraphData, egagraphlen);
-
// Make a clean memory pattern
ChunkStruct ChunkTemplate;
ChunkTemplate.len=0;
m_egagraph.assign(EpisodeInfo[ep].NumChunks, ChunkTemplate);
- unsigned long inlen, outlen;
- inlen = outlen = 0;
+ unsigned long inlen = 0, outlen = 0;
// Now lets decompress the graphics
for(size_t i = 0; i < EpisodeInfo[ep].NumChunks; i++)
{
// Show that something is happening
offset = m_egahead[i];
-
+
// Make sure the chunk is valid
- if(offset != offset_limit)
+ if(offset < offset_limit && offset + 4 <= CompEgaGraphData.size())
{
// Get the expanded length of the chunk
if(i >= EpisodeInfo[ep].Index8Tiles && i < EpisodeInfo[ep].Index16MaskedTiles + EpisodeInfo[ep].Num16MaskedTiles)
@@ -379,7 +382,7 @@
}
else
{
- memcpy(&outlen, CompEgaGraphData + offset, 4);
+ memcpy(&outlen, &CompEgaGraphData[offset], 4);
offset += 4;
}
@@ -400,7 +403,7 @@
}
if(j == EpisodeInfo[ep].NumChunks)
inlen = egagraphlen - offset;
- Huffman.expand(CompEgaGraphData + offset, &m_egagraph[i].data[0], inlen, outlen);
+ Huffman.expand(&CompEgaGraphData[offset], &m_egagraph[i].data[0], inlen, outlen);
}
else
{
@@ -415,8 +418,6 @@
//SprHead = (SpriteHeadStruct *)m_EgaGraph[2].data;
//}
- delete [] CompEgaGraphData;
-
File.close();
return true;
}
Modified: cgenius/trunk/src/engine/vorticon/ai/ray.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/ai/ray.cpp 2010-06-28 11:05:06 UTC (rev 1290)
+++ cgenius/trunk/src/engine/vorticon/ai/ray.cpp 2010-06-28 19:05:09 UTC (rev 1291)
@@ -5,6 +5,7 @@
#include "ray.h"
#include "../../spritedefines.h"
#include "../../../common/CBehaviorEngine.h"
+#include "../../../sdl/CVideoDriver.h"
#define Sprite g_pGfxEngine->Sprite
@@ -57,10 +58,10 @@
object.ai.ray.state = RAY_STATE_SETZAPZOT;
object.canbezapped = false;
it_obj->zapped++;
+ if(g_pVideoDriver->getSpecialFXConfig())
+ it_obj->blink(10);
if(it_obj->m_type == OBJ_RAY)
it_obj->ai.ray.state = RAY_STATE_SETZAPZOT;
- it_obj->zapx = it_obj->getXPosition();
- it_obj->zapy = it_obj->getYPosition();
it_obj->zapd = it_obj->ai.ray.direction;
if (object.sprite==ENEMYRAY || object.sprite==ENEMYRAYEP2 || object.sprite==ENEMYRAYEP3)
it_obj->zappedbyenemy = true;
Modified: cgenius/trunk/src/engine/vorticon/ai/tankep2.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/ai/tankep2.cpp 2010-06-28 11:05:06 UTC (rev 1290)
+++ cgenius/trunk/src/engine/vorticon/ai/tankep2.cpp 2010-06-28 19:05:09 UTC (rev 1291)
@@ -262,6 +262,7 @@
}
}
break;
+ default : break;
}
}
Modified: cgenius/trunk/src/graphics/CSprite.cpp
===================================================================
--- cgenius/trunk/src/graphics/CSprite.cpp 2010-06-28 11:05:06 UTC (rev 1290)
+++ cgenius/trunk/src/graphics/CSprite.cpp 2010-06-28 19:05:09 UTC (rev 1291)
@@ -35,7 +35,7 @@
if(m_masksurface) SDL_FreeSurface(m_masksurface);
m_masksurface = SDL_CreateRGBSurface( flags, m_xsize, m_ysize, 8, 0, 0, 0, 0);
SDL_SetColors( m_masksurface, Palette, 0, 255);
- SDL_SetColorKey( m_masksurface, SDL_SRCCOLORKEY, COLORKEY ); // One black is the color key. There is another black, as normal color
+ SDL_SetColorKey( m_masksurface, SDL_SRCCOLORKEY, COLORKEY ); // color key.
return ( !m_surface && !m_masksurface );
}
@@ -46,10 +46,8 @@
{
SDL_Surface *temp_surface;
temp_surface = SDL_DisplayFormatAlpha(m_surface);
-
SDL_FreeSurface(m_surface);
m_surface = temp_surface;
-
return true;
}
else
@@ -195,15 +193,49 @@
if(SDL_MUSTLOCK(m_surface)) SDL_UnlockSurface(m_surface);
}
+void blitMaskedSprite(SDL_Surface *dst, SDL_Surface *src, Uint32 color)
+{
+ Uint16 x,y;
+ Uint32 *srcpixel, *dstpixel;
+
+ if(SDL_MUSTLOCK(dst)) SDL_LockSurface(dst);
+ if(SDL_MUSTLOCK(src)) SDL_LockSurface(src);
+ dstpixel = (Uint32*) dst->pixels;
+ srcpixel = (Uint32*) src->pixels;
+ for(y=0;y<dst->h;y++)
+ {
+ for(x=0;x<dst->w;x++)
+ {
+ Uint8 r,g,b,a;
+
+ SDL_GetRGBA(*srcpixel,src->format, &r, &g, &b, &a);
+ SDL_GetRGB(color, src->format, &r, &g, &b);
+ *dstpixel = SDL_MapRGBA(dst->format, r, g, b, a);
+
+ dstpixel++;
+ srcpixel++;
+ }
+ }
+ if(SDL_MUSTLOCK(src)) SDL_UnlockSurface(src);
+ if(SDL_MUSTLOCK(dst)) SDL_UnlockSurface(dst);
+}
+
+
///
// Drawing Routines
///
+/**
+ * \brief The function that blits the sprite to dst
+ * \param SDL_Surface Surface where the sprite will be drawn
+ * \param x X-Coordinate, indicating the position on dst
+ * \param y Y-Coordinate, indicating the position on dst
+ */
void CSprite::drawSprite( SDL_Surface *dst, Uint16 x, Uint16 y )
{
SDL_Rect dst_rect, src_rect;
dst_rect.x = x; dst_rect.y = y;
dst_rect.w = m_xsize; dst_rect.h = m_ysize;
-
+
src_rect.x = 0; src_rect.y = 0;
src_rect.w = dst_rect.w;
src_rect.h = dst_rect.h;
@@ -211,6 +243,29 @@
SDL_BlitSurface( m_surface, &src_rect, dst, &dst_rect );
}
+/**
+ * \brief The function that blits the sprite to dst
+ * \param SDL_Surface Surface where the sprite will be drawn
+ * \param x X-Coordinate, indicating the position on dst
+ * \param y Y-Coordinate, indicating the position on dst
+ */
+void CSprite::drawBlinkingSprite( SDL_Surface *dst, Uint16 x, Uint16 y )
+{
+ SDL_Rect dst_rect, src_rect;
+ dst_rect.x = x; dst_rect.y = y;
+ dst_rect.w = m_xsize; dst_rect.h = m_ysize;
+
+ src_rect.x = 0; src_rect.y = 0;
+ src_rect.w = dst_rect.w;
+ src_rect.h = dst_rect.h;
+
+ SDL_Surface *blanksfc = SDL_DisplayFormatAlpha(m_surface);
+ blitMaskedSprite(blanksfc, m_surface, 0xFFFFFF);
+ SDL_BlitSurface( blanksfc, &src_rect, dst, &dst_rect );
+ SDL_FreeSurface(blanksfc);
+}
+
+
void CSprite::freeSurfaces()
{
if(m_surface) SDL_FreeSurface(m_surface);
Modified: cgenius/trunk/src/graphics/CSprite.h
===================================================================
--- cgenius/trunk/src/graphics/CSprite.h 2010-06-28 11:05:06 UTC (rev 1290)
+++ cgenius/trunk/src/graphics/CSprite.h 2010-06-28 19:05:09 UTC (rev 1291)
@@ -31,6 +31,7 @@
SDL_Surface *getSDLMaskSurface() { return m_masksurface; }
void drawSprite( SDL_Surface *dst, Uint16 x, Uint16 y );
+ void drawBlinkingSprite( SDL_Surface *dst, Uint16 x, Uint16 y );
Uint8 getWidth() { return m_xsize; };
Uint8 getHeight() { return m_ysize; };
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <piz...@us...> - 2010-06-28 11:05:13
|
Revision: 1290
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1290&view=rev
Author: pizza2004
Date: 2010-06-28 11:05:06 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
the stuff from GIT
Modified Paths:
--------------
cgenius/trunk/src/FindFile.cpp
cgenius/trunk/src/common/CBehaviorEngine.cpp
cgenius/trunk/src/common/CObject.cpp
cgenius/trunk/src/common/CObject.h
cgenius/trunk/src/common/CPlayer.cpp
cgenius/trunk/src/common/CPlayerLevel.cpp
cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.cpp
cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.h
cgenius/trunk/src/engine/vorticon/CEGASprit.cpp
cgenius/trunk/src/engine/vorticon/ai/se.cpp
cgenius/trunk/src/engine/vorticon/playgame/CPlayGameGameState.cpp
cgenius/trunk/src/engine/vorticon/playgame/CPlayGameLevel.cpp
cgenius/trunk/src/fileio/CPatcher.cpp
cgenius/trunk/src/graphics/CSprite.cpp
cgenius/trunk/src/hqp/hq_sound.cpp
cgenius/trunk/src/main.cpp
cgenius/trunk/src/misc.cpp
cgenius/trunk/src/sdl/CInput.cpp
cgenius/trunk/src/sdl/CInput.h
cgenius/trunk/src/sdl/COpenGL.cpp
cgenius/trunk/src/sdl/COpenGL.h
cgenius/trunk/src/sdl/CVideoDriver.cpp
cgenius/trunk/src/sdl/CVideoDriver.h
Added Paths:
-----------
cgenius/trunk/vfsroot/V04.ico
Modified: cgenius/trunk/src/FindFile.cpp
===================================================================
--- cgenius/trunk/src/FindFile.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/FindFile.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -456,9 +456,14 @@
searchpathlist basesearchpaths;
void InitBaseSearchPaths() {
basesearchpaths.clear();
-#if defined(__APPLE__)
+#if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR)
AddToFileList(&basesearchpaths, "${HOME}/Library/Application Support/Commander Genius");
AddToFileList(&basesearchpaths, ".");
+ AddToFileList(&basesearchpaths, "${BIN}/data");
+ AddToFileList(&basesearchpaths, SYSTEM_DATA_DIR"/commandergenius");
+#elif defined(__APPLE__)
+ AddToFileList(&basesearchpaths, "${HOME}/Library/Application Support/Commander Genius");
+ AddToFileList(&basesearchpaths, ".");
AddToFileList(&basesearchpaths, "${BIN}/../Resources");
AddToFileList(&basesearchpaths, SYSTEM_DATA_DIR"/commandergenius");
#elif defined(WIN32)
Modified: cgenius/trunk/src/common/CBehaviorEngine.cpp
===================================================================
--- cgenius/trunk/src/common/CBehaviorEngine.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/common/CBehaviorEngine.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -39,7 +39,7 @@
if( it != stringmap.end() )
text = it->second;
else
- text = "UNKNOWN '" + name + "' STRING";
+ text = "";
return text;
}
Modified: cgenius/trunk/src/common/CObject.cpp
===================================================================
--- cgenius/trunk/src/common/CObject.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/common/CObject.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -12,7 +12,7 @@
#include "../keen.h"
#include <string.h>
-unsigned int CObject::m_number_of_objects = 0; // The current number of total objects we have within the game!
+int CObject::m_number_of_objects = 0; // The current number of total objects we have within the game!
///
// Initialization Routine
@@ -763,9 +763,7 @@
// Cleanup Routine
///
CObject::~CObject() {
- m_number_of_objects--;
-
- if(m_number_of_objects < 0)
- g_pLogFile->textOut("Something went wrong here! More objects were deleted than created!<br>\n");
+ if(m_number_of_objects > 0)
+ m_number_of_objects--;
}
Modified: cgenius/trunk/src/common/CObject.h
===================================================================
--- cgenius/trunk/src/common/CObject.h 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/common/CObject.h 2010-06-28 11:05:06 UTC (rev 1290)
@@ -178,7 +178,7 @@
private:
CMap *mp_Map;
- static unsigned int m_number_of_objects;
+ static int m_number_of_objects;
};
#endif /* COBJECT_H_ */
Modified: cgenius/trunk/src/common/CPlayer.cpp
===================================================================
--- cgenius/trunk/src/common/CPlayer.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/common/CPlayer.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -32,6 +32,7 @@
m_episode(Episode),
m_level(Level),
m_difficulty(Difficulty),
+pjumpupspeed_decrease(g_pBehaviorEngine->getPhysicsSettings().player.defaultjumpupdecreasespeed),
m_Ankhshield(CObject(&map)),
mp_levels_completed(mp_level_completed),
mp_map(NULL),
@@ -575,7 +576,7 @@
// If player is blocked against a wall, decrease the inertia
if( ( (blockedl && xinertia<0 ) || (blockedr && xinertia>0) ) ) {
if(playcontrol[PA_X] == 0) xinertia = 0;
- else decreaseXInertia(1);
+ else decreaseXInertia(30);
}
// apply xinertia and playpushed_x inertia
@@ -781,7 +782,6 @@
CPhysicsSettings &PhysicsSettings = g_pBehaviorEngine->getPhysicsSettings();
pjumpupspeed = PhysicsSettings.player.maxjumpspeed;
- pjumpupspeed_decrease = PhysicsSettings.player.defaultjumpupdecreasespeed;
pjumping = PJUMPUP;
pjustjumped = true;
Modified: cgenius/trunk/src/common/CPlayerLevel.cpp
===================================================================
--- cgenius/trunk/src/common/CPlayerLevel.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/common/CPlayerLevel.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -45,11 +45,8 @@
if(!level_done)
{
getgoodies();
-
ankh(); // Normally can happen in Episode 3
-
raygun();
-
keencicle();
}
@@ -415,7 +412,6 @@
if (pjumpanimtimer>PPOGO_PREPARE_TIME)
{
pjumpupspeed = PhysicsSettings.player.maxjumpspeed;
- pjumpupspeed_decrease = PhysicsSettings.player.defaultjumpupdecreasespeed;
pjumpframe = PJUMP_PREPARE_LAST_FRAME;
pjumping = PPOGOING;
@@ -468,18 +464,11 @@
{ // time to start the jump
// select a jump depending on how long keen was preparing
pjumpupspeed = PhysicsSettings.player.maxjumpspeed;
- pjumpupspeed_decrease = PhysicsSettings.player.defaultjumpupdecreasespeed;
if(pjumpframe > PPREPAREJUMPFRAME+4)
- {
pjumpupspeed = PhysicsSettings.player.maxjumpspeed;
- pjumpupspeed_decrease = PhysicsSettings.player.defaultjumpupdecreasespeed;
- }
else
- {
pjumpupspeed = (PhysicsSettings.player.maxjumpspeed*(pjumpframe-PPREPAREJUMPFRAME))/5;
- pjumpupspeed_decrease = PhysicsSettings.player.defaultjumpupdecreasespeed;
- }
pjumpframe = PJUMP_PREPARE_LAST_FRAME;
g_pSound->playStereofromCoord(SOUND_KEEN_JUMP, PLAY_NOW, scrx);
Modified: cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.cpp
===================================================================
--- cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -9,6 +9,7 @@
#include "CMapLoaderGalaxy.h"
#include "../../sdl/CVideoDriver.h"
+#include "../../sdl/CInput.h"
#include "../../graphics/CGfxEngine.h"
namespace galaxy
@@ -16,7 +17,9 @@
CPlayGameGalaxy::CPlayGameGalaxy(CExeFile &ExeFile, char level,
char numplayers, char difficulty, stOption *p_option) :
-CPlayGame(ExeFile, level, numplayers, difficulty, p_option)
+CPlayGame(ExeFile, level, numplayers, difficulty, p_option),
+m_posx(0),
+m_posy(0)
{}
bool CPlayGameGalaxy::loadGameState()
@@ -51,17 +54,63 @@
// TODO: Process code for the main map
// Blit the background
+ processInput();
+
+ processRendering();
+
//g_pVideoDriver->blitScrollSurface();
+
+
+}
+
+void CPlayGameGalaxy::processInput()
+{
+ if(g_pInput->getPressedCommand(IC_QUIT))
+ {
+ m_endgame = true;
+ }
+
+ if(g_pInput->getPressedCommand(IC_LEFT))
+ {
+ if(m_posx>0)
+ m_posx--;
+ }
+ else if(g_pInput->getPressedCommand(IC_RIGHT))
+ {
+ if(m_posx<m_Map.m_width)
+ m_posx++;
+ }
+
+ if(g_pInput->getPressedCommand(IC_UP))
+ {
+ if(m_posy>0)
+ m_posy--;
+ }
+ else if(g_pInput->getPressedCommand(IC_DOWN))
+ {
+ if(m_posy<m_Map.m_height)
+ m_posy++;
+ }
+
+}
+
+void CPlayGameGalaxy::processRendering()
+{
for(size_t x=0 ; x<20 ; x++)
{
for(size_t y=0 ; y<20 ; y++)
{
g_pGfxEngine->getTileMap(0).drawTile(g_pVideoDriver->getBlitSurface(),
- 16*x, 16*y, m_Map.at((x+2),(y+2),0) );
+ 16*x, 16*y, m_Map.at(m_posx+x,m_posy+y,0) );
+ //g_pGfxEngine->getTileMap(0).drawTile(g_pVideoDriver->getBlitSurface(),
+ //16*x, 16*y, m_Map.at(m_posx+x,m_posy+y,0) );
}
}
+
+ g_pGfxEngine->getFont(0).drawFont(g_pVideoDriver->getBlitSurface(),"Press Esc to end", 10, 10);
}
+
void CPlayGameGalaxy::cleanup()
{}
Modified: cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.h
===================================================================
--- cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.h 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/engine/galaxy/CPlayGameGalaxy.h 2010-06-28 11:05:06 UTC (rev 1290)
@@ -22,14 +22,22 @@
stOption *p_option);
bool loadGameState();
+ bool init();
+
void process();
- bool init();
+
+ void processInput();
+ void processRendering();
+
void cleanup();
virtual ~CPlayGameGalaxy();
private:
CMap m_Map;
+
+ Uint32 m_posx;
+ Uint32 m_posy;
};
}
Modified: cgenius/trunk/src/engine/vorticon/CEGASprit.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/CEGASprit.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/engine/vorticon/CEGASprit.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -365,7 +365,7 @@
CreateYellowSpriteofTile( tilemap, t, sprites.at(ANKHUP_SPRITE) );
}
- for(size_t i=0 ; i < TileProperties.size() ; i++ )
+ for(size_t i=1 ; i < TileProperties.size() ; i++ )
{
if(TileProperties.at(i).behaviour == DOOR_YELLOW)
g_pGfxEngine->copyTileToSprite(i-1, DOOR_YELLOW_SPRITE, 2);
Modified: cgenius/trunk/src/engine/vorticon/ai/se.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/ai/se.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/engine/vorticon/ai/se.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -215,7 +215,7 @@
object.sprite = BLANKSPRITE;
}
- if (object.touchPlayer)
+ if (object.touchPlayer && object.ai.se.state == SPARK_ANIMATE)
{
killplayer(object.touchedBy);
}
@@ -321,7 +321,6 @@
}
-
object.ai.se.blowx++;
}
else object.ai.se.timer++;
Modified: cgenius/trunk/src/engine/vorticon/playgame/CPlayGameGameState.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/playgame/CPlayGameGameState.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/engine/vorticon/playgame/CPlayGameGameState.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -36,17 +36,12 @@
// Load number of Players
m_SavedGame.decodeData(m_NumPlayers);
- // Now load the inventory of every player
+ // Now load the inventory for every player
m_Player.clear();
m_Object.clear();
- // Recreate the Players and tie them to the objects
- //createPlayerObjects();
-
m_level_command = START_LEVEL;
g_pMusicPlayer->stop();
- //g_pSound->playStereofromCoord(SOUND_ENTER_LEVEL, PLAY_NOW, m_Object[mp_Player[i].useObject].scrx);
- // Now that the new level/map will be loaded, the players aren't dead anymore!
// Prepare for loading the new level map and the players.
cleanup();
@@ -55,7 +50,6 @@
mp_level_completed, mp_option, m_Object, m_Map));
init();
-
std::vector<CPlayer> :: iterator player;
for( player=m_Player.begin() ; player != m_Player.end() ; player++ ) {
int x, y;
Modified: cgenius/trunk/src/engine/vorticon/playgame/CPlayGameLevel.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/playgame/CPlayGameLevel.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/engine/vorticon/playgame/CPlayGameLevel.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -82,6 +82,7 @@
if (trigger == LVLTRIG_TANTALUS_RAY)
{
m_dark = false;
+ g_pMusicPlayer->stop();
g_pGfxEngine->Palette.setdark(m_dark);
mp_Finale = new CTantalusRay(m_Map, m_Object, *mp_ObjectAI);
m_gameover = true;
Modified: cgenius/trunk/src/fileio/CPatcher.cpp
===================================================================
--- cgenius/trunk/src/fileio/CPatcher.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/fileio/CPatcher.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -234,7 +234,7 @@
case 6: offset = 0x1511A; end = 0x151B3; break;
case 9: offset = 0x151B4, end = 0x1524D; break;
case 10: offset = 0x1524E; end = 0x152E7; break;
- case 11: offset = 0x152E8; end = 0x1523F; break;
+ case 11: offset = 0x152E8; end = 0x1533F; break;
case 12: offset = 0x15340; end = 0x153DA; break;
case 15: offset = 0x153DB; end = 0x1545E; break;
}
@@ -250,6 +250,10 @@
p_patch = m_data + offset;
+ // Fill everything with zeros, so the old text won't be shown
+ if(end > offset)
+ memset( p_patch, 0, end-offset);
+
std::string buf;
do
{
@@ -264,10 +268,6 @@
p_patch += 2;
if( p_patch == m_data+end ) break;
} while( !input.empty() );
-
- // Fill the rest with zeros, so the old won't be shown
- if(end > offset)
- memset( p_patch, 0, end-offset);
}
CPatcher::~CPatcher() {}
Modified: cgenius/trunk/src/graphics/CSprite.cpp
===================================================================
--- cgenius/trunk/src/graphics/CSprite.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/graphics/CSprite.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -28,9 +28,11 @@
bool CSprite::createSurface(Uint32 flags, SDL_Color *Palette)
{
+ if(m_surface) SDL_FreeSurface(m_surface);
m_surface = SDL_CreateRGBSurface( flags, m_xsize, m_ysize, 8, 0, 0, 0, 0);
SDL_SetColors( m_surface, Palette, 0, 255);
SDL_SetColorKey( m_surface, SDL_SRCCOLORKEY, COLORKEY ); // One black is the color key. There is another black, as normal color
+ if(m_masksurface) SDL_FreeSurface(m_masksurface);
m_masksurface = SDL_CreateRGBSurface( flags, m_xsize, m_ysize, 8, 0, 0, 0, 0);
SDL_SetColors( m_masksurface, Palette, 0, 255);
SDL_SetColorKey( m_masksurface, SDL_SRCCOLORKEY, COLORKEY ); // One black is the color key. There is another black, as normal color
Modified: cgenius/trunk/src/hqp/hq_sound.cpp
===================================================================
--- cgenius/trunk/src/hqp/hq_sound.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/hqp/hq_sound.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -51,10 +51,13 @@
std::string fullfname = GetFullFileName(buf);
if(fullfname.size() == 0)
return 1;
-
+
// Check, if it is a wav file or go back to classic sounds
- if (SDL_LoadWAV (Utf8ToSystemNative(fullfname).c_str(), &AudioFileSpec, &(psound->sound_buffer), &(psound->sound_len)) == NULL)
- return 1;
+ if (SDL_LoadWAV (Utf8ToSystemNative(fullfname).c_str(), &AudioFileSpec, &(psound->sound_buffer), &(psound->sound_len)) == NULL)
+ {
+ g_pLogFile->ftextOut(PURPLE,"Wave file %s could not be opened: \"%s\". Trying to load the classical sound<br>", buf.c_str(), SDL_GetError());
+ return 1;
+ }
#endif
}
else
Modified: cgenius/trunk/src/main.cpp
===================================================================
--- cgenius/trunk/src/main.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/main.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -21,7 +21,7 @@
Enjoy the Code
- The Commander Genius Team
- CloneKeen 2003-2005 Caitlin Shaw
+ CloneKeen 2003-2005 Caitlin Shaw
CloneKeenPlus 2008-2009 Gerstrong
Commander Genius 2009-2010 Tulip, Pickle, DaVince, Albert and Pizza2004
*/
Modified: cgenius/trunk/src/misc.cpp
===================================================================
--- cgenius/trunk/src/misc.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/misc.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -1,4 +1,3 @@
-
#include "misc.h"
#include <cstdlib>
Modified: cgenius/trunk/src/sdl/CInput.cpp
===================================================================
--- cgenius/trunk/src/sdl/CInput.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/sdl/CInput.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -21,6 +21,10 @@
#include "sys/wizgp2x.h"
#endif
+#if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR)
+#define MOUSEWRAPPER 1
+#endif
+
CInput::CInput() {
#if defined(WIZ) || defined(GP2X)
volume_direction = VOLUME_NOCHG;
@@ -28,7 +32,7 @@
WIZ_AdjustVolume(VOLUME_UP);
#endif
g_pLogFile->ftextOut("Starting the input driver...<br>");
- memset(InputCommand, 0, NUM_INPUTS*NUMBER_OF_COMMANDS*sizeof(stInputCommand));
+ memset(InputCommand, 0, NUM_INPUTS*MAX_COMMANDS*sizeof(stInputCommand));
for(size_t c=1 ; c<= NUM_INPUTS ; c++)
resetControls(c);
@@ -61,10 +65,8 @@
memset(immediate_keytable,false,KEYTABLE_SIZE);
memset(last_immediate_keytable,false,KEYTABLE_SIZE);
- for(i=0 ; i<NUMBER_OF_COMMANDS ; i++)
- {
+ for(i=0 ; i<MAX_COMMANDS ; i++)
InputCommand[player][i].active = false;
- }
// These are the default keyboard commands
i=player-1;
@@ -320,10 +322,25 @@
*/
bool CInput::readNewEvent(Uint8 device, int command)
{
+ // This function is used to configure new input keys.
+ // For iPhone, we have emulation via touchpad and we don't want to have custom keys.
+ // We should fix the menu for iPhone so that this function doesn't get called.
+#if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR)
+ printf("WARNING: called readNewEvent on iphone\n");
+ return true;
+#endif
+
while( SDL_PollEvent( &Event ) )
{
switch ( Event.type )
{
+ case SDL_QUIT:
+ g_pLogFile->textOut("SDL: Got quit event in readNewEvent!");
+#if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR)
+ // on iPhone, we just want to quit in this case
+ exit(0);
+#endif
+ break;
case SDL_KEYDOWN:
InputCommand[device][command].joyeventtype = ETYPE_KEYBOARD;
InputCommand[device][command].keysym = Event.key.keysym.sym;
@@ -366,7 +383,7 @@
// copy all the input of the last poll to a space for checking pressing or holding a button
memcpy(last_immediate_keytable, immediate_keytable, KEYTABLE_SIZE*sizeof(char));
- for(int i=0 ; i<NUMBER_OF_COMMANDS ; i++)
+ for(int i=0 ; i<MAX_COMMANDS ; i++)
for(int j=0 ; j<NUM_INPUTS ; j++)
InputCommand[j][i].lastactive = InputCommand[j][i].active;
@@ -375,28 +392,40 @@
{
switch( Event.type )
{
- case SDL_QUIT:
- g_pLogFile->textOut("SDL: Got quit event!");
- m_exit = true;
- break;
- case SDL_KEYDOWN:
- processKeys(1);
- break;
- case SDL_KEYUP:
- processKeys(0);
- break;
- case SDL_JOYAXISMOTION:
- processJoystickAxis();
- break;
- case SDL_JOYBUTTONDOWN:
- processJoystickButton(1);
- break;
- case SDL_JOYBUTTONUP:
- processJoystickButton(0);
- break;
+ case SDL_QUIT:
+ g_pLogFile->textOut("SDL: Got quit event!");
+ m_exit = true;
+ break;
+ case SDL_KEYDOWN:
+ processKeys(1);
+ break;
+ case SDL_KEYUP:
+ processKeys(0);
+ break;
+ case SDL_JOYAXISMOTION:
+ processJoystickAxis();
+ break;
+ case SDL_JOYBUTTONDOWN:
+ processJoystickButton(1);
+ break;
+ case SDL_JOYBUTTONUP:
+ processJoystickButton(0);
+ break;
+#ifdef MOUSEWRAPPER
+ case SDL_MOUSEBUTTONDOWN:
+ case SDL_MOUSEBUTTONUP:
+ case SDL_MOUSEMOTION:
+ processMouse(Event);
+ break;
+#endif
}
}
+#ifdef MOUSEWRAPPER
+ // Handle mouse emulation layer
+ processMouse();
+#endif
+#ifndef MOUSEWRAPPER
// Check, if LALT+ENTER was pressed
if((getHoldedKey(KALT)) && getPressedKey(KENTER))
{
@@ -428,8 +457,8 @@
g_pLogFile->textOut("User exit request!");
m_exit = true;
}
+#endif
-
#if defined(WIZ) || defined(GP2X)
WIZ_AdjustVolume( volume_direction );
#endif
@@ -442,7 +471,7 @@
{
for(int j=0 ; j<NUM_INPUTS ; j++)
{
- for(int i=0 ; i<NUMBER_OF_COMMANDS ; i++)
+ for(int i=0 ; i<MAX_COMMANDS ; i++)
{
if(InputCommand[j][i].joyeventtype == ETYPE_JOYAXIS)
{
@@ -471,7 +500,7 @@
#else
for(int j=0 ; j<NUM_INPUTS ; j++)
{
- for(int i=0 ; i<NUMBER_OF_COMMANDS ; i++)
+ for(int i=0 ; i<MAX_COMMANDS ; i++)
{
// TODO: Check all NUM_INPUTS, if they can be reduced to another variable
if(InputCommand[j][i].joyeventtype == ETYPE_JOYBUTTON)
@@ -495,7 +524,7 @@
void CInput::processKeys(int keydown)
{
// Input for player commands
- for(int i=0 ; i<NUMBER_OF_COMMANDS ; i++)
+ for(int i=0 ; i<MAX_COMMANDS ; i++)
{
for(int j=0 ; j<NUM_INPUTS ; j++)
{
@@ -639,11 +668,19 @@
}
/**
+ * \return false on error
+ */
+static bool checkMousewrapperKey(int& key);
+
+/**
* \brief returns if certain key is being held
* \param key the key to be held
*/
bool CInput::getHoldedKey(int key)
{
+#ifdef MOUSEWRAPPER
+ if(!checkMousewrapperKey(key)) return true;
+#endif
if(immediate_keytable[key])
return true;
@@ -656,6 +693,9 @@
*/
bool CInput::getPressedKey(int key)
{
+#ifdef MOUSEWRAPPER
+ if(!checkMousewrapperKey(key)) return true;
+#endif
if(immediate_keytable[key] && !last_immediate_keytable[key])
{
immediate_keytable[key] = false;
@@ -799,12 +839,13 @@
bool CInput::getPressedAnyKey(void)
{
- int i;
-
- for(i=0 ; i<KEYTABLE_SIZE ; i++)
+ for(int key=0 ; key<KEYTABLE_SIZE ; key++)
{
- if(getPressedKey(i))
+ if(immediate_keytable[key] && !last_immediate_keytable[key])
+ {
+ immediate_keytable[key] = false;
return true;
+ }
}
return false;
}
@@ -878,9 +919,7 @@
bool CInput::getPressedAnyCommand(int player)
{
- int i;
-
- for(i=0 ; i<10 ; i++)
+ for(int i=0 ; i<10 ; i++)
if(getPressedCommand(player,i))
return true;
@@ -893,7 +932,7 @@
void CInput::flushCommands(void)
{
for(int i=0 ; i<NUM_INPUTS ; i++)
- for(int j=0 ; j<NUMBER_OF_COMMANDS ; j++)
+ for(int j=0 ; j<MAX_COMMANDS ; j++)
InputCommand[i][j].active = InputCommand[i][j].lastactive = false;
}
@@ -906,6 +945,219 @@
memset(last_immediate_keytable,false,KEYTABLE_SIZE);
}
+struct TouchButton {
+ stInputCommand* cmd;
+ int immediateIndex;
+ int x, y, w, h;
+
+ bool isInside(int _x, int _y) const {
+ return
+ x <= _x && _x < x + w &&
+ y <= _y && _y < y + h;
+ }
+};
+
+static const int w = 320, h = 200;
+
+#define KSHOWHIDECTRLS (-10)
+
+static TouchButton* getPhoneButtons(stInputCommand InputCommand[NUM_INPUTS][MAX_COMMANDS]) {
+ static const int middlex = w / 2;
+ static const int middley = h / 2;
+
+ static TouchButton phoneButtons[] = {
+ { &InputCommand[0][IC_LEFT], KLEFT, 0, middley, w / 6, h / 2},
+ { &InputCommand[0][IC_UP], KUP, w / 6, middley, w / 6, h / 4},
+ { &InputCommand[0][IC_RIGHT], KRIGHT, w / 3, middley, w / 6, h / 2},
+ { &InputCommand[0][IC_DOWN], KDOWN, w / 6, middley + h / 4, w / 6, h / 4},
+
+ { &InputCommand[0][IC_JUMP], -1, middlex, middley, w / 6, h / 2},
+ { &InputCommand[0][IC_POGO], -1, middlex + w / 6, middley, w / 6, h / 2},
+ { &InputCommand[0][IC_FIRE], KSPACE, middlex + w / 3, middley, w / 6, h / 2},
+
+ { &InputCommand[0][IC_STATUS], KENTER, 0, 0, w/2, h/4},
+ { NULL, KQUIT, 5*w/6, 0, w/6, h/6},
+ { NULL, KSHOWHIDECTRLS, 4*w/6, 0, w/6, h/6},
+ { NULL, KF3 /* save dialog, see gamedo_HandleFKeys */, 3*w/6, 0, w/6, h/6},
+ };
+
+ return phoneButtons;
+}
+
+static const int phoneButtonN = 11;
+
+static Uint32 phoneButtonLasttime[phoneButtonN] = {0,0,0,0,0,0,0,0,0,0,0};
+static int phoneButton_MouseIndex[phoneButtonN] = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
+
+
+
+static TouchButton* getPhoneButton(int x, int y, TouchButton phoneButtons[]) {
+ for(int i = 0; i < phoneButtonN; ++i) {
+ TouchButton& b = phoneButtons[i];
+ if(b.isInside(x, y)) return &b;
+ }
+ return NULL;
+}
+
+
+static bool checkMousewrapperKey(int& key) {
+ switch(key) {
+ case KLEFT: case KRIGHT: case KUP: case KDOWN:
+ case KENTER: case KSPACE: case KQUIT: case KF3:
+ return true;
+ }
+
+ if(key == KY) { key = KENTER; return true; }
+ if(key == KN) { key = KQUIT; return true; }
+
+ //errors << "checkMousewrapperKey: key " << key << " not useable for iPhone" << endl;
+ //return false;
+ // just too many keys ...
+ return true;
+}
+
+void CInput::processMouse() {
+ TouchButton* phoneButtons = getPhoneButtons(InputCommand);
+
+ for(int i = 0; i < phoneButtonN; ++i) {
+ bool down = phoneButton_MouseIndex[i] >= 0;
+
+ TouchButton& b = phoneButtons[i];
+
+ if(b.cmd)
+ b.cmd->active = down;
+
+ // handle immediate keys
+ if(b.immediateIndex >= 0)
+ immediate_keytable[b.immediateIndex] = down;
+ }
+}
+
+void CInput::processMouse(SDL_Event& ev) {
+ switch(ev.type) {
+ case SDL_MOUSEBUTTONDOWN:
+ processMouse(ev.button.x, ev.button.y, true, ev.button.which);
+ break;
+
+ case SDL_MOUSEBUTTONUP:
+ processMouse(ev.button.x, ev.button.y, false, ev.button.which);
+ break;
+
+ case SDL_MOUSEMOTION:
+ processMouse(ev.motion.x - ev.motion.xrel, ev.motion.y - ev.motion.yrel, false, ev.motion.which);
+ processMouse(ev.motion.x, ev.motion.y, true, ev.motion.which);
+ break;
+ }
+}
+
+void CInput::processMouse(int x, int y, bool down, int index) {
+ TouchButton* phoneButtons = getPhoneButtons(InputCommand);
+
+ for(int i = 0; i < phoneButtonN; ++i) {
+ TouchButton& b = phoneButtons[i];
+ if(b.isInside(x, y)) {
+ phoneButtonLasttime[i] = down ? SDL_GetTicks() : 0;
+ phoneButton_MouseIndex[i] = down ? index : -1;
+
+ break;
+ }
+ }
+
+}
+
+#ifdef USE_OPENGL
+static void drawButton(TouchButton& button, bool down) {
+ // similar mysterious constant as in renderTexture
+ glViewport(0,255,w,h);
+
+ int crop = 2;
+ float x1 = float(button.x + crop) / w;
+ float x2 = float(button.x+button.w - crop) / w;
+ float y1 = float(button.y + crop) / h;
+ float y2 = float(button.y+button.h - crop) / h;
+
+ GLfloat vertices[] =
+ {
+ x1, y1,
+ x2, y1,
+ x2, y2,
+ x1, y2,
+ };
+
+
+ //Render the vertices by pointing to the arrays.
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(2, GL_FLOAT, 0, vertices);
+
+ if(down)
+ glColor4f(0,0,0, 0.5);
+ else
+ glColor4f(0,0,0, 0.2);
+
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+
+ //Finally draw the arrays.
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+ glDisableClientState(GL_VERTEX_ARRAY);
+}
+#endif
+
+void CInput::renderOverlay() {
+#ifdef USE_OPENGL // only ogl supported yet (and probably worth)
+#if defined(MOUSEWRAPPER)
+ static bool showControls = true;
+ static bool buttonShowHideCtrlWasDown = false;
+
+ TouchButton* phoneButtons = getPhoneButtons(InputCommand);
+
+ for(int i = phoneButtonN - 1; i >= 0; --i) {
+ TouchButton& b = phoneButtons[i];
+ bool down = phoneButton_MouseIndex[i] >= 0;
+ if(showControls) drawButton(b, down);
+
+ if(b.immediateIndex == KSHOWHIDECTRLS) {
+ if(buttonShowHideCtrlWasDown && !down)
+ showControls = !showControls;
+ buttonShowHideCtrlWasDown = down;
+ }
+ }
+#endif
+#endif
+}
+
+
+/*#ifdef WIZ
+void CInput::WIZ_EmuKeyboard( int button, int value )
+{
+ SDL_Event fakeevent1, fakeevent2;
+
+ //printf( "Button %d Value %d\n", button, value );
+
+ if( value == 1 ) {
+ fakeevent1.type = SDL_KEYDOWN;
+ fakeevent1.key.state = SDL_PRESSED;
+ fakeevent1.key.type = SDL_KEYDOWN;
+ fakeevent1.key.keysym.mod = KMOD_NONE;
+
+ fakeevent2.type = SDL_KEYDOWN;
+ fakeevent2.key.state = SDL_PRESSED;
+ fakeevent2.key.type = SDL_KEYDOWN;
+ fakeevent2.key.keysym.mod = KMOD_NONE;
+ }
+ else {
+ fakeevent1.type = SDL_KEYUP;
+ fakeevent1.key.state = SDL_RELEASED;
+ fakeevent1.key.type = SDL_KEYUP;
+ fakeevent1.key.keysym.mod = KMOD_NONE;
+
+ fakeevent2.type = SDL_KEYUP;
+ fakeevent2.key.state = SDL_RELEASED;
+ fakeevent2.key.type = SDL_KEYUP;
+ fakeevent2.key.keysym.mod = KMOD_NONE;
+ }
+}*/
+
/**
* \brief flushes both key and commands queue
*/
Modified: cgenius/trunk/src/sdl/CInput.h
===================================================================
--- cgenius/trunk/src/sdl/CInput.h 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/sdl/CInput.h 2010-06-28 11:05:06 UTC (rev 1290)
@@ -130,11 +130,9 @@
IC_STATUS,
IC_HELP,
IC_QUIT,
+ MAX_COMMANDS
};
-const int MAX_COMMANDS = 10;
-
-#define NUMBER_OF_COMMANDS 10
#define NUM_INPUTS 4
#define ETYPE_KEYBOARD 0
@@ -201,13 +199,15 @@
void flushCommands(void);
void flushAll(void);
+ void renderOverlay(); // for mouse wrapper gfx or other stuff
+
virtual ~CInput();
private:
SDL_Event Event;
std::list<SDL_Joystick*> mp_Joysticks;
- stInputCommand InputCommand[NUM_INPUTS][NUMBER_OF_COMMANDS];
+ stInputCommand InputCommand[NUM_INPUTS][MAX_COMMANDS];
bool TwoButtonFiring[NUM_INPUTS];
bool m_exit;
@@ -220,6 +220,14 @@
void processKeys(int value);
void processJoystickAxis(void);
void processJoystickButton(int value);
+
+ void processMouse();
+ void processMouse(SDL_Event& ev);
+ void processMouse(int x, int y, bool down, int index);
+#ifdef WIZ
+ void WIZ_EmuKeyboard( int button, int value );
+ void WIZ_AdjustVolume( int direction );
+#endif
};
#endif /* CINPUT_H_ */
Modified: cgenius/trunk/src/sdl/COpenGL.cpp
===================================================================
--- cgenius/trunk/src/sdl/COpenGL.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/sdl/COpenGL.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -9,23 +9,37 @@
#include "COpenGL.h"
#include "CVideoDriver.h"
#include "../CLogFile.h"
+#include "CInput.h" // for CInput::renderOverlay
+/**
+ * This function calculates an equivalent value near by the power of two. That is needed so we support POT Textures
+ */
+Uint16 getPowerOfTwo(Uint16 value)
+{
+ Uint16 output = 1;
+ while (output<value)
+ output <<= 1;
+ return output;
+}
+
// gamerect is the base resolution for the game which is scaled with the filter
// depending on what resolution has been chosen, it is mostly 320x200 or 320x240
-COpenGL::COpenGL(float Width, float Height, unsigned char Depth,
+COpenGL::COpenGL(Uint16 Width, Uint16 Height, unsigned char Depth,
unsigned char scalex,SDL_Rect &gamestdrect) :
-m_blitsurface(NULL),
+mp_blitsurface(NULL),
m_opengl_buffer(NULL),
-m_Width(Width),
-m_Height(Height),
m_Depth(Depth),
m_ScaleX(scalex),
m_texparam(GL_TEXTURE_2D),
m_aspectratio(Width/Height),
-m_GameStdRect(gamestdrect)
-{}
+m_GamePOTBaseDim(getPowerOfTwo(gamestdrect.w),
+ getPowerOfTwo(gamestdrect.h)),
+m_GamePOTVideoDim(getPowerOfTwo(Width),
+ getPowerOfTwo(Height))
+{
+}
-static void createTexture(GLuint& tex, int oglfilter, bool withAlpha = false) {
+static void createTexture(GLuint& tex, int oglfilter, GLsizei potwidth, GLsizei potheight, bool withAlpha = false) {
glGenTextures(1, &tex);
glBindTexture(GL_TEXTURE_2D, tex);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
@@ -39,53 +53,85 @@
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
if(withAlpha)
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 512, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, potwidth, potheight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
else
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 512, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, potwidth, potheight, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
}
-bool COpenGL::initGL(GLint oglfilter, float aspect)
+bool COpenGL::initGL(GLint oglfilter)
{
- // Set the proper resolution for OpenGL. Very important, when user changes the resolution
- if(aspect == 8.0f/5.0f)
+ if(m_Depth != 32)
{
- if(m_aspectratio < 8.0f/5.0f)
- glViewport(0,(m_Height-((m_Width/320)*200))/2,m_Width, (m_Width/320)*200);
- else if(m_aspectratio > 8.0f/5.0f)
- glViewport((m_Width-((m_Height/200)*320))/2,0, (m_Height/200)*320, m_Height);
- else
- glViewport(0,0,m_Width, m_Height);
+ // TODO: I know, this is an issue, but I need to investigate, how pixels in SDL are stored when using
+ // 16 bit depth copy it correctly to the OGL Texture
+ g_pLogFile->textOut("Sorry, but OpenGL with 16 bpp is not supported! Please switch to 32 bpp mode!");
+ return false;
}
-
+
+ // Calculate the proper viewport for any resolution
+ float base_width = g_pVideoDriver->getGameResolution().w;
+ float base_height = g_pVideoDriver->getGameResolution().h;
+
+ float scale_width = (float)(g_pVideoDriver->getWidth())/base_width;
+ float scale_height = (float)(g_pVideoDriver->getHeight())/base_height;
+
+ float width = ((float)m_GamePOTBaseDim.w)*scale_width;
+ float height = ((float)m_GamePOTBaseDim.h)*scale_height;
+ float ypos = (base_height-m_GamePOTBaseDim.h)*scale_height;
+ float xpos = 0.0f; // Not needed because the x-axis of ogl and sdl_surfaces are the same.
+
+ // strange constants here; 225 seems good for pc. 200 is better for iphone
+ // the size is the same as the texture buffers
+ glViewport(xpos, ypos, width, height);
+
// Set clear colour
glClearColor(0,0,0,0);
// Set projection
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
- glOrtho( 0 , 1, 1, 0 , -1 , 1 );
-
+
+ #if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR) // TODO: dont check for iphone but for opengles
+#define glOrtho glOrthof
+#endif
+ glOrtho( 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f );
+
// Now Initialize modelview matrix
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
-
+ /*Using the standard OpenGL API for specifying a 2D texture
+ image: glTexImage2D, glSubTexImage2D, glCopyTexImage2D,
+ and glCopySubTexImage2D. The target for these commands is
+ GL_TEXTURE_RECTANGLE_ARB though.
+
+ This is similar to how the texture cube map functionality uses the 2D
+ texture image specification API though with its own texture target.
+
+ The texture target GL_TEXTURE_RECTANGLE_ARB should also
+ be used for glGetTexImage, glGetTexLevelParameteriv, and
+ glGetTexLevelParameterfv.*/
+
// Enable Texture loading for the blit screen
- glEnable (m_texparam);
+ /*glEnable (m_texparam);
glBindTexture(m_texparam, 1);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
+
glTexParameteri(m_texparam, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri (m_texparam, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
-
+
+
glTexParameteri (m_texparam, GL_TEXTURE_MAG_FILTER, oglfilter);
glTexParameteri (m_texparam, GL_TEXTURE_MIN_FILTER, oglfilter);
+
+ glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);*/
+
+ glEnable(m_texparam);
+ createTexture(m_texture, oglfilter, m_GamePOTVideoDim.w, m_GamePOTVideoDim.h);
+ //createTexture(m_texBG, oglfilter, m_GamePOTVideoDim.w, m_GamePOTVideoDim.h);
+ //createTexture(m_texFG, oglfilter, m_GamePOTVideoDim.w, m_GamePOTVideoDim.h, true);
- glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
-
if(m_ScaleX > 1)
- m_opengl_buffer = new char[m_GameStdRect.h*m_GameStdRect.w*m_ScaleX*m_Depth];
+ m_opengl_buffer = new char[m_GamePOTVideoDim.w*m_GamePOTVideoDim.h*m_ScaleX*m_Depth];
else
m_opengl_buffer = NULL;
@@ -105,71 +151,121 @@
return true;
}
-void COpenGL::setSurface(SDL_Surface *blitsurface)
-{ m_blitsurface = blitsurface; }
+void COpenGL::setBlitSurface(SDL_Surface *blitsurface)
+{ mp_blitsurface = blitsurface; }
-void COpenGL::render(void)
-{
- //Clear the screen
- glClear(GL_COLOR_BUFFER_BIT); // Clear The Screen
+void COpenGL::setFGSurface(SDL_Surface *fgsurface)
+{ mp_fgsurface = fgsurface; }
+
+/*static void loadSurface(GLuint texture, SDL_Surface* surface) {
+ glBindTexture(GL_TEXTURE_2D, texture);
+ LockSurface(surface);
+ if(surface->format->BitsPerPixel == 24)
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 512, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, surface->pixels);
+ else {
+ // we assume RGBA
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 512, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, surface->pixels);
+ }
+ UnlockSurface(surface);
+}*/
+
+void COpenGL::reloadBG(SDL_Surface* surf) {
+ loadSurface(m_texBG, surf);
+}
+
+void COpenGL::reloadFG(SDL_Surface* surf) {
+ loadSurface(m_texFG, surf);
+}
+
+static void renderTexture(GLuint texture, bool withAlpha = false) {
- LockSurface(m_blitsurface);
+ // Set up an array of values to use as the sprite vertices.
+ GLfloat vertices[] =
+ {
+ 0, 0,
+ 1, 0,
+ 1, 1,
+ 0, 1,
+ };
+
+ // Set up an array of values for the texture coordinates.
+ GLfloat texcoords[] =
+ {
+ 0, 0,
+ 1, 0,
+ 1, 1,
+ 0, 1,
+ };
+
+ //Render the vertices by pointing to the arrays.
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+
+ glVertexPointer(2, GL_FLOAT, 0, vertices);
+ glTexCoordPointer(2, GL_FLOAT, 0, texcoords);
+
+ glEnable(GL_BLEND);
+ if(withAlpha)
+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+ else
+ glBlendFunc(GL_ONE, GL_ZERO /*GL_SRC_COLOR*/);
+
+ glBindTexture (GL_TEXTURE_2D, texture);
+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
- if(m_ScaleX == 2) //Scale 2x
+ // Set the texture parameters to use a linear filter when minifying.
+ //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+
+ //Finally draw the arrays.
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+ glDisableClientState(GL_VERTEX_ARRAY);
+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+ glDisable(GL_BLEND);
+}
+
+void COpenGL::loadSurface(GLuint texture, SDL_Surface* surface)
+{
+ glBindTexture (m_texparam, texture);
+ LockSurface(surface);
+ if(m_ScaleX > 1) //ScaleX
{
+ unsigned m_src_slice = m_GamePOTBaseDim.w*surface->format->BytesPerPixel;
+ unsigned m_dst_slice = m_ScaleX*m_src_slice;
- //unsigned m_dst_slice = m_Width*m_blitsurface->format->BytesPerPixel;
- unsigned m_dst_slice = m_GameStdRect.w*2*m_blitsurface->format->BytesPerPixel;
- unsigned m_src_slice = m_GameStdRect.w*m_blitsurface->format->BytesPerPixel;
- scale(m_ScaleX, m_opengl_buffer, m_dst_slice, m_blitsurface->pixels,
- m_src_slice, m_blitsurface->format->BytesPerPixel,
- m_GameStdRect.w, m_GameStdRect.h);
-
- glTexImage2D(m_texparam, 0, GL_RGBA, m_GameStdRect.w<<1, m_GameStdRect.h<<1, 0, GL_BGRA, GL_UNSIGNED_BYTE, m_opengl_buffer);
+ scale(m_ScaleX, m_opengl_buffer, m_dst_slice, surface->pixels,
+ m_src_slice, surface->format->BytesPerPixel,
+ m_GamePOTBaseDim.w, m_GamePOTBaseDim.h);
+
+ glTexImage2D(m_texparam, 0, GL_RGBA, m_GamePOTBaseDim.w*m_ScaleX, m_GamePOTBaseDim.h*m_ScaleX,
+ 0, GL_BGRA, GL_UNSIGNED_BYTE, m_opengl_buffer);
}
- else if(m_ScaleX == 3) //Scale 3x
- {
- scale(m_ScaleX, m_opengl_buffer, (m_GameStdRect.w*3)<<2, m_blitsurface->pixels,
- m_GameStdRect.w<<2, 4, m_GameStdRect.w, m_GameStdRect.h);
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_GameStdRect.w*3, m_GameStdRect.h*3, 0, GL_BGRA, GL_UNSIGNED_BYTE, m_opengl_buffer);
- }
- else if(m_ScaleX == 4) //Scale 4x
- {
- scale(m_ScaleX, m_opengl_buffer, (m_GameStdRect.w<<2)<<2, m_blitsurface->pixels,
- m_GameStdRect.w<<2, 4, m_GameStdRect.w, m_GameStdRect.h);
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_GameStdRect.w<<2, m_GameStdRect.h<<2, 0, GL_BGRA, GL_UNSIGNED_BYTE, m_opengl_buffer);
- }
else
{
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_GameStdRect.w, m_GameStdRect.h, 0, GL_BGRA, GL_UNSIGNED_BYTE, m_blitsurface->pixels);
+ glTexImage2D(m_texparam, 0, GL_RGBA, m_GamePOTBaseDim.w, m_GamePOTBaseDim.h,
+ 0, GL_BGRA, GL_UNSIGNED_BYTE, surface->pixels);
}
+
+ UnlockSurface(surface);
+}
+
+void COpenGL::render(bool withFG)
+{
+ //glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+
+ loadSurface(m_texture, mp_blitsurface);
+ renderTexture(m_texture);
+
+ //reloadFG(mp_fgsurface);
+ //loadSurface(m_texFG, mp_fgsurface);
+ //renderTexture(m_texFG, true);
- glBindTexture (GL_TEXTURE_2D, 1);
+ g_pInput->renderOverlay();
- glBegin (GL_QUADS);
- glTexCoord2f (0.0, 0.0);
- glVertex3f (0.0, 0.0, 0.0);
- glTexCoord2f (1.0, 0.0);
- glVertex3f (1.0, 0.0, 0.0);
- glTexCoord2f (1.0, 1.0);
- glVertex3f (1.0, 1.0, 0.0);
- glTexCoord2f (0.0, 1.0);
- glVertex3f (0.0, 1.0, 0.0);
- glEnd();
-
- UnlockSurface(m_blitsurface);
-
- // Reset (Position?)
- glLoadIdentity();
-
SDL_GL_SwapBuffers();
+
}
COpenGL::~COpenGL() {
- if(m_opengl_buffer){ delete[] m_opengl_buffer; m_opengl_buffer = NULL; }
-}
-
+ if(m_opengl_buffer) delete[] m_opengl_buffer; m_opengl_buffer = NULL; }
#endif
Modified: cgenius/trunk/src/sdl/COpenGL.h
===================================================================
--- cgenius/trunk/src/sdl/COpenGL.h 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/sdl/COpenGL.h 2010-06-28 11:05:06 UTC (rev 1290)
@@ -13,31 +13,60 @@
#define __CG_COPENGL_H__
#include <SDL.h>
+
+#if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR)
+#include <OpenGLES/ES1/gl.h>
+#include <OpenGLES/ES1/glext.h>
+#else
#include <SDL_opengl.h>
+#endif
+
#include "../scale2x/scalebit.h"
+// Structure used for dimensions
+struct stDims{
+ Uint16 w,h;
+ stDims(Uint16 width, Uint16 height) :
+ w(width),h(height){};
+};
+
+Uint16 getPowerOfTwo(Uint16 value);
+
class COpenGL {
public:
- COpenGL(float Width, float Height, unsigned char Depth,
+ COpenGL(Uint16 Width, Uint16 Height, unsigned char Depth,
unsigned char scalex,SDL_Rect &gamestdrect);
- void render();
- bool initGL(GLint oglfilter, float aspect);
+ void loadSurface(GLuint texture, SDL_Surface* surface);
- void setSurface(SDL_Surface *blitsurface);
+ void render(bool withFG);
+ bool initGL(GLint oglfilter);
+ void setBlitSurface(SDL_Surface *blitsurface);
+ void setFGSurface(SDL_Surface *fgsurface);
+
+ void reloadBG(SDL_Surface* surf);
+ void reloadFG(SDL_Surface* surf);
+
virtual ~COpenGL();
private:
- SDL_Surface *m_blitsurface;
+ SDL_Surface *mp_blitsurface;
+ SDL_Surface *mp_fgsurface;
char* m_opengl_buffer; // Used for internal ScaleX filtering
- unsigned short m_Width;
- unsigned short m_Height;
+
unsigned char m_Depth;
unsigned char m_ScaleX;
unsigned int m_texparam;
+
float m_aspectratio;
- SDL_Rect m_GameStdRect;
+
+ stDims m_GamePOTBaseDim;
+ stDims m_GamePOTVideoDim;
+
+ GLuint m_texture;
+
+ GLuint m_texBG, m_texFG;
};
#endif
Modified: cgenius/trunk/src/sdl/CVideoDriver.cpp
===================================================================
--- cgenius/trunk/src/sdl/CVideoDriver.cpp 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/sdl/CVideoDriver.cpp 2010-06-28 11:05:06 UTC (rev 1290)
@@ -69,7 +69,6 @@
m_opengl = false; // Must stay optional for better compatibility
#endif
m_aspect_correction = true;
- m_aspect_ratio = 8.0f/5.0f;
screenrect.x=0;
screenrect.y=0;
@@ -79,6 +78,7 @@
ScrollSurface=NULL; // 512x512 scroll buffer
FGLayerSurface=NULL; // Scroll buffer for Messages
BlitSurface=NULL;
+
m_special_fx = true;
mp_sbufferx = mp_sbuffery = NULL;
@@ -93,10 +93,19 @@
m_maxwidth = SDL_GetVideoInfo()->current_w;
}
+#if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR)
+ Zoom = 1;
+ Filtermode = 0;
+ FrameSkip = 15;
+ m_targetfps = 30;
+ m_aspect_correction = false;
+#else
initResolutionList();
// take the first default resolution. It might be changed if there is a config file already created
setMode(m_Resolutionlist.front().width, m_Resolutionlist.front().height, m_Resolutionlist.front().depth);
+#endif
+
}
// initResolutionList() reads the local list of available resolution.
@@ -158,6 +167,16 @@
}
m_Resolution_pos = m_Resolutionlist.begin();
+
+#if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR)
+ m_Resolution.width = 320; // 320;
+ m_Resolution.height = 200; // 480;
+ m_Resolution.depth = 32;
+ m_Resolutionlist.push_back(m_Resolution);
+ m_Resolution_pos = m_Resolutionlist.begin();
+
+ return;
+#endif
}
void CVideoDriver::checkResolution( st_resolution& resolution, int flags )
@@ -264,9 +283,12 @@
g_pLogFile->textOut(GREEN, "VideoDriver Stopped<br>\n");
}
+#if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR)
+extern "C" void iPhoneRotateScreen();
+#endif
bool CVideoDriver::start(void)
-{
+{
bool retval = false;
SDL_WM_SetCaption("Commander Genius (CKP)", NULL);
@@ -280,6 +302,10 @@
return false;
}
+#if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR)
+ iPhoneRotateScreen();
+#endif
+
retval = createSurfaces();
initOpenGL();
@@ -294,14 +320,18 @@
mp_OpenGL = new COpenGL(m_Resolution.width, m_Resolution.height, m_Resolution.depth,
m_ScaleXFilter, game_resolution_rect);
- if(!(mp_OpenGL->initGL(m_opengl_filter, m_aspect_ratio)))
+ if(!(mp_OpenGL->initGL(m_opengl_filter)))
{
delete mp_OpenGL;
mp_OpenGL = NULL;
m_opengl = false;
+ applyMode();
}
else
- mp_OpenGL->setSurface(BlitSurface);
+ {
+ mp_OpenGL->setBlitSurface(BlitSurface);
+ mp_OpenGL->setFGSurface(FGLayerSurface);
+ }
}
#endif
@@ -310,6 +340,13 @@
bool CVideoDriver::applyMode()
{
+#if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR)
+ // Force the default settings on iPhone.
+ // There is no reason yet to play with it, most likely other settings will
+ // either not work, will crash or will just be totally screwed up.
+ resetSettings();
+#endif
+
// Check if some zoom/filter modes are illogical
// TODO: Make this call better to understand
// It must be able to change the resolution, and if it fails, roll back.
@@ -338,7 +375,8 @@
if(m_opengl)
{
SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1);
- SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
+ // TODO: unknown in SDL 1.3. important?
+// SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
Mode |= SDL_OPENGL;
}
#endif
@@ -395,6 +433,19 @@
{
float scalefactor;
SDL_Rect Gamerect;
+ /*static const Uint32 RGBA[] = {
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN // OpenGL RGBA masks
+ 0x000000FF,
+ 0x0000FF00,
+ 0x00FF0000,
+ 0xFF000000
+#else
+ 0xFF000000,
+ 0x00FF0000,
+ 0x0000FF00,
+ 0x000000FF
+#endif
+ };*/
Gamerect = game_resolution_rect;
scalefactor = ((float)m_Resolution.width) / ((float)Gamerect.w);
@@ -424,12 +475,27 @@
}
else
{
+
g_pLogFile->textOut("Blitsurface = creatergbsurfacefrom<br>");
- BlitSurface = createSurface( "BlitSurface", true,
+
+#ifdef USE_OPENGL
+ if(m_opengl)
+ {
+ BlitSurface = createSurface( "BlitSurface", true,
+ getPowerOfTwo(game_resolution_rect.w),
+ getPowerOfTwo(game_resolution_rect.h),
+ m_Resolution.depth,
+ Mode, screen->format );
+ }
+ else
+#endif
+ {
+ BlitSurface = createSurface( "BlitSurface", true,
game_resolution_rect.w,
game_resolution_rect.h,
m_Resolution.depth,
Mode, screen->format );
+ }
m_blitsurface_alloc = true;
}
VRAMPtr = (unsigned char*)screen->pixels +
@@ -489,6 +555,22 @@
mp_sbuffery = pbufy;
}
+/*static void sb_lowblit(SDL_Surface* src, SDL_Rect* srcrect, SDL_Surface* dst, SDL_Rect* dstrect) {
+#if !defined(USE_OPENGL) && (defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR))
+ // SDL_BlitSurface doesn't work for some reason
+ int _xend = srcrect->x + dstrect->w;
+ int _yend = srcrect->y + dstrect->h;
+ int _dst_xdiff = dstrect->x - srcrect->x;
+ int _dst_ydiff = dstrect->y - srcrect->y;
+ for(int x = srcrect->x; x < _xend; ++x)
+ for(int y = srcrect->y; y < _yend; ++y)
+ SDL_DrawPoint(dst, x + _dst_xdiff, y + _dst_ydiff, convert4to32BPPcolor( ((Uint8*)src->pixels)[y * 512 + x], dst ));
+#else
+ SDL_BlitSurface(src, srcrect, dst, dstrect);
+#endif
+}
+*/
+
void CVideoDriver::blitScrollSurface() // This is only for tiles
// The name should be changed
{
@@ -579,10 +661,22 @@
void CVideoDriver::collectSurfaces()
{
- SDL_BlitSurface(FGLayerSurface, NULL, BlitSurface, NULL);
+/*#ifdef USE_OPENGL
+ if(m_opengl)
+ {
+ // TODO: Create a solid concept for rendering more textures instead of just one that is binded
+ // to BlitSurface. It's not that easy, because doing that and using scaleX will mean, that you
+ // to scaleX multiple times. So COpenGL must have separate cases. With or without ScaleX.
+ // It's might only be faster if scaleX is never used in that TODO-case
+ }
+ else
+#endif*/
+ {
+ SDL_BlitSurface(FGLayerSurface, NULL, BlitSurface, NULL);
- if(FXSurface->format->alpha)
- SDL_BlitSurface(FXSurface, NULL, BlitSurface, NULL);
+ if(FXSurface->format->alpha)
+ SDL_BlitSurface(FXSurface, NULL, BlitSurface, NULL);
+ }
}
void CVideoDriver::updateScreen()
@@ -591,7 +685,7 @@
#ifdef USE_OPENGL
if(m_opengl)
{
- mp_OpenGL->render();
+ mp_OpenGL->render(false);
// Flush the FG-Layer
SDL_FillRect(FGLayerSurface, NULL, SDL_MapRGB(FGLayerSurface->format, 0, 0xFF, 0xFE));
Modified: cgenius/trunk/src/sdl/CVideoDriver.h
===================================================================
--- cgenius/trunk/src/sdl/CVideoDriver.h 2010-06-28 11:04:27 UTC (rev 1289)
+++ cgenius/trunk/src/sdl/CVideoDriver.h 2010-06-28 11:05:06 UTC (rev 1290)
@@ -41,6 +41,9 @@
bool applyMode();
SDL_Rect adaptGameResolution();
SDL_Surface* createSurface( std::string name, bool alpha, int width, int height, int bpp, int mode, SDL_PixelFormat* format );
+ //void resetSettings();
+ //bool createSurfaces(void);
+
void stop(void);
bool start(void);
void isFullscreen(bool value);
@@ -81,6 +84,7 @@
SDL_Surface *getScrollSurface(void);
void setMode(st_resolution Resolution);
+
void setMode(int width, int height,int depth);
void setSpecialFXMode(bool SpecialFX);
void setFilter(short value);
@@ -137,7 +141,6 @@
int m_maxwidth;
bool m_aspect_correction;
bool m_special_fx;
- float m_aspect_ratio;
SDL_Rect screenrect;
SDL_Rect blitrect;
Added: cgenius/trunk/vfsroot/V04.ico
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/V04.ico
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <piz...@us...> - 2010-06-28 11:04:35
|
Revision: 1289
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1289&view=rev
Author: pizza2004
Date: 2010-06-28 11:04:27 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
updating
Added Paths:
-----------
cgenius/trunk/src/sdl/iphone/
cgenius/trunk/src/sdl/iphone/EAGLView.h
cgenius/trunk/src/sdl/iphone/EAGLView.m
cgenius/trunk/src/sdl/iphone/Info.plist
cgenius/trunk/src/sdl/iphone/MainWindow.xib
cgenius/trunk/src/sdl/iphone/blit.cpp
cgenius/trunk/src/sdl/iphone/blit_arm.h
cgenius/trunk/src/sdl/iphone/blit_arm.s
cgenius/trunk/src/sdl/iphone/gles_glue.c
cgenius/trunk/src/sdl/iphone/gles_glue.h
cgenius/trunk/src/sdl/iphone/iphone_common.h
cgenius/trunk/src/sdl/iphone/iphone_keyboard.h
cgenius/trunk/src/sdl/iphone/iphone_keyboard.m
cgenius/trunk/src/sdl/iphone/iphone_loop.c
cgenius/trunk/src/sdl/iphone/iphone_main.c
cgenius/trunk/src/sdl/iphone/iphone_main.m
cgenius/trunk/src/sdl/iphone/iphone_menus.c
cgenius/trunk/src/sdl/iphone/iphone_qgl.h
cgenius/trunk/src/sdl/iphone/iphone_qgl_enumerants.h
cgenius/trunk/src/sdl/iphone/iphone_video.h
cgenius/trunk/src/sdl/iphone/iphone_video.m
cgenius/trunk/src/sdl/iphone/iphone_wolf.h
cgenius/trunk/src/sdl/iphone/main.m
cgenius/trunk/src/sdl/iphone/module.mk
cgenius/trunk/src/sdl/iphone/osys_events.cpp
cgenius/trunk/src/sdl/iphone/osys_main.cpp
cgenius/trunk/src/sdl/iphone/osys_main.h
cgenius/trunk/src/sdl/iphone/osys_sound.cpp
cgenius/trunk/src/sdl/iphone/osys_video.cpp
cgenius/trunk/src/sdl/iphone/wolf3dAppDelegate.h
cgenius/trunk/src/sdl/iphone/wolf3dAppDelegate.m
Added: cgenius/trunk/src/sdl/iphone/EAGLView.h
===================================================================
--- cgenius/trunk/src/sdl/iphone/EAGLView.h (rev 0)
+++ cgenius/trunk/src/sdl/iphone/EAGLView.h 2010-06-28 11:04:27 UTC (rev 1289)
@@ -0,0 +1,58 @@
+/*
+
+ Copyright (C) 2009 Id Software, Inc.
+
+ 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.
+
+ */
+
+
+#import <UIKit/UIKit.h>
+#import <OpenGLES/EAGL.h>
+#import <OpenGLES/ES1/gl.h>
+#import <OpenGLES/ES1/glext.h>
+
+/*
+This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
+The view content is basically an EAGL surface you render your OpenGL scene into.
+Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
+*/
+@interface EAGLView : UIView <UITextFieldDelegate> {
+@public
+ UITextField *textField;
+
+@private
+ /* The pixel dimensions of the backbuffer */
+ GLint backingWidth;
+ GLint backingHeight;
+
+ EAGLContext *context;
+
+ /* OpenGL names for the renderbuffer and framebuffers used to render to this view */
+ GLuint viewRenderbuffer, viewFramebuffer;
+
+ /* OpenGL name for the depth buffer that is attached to viewFramebuffer, if it exists (0 if it does not exist) */
+ GLuint depthRenderbuffer;
+
+ NSTimer *animationTimer;
+ NSTimeInterval animationInterval;
+
+}
+
+@property NSTimeInterval animationInterval;
+
+- (void)drawView;
+
+@end
Property changes on: cgenius/trunk/src/sdl/iphone/EAGLView.h
___________________________________________________________________
Added: svn:executable
+
Added: cgenius/trunk/src/sdl/iphone/EAGLView.m
===================================================================
--- cgenius/trunk/src/sdl/iphone/EAGLView.m (rev 0)
+++ cgenius/trunk/src/sdl/iphone/EAGLView.m 2010-06-28 11:04:27 UTC (rev 1289)
@@ -0,0 +1,293 @@
+//
+// EAGLView.m
+// wolf3d
+//
+// Created by Cass Everitt on 2/20/09.
+// Copyright Id Software 2009. All rights reserved.
+//
+
+
+
+#import <QuartzCore/QuartzCore.h>
+#import <OpenGLES/EAGLDrawable.h>
+
+#import "EAGLView.h"
+#import "wolf3dAppDelegate.h"
+
+#include "wolfiphone.h"
+
+EAGLView *eaglview;
+
+// A class extension to declare private methods
+@interface EAGLView ()
+
+@property (nonatomic, retain) EAGLContext *context;
+@property (nonatomic, assign) NSTimer *animationTimer;
+
+- (void) destroyFramebuffer;
+- (void) swapBuffers;
+
+@end
+
+
+@implementation EAGLView
+
+@synthesize context;
+@synthesize animationTimer;
+@synthesize animationInterval;
+
+
+// You must implement this method
++ (Class)layerClass {
+ return [CAEAGLLayer class];
+}
+
+
+//The GL view is stored in the nib file. When it's unarchived it's sent -initWithCoder:
+- (id)initWithCoder:(NSCoder*)coder {
+ self = [super initWithCoder:coder];
+
+ eaglview = self;
+
+ // Get the layer
+ CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;
+
+ eaglLayer.opaque = YES;
+ eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
+
+ [NSNumber numberWithBool:NO],
+ kEAGLDrawablePropertyRetainedBacking,
+
+ kEAGLColorFormatRGB565,
+ /* kEAGLColorFormatRGBA8, */
+ kEAGLDrawablePropertyColorFormat,
+
+ nil];
+
+ context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1];
+ assert( context );
+
+ if ( ![EAGLContext setCurrentContext:context]) {
+ [self release];
+ return nil;
+ }
+ self.multipleTouchEnabled = true;
+
+ [EAGLContext setCurrentContext:context];
+
+ glGenFramebuffersOES(1, &viewFramebuffer);
+ glGenRenderbuffersOES(1, &viewRenderbuffer);
+
+ glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer);
+ glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
+ [context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(CAEAGLLayer*)self.layer];
+ glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, viewRenderbuffer);
+
+ glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
+ glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
+
+ glGenRenderbuffersOES(1, &depthRenderbuffer);
+ glBindRenderbufferOES(GL_RENDERBUFFER_OES, depthRenderbuffer);
+ glRenderbufferStorageOES(GL_RENDERBUFFER_OES, GL_DEPTH_COMPONENT16_OES, backingWidth, backingHeight);
+ glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_DEPTH_ATTACHMENT_OES, GL_RENDERBUFFER_OES, depthRenderbuffer);
+
+ if(glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES) {
+ NSLog(@"failed to make complete framebuffer object %x", glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES));
+ }
+
+ self.animationTimer = [NSTimer scheduledTimerWithTimeInterval:0.032
+ target:self
+ selector:@selector(drawView)
+ userInfo:nil repeats:YES];
+ return self;
+}
+
+- (void)drawView {
+ int start, end;
+
+ [EAGLContext setCurrentContext:context];
+
+ glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer);
+
+ [ (wolf3dAppDelegate *)[UIApplication sharedApplication].delegate restartAccelerometerIfNeeded];
+
+ start = Sys_Milliseconds();
+
+ extern void iphoneFrame();
+ iphoneFrame();
+
+ end = Sys_Milliseconds();
+// Com_Printf( "msec: %i\n", end - start );
+
+ [self swapBuffers];
+}
+
+void GLimp_EndFrame() {
+ [eaglview swapBuffers];
+}
+
+- (void)swapBuffers {
+ glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
+ [context presentRenderbuffer:GL_RENDERBUFFER_OES];
+}
+
+- (void)layoutSubviews {
+ [self drawView];
+}
+
+
+
+- (void)destroyFramebuffer {
+
+ glDeleteFramebuffersOES(1, &viewFramebuffer);
+ viewFramebuffer = 0;
+ glDeleteRenderbuffersOES(1, &viewRenderbuffer);
+ viewRenderbuffer = 0;
+ glDeleteRenderbuffersOES(1, &depthRenderbuffer);
+ depthRenderbuffer = 0;
+}
+
+
+- (void)dealloc {
+ if ([EAGLContext currentContext] == context) {
+ [EAGLContext setCurrentContext:nil];
+ }
+
+ [context release];
+ [super dealloc];
+}
+
+void WolfensteinTouches( int numTouches, int touches[16] );
+
+- (void) handleTouches:(NSSet*)touches withEvent:(UIEvent*)event {
+ int touchCount = 0;
+ int points[16];
+ static int previousTouchCount;
+
+ NSSet *t = [event allTouches];
+ for (UITouch *myTouch in t)
+ {
+ CGPoint touchLocation = [myTouch locationInView:nil];
+
+ points[ 2 * touchCount + 0 ] = touchLocation.x;
+ points[ 2 * touchCount + 1 ] = touchLocation.y; // ( h - 1 ) - touchLocation.y;
+
+ touchCount++;
+
+ if (myTouch.phase == UITouchPhaseBegan) {
+ // new touch handler
+ }
+ if (myTouch.phase == UITouchPhaseMoved) {
+ // touch moved handler
+ }
+ if (myTouch.phase == UITouchPhaseEnded) {
+ touchCount--;
+ }
+ }
+
+ // toggle the console with four touches
+ if ( touchCount == 4 && previousTouchCount != 4 ) {
+ if ( textField == nil ) {
+ void iphoneActivateConsole();
+ textField = [UITextField alloc];
+ [textField initWithFrame:CGRectMake( 0, 0, 20, 20 ) ];
+ [self addSubview:textField];
+ [textField release];
+ textField.hidden = true;
+ textField.delegate = self;
+ textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
+ textField.autocorrectionType = UITextAutocorrectionTypeNo;
+ [textField becomeFirstResponder];
+
+ iphoneActivateConsole();
+ } else {
+ void iphoneDeactivateConsole();
+ [textField resignFirstResponder];
+ [textField removeFromSuperview];
+ textField = nil;
+
+ iphoneDeactivateConsole();
+ }
+ }
+ previousTouchCount = touchCount;
+
+ WolfensteinTouches( touchCount, points );
+}
+
+
+- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {
+ [self handleTouches:touches withEvent:event];
+}
+
+- (void) touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event {
+ [self handleTouches:touches withEvent:event];
+}
+
+- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
+ [self handleTouches:touches withEvent:event];
+}
+
+
+- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
+ [self handleTouches:touches withEvent:event];
+}
+
+
+
+@end
+
+
+@implementation EAGLView (UITextFieldDelegate)
+
+- (BOOL)textFieldShouldReturn:(UITextField *)_textField
+{
+ void iphoneExecuteCommandLine();
+ iphoneExecuteCommandLine();
+ return YES;
+}
+
+@end
+
+const char * GetCurrentCommandLine() {
+ assert( eaglview->textField != nil );
+ return [ eaglview->textField.text UTF8String ];
+}
+
+void SetCurrentCommandLine( const char * str) {
+ assert( eaglview->textField != nil );
+ eaglview->textField.text = [ NSString stringWithUTF8String: str ];
+}
+
+void OpenURL( const char *url ) {
+ Com_Printf( "OpenURL char *: %s\n", url );
+
+ NSString *nss = [NSString stringWithCString: url encoding: NSASCIIStringEncoding];
+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString: nss]];
+}
+
+
+void iPhoneLoadJPG( W8* jpegData, int jpegBytes, W8 **pic, W16 *width, W16 *height, W16 *bytes ) {
+ CFDataRef data;
+ int dataBytes = 0;
+ UIImage *img = [ UIImage imageWithData: [NSData dataWithBytes: (const char *)jpegData length: (NSUInteger)jpegBytes ] ];
+ int imgBytes;
+ *width = img.size.width;
+ *height = img.size.height;
+ imgBytes = (int)(*width) * (int)(*height) * 4;
+ data = CGDataProviderCopyData( CGImageGetDataProvider( img.CGImage ) );
+ dataBytes = CFDataGetLength( data );
+ *bytes = 4;
+ if ( dataBytes > imgBytes ) {
+ *pic = NULL;
+ return;
+ }
+ *pic = (W8 *)malloc( imgBytes );
+ CFDataGetBytes( data, CFRangeMake(0, dataBytes), *pic );
+ // convert BGRA to RGBA
+ for ( imgBytes = 0; imgBytes < dataBytes; imgBytes+= 4 ) {
+ W8 tmp = pic[0][ imgBytes + 0 ];
+ pic[0][ imgBytes + 0 ] = pic[0][ imgBytes + 2 ];
+ pic[0][ imgBytes + 2 ] = tmp;
+ }
+}
+
Property changes on: cgenius/trunk/src/sdl/iphone/EAGLView.m
___________________________________________________________________
Added: svn:executable
+
Added: cgenius/trunk/src/sdl/iphone/Info.plist
===================================================================
--- cgenius/trunk/src/sdl/iphone/Info.plist (rev 0)
+++ cgenius/trunk/src/sdl/iphone/Info.plist 2010-06-28 11:04:27 UTC (rev 1289)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key></key>
+ <string></string>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string>${PRODUCT_NAME}_icon.png</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.zodttd.${PRODUCT_NAME:identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>NSMainNibFile</key>
+ <string>MainWindow</string>
+ <key>UIInterfaceOrientation</key>
+ <string>UIInterfaceOrientationPortrait</string>
+ <key>UIStatusBarHidden</key>
+ <true/>
+</dict>
+</plist>
Property changes on: cgenius/trunk/src/sdl/iphone/Info.plist
___________________________________________________________________
Added: svn:executable
+
Added: cgenius/trunk/src/sdl/iphone/MainWindow.xib
===================================================================
--- cgenius/trunk/src/sdl/iphone/MainWindow.xib (rev 0)
+++ cgenius/trunk/src/sdl/iphone/MainWindow.xib 2010-06-28 11:04:27 UTC (rev 1289)
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.02">
+ <data>
+ <int key="IBDocument.SystemTarget">528</int>
+ <string key="IBDocument.SystemVersion">9E17</string>
+ <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.AppKitVersion">949.33</string>
+ <string key="IBDocument.HIToolboxVersion">352.00</string>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="8"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ </object>
+ <object class="IBProxyObject" id="191355593">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ </object>
+ <object class="IBUICustomObject" id="664661524"/>
+ <object class="IBUIWindow" id="380026005">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">1316</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUIView" id="773737154">
+ <reference key="NSNextResponder" ref="380026005"/>
+ <int key="NSvFlags">1298</int>
+ <string key="NSFrameSize">{320, 480}</string>
+ <reference key="NSSuperview" ref="380026005"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ </object>
+ </object>
+ <object class="NSPSMatrix" key="NSFrameMatrix"/>
+ <string key="NSFrameSize">{320, 480}</string>
+ <reference key="NSSuperview"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <bool key="IBUIVisibleAtLaunch">YES</bool>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="664661524"/>
+ </object>
+ <int key="connectionID">4</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="380026005"/>
+ </object>
+ <int key="connectionID">5</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">glView</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="773737154"/>
+ </object>
+ <int key="connectionID">9</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <object class="NSArray" key="object" id="957960031">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2</int>
+ <reference key="object" ref="380026005"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="773737154"/>
+ </object>
+ <reference key="parent" ref="957960031"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="957960031"/>
+ <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">3</int>
+ <reference key="object" ref="664661524"/>
+ <reference key="parent" ref="957960031"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8</int>
+ <reference key="object" ref="773737154"/>
+ <reference key="parent" ref="380026005"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="191355593"/>
+ <reference key="parent" ref="957960031"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>2.IBAttributePlaceholdersKey</string>
+ <string>2.IBEditorWindowLastContentRect</string>
+ <string>2.IBPluginDependency</string>
+ <string>3.CustomClassName</string>
+ <string>3.IBPluginDependency</string>
+ <string>8.CustomClassName</string>
+ <string>8.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIApplication</string>
+ <string>UIResponder</string>
+ <object class="NSMutableDictionary">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <string>{{500, 343}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>wolf3dAppDelegate</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>EAGLView</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">9</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">EAGLView</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/EAGLView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">wolf3dAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>glView</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>EAGLView</string>
+ <string>UIWindow</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/wolf3dAppDelegate.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.LastKnownRelativeProjectPath">wolf3d.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ </data>
+</archive>
Property changes on: cgenius/trunk/src/sdl/iphone/MainWindow.xib
___________________________________________________________________
Added: svn:executable
+
Added: cgenius/trunk/src/sdl/iphone/blit.cpp
===================================================================
--- cgenius/trunk/src/sdl/iphone/blit.cpp (rev 0)
+++ cgenius/trunk/src/sdl/iphone/blit.cpp 2010-06-28 11:04:27 UTC (rev 1289)
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL: https://scummvm.svn.sf.net/svnroot/scummvm/scummvm/trunk/backends/platform/iphone/blit.cpp $
+ * $Id: blit.cpp 40867 2009-05-24 15:17:42Z lordhoto $
+ *
+ */
+
+#include "common/scummsys.h"
+#include "blit_arm.h"
+
+void blitLandscapeScreenRect16bpp(uint16 *dst, uint16 *src, int width, int height, int screenWidth, int screenHeight)
+{
+ for (int x = width; x > 0; x--) {
+ for (int y = height; y > 0; y--) {
+ *(dst++) = *src;
+ src += screenWidth;
+ }
+ dst -= screenHeight + height;
+ src += 1 - height * screenWidth;
+ }
+}
+
+void blitLandscapeScreenRect8bpp(uint16 *dst, byte *src, int width, int height, uint16 *palette, int screenWidth, int screenHeight)
+{
+ for (int x = width; x > 0; x--) {
+ for (int y = height; y > 0; y--) {
+ *(dst++) = palette[*src];
+ src += screenWidth;
+ }
+ dst -= screenHeight + height;
+ src += 1 - height * screenWidth;
+ }
+}
Added: cgenius/trunk/src/sdl/iphone/blit_arm.h
===================================================================
--- cgenius/trunk/src/sdl/iphone/blit_arm.h (rev 0)
+++ cgenius/trunk/src/sdl/iphone/blit_arm.h 2010-06-28 11:04:27 UTC (rev 1289)
@@ -0,0 +1,38 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL: https://scummvm.svn.sf.net/svnroot/scummvm/scummvm/trunk/backends/platform/iphone/blit_arm.h $
+ * $Id: blit_arm.h 29718 2007-12-05 08:07:10Z vinterstum $
+ *
+ */
+
+extern "C" void blitLandscapeScreenRect16bpp(uint16 *dst, uint16 *src,
+ int width,
+ int height,
+ int screenWidth,
+ int screenHeight);
+
+extern "C" void blitLandscapeScreenRect8bpp(uint16 *dst,
+ byte *src,
+ int width,
+ int height,
+ uint16 *palette,
+ int screenWidth,
+ int screenHeight);
Added: cgenius/trunk/src/sdl/iphone/blit_arm.s
===================================================================
--- cgenius/trunk/src/sdl/iphone/blit_arm.s (rev 0)
+++ cgenius/trunk/src/sdl/iphone/blit_arm.s 2010-06-28 11:04:27 UTC (rev 1289)
@@ -0,0 +1,140 @@
+@ ScummVM - Graphic Adventure Engine
+@
+@ ScummVM is the legal property of its developers, whose names
+@ are too numerous to list here. Please refer to the COPYRIGHT
+@ file distributed with this source distribution.
+@
+@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+@
+@ $URL: https://scummvm.svn.sf.net/svnroot/scummvm/scummvm/trunk/backends/platform/iphone/blit_arm.s $
+@ $Id: blit_arm.s 33326 2008-07-27 10:15:57Z vinterstum $
+@
+@ @author Robin Watts (ro...@ws...)
+
+ .text
+
+ .global _blitLandscapeScreenRect16bpp
+ .global _blitLandscapeScreenRect8bpp
+
+
+_blitLandscapeScreenRect16bpp:
+ @ r0 = dst
+ @ r1 = src
+ @ r2 = w
+ @ r3 = h
+ @ <> = _screenWidth
+ @ <> = _screenHeight
+ mov r12,r13
+ stmfd r13!,{r4-r11,r14}
+ ldmfd r12,{r12,r14} @ r12 = _screenWidth
+ @ r14 = _screenHeight
+ add r14,r14,r3 @ r14 = _screenHeight + h
+ mvn r11,#0
+ mla r11,r3,r12,r11 @ r11= _screenWidth*h-1
+ add r12,r12,r12
+xloop:
+ subs r4,r3,#5 @ r4 = y = h
+ ble thin
+yloop:
+ ldrh r5, [r1],r12 @ r5 = *src src += _screenWidth
+ ldrh r6, [r1],r12 @ r6 = *src src += _screenWidth
+ ldrh r7, [r1],r12 @ r7 = *src src += _screenWidth
+ ldrh r8, [r1],r12 @ r8 = *src src += _screenWidth
+ ldrh r9, [r1],r12 @ r9 = *src src += _screenWidth
+ ldrh r10,[r1],r12 @ r10= *src src += _screenWidth
+ subs r4,r4,#6
+ strh r5, [r0],#2 @ *dst++ = r5
+ strh r6, [r0],#2 @ *dst++ = r6
+ strh r7, [r0],#2 @ *dst++ = r7
+ strh r8, [r0],#2 @ *dst++ = r8
+ strh r9, [r0],#2 @ *dst++ = r9
+ strh r10,[r0],#2 @ *dst++ = r10
+ bgt yloop
+thin:
+ adds r4,r4,#5
+ beq lineend
+thin_loop:
+ ldrh r5,[r1],r12 @ r5 = *src src += _screenWidth
+ subs r4,r4,#1
+ strh r5,[r0],#2 @ *dst++ = r5
+ bgt thin_loop
+lineend:
+ sub r0,r0,r14,LSL #1 @ dst -= _screenHeight + h
+ sub r1,r1,r11,LSL #1 @ src += 1-_screenWidth*h
+ subs r2,r2,#1
+ bgt xloop
+
+ ldmfd r13!,{r4-r11,PC}
+
+_blitLandscapeScreenRect8bpp:
+ @ r0 = dst
+ @ r1 = src
+ @ r2 = w
+ @ r3 = h
+ @ <> = _palette
+ @ <> = _screenWidth
+ @ <> = _screenHeight
+ mov r12,r13
+ stmfd r13!,{r4-r11,r14}
+ ldmfd r12,{r11,r12,r14} @ r11 = _palette
+ @ r12 = _screenWidth
+ @ r14 = _screenHeight
+ add r14,r14,r3 @ r14 = _screenHeight + h
+ mvn r6,#0
+ mla r6,r3,r12,r6 @ r6 = _screenWidth*h-1
+xloop8:
+ mov r4,r3 @ r4 = y = h
+ subs r4,r3,#4 @ r4 = y = h
+ ble thin8
+yloop8:
+ ldrb r5, [r1],r12 @ r5 = *src src += _screenWidth
+ ldrb r7, [r1],r12 @ r7 = *src src += _screenWidth
+ ldrb r8, [r1],r12 @ r8 = *src src += _screenWidth
+ ldrb r9, [r1],r12 @ r9 = *src src += _screenWidth
+ ldrb r10,[r1],r12 @ r10= *src src += _screenWidth
+ add r5, r5, r5
+ add r7, r7, r7
+ add r8, r8, r8
+ add r9, r9, r9
+ add r10,r10,r10
+ ldrh r5, [r11,r5]
+ ldrh r7, [r11,r7]
+ ldrh r8, [r11,r8]
+ ldrh r9, [r11,r9]
+ ldrh r10,[r11,r10]
+ subs r4,r4,#5
+ strh r5, [r0],#2 @ *dst++ = r5
+ strh r7, [r0],#2 @ *dst++ = r7
+ strh r8, [r0],#2 @ *dst++ = r8
+ strh r9, [r0],#2 @ *dst++ = r9
+ strh r10,[r0],#2 @ *dst++ = r10
+ bgt yloop8
+thin8:
+ adds r4,r4,#4
+ beq lineend8
+thin_loop8:
+ ldrb r5,[r1],r12 @ r5 = *src src += _screenWidth
+ add r5,r5,r5
+ ldrh r5,[r11,r5]
+ subs r4,r4,#1
+ strh r5,[r0],#2 @ *dst++ = r5
+ bgt thin_loop8
+lineend8:
+ sub r0,r0,r14,LSL #1 @ dst -= _screenHeight + h
+ sub r1,r1,r6 @ src += 1-_screenWidth*h
+ subs r2,r2,#1
+ bgt xloop8
+
+ ldmfd r13!,{r4-r11,PC}
Added: cgenius/trunk/src/sdl/iphone/gles_glue.c
===================================================================
--- cgenius/trunk/src/sdl/iphone/gles_glue.c (rev 0)
+++ cgenius/trunk/src/sdl/iphone/gles_glue.c 2010-06-28 11:04:27 UTC (rev 1289)
@@ -0,0 +1,134 @@
+/*
+
+ Copyright (C) 2009 Id Software, Inc.
+
+ 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 "wolfiphone.h"
+
+//int registration_sequence;
+
+#include "iphone_qgl.h"
+
+
+#ifdef QGL_LOG_GL_CALLS
+unsigned int QGLLogGLCalls = 1;
+FILE *QGLDebugFile(void) {
+ return stdout;
+}
+#endif
+
+void QGLCheckError(const char *message) {
+ GLint err = qglGetError();
+ if ( err != GL_NO_ERROR ) {
+ printf( "GL ERROR %d from %s\n", err, message );
+ }
+}
+
+unsigned int QGLBeginStarted = 0;
+
+
+
+
+struct Vertex {
+ float xyz[3];
+ float st[2];
+ GLubyte c[4];
+};
+
+#define MAX_VERTS 16384
+
+typedef struct Vertex Vertex;
+Vertex immediate[ MAX_VERTS ];
+Vertex vab;
+short quad_indexes[MAX_VERTS * 3 / 2 ];
+int curr_vertex;
+GLenum curr_prim;
+
+void InitImmediateModeGL() {
+ for ( int i = 0; i < MAX_VERTS * 3 / 2; i+=6 ) {
+ int q = i / 6 * 4;
+ quad_indexes[ i + 0 ] = q + 0;
+ quad_indexes[ i + 1 ] = q + 1;
+ quad_indexes[ i + 2 ] = q + 2;
+
+ quad_indexes[ i + 3 ] = q + 0;
+ quad_indexes[ i + 4 ] = q + 2;
+ quad_indexes[ i + 5 ] = q + 3;
+ }
+
+ qglVertexPointer( 3, GL_FLOAT, sizeof( Vertex ), immediate[ 0 ].xyz );
+ qglTexCoordPointer( 2, GL_FLOAT, sizeof( Vertex ), immediate[ 0 ].st );
+ qglColorPointer( 4, GL_UNSIGNED_BYTE, sizeof( Vertex ), immediate[ 0 ].c );
+ qglEnableClientState( GL_VERTEX_ARRAY );
+ qglEnableClientState( GL_TEXTURE_COORD_ARRAY );
+ qglEnableClientState( GL_COLOR_ARRAY );
+}
+
+void pfglBegin( GLenum prim ) {
+ curr_vertex = 0;
+ curr_prim = prim;
+}
+
+void pfglVertex3f( float x, float y, float z ) {
+ assert( curr_vertex < MAX_VERTS );
+ vab.xyz[ 0 ] = x;
+ vab.xyz[ 1 ] = y;
+ vab.xyz[ 2 ] = z;
+ immediate[ curr_vertex ] = vab;
+ curr_vertex++;
+}
+void pfglVertex2i( GLint x, GLint y ) {
+ assert( curr_vertex < MAX_VERTS );
+ vab.xyz[ 0 ] = (float)x;
+ vab.xyz[ 1 ] = (float)y;
+ vab.xyz[ 2 ] = 0.0f;
+ immediate[ curr_vertex ] = vab;
+ curr_vertex++;
+}
+void pfglColor4ub( GLubyte r, GLubyte g, GLubyte b, GLubyte a ) {
+ vab.c[ 0 ] = r;
+ vab.c[ 1 ] = g;
+ vab.c[ 2 ] = b;
+ vab.c[ 3 ] = a;
+}
+void pfglColor4f( GLfloat r, GLfloat g, GLfloat b, GLfloat a ) {
+ vab.c[ 0 ] = (GLubyte) ( r * 255 );
+ vab.c[ 1 ] = (GLubyte) ( g * 255 );
+ vab.c[ 2 ] = (GLubyte) ( b * 255 );
+ vab.c[ 3 ] = (GLubyte) ( a * 255 );
+}
+void pfglTexCoord2i( GLint s, GLint t ) {
+ vab.st[ 0 ] = (float)s;
+ vab.st[ 1 ] = (float)t;
+}
+void pfglTexCoord2f( GLfloat s, GLfloat t ) {
+ vab.st[ 0 ] = s;
+ vab.st[ 1 ] = t;
+}
+
+void pfglEnd() {
+ if ( curr_prim == GL_QUADS ) {
+ qglDrawElements( GL_TRIANGLES, curr_vertex / 4 * 6, GL_UNSIGNED_SHORT, quad_indexes );
+ } else {
+ qglDrawArrays( curr_prim, 0, curr_vertex );
+ }
+ curr_vertex = 0;
+ curr_prim = 0;
+}
+
Property changes on: cgenius/trunk/src/sdl/iphone/gles_glue.c
___________________________________________________________________
Added: svn:executable
+
Added: cgenius/trunk/src/sdl/iphone/gles_glue.h
===================================================================
--- cgenius/trunk/src/sdl/iphone/gles_glue.h (rev 0)
+++ cgenius/trunk/src/sdl/iphone/gles_glue.h 2010-06-28 11:04:27 UTC (rev 1289)
@@ -0,0 +1,77 @@
+
+
+#ifndef __GLES_GLUE_H__
+#define __GLES_GLUE_H__
+
+#include "iphone_qgl.h"
+
+typedef GLfloat GLdouble;
+
+#define pfglEnable qglEnable
+#define pfglDisable qglDisable
+#define pfglActiveTextureARB qglActiveTexture
+#define pfglGenTextures qglGenTextures
+#define pfglDeleteTextures qglDeleteTextures
+#define pfglDepthRange qglDepthRangef
+#define pfglDepthFunc qglDepthFunc
+#define pfglCullFace qglCullFace
+#define pfglColor3f(r,g,b) pfglColor4f(r,g,b,1.0f)
+#define pfglColor3ubv(c) pfglColor4ub( (c)[0], (c)[1], (c)[2], 255 )
+#define pfglColor4ubv(c) pfglColor4ub( (c)[0], (c)[1], (c)[2], (c)[3] )
+#define pfglBlendFunc qglBlendFunc
+#define pfglClearColor qglClearColor
+#define pfglClear qglClear
+#define pfglDrawBuffer(buffer)
+#define pfglLineWidth qglLineWidth
+#define pfglBindTexture qglBindTexture
+#define pfglTexParameteri qglTexParameteri
+#define pfglTexParameterf qglTexParameterf
+#define pfglTexImage2D qglTexImage2D
+#define pfglFrustum qglFrustumf
+#define pfglOrtho qglOrthof
+#define pfglLoadIdentity qglLoadIdentity
+#define pfglMatrixMode qglMatrixMode
+#define pfglShadeModel qglShadeModel
+#define pfglRotatef qglRotatef
+#define pfglTranslatef qglTranslatef
+#define pfglReadPixels qglReadPixels
+#define pfglAlphaFunc qglAlphaFunc
+#define pfglViewport qglViewport
+#define pfglTexEnvi qglTexEnvi
+#define pfglClientActiveTextureARB qglClientActiveTexture
+
+#define pfglGetIntegerv qglGetIntegerv
+#define pfglGetString qglGetString
+#define pfglGetError qglGetError
+
+
+#define GL_QUADS 888
+
+/*
+void GLimp_BeginFrame();
+void GLimp_EndFrame( void );
+_boolean GLimp_Init( void *hinstance, void *hWnd );
+void GLimp_Shutdown( void );
+int GLimp_SetMode( int *pwidth, int *pheight, int mode, _boolean fullscreen );
+void GLimp_AppActivate( _boolean active );
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void pfglBegin( GLenum prim );
+void pfglVertex3f( float x, float y, float z );
+void pfglVertex2i( GLint x, GLint y );
+void pfglColor4ub( GLubyte r, GLubyte g, GLubyte b, GLubyte a );
+void pfglColor4f( GLfloat r, GLfloat g, GLfloat b, GLfloat a );
+void pfglTexCoord2i( GLint s, GLint t );
+void pfglTexCoord2f( GLfloat s, GLfloat t );
+
+void pfglEnd();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
\ No newline at end of file
Property changes on: cgenius/trunk/src/sdl/iphone/gles_glue.h
___________________________________________________________________
Added: svn:executable
+
Added: cgenius/trunk/src/sdl/iphone/iphone_common.h
===================================================================
--- cgenius/trunk/src/sdl/iphone/iphone_common.h (rev 0)
+++ cgenius/trunk/src/sdl/iphone/iphone_common.h 2010-06-28 11:04:27 UTC (rev 1289)
@@ -0,0 +1,72 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL: https://scummvm.svn.sf.net/svnroot/scummvm/scummvm/trunk/backends/platform/iphone/iphone_common.h $
+ * $Id: iphone_common.h 40867 2009-05-24 15:17:42Z lordhoto $
+ *
+ */
+
+
+enum InputEvent {
+ kInputMouseDown,
+ kInputMouseUp,
+ kInputMouseDragged,
+ kInputMouseSecondDragged,
+ kInputMouseSecondDown,
+ kInputMouseSecondUp,
+ kInputOrientationChanged,
+ kInputKeyPressed,
+ kInputApplicationSuspended,
+ kInputApplicationResumed,
+ kInputSwipe
+};
+
+enum ScreenOrientation {
+ kScreenOrientationPortrait,
+ kScreenOrientationLandscape,
+ kScreenOrientationFlippedLandscape
+};
+
+typedef enum
+{
+ kUIViewSwipeUp = 1,
+ kUIViewSwipeDown = 2,
+ kUIViewSwipeLeft = 4,
+ kUIViewSwipeRight = 8
+} UIViewSwipeDirection;
+
+// We need this to be able to call functions from/in Objective-C.
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// On the C++ side
+int iphone_main(int argc, char *argv[]);
+
+// On the ObjC side
+void iPhone_updateScreen();
+void iPhone_updateScreenRect(unsigned short* screen, int x1, int y1, int x2, int y2);
+void iPhone_initSurface(int width, int height);
+bool iPhone_fetchEvent(int *outEvent, float *outX, float *outY);
+const char* iPhone_getDocumentsDir();
+
+#ifdef __cplusplus
+}
+#endif
Added: cgenius/trunk/src/sdl/iphone/iphone_keyboard.h
===================================================================
--- cgenius/trunk/src/sdl/iphone/iphone_keyboard.h (rev 0)
+++ cgenius/trunk/src/sdl/iphone/iphone_keyboard.h 2010-06-28 11:04:27 UTC (rev 1289)
@@ -0,0 +1,39 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL: https://scummvm.svn.sf.net/svnroot/scummvm/scummvm/trunk/backends/platform/iphone/iphone_keyboard.h $
+ * $Id: iphone_keyboard.h 39020 2009-03-01 08:41:03Z vinterstum $
+ *
+ */
+
+#import <UIKit/UIKit.h>
+#import <UIKit/UITextView.h>
+
+@interface SoftKeyboard : UIView {
+ id inputDelegate;
+ UITextView* inputView;
+}
+
+- (id)initWithFrame:(CGRect)frame;
+- (UITextView*)inputView;
+- (void)setInputDelegate:(id)delegate;
+- (void)handleKeyPress:(unichar)c;
+
+@end
Added: cgenius/trunk/src/sdl/iphone/iphone_keyboard.m
===================================================================
--- cgenius/trunk/src/sdl/iphone/iphone_keyboard.m (rev 0)
+++ cgenius/trunk/src/sdl/iphone/iphone_keyboard.m 2010-06-28 11:04:27 UTC (rev 1289)
@@ -0,0 +1,98 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL: https://scummvm.svn.sf.net/svnroot/scummvm/scummvm/trunk/backends/platform/iphone/iphone_keyboard.m $
+ * $Id: iphone_keyboard.m 40872 2009-05-24 21:53:29Z lordhoto $
+ *
+ */
+
+#import "iphone_keyboard.h"
+
+@interface UITextInputTraits
+- (void)setAutocorrectionType:(int)type;
+- (void)setAutocapitalizationType:(int)type;
+- (void)setEnablesReturnKeyAutomatically:(BOOL)val;
+@end
+
+@interface TextInputHandler : UITextView {
+ SoftKeyboard* softKeyboard;
+}
+
+- (id)initWithKeyboard:(SoftKeyboard*)keyboard;
+
+@end
+
+
+@implementation TextInputHandler
+
+- (id)initWithKeyboard:(SoftKeyboard*)keyboard; {
+ self = [super initWithFrame:CGRectMake(0.0f, 0.0f, 0.0f, 0.0f)];
+ softKeyboard = keyboard;
+
+ [[self textInputTraits] setAutocorrectionType:1];
+ [[self textInputTraits] setAutocapitalizationType:0];
+ [[self textInputTraits] setEnablesReturnKeyAutomatically:NO];
+
+ return self;
+}
+
+- (void) keyboardInputShouldDelete:(id)input {
+ [softKeyboard handleKeyPress:0x08];
+}
+
+- (BOOL)webView:(id)fp8 shouldInsertText:(id)character
+ replacingDOMRange:(id)fp16
+ givenAction:(int)fp20 {
+
+ if ([character length] != 1) {
+ [NSException raise:@"Unsupported" format:@"Unhandled multi-char insert!"];
+ return NO;
+ }
+
+ [softKeyboard handleKeyPress:[character characterAtIndex:0]];
+
+ return NO;
+}
+
+@end
+
+
+@implementation SoftKeyboard
+
+- (id)initWithFrame:(CGRect)frame {
+ self = [super initWithFrame:frame];
+ inputDelegate = nil;
+ inputView = [[TextInputHandler alloc] initWithKeyboard:self];
+ return self;
+}
+
+- (UITextView*)inputView {
+ return inputView;
+}
+
+- (void)setInputDelegate:(id)delegate {
+ inputDelegate = delegate;
+}
+
+- (void)handleKeyPress:(unichar)c {
+ [inputDelegate handleKeyPress:c];
+}
+
+@end
Added: cgenius/trunk/src/sdl/iphone/iphone_loop.c
===================================================================
--- cgenius/trunk/src/sdl/iphone/iphone_loop.c (rev 0)
+++ cgenius/trunk/src/sdl/iphone/iphone_loop.c 2010-06-28 11:04:27 UTC (rev 1289)
@@ -0,0 +1,1025 @@
+/*
+ remove wolf_render.c
+ for the iphone build, we only need the following lsfx files:
+
+ 001
+ 003
+ 008
+ 009
+ 012
+ 023
+ 028
+ 030
+ 031
+ 033
+ 034
+ 035
+ 036
+ 037
+ 038
+ 040
+ 044
+ 045
+ 061
+ 062
+ 064
+ 069
+ 076
+ 078
+ 080
+ 085
+ 086
+
+ */
+
+#include "../wolfiphone.h"
+
+currentMap_t currentMap;
+
+vec3_t vnull = { 0, 0, 0 };
+
+int iphoneFrameNum;
+int intermissionTriggerFrame;
+int slowAIFrame;
+
+// console mode
+int consoleActive;
+
+// the native iPhone code should set the following each frame:
+int numTouches;
+int touches[5][2]; // [0] = x, [1] = y in landscape mode, raster order with y = 0 at top
+float tilt; // -1.0 to 1.0
+float tiltPitch;
+
+#define MAX_TILT_HISTORY 64
+float tiltHistory[MAX_TILT_HISTORY][4];
+int tiltHistoryNum;
+
+// so we can detect button releases
+int numPrevTouches;
+int prevTouches[5][2];
+
+
+// the layout drawing code sets these, which are then used
+// by the touch processing
+int fireButtonX, fireButtonY, fireButtonSize;
+int moveAxisX, moveAxisY, moveAxisSize;
+int turnAxisX, turnAxisY, turnAxisSize;
+
+texture_t *numberPics[10];
+
+int damageflash;
+int bonusFrameNum;
+int attackDirTime[2];
+
+/*
+ ==================
+ iphoneActivateConsole
+
+ ==================
+ */
+void iphoneActivateConsole() {
+ extern float scr_conlines;
+ scr_conlines = 0.5f;
+ consoleActive = 1;
+}
+
+/*
+ ==================
+ iphoneDeactivateConsole
+
+ ==================
+ */
+void iphoneDeactivateConsole() {
+ extern float scr_conlines;
+ scr_conlines = 0.0f;
+ consoleActive = 0;
+}
+
+/*
+ ==================
+ iphoneExecuteCommandLine
+
+ ==================
+ */
+void iphoneExecuteCommandLine() {
+ const char * GetCurrentCommandLine();
+ void SetCurrentCommandLine(const char *);
+ char buf[256];
+ strcpy( buf, GetCurrentCommandLine() );
+
+ Cmd_ExecuteString( buf );
+ SetCurrentCommandLine( "" );
+}
+
+
+
+/*
+ ==================
+ iphoneSavePrevTouches
+
+ ==================
+ */
+void iphoneSavePrevTouches() {
+ numPrevTouches = numTouches;
+ memcpy( prevTouches, touches, sizeof( prevTouches ) );
+#if 0
+ // display the touch locations
+ for ( int i = 0 ; i < numTouches ; i++ ) {
+ int w = 32;
+ iphoneDrawPic( touches[i][0] - w/2, touches[i][1] - w/2, w, w, "iphone/diractional_02.tga" );
+ }
+#endif
+}
+
+/*
+ ==================
+ iphoneCenterText
+
+ Returns the width in pixels
+ ==================
+ */
+extern font_t *myfonts[ 1 ];
+int iphoneCenterText( int x, int y, const char *str ) {
+ int l = strlen( str );
+ int i;
+ font_t *myfont = myfonts[0];
+ int scale;
+ int step = 10;
+
+ scale = 16;
+
+ x -= l * step / 2;
+
+ R_Bind( myfont->texfont->texnum );
+ pfglBegin( GL_QUADS );
+
+ for ( i = 0 ; i < l ; i++, x += step ) {
+ int row, col;
+ float frow, fcol;
+ int num = str[i];
+
+ if ( num == ' ' ) {
+ continue;
+ }
+
+ row = (num >> 4) - 2;
+ col = num & 15;
+
+ frow = row * myfont->hFrac;
+ fcol = col * myfont->wFrac;
+
+ pfglTexCoord2f( fcol, frow );
+ pfglVertex2i( x, y );
+
+ pfglTexCoord2f( fcol+myfont->wFrac, frow );
+ pfglVertex2i( x+scale, y );
+
+ pfglTexCoord2f( fcol+myfont->wFrac, frow+myfont->hFrac );
+ pfglVertex2i( x+scale, y+scale );
+
+ pfglTexCoord2f( fcol, frow+myfont->hFrac );
+ pfglVertex2i( x, y+scale );
+ }
+
+ pfglEnd();
+
+ return l * step;
+}
+
+
+/*
+ ==================
+ TouchDown
+
+ Checks all touches against a square
+ ==================
+ */
+int TouchDown( int x, int y, int w, int h ) {
+ int i;
+ for ( i = 0 ; i < numTouches ; i++ ) {
+ if ( touches[i][0] >= x && touches[i][1] >= y
+ && touches[i][0] < x + w && touches[i][1] < y + h ) {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+/*
+ ==================
+ TouchReleased
+
+ Perform an action when released in the box.
+ If not down this frame, but down the previous frame, it is released
+ ==================
+ */
+int TouchReleased( int x, int y, int w, int h ) {
+ int i;
+ int downPrev = 0;
+ int downNow = 0;
+
+ for ( i = 0 ; i < numPrevTouches ; i++ ) {
+ if ( prevTouches[i][0] >= x && prevTouches[i][1] >= y
+ && prevTouches[i][0] < x + w && prevTouches[i][1] < y + h ) {
+ downPrev = 1;
+ break;
+ }
+ }
+
+ // see if not down this frame
+ for ( i = 0 ; i < numTouches ; i++ ) {
+ if ( touches[i][0] >= x && touches[i][1] >= y
+ && touches[i][0] < x + w && touches[i][1] < y + h ) {
+ downNow = 1;
+ break;
+ }
+ }
+
+ if ( !downPrev ) {
+ if ( downNow ) {
+ Sound_StartLocalSound( "iphone/bdown_01.wav" );
+ }
+ // wasn't down the previous frame
+ return 0;
+ }
+
+ if ( downNow ) {
+ // still down
+ return 0;
+ }
+
+ if ( numTouches != 0 ) {
+ // finger dragged off
+ Sound_StartLocalSound( "iphone/baborted_01.wav" );
+ return 0;
+ }
+
+ // released
+ Sound_StartLocalSound( "iphone/baction_01.wav" );
+ return 1;
+}
+
+/*
+ ==================
+ iphoneSet2D
+
+ ==================
+ */
+void iphoneSet2D( void ) {
+ pfglViewport( 0,0, 480, 320 );
+ pfglMatrixMode( GL_MODELVIEW );
+ pfglLoadIdentity();
+ pfglDisable( GL_DEPTH_TEST );
+ pfglDisable( GL_CULL_FACE );
+ pfglEnable( GL_BLEND );
+ pfglBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
+ pfglDisable( GL_ALPHA_TEST );
+ pfglColor4f( 1,1,1,1 );
+
+ pfglMatrixMode( GL_PROJECTION );
+ pfglLoadIdentity();
+ pfglRotatef( 90, 0, 0, 1 );
+ pfglOrtho( 0, 480, 320, 0, -99999, 99999 );
+}
+
+
+/*
+ ==================
+ DeadBandAdjust
+
+ Compresses the 0.0 - 1.0 range into deadband - 1.0
+ ==================
+ */
+float DeadBandAdjust( float f, float deadBand ) {
+ if ( f < 0 ) {
+ return -DeadBandAdjust( -f, deadBand );
+ }
+ if ( f > 1.0 ) {
+ return 1.0;
+ }
+ if ( f < deadBand ) {
+ return 0;
+ }
+ return (f-deadBand) / (1.0 - deadBand);
+}
+
+/*
+==================
+AxisHit
+
+Returns a -1 to 1 range
+
+If activeFraction is less than 1.0, the range will clamp
+to the limits before the edge of the box is hit.
+==================
+*/
+float AxisHit( int x, int y, int size, int isXaxis, float activeFraction ) {
+ int i;
+
+ // allow the touches to go outside the indicated bounds with clamping
+ x -= size/2;
+ y -= size/2;
+ size *= 2;
+ activeFraction *= 0.5f;
+
+ for ( i = 0 ; i < numTouches ; i++ ) {
+ if ( touches[i][0] >= x && touches[i][1] >= y
+ && touches[i][0] < x + size && touches[i][1] < y + size ) {
+ float f;
+ if ( isXaxis ) {
+ f = (float)( touches[i][0] - x ) / size * 2.0f - 1.0f;
+ } else {
+ f = (float)( touches[i][1] - y ) / size * 2.0f - 1.0f;
+ }
+ f /= activeFraction;
+ if ( f > 1.0f ) {
+ f = 1.0f;
+ } else if ( f < -1.0f ) {
+ f = -1.0f;
+ }
+ if ( f > -stickDeadBand->value && f < stickDeadBand->value ) {
+ f = 0;
+ }
+ return f;
+ }
+ }
+ return 0;
+}
+
+void WolfensteinTouches( int _numTouches, int _touches[16] ) {
+ numTouches = _numTouches;
+ for ( int i = 0 ; i < numTouches ; i++ ) {
+ touches[i][0] = 480 - _touches[i*2+1];
+ touches[i][1] = _touches[i*2+0];
+ }
+}
+
+void WolfensteinTilts( float *tilts ) {
+ int i;
+ int j;
+ int c;
+ float sum[3];
+ static float prevTime;
+
+ c = tiltAverages->value;
+ if ( c < 1 ) {
+ c = 1;
+ } else if ( c > MAX_TILT_HISTORY ) {
+ c = MAX_TILT_HISTORY;
+ }
+
+ // acc[0] - [2] are accelerometer values, ax[3] is the timestamp
+ for ( i = 0 ; i < 3 ; i++ ) {
+ tiltHistory[tiltHistoryNum&(MAX_TILT_HISTORY-1)][i] = tilts[i];
+ sum[i] = 0;
+ for ( j = 0 ; j < c ; j++ ) {
+ sum[i] += tiltHistory[(tiltHistoryNum-j)&(MAX_TILT_HISTORY-1)][i];
+ }
+ sum[i] /= c;
+ }
+ // save the timestamp for analysis
+ tiltHistory[tiltHistoryNum&(MAX_TILT_HISTORY-1)][3] = tilts[3] - prevTime;
+ prevTime = tilts[3];
+ tiltHistoryNum++;
+
+ tilt = sum[1];
+ tiltPitch = sum[0];
+// Com_Printf( "%4.2f %4.2f %4.2f\n", tilts[0], tilts[1], tilts[2] );
+}
+
+void ShowTilt() {
+ int i;
+ int axis = (int)showTilt->value;
+ colour4_t fillColor = { 255, 0, 0, 255 };
+ colour4_t whiteColor = { 255, 255, 255, 255 };
+ colour4_t nowColor = { 0, 255, 0, 255 };
+ float x;
+
+ if ( axis < 0 || axis > 2 ) {
+ return;
+ }
+ for ( i = 0 ; i < MAX_TILT_HISTORY ; i++ ) {
+ x = tiltHistory[(tiltHistoryNum-1-i)&(MAX_TILT_HISTORY-1)][axis] * ( 10 / 0.018168604 );
+ if ( x < 0 ) {
+ R_Draw_Fill( 240 + x, i*4, -x, 4, fillColor );
+ } else if ( x > 0 ) {
+ R_Draw_Fill( 240, i*4, x, 4, fillColor );
+ }
+ }
+ x = tilt * ( 10 / 0.018168604 );
+ if ( x < 0 ) {
+ R_Draw_Fill( 240 + x, i*4, -x, 4, nowColor );
+ } else if ( x > 0 ) {
+ R_Draw_Fill( 240, i*4, x, 4, nowColor );
+ }
+ R_Draw_Fill( 240, 0, 1, MAX_TILT_HISTORY*4, whiteColor );
+}
+
+
+/*
+==================
+CreateIphoneUserCmd
+
+Build the movement, angles, and buttons for a frame of action:
+
+Player.position.angle
+Player.cmd.buttons
+Player.cmd.forwardMove
+Player.cmd.sideMove
+==================
+*/
+PRIVATE void CreateIphoneUserCmd()
+{
+ float stickTurnValue;
+ float stickMoveValue;
+
+ stickTurnValue = stickTurnBase->value + stickTurnScale->value * sensitivity->value;
+ stickMoveValue = stickMoveBase->value + stickMoveScale->value * sensitivity->value;
+
+ usercmd_t *cmd = &Player.cmd;
+ memset( cmd, 0, sizeof( *cmd ) );
+
+ if ( TouchDown( fireButtonX, fireButtonY, fireButtonSize, fireButtonSize ) ) {
+ cmd->buttons |= BUTTON_ATTACK;
+ }
+ if ( tiltFire->value > 0 && tiltPitch < tiltFire->value ) {
+ cmd->buttons |= BUTTON_ATTACK;
+ }
+
+ cmd->forwardmove = -stickMoveValue * AxisHit( moveAxisX, moveAxisY, moveAxisSize, 0, 0.8f );
+
+ if( controlScheme->value == 0 || controlScheme->value == 1 ) {
+ Player.position.angle += -stickTurnValue * AxisHit( moveAxisX, moveAxisY, moveAxisSize, 1, 0.8f );
+ } else {
+ Player.position.angle += -stickTurnValue * AxisHit( turnAxisX, turnAxisY, turnAxisSize, 1, 0.8f );
+ cmd->sidemove = stickMoveValue * AxisHit( moveAxisX, moveAxisY, moveAxisSize, 1, 0.8f );
+ }
+
+ // accelerometer tilting
+ cmd->sidemove += tiltMove->value * DeadBandAdjust( tilt, tiltDeadBand->value );
+ Player.position.angle -= tiltTurn->value * DeadBandAdjust( tilt, tiltDeadBand->value );
+
+ // always use
+ if ( iphoneFrameNum & 1 ) {
+ cmd->buttons |= BUTTON_USE;
+ }
+}
+
+
+/*
+==================
+iphoneHighlightPicWhenTouched
+
+Draw transparent except when touched
+=================
+*/
+void iphoneHighlightPicWhenTouched( int x, int y, int w, int h, const char *pic ) {
+ if ( TouchDown( x, y, w, h ) ) {
+ pfglColor4f(1,1,1,1);
+ } else {
+ pfglColor4f(1,1,1,0.5);
+ }
+ R_Draw_StretchPic( x, y, w, h, pic );
+ pfglColor4f(1,1,1,1);
+}
+int iphoneActivatePicWhenTouched( int x, int y, int w, int h, const char *pic ) {
+ iphoneHighlightPicWhenTouched( x, y, w, h, pic );
+ return TouchReleased( x, y, w, h );
+}
+
+
+/*
+==================
+iphoneDrawControls
+
+ scheme 0: turnstick on left
+ scheme 1: turnstick on right
+ scheme 2: dualstick, move on left
+ scheme 3: dualstick, move on right
+=================
+*/
+static const int BUTTON_SIZE = 100;
+void iphoneDrawControls( void ) {
+ int ss = (int)stickSize->value;
+
+ switch ( (int)controlScheme->value ) {
+ case 0:
+ moveAxisX = 0;
+ moveAxisY = 320 - ss;
+ moveAxisSize = ss;
+ iphoneHighlightPicWhenTouched( moveAxisX, moveAxisY, moveAxisSize, moveAxisSize, "iphone/diractional_02.tga" );
+
+ fireButtonX = 480 - BUTTON_SIZE;
+ fireButtonY = 320 - BUTTON_SIZE;
+ fireButtonSize = BUTTON_SIZE;
+ break;
+
+ case 1:
+ moveAxisX = 480 - ss;
+ moveAxisY = 320 - ss;
+ moveAxisSize = ss;
+ iphoneHighlightPicWhenTouched( moveAxisX, moveAxisY, moveAxisSize, moveAxisSize, "iphone/diractional_02.tga" );
+
+ fireButtonX = 0;
+ fireButtonY = 320 - BUTTON_SIZE;
+ fireButtonSize = BUTTON_SIZE;
+ break;
+
+ case 2:
+ moveAxisX = 0;
+ moveAxisY = 320 - ss;
+ moveAxisSize = ss;
+ iphoneHighlightPicWhenTouched( moveAxisX, moveAxisY, moveAxisSize, moveAxisSize, "iphone/diractional_01.tga" );
+
+ turnAxisX = 480 - ss;
+ turnAxisY = 320 - ss;
+ turnAxisSize = ss;
+ iphoneHighlightPicWhenTouched( turnAxisX, turnAxisY, turnAxisSize, turnAxisSize, "iphone/diractional_03.tga" );
+
+ fireButtonX = 480-BUTTON_SIZE;
+ fireButtonY = 0;
+ fireButtonSize = BUTTON_SIZE;
+ break;
+ case 3:
+ moveAxisX = 480 - ss;
+ moveAxisY = 320 - ss;
+ moveAxisSize = ss;
+ iphoneHighlightPicWhenTouched( moveAxisX, moveAxisY, moveAxisSize, moveAxisSize, "iphone/diractional_01.tga" );
+
+ turnAxisX = 0;
+ turnAxisY = 320 - ss;
+ turnAxisSize = ss;
+ iphoneHighlightPicWhenTouched( turnAxisX, turnAxisY, turnAxisSize, turnAxisSize, "iphone/diractional_03.tga" );
+
+ fireButtonX = 480-BUTTON_SIZE;
+ fireButtonY = 0;
+ fireButtonSize = BUTTON_SIZE;
+ break;
+ }
+
+ iphoneHighlightPicWhenTouched( fireButtonX, fireButtonY, fireButtonSize, fireButtonSize, "iphone/shoot.tga" );
+}
+
+/*
+ ==================
+ iphoneDrawWeapon
+
+ ==================
+ */
+void iphoneDrawWeapon( void ) {
+ char name[ 32 ];
+ texture_t *tex;
+ static int w = 200;
+ static int h = 200;
+ int x = (viddef.width - w ) >> 1;
+ int y = viddef.height - 80 - h;
+ int frame;
+
+ if ( gunFrame->value ) {
+ // screenshots look better with the muzzle flash
+ frame = Player.weapon * 5 + gunFrame->value + SPR_KNIFEREADY;
+ } else {
+ frame = Player.weapon * 5 + Player.weaponframe + SPR_KNIFEREADY;
+ }
+
+ my_snprintf( name, sizeof( name ), "%s/%d.tga", spritelocation, frame);
+ tex = TM_FindTexture( name, TT_Pic );
+
+ R_Bind( tex->texnum );
+
+ pfglBegin( GL_QUADS );
+
+ pfglTexCoord2f( 0.01f, 0.01f ); pfglVertex2i( x, y );
+ pfglTexCoord2f( 0.99f, 0.01f ); pfglVertex2i( x + w, y );
+ pfglTexCoord2f( 0.99f, 0.99f ); pfglVertex2i( x + w, y + h );
+ pfglTexCoord2f( 0.01f, 0.99f ); pfglVertex2i( x, y + h );
+
+ pfglEnd();
+}
+
+/*
+ ==================
+ iphoneDrawNumber
+
+ ==================
+ */
+void iphoneDrawNumber( int x, int y, int number, int charWidth, int charHeight ) {
+ texture_t *tex;
+ int i;
+ char string[ 20 ];
+ W32 length;
+ float charStep =...
[truncated message content] |
|
From: <piz...@us...> - 2010-06-28 11:04:00
|
Revision: 1288
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1288&view=rev
Author: pizza2004
Date: 2010-06-28 11:03:54 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
because
Removed Paths:
-------------
cgenius/trunk/src/sdl/iphone/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <piz...@us...> - 2010-06-28 11:02:45
|
Revision: 1287
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1287&view=rev
Author: pizza2004
Date: 2010-06-28 11:02:40 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
updating in svn, but it is weird.
Added Paths:
-----------
cgenius/trunk/src/sdl/iphone/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <piz...@us...> - 2010-06-28 11:01:12
|
Revision: 1286
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1286&view=rev
Author: pizza2004
Date: 2010-06-28 11:01:05 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
because
Removed Paths:
-------------
cgenius/trunk/src/sdl/iphone/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <piz...@us...> - 2010-06-28 10:58:12
|
Revision: 1285
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1285&view=rev
Author: pizza2004
Date: 2010-06-28 10:58:06 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
updating in svn, but it is weird.
Added Paths:
-----------
cgenius/trunk/src/sdl/iphone/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <piz...@us...> - 2010-06-28 10:40:48
|
Revision: 1284
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1284&view=rev
Author: pizza2004
Date: 2010-06-28 10:40:41 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
Updating SVN, but it is weird about it
Modified Paths:
--------------
cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj
Modified: cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj
===================================================================
--- cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj 2010-06-28 10:32:30 UTC (rev 1283)
+++ cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj 2010-06-28 10:40:41 UTC (rev 1284)
@@ -1974,7 +1974,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "#!/bin/sh\n\n# script taken from Pidgin-MacOSX project\n# by Albert Zeyer - www.az2000.de\n\n# builds a DMG for Commander Genius\n\n\n# Creates a disk image (dmg) on Mac OS X from the command line.\n# usage:\n# mkdmg <volname> <vers> <srcdir>\n#\n# Where <volname> is the name to use for the mounted image, <vers> is the version\n# number of the volume and <srcdir> is where the contents to put on the dmg are.\n#\n# The result will be a file called <volname>-<vers>.dmg\nDEBUG=\"false\"\n\nmkdmg() {\n\n\tif [ $# != 3 ]; then\n\t echo \"usage: mkdmg.sh volname vers srcdir\"\n\t exit 0\n\tfi\n\n\tVOL=\"$1\"\n\tVER=\"$2\"\n\tFILES=\"$3\"\n\n\tDMG=\"tmp-$VOL.dmg\"\n\n\t# create temporary disk image and format, ejecting when done\n\tSIZE=$(du -sk ${FILES} | cut -f 1)\n\tSIZE=$((${SIZE}/1000+5))\n\thdiutil create \"$DMG\" -megabytes ${SIZE} -ov -type UDIF -fs HFS+ -volname \"$VOL\"\n\n\t# mount and copy files onto volume\n\thdid \"$DMG\"\n\techo -n \"copying files ... \"\n\tcp -R \"${FILES}\"/* \"/Volumes/$VOL/\"\n\techo \"ready\"\n\thdiutil eject \"/Volumes/$VOL\"\n\t#osascript -e \"tell application \"Finder\" to eject disk \"$VOL\"\" && \n\n\t# convert to compressed image, delete temp image\n\trm -f \"cgenius-v${VER}-mac.dmg\"\n\thdiutil convert \"$DMG\" -format UDZO -o \"cgenius-v${VER}-mac.dmg\"\n\trm -f \"$DMG\"\n\n}\n\nif [ $DEBUG == \"false\" ]; then\n cd \"$(dirname \"$0\")/../../../../\"\n mkdmg CommanderGenius \"$(egrep -E \".*#define.*CGVERSION.*\" ../../version.h | cut -d \"\\\"\" -f 2)\" build/Release\nfi";
+ shellScript = "#!/bin/sh\n\n# script taken from Pidgin-MacOSX project\n# by Albert Zeyer - www.az2000.de\n\n# builds a DMG for Commander Genius\n\n\n# Creates a disk image (dmg) on Mac OS X from the command line.\n# usage:\n# mkdmg <volname> <vers> <srcdir>\n#\n# Where <volname> is the name to use for the mounted image, <vers> is the version\n# number of the volume and <srcdir> is where the contents to put on the dmg are.\n#\n# The result will be a file called <volname>-<vers>.dmg\nDEBUG=\"true\"\n\nmkdmg() {\n\n\tif [ $# != 3 ]; then\n\t echo \"usage: mkdmg.sh volname vers srcdir\"\n\t exit 0\n\tfi\n\n\tVOL=\"$1\"\n\tVER=\"$2\"\n\tFILES=\"$3\"\n\n\tDMG=\"tmp-$VOL.dmg\"\n\n\t# create temporary disk image and format, ejecting when done\n\tSIZE=$(du -sk ${FILES} | cut -f 1)\n\tSIZE=$((${SIZE}/1000+5))\n\thdiutil create \"$DMG\" -megabytes ${SIZE} -ov -type UDIF -fs HFS+ -volname \"$VOL\"\n\n\t# mount and copy files onto volume\n\thdid \"$DMG\"\n\techo -n \"copying files ... \"\n\tcp -R \"${FILES}\"/* \"/Volumes/$VOL/\"\n\techo \"ready\"\n\thdiutil eject \"/Volumes/$VOL\"\n\t#osascript -e \"tell application \"Finder\" to eject disk \"$VOL\"\" && \n\n\t# convert to compressed image, delete temp image\n\trm -f \"cgenius-v${VER}-mac.dmg\"\n\thdiutil convert \"$DMG\" -format UDZO -o \"cgenius-v${VER}-mac.dmg\"\n\trm -f \"$DMG\"\n\n}\n\nif [ $DEBUG == \"false\" ]; then\n cd \"$(dirname \"$0\")/../../../../\"\n mkdmg CommanderGenius \"$(egrep -E \".*#define.*CGVERSION.*\" ../../version.h | cut -d \"\\\"\" -f 2)\" build/Release\nfi";
};
/* End PBXShellScriptBuildPhase section */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <piz...@us...> - 2010-06-28 10:32:37
|
Revision: 1283
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1283&view=rev
Author: pizza2004
Date: 2010-06-28 10:32:30 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
Updating SVN, but it is weird about it
Modified Paths:
--------------
cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj
cgenius/trunk/changelog.txt
cgenius/trunk/cmake_install.cmake
cgenius/trunk/createReleases.sh
cgenius/trunk/createTestVersions.sh
cgenius/trunk/version.h
Modified: cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj
===================================================================
--- cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj 2010-06-26 00:44:32 UTC (rev 1282)
+++ cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj 2010-06-28 10:32:30 UTC (rev 1283)
@@ -517,7 +517,7 @@
63D4A718107FEC1100E43500 /* Copy Res Files */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
- dstPath = data/global/gfx;
+ dstPath = global/gfx;
dstSubfolderSpec = 7;
files = (
638890BF1162A490009810AC /* extratiles.bmp in Copy Res Files */,
@@ -1974,7 +1974,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "#!/bin/sh\n\n# script taken from Pidgin-MacOSX project\n# by Albert Zeyer - www.az2000.de\n\n# builds a DMG for Commander Genius\n\n\n# Creates a disk image (dmg) on Mac OS X from the command line.\n# usage:\n# mkdmg <volname> <vers> <srcdir>\n#\n# Where <volname> is the name to use for the mounted image, <vers> is the version\n# number of the volume and <srcdir> is where the contents to put on the dmg are.\n#\n# The result will be a file called <volname>-<vers>.dmg\nDEBUG=\"true\"\n\nmkdmg() {\n\n\tif [ $# != 3 ]; then\n\t echo \"usage: mkdmg.sh volname vers srcdir\"\n\t exit 0\n\tfi\n\n\tVOL=\"$1\"\n\tVER=\"$2\"\n\tFILES=\"$3\"\n\n\tDMG=\"tmp-$VOL.dmg\"\n\n\t# create temporary disk image and format, ejecting when done\n\tSIZE=$(du -sk ${FILES} | cut -f 1)\n\tSIZE=$((${SIZE}/1000+5))\n\thdiutil create \"$DMG\" -megabytes ${SIZE} -ov -type UDIF -fs HFS+ -volname \"$VOL\"\n\n\t# mount and copy files onto volume\n\thdid \"$DMG\"\n\techo -n \"copying files ... \"\n\tcp -R \"${FILES}\"/* \"/Volumes/$VOL/\"\n\techo \"ready\"\n\thdiutil eject \"/Volumes/$VOL\"\n\t#osascript -e \"tell application \"Finder\" to eject disk \"$VOL\"\" && \n\n\t# convert to compressed image, delete temp image\n\trm -f \"cgenius-v${VER}-mac.dmg\"\n\thdiutil convert \"$DMG\" -format UDZO -o \"cgenius-v${VER}-mac.dmg\"\n\trm -f \"$DMG\"\n\n}\n\nif [ $DEBUG == \"false\" ]; then\n cd \"$(dirname \"$0\")/../../../../\"\n mkdmg CommanderGenius \"$(egrep -E \".*#define.*CGVERSION.*\" ../../version.h | cut -d \"\\\"\" -f 2)\" build/Release\nfi";
+ shellScript = "#!/bin/sh\n\n# script taken from Pidgin-MacOSX project\n# by Albert Zeyer - www.az2000.de\n\n# builds a DMG for Commander Genius\n\n\n# Creates a disk image (dmg) on Mac OS X from the command line.\n# usage:\n# mkdmg <volname> <vers> <srcdir>\n#\n# Where <volname> is the name to use for the mounted image, <vers> is the version\n# number of the volume and <srcdir> is where the contents to put on the dmg are.\n#\n# The result will be a file called <volname>-<vers>.dmg\nDEBUG=\"false\"\n\nmkdmg() {\n\n\tif [ $# != 3 ]; then\n\t echo \"usage: mkdmg.sh volname vers srcdir\"\n\t exit 0\n\tfi\n\n\tVOL=\"$1\"\n\tVER=\"$2\"\n\tFILES=\"$3\"\n\n\tDMG=\"tmp-$VOL.dmg\"\n\n\t# create temporary disk image and format, ejecting when done\n\tSIZE=$(du -sk ${FILES} | cut -f 1)\n\tSIZE=$((${SIZE}/1000+5))\n\thdiutil create \"$DMG\" -megabytes ${SIZE} -ov -type UDIF -fs HFS+ -volname \"$VOL\"\n\n\t# mount and copy files onto volume\n\thdid \"$DMG\"\n\techo -n \"copying files ... \"\n\tcp -R \"${FILES}\"/* \"/Volumes/$VOL/\"\n\techo \"ready\"\n\thdiutil eject \"/Volumes/$VOL\"\n\t#osascript -e \"tell application \"Finder\" to eject disk \"$VOL\"\" && \n\n\t# convert to compressed image, delete temp image\n\trm -f \"cgenius-v${VER}-mac.dmg\"\n\thdiutil convert \"$DMG\" -format UDZO -o \"cgenius-v${VER}-mac.dmg\"\n\trm -f \"$DMG\"\n\n}\n\nif [ $DEBUG == \"false\" ]; then\n cd \"$(dirname \"$0\")/../../../../\"\n mkdmg CommanderGenius \"$(egrep -E \".*#define.*CGVERSION.*\" ../../version.h | cut -d \"\\\"\" -f 2)\" build/Release\nfi";
};
/* End PBXShellScriptBuildPhase section */
@@ -2189,6 +2189,7 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREFIX_HEADER = "";
+ GCC_VERSION = "";
HEADER_SEARCH_PATHS = (
/Library/Frameworks/SDL.framework/Headers,
"\"$(SRCROOT)\"/Vorbis.framework/Headers",
@@ -2201,6 +2202,7 @@
"-DOGG",
);
PRODUCT_NAME = "Commander Genius";
+ SDKROOT = macosx10.5;
};
name = Debug;
};
@@ -2218,6 +2220,7 @@
);
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREFIX_HEADER = "";
+ GCC_VERSION = "";
HEADER_SEARCH_PATHS = (
/Library/Frameworks/SDL.framework/Headers,
"\"$(SRCROOT)\"/Vorbis.framework/Headers",
@@ -2245,6 +2248,7 @@
GCC_C_LANGUAGE_STANDARD = c99;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_VERSION = "";
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "Commander Genius";
SDKROOT = macosx10.5;
@@ -2257,7 +2261,9 @@
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_VERSION = "";
MACOSX_DEPLOYMENT_TARGET = 10.3;
+ ONLY_ACTIVE_ARCH = NO;
SDKROOT = macosx10.5;
SEPARATE_STRIP = YES;
};
Modified: cgenius/trunk/changelog.txt
===================================================================
--- cgenius/trunk/changelog.txt 2010-06-26 00:44:32 UTC (rev 1282)
+++ cgenius/trunk/changelog.txt 2010-06-28 10:32:30 UTC (rev 1283)
@@ -1,7 +1,7 @@
Commander Genius Release :
==========================
-v0.3.1.4:
+v0.3.2:
---------
- Faster Game loads!
- Other segfault fixes!!
Modified: cgenius/trunk/cmake_install.cmake
===================================================================
--- cgenius/trunk/cmake_install.cmake 2010-06-26 00:44:32 UTC (rev 1282)
+++ cgenius/trunk/cmake_install.cmake 2010-06-28 10:32:30 UTC (rev 1283)
@@ -1,4 +1,4 @@
-# Install script for directory: /home/gerstrong/projects/CommanderGenius
+# Install script for directory: /home/gerstrong/workspace/clonekeenplus
# Set the install prefix
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
@@ -12,7 +12,7 @@
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
ELSE(BUILD_TYPE)
- SET(CMAKE_INSTALL_CONFIG_NAME "Debug")
+ SET(CMAKE_INSTALL_CONFIG_NAME "Release")
ENDIF(BUILD_TYPE)
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
@@ -38,7 +38,7 @@
SET(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
ENDIF(CMAKE_INSTALL_COMPONENT)
-FILE(WRITE "/home/gerstrong/projects/CommanderGenius/${CMAKE_INSTALL_MANIFEST}" "")
+FILE(WRITE "/home/gerstrong/workspace/clonekeenplus/${CMAKE_INSTALL_MANIFEST}" "")
FOREACH(file ${CMAKE_INSTALL_MANIFEST_FILES})
- FILE(APPEND "/home/gerstrong/projects/CommanderGenius/${CMAKE_INSTALL_MANIFEST}" "${file}\n")
+ FILE(APPEND "/home/gerstrong/workspace/clonekeenplus/${CMAKE_INSTALL_MANIFEST}" "${file}\n")
ENDFOREACH(file)
Modified: cgenius/trunk/createReleases.sh
===================================================================
--- cgenius/trunk/createReleases.sh 2010-06-26 00:44:32 UTC (rev 1282)
+++ cgenius/trunk/createReleases.sh 2010-06-28 10:32:30 UTC (rev 1283)
@@ -1,17 +1,14 @@
#!/bin/sh
-
NAME=cgenius
-VERSION=0313
+VERSION=032
-# extract the data getting rid of .svn
-svn export vfsroot vfsrootnonsvn
-
# Windows Version
cp build/Win32/CGenius.exe ./CGenius.exe
-cd vfsrootnonsvn
-zip -r ../${NAME}-v${VERSION}-win32.zip ./
+cd vfsroot
+git archive -o ../${NAME}-v${VERSION}-win32.zip HEAD
cd ..
+
zip ${NAME}-v${VERSION}-win32.zip ./libogg-0.dll
zip ${NAME}-v${VERSION}-win32.zip ./libogg-0.dll
zip ${NAME}-v${VERSION}-win32.zip ./libvorbis-0.dll
@@ -27,9 +24,10 @@
cp build/Linux64/CGenius ./CGenius
cp build/Linux64/CGenius ./distro/Ubuntu/usr/games
-cd vfsrootnonsvn
-zip -r ../${NAME}-v${VERSION}-linux64.zip ./
+cd vfsroot
+git archive -o ../${NAME}-v${VERSION}-linux64.zip HEAD
cd ..
+
zip ${NAME}-v${VERSION}-linux64.zip ./CGenius
zip ${NAME}-v${VERSION}-linux64.zip ./changelog.txt
zip ${NAME}-v${VERSION}-linux64.zip ./readme.txt
@@ -45,10 +43,10 @@
cp build/Linux32/CGenius ./CGenius
cp build/Linux32/CGenius ./distro/Ubuntu/usr/games
+cd vfsroot
+git archive -o ../${NAME}-v${VERSION}-linux32.zip HEAD
cd ..
-cd vfsrootnonsvn
-zip -r ../${NAME}-v${VERSION}-linux32.zip ./
-cd ..
+
zip ${NAME}-v${VERSION}-linux32.zip ./CGenius
zip ${NAME}-v${VERSION}-linux32.zip ./changelog.txt
zip ${NAME}-v${VERSION}-linux32.zip ./readme.txt
@@ -60,9 +58,9 @@
cd ..
mv distro/CGenius_i386.deb ${NAME}-v${VERSION}-i386.deb
-rm -r vfsrootnonsvn
-
# upload the packages
-#rsync -e ssh ${NAME}-v${VERSION}-win32.zip gerstrong,clo...@fr...:/home/frs/project/c/cl/clonekeenplus/
-#rsync -e ssh C${NAME}-v${VERSION}-linux32.zip gerstrong,clo...@fr...:/home/frs/project/c/cl/clonekeenplus/
-#rsync -e ssh ${NAME}-v${VERSION}-linux64.zip gerstrong,clo...@fr...:/home/frs/project/c/cl/clonekeenplus/
+#rsync -e ssh ${NAME}-v${VERSION}-win32.zip gerstrong,clo...@fr...:/home/frs/#project/c/cl/clonekeenplus/
+#rsync -e ssh C${NAME}-v${VERSION}-linux32.zip gerstrong,clo...@fr...:/home/#frs/project/c/cl/clonekeenplus/
+#rsync -e ssh ${NAME}-v${VERSION}-linux64.zip gerstrong,clo...@fr...:/home/#frs/project/c/cl/clonekeenplus/
+#rsync -e ssh ${NAME}-v${VERSION}-i386.deb gerstrong,clo...@fr...:/home/frs/#project/c/cl/clonekeenplus/
+#rsync -e ssh ${NAME}-v${VERSION}-x64.deb gerstrong,clo...@fr...:/home/frs/#project/c/cl/clonekeenplus/
Modified: cgenius/trunk/createTestVersions.sh
===================================================================
--- cgenius/trunk/createTestVersions.sh 2010-06-26 00:44:32 UTC (rev 1282)
+++ cgenius/trunk/createTestVersions.sh 2010-06-28 10:32:30 UTC (rev 1283)
@@ -3,15 +3,13 @@
# put date on the filename
dt=`date +%b%d%y-%H%M`
-# extract the data getting rid of .svn
-svn export vfsroot vfsrootnonsvn
-
# Windows Version
cp build/Win32/CGenius.exe ./CGenius.exe
-cd vfsrootnonsvn
-zip -r ../CG-SVN-${dt}-win32.zip ./
+cd vfsroot
+git archive -o ../CG-SVN-${dt}-win32.zip HEAD
cd ..
+
zip CG-SVN-${dt}-win32.zip ./libogg-0.dll
zip CG-SVN-${dt}-win32.zip ./libogg-0.dll
zip CG-SVN-${dt}-win32.zip ./libvorbis-0.dll
@@ -27,9 +25,10 @@
cp build/Linux64/CGenius ./CGenius
cp build/Linux64/CGenius ./distro/Ubuntu/usr/games
-cd vfsrootnonsvn
-zip -r ../CG-SVN-${dt}-linux64.zip ./
+cd vfsroot
+git archive -o ../CG-SVN-${dt}-linux64.zip HEAD
cd ..
+
zip CG-SVN-${dt}-linux64.zip ./CGenius
zip CG-SVN-${dt}-linux64.zip ./changelog.txt
zip CG-SVN-${dt}-linux64.zip ./readme.txt
@@ -45,9 +44,10 @@
cp build/Linux32/CGenius ./CGenius
cp build/Linux32/CGenius ./distro/Ubuntu/usr/games
-cd vfsrootnonsvn
-zip -r ../CG-SVN-${dt}-linux32.zip ./
+cd vfsroot
+git archive -o ../CG-SVN-${dt}-linux32.zip HEAD
cd ..
+
zip CG-SVN-${dt}-linux32.zip ./CGenius
zip CG-SVN-${dt}-linux32.zip ./changelog.txt
zip CG-SVN-${dt}-linux32.zip ./readme.txt
@@ -59,9 +59,9 @@
cd ..
mv distro/CGenius_i386.deb CG-SVN-${dt}-i386.deb
-rm -r vfsrootnonsvn
-
# upload the packages
#rsync -e ssh CG-SVN-${dt}-win32.zip gerstrong,clo...@fr...:/home/frs/project/c/cl/clonekeenplus/
#rsync -e ssh CCG-SVN-${dt}-linux32.zip gerstrong,clo...@fr...:/home/frs/project/c/cl/clonekeenplus/
#rsync -e ssh CG-SVN-${dt}-linux64.zip gerstrong,clo...@fr...:/home/frs/project/c/cl/clonekeenplus/
+#rsync -e ssh CG-SVN-${dt}-i386.deb gerstrong,clo...@fr...:/home/frs/project/c/cl/clonekeenplus/
+#rsync -e ssh CG-SVN-${dt}-x64.deb gerstrong,clo...@fr...:/home/frs/project/c/cl/clonekeenplus/
Modified: cgenius/trunk/version.h
===================================================================
--- cgenius/trunk/version.h 2010-06-26 00:44:32 UTC (rev 1282)
+++ cgenius/trunk/version.h 2010-06-28 10:32:30 UTC (rev 1283)
@@ -1,7 +1,7 @@
#ifndef __CG__VERSION_H__
#define __CG__VERSION_H__
-#define CGVERSION "032"
+#define CGVERSION "0.3.2"
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <piz...@us...> - 2010-06-26 00:44:38
|
Revision: 1282
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1282&view=rev
Author: pizza2004
Date: 2010-06-26 00:44:32 +0000 (Sat, 26 Jun 2010)
Log Message:
-----------
changing the version
Modified Paths:
--------------
cgenius/trunk/version.h
Modified: cgenius/trunk/version.h
===================================================================
--- cgenius/trunk/version.h 2010-06-25 20:05:07 UTC (rev 1281)
+++ cgenius/trunk/version.h 2010-06-26 00:44:32 UTC (rev 1282)
@@ -1,7 +1,7 @@
#ifndef __CG__VERSION_H__
#define __CG__VERSION_H__
-#define CGVERSION "0314"
+#define CGVERSION "032"
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <piz...@us...> - 2010-06-25 20:05:13
|
Revision: 1281
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1281&view=rev
Author: pizza2004
Date: 2010-06-25 20:05:07 +0000 (Fri, 25 Jun 2010)
Log Message:
-----------
I added tank.h to the repository
Modified Paths:
--------------
cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj
Modified: cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj
===================================================================
--- cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj 2010-06-25 07:03:20 UTC (rev 1280)
+++ cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj 2010-06-25 20:05:07 UTC (rev 1281)
@@ -638,6 +638,7 @@
638890BE1162A490009810AC /* extratiles.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = extratiles.bmp; sourceTree = "<group>"; };
63999E3910D151BA00EDB6CD /* fonts.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = fonts.bmp; sourceTree = "<group>"; };
63AB8C2E107C62D0001EE22F /* cglogo.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = cglogo.icns; sourceTree = "<group>"; };
+ 63C446DD11D53C6400606CF6 /* tank.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tank.h; sourceTree = "<group>"; };
63CB71F511D339BC0069EAC6 /* CK1PATCH.EXE */ = {isa = PBXFileReference; lastKnownFileType = file; path = CK1PATCH.EXE; sourceTree = "<group>"; };
63CB71F611D339BC0069EAC6 /* EGAHEAD.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = EGAHEAD.CK1; sourceTree = "<group>"; };
63CB71F711D339BC0069EAC6 /* EGALATCH.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = EGALATCH.CK1; sourceTree = "<group>"; };
@@ -1567,6 +1568,7 @@
63CD113511CFF5FB00F60BC8 /* ai */ = {
isa = PBXGroup;
children = (
+ 63C446DD11D53C6400606CF6 /* tank.h */,
63CD113611CFF5FB00F60BC8 /* autoray.cpp */,
63CD113711CFF5FB00F60BC8 /* baby.cpp */,
63CD113811CFF5FB00F60BC8 /* balljack.cpp */,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ger...@us...> - 2010-06-25 07:03:27
|
Revision: 1280
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1280&view=rev
Author: gerstrong
Date: 2010-06-25 07:03:20 +0000 (Fri, 25 Jun 2010)
Log Message:
-----------
- Small updates on the OpenGL code
- Added tank.h
Modified Paths:
--------------
cgenius/trunk/src/engine/vorticon/ai/ray.cpp
cgenius/trunk/src/sdl/COpenGL.cpp
cgenius/trunk/src/sdl/COpenGL.h
cgenius/trunk/src/sdl/CVideoDriver.cpp
Added Paths:
-----------
cgenius/trunk/src/engine/vorticon/ai/tank.h
Modified: cgenius/trunk/src/engine/vorticon/ai/ray.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/ai/ray.cpp 2010-06-25 06:15:33 UTC (rev 1279)
+++ cgenius/trunk/src/engine/vorticon/ai/ray.cpp 2010-06-25 07:03:20 UTC (rev 1280)
@@ -13,7 +13,6 @@
int hitlethal;
int rayspeed;
CSprite &raysprite = g_pGfxEngine->getSprite(object.sprite);
- std::vector<CObject>::iterator it_obj;
if (object.needinit)
{
object.ai.ray.state = RAY_STATE_FLY;
@@ -38,9 +37,11 @@
int y = object.getYPosition();
std::vector<CTileProperties> &TileProperties = g_pBehaviorEngine->getTileProperties();
+ std::vector<CObject>::iterator it_obj;
switch(object.ai.ray.state)
{
case RAY_STATE_FLY:
+
// test if it hit a baddie. I hate that code! TODO: think about a way to reduce this
for( it_obj = m_Objvect.begin() ; it_obj!=m_Objvect.end() ; it_obj++)
{
Added: cgenius/trunk/src/engine/vorticon/ai/tank.h
===================================================================
--- cgenius/trunk/src/engine/vorticon/ai/tank.h (rev 0)
+++ cgenius/trunk/src/engine/vorticon/ai/tank.h 2010-06-25 07:03:20 UTC (rev 1280)
@@ -0,0 +1,46 @@
+/*
+ * tankep2.h
+ *
+ * Created on: 25.06.2010
+ * Author: gerstrong
+ */
+
+#ifndef TANKEP2_H_
+#define TANKEP2_H_
+
+
+#define OBJ_TANKEP2_DEFSPRITE 112
+#define OBJ_TANK_DEFSPRITE 98
+
+// this same struct is used for both ep1 and ep2 "tanks", although
+// they have seperate ai modules
+typedef struct stTankData
+{
+ // Tank Robot (Ep2 and (ep1))
+ enum{ TANK_WALK,TANK_TURN,TANK_WAIT,TANK_WAIT_LOOK,TANK_FIRE,TANK_LOOK
+ } state;
+
+ unsigned int timer,animtimer;
+ unsigned char frame;
+ unsigned int dist_to_travel;
+
+ unsigned char movedir;
+
+ unsigned int ponsameleveltime;
+ unsigned char alreadyfiredcauseonsamelevel;
+ unsigned char fireafterlook;
+
+ bool detectedPlayer; // true if player on same level
+ unsigned char detectedPlayerIndex; // index of player that was detected
+
+ // for tank2
+ unsigned int timetillnextshot;
+ unsigned int firetimes;
+ unsigned int timetillcanfire;
+ unsigned int timetillcanfirecauseonsamelevel;
+ unsigned int turnaroundtimer;
+ int pausetime;
+} stTankData;
+
+
+#endif /* TANKEP2_H_ */
Property changes on: cgenius/trunk/src/engine/vorticon/ai/tank.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: cgenius/trunk/src/sdl/COpenGL.cpp
===================================================================
--- cgenius/trunk/src/sdl/COpenGL.cpp 2010-06-25 06:15:33 UTC (rev 1279)
+++ cgenius/trunk/src/sdl/COpenGL.cpp 2010-06-25 07:03:20 UTC (rev 1280)
@@ -12,58 +12,50 @@
// gamerect is the base resolution for the game which is scaled with the filter
// depending on what resolution has been chosen, it is mostly 320x200 or 320x240
-COpenGL::COpenGL(SDL_Rect &gamestdrect) :
+COpenGL::COpenGL(float Width, float Height, unsigned char Depth,
+ unsigned char scalex,SDL_Rect &gamestdrect) :
m_blitsurface(NULL),
-m_Depth(4), // 32-bit colour depth is default
+m_opengl_buffer(NULL),
+m_Width(Width),
+m_Height(Height),
+m_Depth(Depth),
+m_ScaleX(scalex),
+m_texparam(GL_TEXTURE_2D),
+m_aspectratio(Width/Height),
m_GameStdRect(gamestdrect)
-{ }
+{}
-bool COpenGL::initGL(float Width, float Height, unsigned char Depth,
- GLint oglfilter, unsigned char scalex, float aspect)
+static void createTexture(GLuint& tex, int oglfilter, bool withAlpha = false) {
+ glGenTextures(1, &tex);
+ glBindTexture(GL_TEXTURE_2D, tex);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, oglfilter);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, oglfilter);
+
+ glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+
+ if(withAlpha)
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 512, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ else
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 512, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
+}
+
+bool COpenGL::initGL(GLint oglfilter, float aspect)
{
- m_Depth = Depth;
- m_ScaleX = scalex;
- m_aspectratio = Width/Height;
- //m_texparam = GL_TEXTURE_RECTANGLE_ARB;
- m_texparam = GL_TEXTURE_2D;
-
// Set the proper resolution for OpenGL. Very important, when user changes the resolution
- /*if(aspect == 4.0f/3.0f)
+ if(aspect == 8.0f/5.0f)
{
- if(m_aspectratio < 4.0f/3.0f)
- glViewport(0,(Height-((Width/320)*240))/2,Width, (Width/320)*240);
- else if(m_aspectratio > 3.0f/2.0f)
- glViewport((Width-((Height/240)*320))/2,0, (Height/240)*320, Height);
- else
- glViewport(0,0,Width, Height);
- }
- else if(aspect == 3.0f/2.0f)
- {
- if(m_aspectratio < 3.0f/3.0f)
- glViewport(0,(Height-((Width/720)*480))/2,Width, (Width/720)*480);
- else if(m_aspectratio > 3.0f/2.0f)
- glViewport((Width-((Height/480)*720))/2,0, (Height/480)*720, Height);
- else
- glViewport(0,0,Width, Height);
- }
- else */if(aspect == 8.0f/5.0f)
- {
if(m_aspectratio < 8.0f/5.0f)
- glViewport(0,(Height-((Width/320)*200))/2,Width, (Width/320)*200);
+ glViewport(0,(m_Height-((m_Width/320)*200))/2,m_Width, (m_Width/320)*200);
else if(m_aspectratio > 8.0f/5.0f)
- glViewport((Width-((Height/200)*320))/2,0, (Height/200)*320, Height);
+ glViewport((m_Width-((m_Height/200)*320))/2,0, (m_Height/200)*320, m_Height);
else
- glViewport(0,0,Width, Height);
+ glViewport(0,0,m_Width, m_Height);
}
- /*else if(aspect == 16.0f/9.0f)
- {
- if(m_aspectratio < 16.0f/9.0f)
- glViewport(0,(Height-((Width/320)*180))/2,Width, (Width/320)*180);
- else if(m_aspectratio > 16.0f/9.0f)
- glViewport((Width-((Height/180)*320))/2,0, (Height/180)*320, Height);
- else
- glViewport(0,0,Width, Height);
- }*/
// Set clear colour
glClearColor(0,0,0,0);
@@ -78,31 +70,6 @@
glLoadIdentity();
// Enable Texture loading for the blit screen
- /* uint textureID;
-
- glEnable (GL_TEXTURE_2D);
- glGenTextures(1, &textureID);
- glBindTexture(GL_TEXTURE_RECTANGLE_ARB, textureID);
- //glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- */
-
- /*Using the standard OpenGL API for specifying a 2D texture
- image: glTexImage2D, glSubTexImage2D, glCopyTexImage2D,
- and glCopySubTexImage2D. The target for these commands is
- GL_TEXTURE_RECTANGLE_ARB though.
-
- This is similar to how the texture cube map functionality uses the 2D
- texture image specification API though with its own texture target.
-
- The texture target GL_TEXTURE_RECTANGLE_ARB should also
- be used for glGetTexImage, glGetTexLevelParameteriv, and
- glGetTexLevelParameterfv.*/
-
-
glEnable (m_texparam);
glBindTexture(m_texparam, 1);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
@@ -117,8 +84,8 @@
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
- if(scalex > 1)
- m_opengl_buffer = new char[m_GameStdRect.h*m_GameStdRect.w*scalex*Depth];
+ if(m_ScaleX > 1)
+ m_opengl_buffer = new char[m_GameStdRect.h*m_GameStdRect.w*m_ScaleX*m_Depth];
else
m_opengl_buffer = NULL;
@@ -150,29 +117,35 @@
if(m_ScaleX == 2) //Scale 2x
{
- scale(2, m_opengl_buffer, (m_GameStdRect.w<<1)<<2, m_blitsurface->pixels,
- m_GameStdRect.w<<2, 4, m_GameStdRect.w, m_GameStdRect.h);
+
+ //unsigned m_dst_slice = m_Width*m_blitsurface->format->BytesPerPixel;
+ unsigned m_dst_slice = m_GameStdRect.w*2*m_blitsurface->format->BytesPerPixel;
+ unsigned m_src_slice = m_GameStdRect.w*m_blitsurface->format->BytesPerPixel;
+
+ scale(m_ScaleX, m_opengl_buffer, m_dst_slice, m_blitsurface->pixels,
+ m_src_slice, m_blitsurface->format->BytesPerPixel,
+ m_GameStdRect.w, m_GameStdRect.h);
glTexImage2D(m_texparam, 0, GL_RGBA, m_GameStdRect.w<<1, m_GameStdRect.h<<1, 0, GL_BGRA, GL_UNSIGNED_BYTE, m_opengl_buffer);
- //glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, GAME_STD_WIDTH<<1, m_GameStdRect.h<<1, 0, GL_BGRA, GL_UNSIGNED_BYTE, m_opengl_buffer);
- //glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA8, GAME_STD_WIDTH<<1, m_GameStdRect.h<<1, 0, GL_BGRA, GL_UNSIGNED_BYTE, m_opengl_buffer);
}
else if(m_ScaleX == 3) //Scale 3x
{
- scale(3, m_opengl_buffer, (m_GameStdRect.w*3)<<2, m_blitsurface->pixels,
+ scale(m_ScaleX, m_opengl_buffer, (m_GameStdRect.w*3)<<2, m_blitsurface->pixels,
m_GameStdRect.w<<2, 4, m_GameStdRect.w, m_GameStdRect.h);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_GameStdRect.w*3, m_GameStdRect.h*3, 0, GL_BGRA, GL_UNSIGNED_BYTE, m_opengl_buffer);
}
else if(m_ScaleX == 4) //Scale 4x
{
- scale(4, m_opengl_buffer, (m_GameStdRect.w<<2)<<2, m_blitsurface->pixels,
+ scale(m_ScaleX, m_opengl_buffer, (m_GameStdRect.w<<2)<<2, m_blitsurface->pixels,
m_GameStdRect.w<<2, 4, m_GameStdRect.w, m_GameStdRect.h);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_GameStdRect.w<<2, m_GameStdRect.h<<2, 0, GL_BGRA, GL_UNSIGNED_BYTE, m_opengl_buffer);
}
else
+ {
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_GameStdRect.w, m_GameStdRect.h, 0, GL_BGRA, GL_UNSIGNED_BYTE, m_blitsurface->pixels);
+ }
glBindTexture (GL_TEXTURE_2D, 1);
Modified: cgenius/trunk/src/sdl/COpenGL.h
===================================================================
--- cgenius/trunk/src/sdl/COpenGL.h 2010-06-25 06:15:33 UTC (rev 1279)
+++ cgenius/trunk/src/sdl/COpenGL.h 2010-06-25 07:03:20 UTC (rev 1280)
@@ -18,11 +18,11 @@
class COpenGL {
public:
- COpenGL(SDL_Rect &gamestdrect);
+ COpenGL(float Width, float Height, unsigned char Depth,
+ unsigned char scalex,SDL_Rect &gamestdrect);
void render();
- bool initGL(float Width, float Height, unsigned char Depth,
- GLint oglfilter, unsigned char scalex, float aspect);
+ bool initGL(GLint oglfilter, float aspect);
void setSurface(SDL_Surface *blitsurface);
@@ -31,6 +31,8 @@
private:
SDL_Surface *m_blitsurface;
char* m_opengl_buffer; // Used for internal ScaleX filtering
+ unsigned short m_Width;
+ unsigned short m_Height;
unsigned char m_Depth;
unsigned char m_ScaleX;
unsigned int m_texparam;
Modified: cgenius/trunk/src/sdl/CVideoDriver.cpp
===================================================================
--- cgenius/trunk/src/sdl/CVideoDriver.cpp 2010-06-25 06:15:33 UTC (rev 1279)
+++ cgenius/trunk/src/sdl/CVideoDriver.cpp 2010-06-25 07:03:20 UTC (rev 1280)
@@ -291,9 +291,10 @@
#ifdef USE_OPENGL
if(m_opengl) // If OpenGL could be set, initialize the matrices
{
- mp_OpenGL = new COpenGL(game_resolution_rect);
- if(!(mp_OpenGL->initGL(m_Resolution.width, m_Resolution.height, m_Resolution.depth,
- m_opengl_filter, m_ScaleXFilter, m_aspect_ratio)))
+ mp_OpenGL = new COpenGL(m_Resolution.width, m_Resolution.height, m_Resolution.depth,
+ m_ScaleXFilter, game_resolution_rect);
+
+ if(!(mp_OpenGL->initGL(m_opengl_filter, m_aspect_ratio)))
{
delete mp_OpenGL;
mp_OpenGL = NULL;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ger...@us...> - 2010-06-25 06:15:40
|
Revision: 1279
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1279&view=rev
Author: gerstrong
Date: 2010-06-25 06:15:33 +0000 (Fri, 25 Jun 2010)
Log Message:
-----------
declared a static member in the object class, so the automatic indexing is automatic and makes less trouble.
Modified Paths:
--------------
cgenius/trunk/src/common/CObject.cpp
cgenius/trunk/src/common/CObject.h
cgenius/trunk/src/common/CPlayer.cpp
cgenius/trunk/src/common/CPlayer.h
cgenius/trunk/src/common/CPlayerLevel.cpp
cgenius/trunk/src/engine/spritedefines.h
cgenius/trunk/src/engine/vorticon/ai/autoray.cpp
cgenius/trunk/src/engine/vorticon/ai/enemydata.h
cgenius/trunk/src/engine/vorticon/ai/mother.cpp
cgenius/trunk/src/engine/vorticon/ai/se.cpp
cgenius/trunk/src/engine/vorticon/ai/tank.cpp
cgenius/trunk/src/engine/vorticon/ai/tankep2.cpp
cgenius/trunk/src/engine/vorticon/ai/vortelite.cpp
cgenius/trunk/src/engine/vorticon/finale/CShipFlySys.cpp
cgenius/trunk/src/engine/vorticon/finale/CTantalusRay.cpp
cgenius/trunk/src/engine/vorticon/playgame/CPlayGameGameState.cpp
cgenius/trunk/src/engine/vorticon/playgame/CPlayGameVorticon.cpp
Modified: cgenius/trunk/src/common/CObject.cpp
===================================================================
--- cgenius/trunk/src/common/CObject.cpp 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/common/CObject.cpp 2010-06-25 06:15:33 UTC (rev 1279)
@@ -12,14 +12,17 @@
#include "../keen.h"
#include <string.h>
+unsigned int CObject::m_number_of_objects = 0; // The current number of total objects we have within the game!
+
///
// Initialization Routine
///
-CObject::CObject(CMap *pmap, int index) :
-m_index(index),
+CObject::CObject(CMap *pmap) :
+m_index(m_number_of_objects),
mp_object(NULL),
mp_Map(pmap)
{
+ m_number_of_objects++;
honorPriority = false;
exists = false;
sprite=BLANKSPRITE;
@@ -760,5 +763,9 @@
// Cleanup Routine
///
CObject::~CObject() {
+ m_number_of_objects--;
+
+ if(m_number_of_objects < 0)
+ g_pLogFile->textOut("Something went wrong here! More objects were deleted than created!<br>\n");
}
Modified: cgenius/trunk/src/common/CObject.h
===================================================================
--- cgenius/trunk/src/common/CObject.h 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/common/CObject.h 2010-06-25 06:15:33 UTC (rev 1279)
@@ -44,7 +44,7 @@
class CObject {
public:
- CObject(CMap *pmap=NULL, int index=0);
+ CObject(CMap *pmap=NULL);
object_t m_type; // yorp, vorticon, etc.
unsigned int m_index; // Like an ID for some objects that need this implementation
@@ -178,6 +178,7 @@
private:
CMap *mp_Map;
+ static unsigned int m_number_of_objects;
};
#endif /* COBJECT_H_ */
Modified: cgenius/trunk/src/common/CPlayer.cpp
===================================================================
--- cgenius/trunk/src/common/CPlayer.cpp 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/common/CPlayer.cpp 2010-06-25 06:15:33 UTC (rev 1279)
@@ -26,9 +26,9 @@
// Initialization Part
///
CPlayer::CPlayer(const char &Episode, short &Level, char &Difficulty,
- short player_index, bool *mp_level_completed, stOption *mp_option,
+ bool *mp_level_completed, stOption *mp_option,
std::vector<CObject> &m_Object, CMap &map) :
-CObject(&map, player_index),
+CObject(&map),
m_episode(Episode),
m_level(Level),
m_difficulty(Difficulty),
Modified: cgenius/trunk/src/common/CPlayer.h
===================================================================
--- cgenius/trunk/src/common/CPlayer.h 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/common/CPlayer.h 2010-06-25 06:15:33 UTC (rev 1279)
@@ -34,7 +34,7 @@
};
CPlayer(const char &Episode, short &Level, char &Difficulty,
- short player_index, bool *mp_level_completed, stOption *mp_option,
+ bool *mp_level_completed, stOption *mp_option,
std::vector<CObject> &m_Object, CMap &map);
void setDatatoZero();
void setDefaultStartValues();
Modified: cgenius/trunk/src/common/CPlayerLevel.cpp
===================================================================
--- cgenius/trunk/src/common/CPlayerLevel.cpp 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/common/CPlayerLevel.cpp 2010-06-25 06:15:33 UTC (rev 1279)
@@ -750,7 +750,7 @@
if (inventory.charges)
{ // we have enough charges
int xdir, ydir;
- CObject rayobject(mp_map, mp_object->size());
+ CObject rayobject(mp_map);
inventory.charges--;
pshowdir = pdir;
Modified: cgenius/trunk/src/engine/spritedefines.h
===================================================================
--- cgenius/trunk/src/engine/spritedefines.h 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/engine/spritedefines.h 2010-06-25 06:15:33 UTC (rev 1279)
@@ -41,7 +41,6 @@
#define OBJ_VORT_DEFSPRITE_EP2 82
#define OBJ_VORT_DEFSPRITE_EP3 71
#define OBJ_BUTLER_DEFSPRITE 88
-#define OBJ_TANK_DEFSPRITE 98
#define OBJ_ICECHUNK_DEFSPRITE 112
#define OBJ_ICEBIT_DEFSPRITE 113
#define OBJ_ROPE_DEFSPRITE 114
@@ -54,7 +53,6 @@
#define OBJ_SNDWAVE_DEFSPRITE 128
#define OBJ_SCRUB_DEFSPRITE 102
-#define OBJ_TANKEP2_DEFSPRITE 112
#define OBJ_VORTELITE_DEFSPRITE 88
Modified: cgenius/trunk/src/engine/vorticon/ai/autoray.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/ai/autoray.cpp 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/engine/vorticon/ai/autoray.cpp 2010-06-25 06:15:33 UTC (rev 1279)
@@ -23,7 +23,7 @@
if (m_gunfiretimer == 0)
{
unsigned int x,y;
- CObject NewRay(mp_Map, m_Objvect.size());
+ CObject NewRay(mp_Map);
NewRay.ai.ray.owner = 0;
x = Object.getXPosition();
y = Object.getYPosition();
Modified: cgenius/trunk/src/engine/vorticon/ai/enemydata.h
===================================================================
--- cgenius/trunk/src/engine/vorticon/ai/enemydata.h 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/engine/vorticon/ai/enemydata.h 2010-06-25 06:15:33 UTC (rev 1279)
@@ -9,6 +9,7 @@
#define ENEMYDATA_H_
#include "../../../keen.h"
+#include "tank.h"
// Structs used for different enemy's variables. These are in a union.
@@ -95,36 +96,6 @@
unsigned char movedir;
} stButlerData;
-
-// this same struct is used for both ep1 and ep2 "tanks", although
-// they have seperate ai modules
-typedef struct stTankData
-{
- char state;
-
- unsigned int timer,animtimer;
- unsigned char frame;
- unsigned int dist_to_travel;
-
- unsigned char movedir;
-
- unsigned int ponsameleveltime;
- unsigned char alreadyfiredcauseonsamelevel;
- unsigned char fireafterlook;
-
- bool detectedPlayer; // true if player on same level
- unsigned char detectedPlayerIndex; // index of player that was detected
-
- // for tank2
- unsigned int timetillnextshot;
- unsigned int firetimes;
- unsigned int timetillcanfire;
- unsigned int timetillcanfirecauseonsamelevel;
- unsigned int turnaroundtimer;
- int pausetime;
-} stTankData;
-
-
// a shot from keen's raygun or an enemy that shoots rayguns
// also used for various other types of projectiles
typedef struct stRayData
Modified: cgenius/trunk/src/engine/vorticon/ai/mother.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/ai/mother.cpp 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/engine/vorticon/ai/mother.cpp 2010-06-25 06:15:33 UTC (rev 1279)
@@ -140,7 +140,7 @@
if (object.ai.mother.timer > MOTHER_SPIT_SHOW_TIME)
{
- CObject newobject(mp_Map, m_Objvect.size());
+ CObject newobject(mp_Map);
newobject.spawn(object.getXMidPos()-(3<<STC), object.getYPosition()+(11<<STC), OBJ_FIREBALL, 3, object.ai.mother.dir);
newobject.ai.ray.direction = object.ai.mother.dir;
newobject.ai.ray.owner = object.m_index;
Modified: cgenius/trunk/src/engine/vorticon/ai/se.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/ai/se.cpp 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/engine/vorticon/ai/se.cpp 2010-06-25 06:15:33 UTC (rev 1279)
@@ -262,7 +262,7 @@
my = object.ai.se.my+3+object.ai.se.blowy;
mp_Map->setTile(mx, my, 505, true);
// spawn a ZAP! or a ZOT!
- CObject newobject(mp_Map, m_Objvect.size());
+ CObject newobject(mp_Map);
newobject.spawn(mx<<CSF, my<<CSF, OBJ_RAY, m_Episode);
newobject.ai.ray.state = RAY_STATE_SETZAPZOT;
newobject.ai.ray.owner = object.m_index;
@@ -310,7 +310,7 @@
my = object.ai.se.my+3+y;
mp_Map->setTile(mx, my, 549, true);
// spawn a ZAP! or a ZOT!
- CObject newobject(mp_Map, m_Objvect.size());
+ CObject newobject(mp_Map);
newobject.spawn(mx<<CSF, my<<CSF, OBJ_RAY, m_Episode);
newobject.ai.ray.owner = object.m_index;
newobject.ai.ray.state = RAY_STATE_SETZAPZOT;
@@ -535,7 +535,7 @@
{
mp_Map->setTile(mx, object.ai.se.my, 169, true);
// spawn a ZAP! or a ZOT!
- CObject newobject(mp_Map, m_Objvect.size());
+ CObject newobject(mp_Map);
newobject.spawn(((mx<<4)+4)<<STC, object.ai.se.my<<4<<STC, OBJ_RAY, m_Episode);
newobject.ai.ray.state = RAY_STATE_SETZAPZOT;
newobject.ai.ray.direction = DOWN;
@@ -549,7 +549,7 @@
{
mp_Map->setTile(mx, object.ai.se.my, 169, true);
// spawn a ZAP! or a ZOT!
- CObject newobject(mp_Map, m_Objvect.size());
+ CObject newobject(mp_Map);
newobject.spawn(((mx<<4)+4)<<STC, object.ai.se.my<<4<<STC, OBJ_RAY, m_Episode);
newobject.ai.ray.state = RAY_STATE_SETZAPZOT;
newobject.ai.ray.direction = DOWN;
@@ -721,7 +721,7 @@
for(x=MORTIMER_MACHINE_XSTART;x<MORTIMER_MACHINE_XEND;x++)
{
// spawn a ZAP! or a ZOT!
- CObject newobject(mp_Map, m_Objvect.size());
+ CObject newobject(mp_Map);
newobject.spawn(((x<<4)+4)<<STC, object.ai.se.my<<4<<STC, OBJ_RAY, m_Episode);
newobject.ai.ray.state = RAY_STATE_SETZAPZOT;
newobject.ai.ray.direction = DOWN;
@@ -995,7 +995,7 @@
y = rand()%((MORTIMER_MACHINE_YENDNOLEGS*16)-(MORTIMER_MACHINE_YSTART*16))+(MORTIMER_MACHINE_YSTART*16);
// spawn a ZAP! or a ZOT!
- CObject newobject(mp_Map, m_Objvect.size());
+ CObject newobject(mp_Map);
newobject.spawn(x<<CSF, y<<CSF, OBJ_RAY, m_Episode);
newobject.ai.ray.state = RAY_STATE_SETZAPZOT;
newobject.inhibitfall = true;
Modified: cgenius/trunk/src/engine/vorticon/ai/tank.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/ai/tank.cpp 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/engine/vorticon/ai/tank.cpp 2010-06-25 06:15:33 UTC (rev 1279)
@@ -2,29 +2,8 @@
#include "../../spritedefines.h"
#include "../../../sdl/sound/CSound.h"
#include "../../../keen.h"
+#include "tank.h"
-// Comments by Tulip
-/*
-
- Walk in a direction (TANK_WALK)
--> after a random time has passed stop for maybe half a second (TANK_WAIT)
--> a shoot in that same direction it has been walking (TANK_FIRE)
--> Show frontal animation for half a second (while doing that the AI should seek Keen) (TANK_LOOK)
-
- -> if Keen is anywhere on the screen left of the Tank -> walk left
- -> if Keen is anywhere right of the Tankbot on screen -> walk right
-
- (the Y position of Keen is completely irrelevant, the Tank should only check for the X position)
-
--> go to the top of this loop again.
-
- */
-
-// Tank Robot (ep1)
-enum{
- TANK_WALK,TANK_TURN,TANK_WAIT,TANK_WAIT_LOOK,TANK_FIRE,TANK_LOOK
-};
-
#define TANK_SAME_LEVEL_TIME 25
#define TANK_REPEAT_FIRE_TIME 50
@@ -58,7 +37,7 @@
{
if (object.needinit)
{ // first time initialization
- object.ai.tank.state = TANK_WALK;
+ object.ai.tank.state = stTankData::TANK_WALK;
object.ai.tank.movedir = RIGHT;
object.ai.tank.animtimer = 0;
object.ai.tank.frame = 0;
@@ -96,7 +75,7 @@
{
// Walk in a direction
- case TANK_WALK:
+ case stTankData::TANK_WALK:
{
// is keen on same level?
if (object.ai.tank.movedir==LEFT)
@@ -109,7 +88,7 @@
object.ai.tank.frame = 0;
object.ai.tank.timer = 0;
object.ai.tank.animtimer = 0;
- object.ai.tank.state = TANK_TURN;
+ object.ai.tank.state = stTankData::TANK_TURN;
}
object.ai.tank.dist_to_travel--;
@@ -124,7 +103,7 @@
object.ai.tank.frame = 0;
object.ai.tank.timer = 0;
object.ai.tank.animtimer = 0;
- object.ai.tank.state = TANK_TURN;
+ object.ai.tank.state = stTankData::TANK_TURN;
}
object.ai.tank.dist_to_travel--;
@@ -143,25 +122,25 @@
object.ai.tank.frame = 0;
object.ai.tank.timer = 0;
object.ai.tank.animtimer = 0;
- object.ai.tank.state = TANK_WAIT;
+ object.ai.tank.state = stTankData::TANK_WAIT;
}
}
break;
- case TANK_WAIT:
+ case stTankData::TANK_WAIT:
if ( (object.ai.tank.timer > TANK_PREPAREFIRE_TIME) ||
(object.ai.tank.timer > TANK_PREPAREFIRE_TIME_FAST && hardmode) )
{
object.ai.tank.timer = 0;
- object.ai.tank.state = TANK_FIRE;
+ object.ai.tank.state = stTankData::TANK_FIRE;
}
else
object.ai.tank.timer++;
break;
- case TANK_TURN:
+ case stTankData::TANK_TURN:
// If it gets stuck somewhere turn around
object.sprite = TANK_LOOK_FRAME + object.ai.tank.frame;
// animation
@@ -175,14 +154,14 @@
if (object.ai.tank.timer > TANK_LOOK_TOTALTIME)
{
// decide what direction to go
- object.ai.tank.state = TANK_WALK;
+ object.ai.tank.state = stTankData::TANK_WALK;
object.ai.tank.animtimer = 0;
object.ai.tank.timer = 0;
} else object.ai.tank.timer++;
break;
- case TANK_FIRE:
+ case stTankData::TANK_FIRE:
{
- CObject newobject(mp_Map, m_Objvect.size());
+ CObject newobject(mp_Map);
if (object.onscreen) g_pSound->playStereofromCoord(SOUND_TANK_FIRE, PLAY_NOW, object.scrx);
if (object.ai.tank.movedir==RIGHT)
{
@@ -200,7 +179,7 @@
newobject.canbezapped = true;
m_Objvect.push_back(newobject);
- object.ai.tank.state = TANK_WAIT_LOOK;
+ object.ai.tank.state = stTankData::TANK_WAIT_LOOK;
object.ai.tank.frame = 0;
object.ai.tank.timer = 0;
object.ai.tank.animtimer = 0;
@@ -208,19 +187,19 @@
}
break;
- case TANK_WAIT_LOOK:
+ case stTankData::TANK_WAIT_LOOK:
// Happens after Robot has fired
if ( object.ai.tank.timer > TANK_WAITAFTER_FIRE )
{
object.ai.tank.timer = 0;
- object.ai.tank.state = TANK_LOOK;
+ object.ai.tank.state = stTankData::TANK_LOOK;
}
else
object.ai.tank.timer++;
break;
- case TANK_LOOK:
+ case stTankData::TANK_LOOK:
object.sprite = TANK_LOOK_FRAME + object.ai.tank.frame;
// animation
if (object.ai.tank.animtimer > TANK_LOOK_ANIM_TIME)
@@ -244,7 +223,7 @@
object.ai.tank.movedir = RIGHT;
object.sprite = TANK_WALK_RIGHT_FRAME;
}
- object.ai.tank.state = TANK_WALK;
+ object.ai.tank.state = stTankData::TANK_WALK;
object.ai.tank.animtimer = 0;
object.ai.tank.timer = 0;
} else object.ai.tank.timer++;
Modified: cgenius/trunk/src/engine/vorticon/ai/tankep2.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/ai/tankep2.cpp 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/engine/vorticon/ai/tankep2.cpp 2010-06-25 06:15:33 UTC (rev 1279)
@@ -3,10 +3,6 @@
#include "CObjectAI.h"
-// Tank Robot (Ep2)
-enum tank2_actions{
-TANK_LOOK, TANK_WALK };
-
#define TANK2_SAME_LEVEL_TIME 150
#define TANK_REPEAT_FIRE_TIME 800
@@ -45,7 +41,7 @@
{
if (object.needinit)
{ // first time initilization
- object.ai.tank.state = TANK_WALK;
+ object.ai.tank.state = stTankData::TANK_WALK;
object.ai.tank.movedir = RIGHT;
object.ai.tank.fireafterlook = 0;
object.ai.tank.animtimer = 0;
@@ -68,7 +64,7 @@
switch(object.ai.tank.state)
{
- case TANK_LOOK:
+ case stTankData::TANK_LOOK:
// animation
if (object.ai.tank.animtimer > TANK_LOOK_ANIM_TIME)
{
@@ -97,7 +93,7 @@
object.ai.tank.timetillcanfire = (rnd()%(TANK2_MAX_TIME_TILL_CAN_FIRE-TANK2_MIN_TIME_TILL_CAN_FIRE))+TANK2_MIN_TIME_TILL_CAN_FIRE;
object.ai.tank.timetillcanfirecauseonsamelevel = TANK2_TIME_BEFORE_FIRE_WHEN_SEE;
object.ai.tank.firetimes = 0;
- object.ai.tank.state = TANK_WALK;
+ object.ai.tank.state = stTankData::TANK_WALK;
object.ai.tank.frame = 0;
object.ai.tank.animtimer = 0;
object.ai.tank.timer = 0;
@@ -108,7 +104,7 @@
break;
- case TANK_WALK:
+ case stTankData::TANK_WALK:
// hover animation
if (object.ai.tank.animtimer > TANK_WALK_ANIM_TIME)
{
@@ -140,7 +136,7 @@
// is it time to fire the next shot in the volley?
if (!object.ai.tank.timetillnextshot)
{
- CObject newobject(mp_Map, m_Objvect.size());
+ CObject newobject(mp_Map);
if (object.onscreen) g_pSound->playStereofromCoord(SOUND_TANK_FIRE, PLAY_NOW, object.scrx);
if (object.ai.tank.movedir==RIGHT)
{
@@ -220,7 +216,7 @@
object.ai.tank.frame = 0;
object.ai.tank.timer = 0;
object.ai.tank.animtimer = 0;
- object.ai.tank.state = TANK_LOOK;
+ object.ai.tank.state = stTankData::TANK_LOOK;
object.ai.tank.turnaroundtimer = 100;
}
else object.ai.tank.turnaroundtimer--;
@@ -246,7 +242,7 @@
object.ai.tank.frame = 0;
object.ai.tank.timer = 0;
object.ai.tank.animtimer = 0;
- object.ai.tank.state = TANK_LOOK;
+ object.ai.tank.state = stTankData::TANK_LOOK;
}
}
else
@@ -262,7 +258,7 @@
object.ai.tank.frame = 0;
object.ai.tank.timer = 0;
object.ai.tank.animtimer = 0;
- object.ai.tank.state = TANK_LOOK;
+ object.ai.tank.state = stTankData::TANK_LOOK;
}
}
break;
Modified: cgenius/trunk/src/engine/vorticon/ai/vortelite.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/ai/vortelite.cpp 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/engine/vorticon/ai/vortelite.cpp 2010-06-25 06:15:33 UTC (rev 1279)
@@ -233,7 +233,7 @@
object.ai.vortelite.timer = 0;
object.ai.vortelite.state = VORTELITE_FIRED;
- CObject newobject(mp_Map, m_Objvect.size());
+ CObject newobject(mp_Map);
if (object.ai.vortelite.movedir==RIGHT)
{
newobject.spawn(object.getXRightPos()+1, object.getYPosition()+(9<<STC), OBJ_RAY, m_Episode);
Modified: cgenius/trunk/src/engine/vorticon/finale/CShipFlySys.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/finale/CShipFlySys.cpp 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/engine/vorticon/finale/CShipFlySys.cpp 2010-06-25 06:15:33 UTC (rev 1279)
@@ -26,7 +26,7 @@
// Now, that everything is initialized, create a mark that will be used
// as ! or ? Sprite
- CObject mark(mp_Map, 1);
+ CObject mark(mp_Map);
mark.m_type = OBJ_YORP; // doesn't matter
mark.exists = 0;
mark.sprite = SPR_QUESTION;
Modified: cgenius/trunk/src/engine/vorticon/finale/CTantalusRay.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/finale/CTantalusRay.cpp 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/engine/vorticon/finale/CTantalusRay.cpp 2010-06-25 06:15:33 UTC (rev 1279)
@@ -66,7 +66,7 @@
m_Map.drawAll();
- CObject ShootObject(&m_Map, m_vect_obj.size());
+ CObject ShootObject(&m_Map);
ShootObject.spawn(4<<CSF, 4<<CSF, OBJ_RAY,2);
ShootObject.solid = false;
ShootObject.exists = ShootObject.onscreen = true;
Modified: cgenius/trunk/src/engine/vorticon/playgame/CPlayGameGameState.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/playgame/CPlayGameGameState.cpp 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/engine/vorticon/playgame/CPlayGameGameState.cpp 2010-06-25 06:15:33 UTC (rev 1279)
@@ -51,11 +51,8 @@
// Prepare for loading the new level map and the players.
cleanup();
- for( short i=0 ; i<m_NumPlayers ; i++ ) {
- CPlayer Player(m_Episode, m_Level, m_Difficulty,
- i, mp_level_completed, mp_option, m_Object, m_Map);
- m_Player.push_back(Player);
- }
+ m_Player.assign(m_NumPlayers, CPlayer(m_Episode, m_Level, m_Difficulty,
+ mp_level_completed, mp_option, m_Object, m_Map));
init();
@@ -80,7 +77,7 @@
m_SavedGame.decodeData(size);
for( Uint32 i=0 ; i<size ; i++) {
// save all the objects states
- CObject object(&m_Map, i);
+ CObject object(&m_Map);
m_SavedGame.decodeData(object.m_type);
m_SavedGame.decodeData(x);
Modified: cgenius/trunk/src/engine/vorticon/playgame/CPlayGameVorticon.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/playgame/CPlayGameVorticon.cpp 2010-06-24 21:50:08 UTC (rev 1278)
+++ cgenius/trunk/src/engine/vorticon/playgame/CPlayGameVorticon.cpp 2010-06-25 06:15:33 UTC (rev 1279)
@@ -38,7 +38,7 @@
mp_gameoverbmp = NULL;
m_Player.assign(m_NumPlayers, CPlayer(m_Episode, m_Level, m_Difficulty,
- (short)0, mp_level_completed, mp_option,
+ mp_level_completed, mp_option,
m_Object, m_Map));
for(int i=0 ; i<m_NumPlayers ; i++)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ger...@us...> - 2010-06-24 21:50:16
|
Revision: 1278
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1278&view=rev
Author: gerstrong
Date: 2010-06-24 21:50:08 +0000 (Thu, 24 Jun 2010)
Log Message:
-----------
swapped keycard rising points. Now it's correct.
Modified Paths:
--------------
cgenius/trunk/src/engine/vorticon/CEGASprit.cpp
Modified: cgenius/trunk/src/engine/vorticon/CEGASprit.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/CEGASprit.cpp 2010-06-24 12:57:07 UTC (rev 1277)
+++ cgenius/trunk/src/engine/vorticon/CEGASprit.cpp 2010-06-24 21:50:08 UTC (rev 1278)
@@ -353,8 +353,8 @@
// Keycards
if( TileProperties.at(t).behaviour==18 ) CreateYellowSpriteofTile( tilemap, t, sprites.at(PTCARDY_SPRITE));
- if( TileProperties.at(t).behaviour==19 ) CreateYellowSpriteofTile( tilemap, t, sprites.at(PTCARDG_SPRITE));
- if( TileProperties.at(t).behaviour==20 ) CreateYellowSpriteofTile( tilemap, t, sprites.at(PTCARDR_SPRITE));
+ if( TileProperties.at(t).behaviour==19 ) CreateYellowSpriteofTile( tilemap, t, sprites.at(PTCARDR_SPRITE));
+ if( TileProperties.at(t).behaviour==20 ) CreateYellowSpriteofTile( tilemap, t, sprites.at(PTCARDG_SPRITE));
if( TileProperties.at(t).behaviour==21 ) CreateYellowSpriteofTile( tilemap, t, sprites.at(PTCARDB_SPRITE));
// Single Bullet in Ep3
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ger...@us...> - 2010-06-24 12:57:13
|
Revision: 1277
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1277&view=rev
Author: gerstrong
Date: 2010-06-24 12:57:07 +0000 (Thu, 24 Jun 2010)
Log Message:
-----------
Keen now ignores items when he goes through an exit.
Modified Paths:
--------------
cgenius/trunk/src/common/CPlayerLevel.cpp
Modified: cgenius/trunk/src/common/CPlayerLevel.cpp
===================================================================
--- cgenius/trunk/src/common/CPlayerLevel.cpp 2010-06-24 12:45:12 UTC (rev 1276)
+++ cgenius/trunk/src/common/CPlayerLevel.cpp 2010-06-24 12:57:07 UTC (rev 1277)
@@ -42,13 +42,16 @@
setDir();
- getgoodies();
+ if(!level_done)
+ {
+ getgoodies();
- ankh(); // Normally can happen in Episode 3
+ ankh(); // Normally can happen in Episode 3
- raygun();
+ raygun();
- keencicle();
+ keencicle();
+ }
if(!pfrozentime)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ger...@us...> - 2010-06-24 12:45:19
|
Revision: 1276
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1276&view=rev
Author: gerstrong
Date: 2010-06-24 12:45:12 +0000 (Thu, 24 Jun 2010)
Log Message:
-----------
Solved some other gamestate issues
Modified Paths:
--------------
cgenius/trunk/src/common/CPlayer.cpp
cgenius/trunk/src/common/CPlayer.h
cgenius/trunk/src/engine/infoscenes/CHighScores.cpp
cgenius/trunk/src/engine/vorticon/ai/door.cpp
cgenius/trunk/src/engine/vorticon/playgame/CPlayGameGameState.cpp
cgenius/trunk/src/fileio/CExeFile.cpp
Modified: cgenius/trunk/src/common/CPlayer.cpp
===================================================================
--- cgenius/trunk/src/common/CPlayer.cpp 2010-06-24 10:22:44 UTC (rev 1275)
+++ cgenius/trunk/src/common/CPlayer.cpp 2010-06-24 12:45:12 UTC (rev 1276)
@@ -120,7 +120,6 @@
{
plastfalling = true;
solid = true;
- pfalling = false;
pshowdir = RIGHT;
ppogostick = false;
pjumping = PNOJUMP;
Modified: cgenius/trunk/src/common/CPlayer.h
===================================================================
--- cgenius/trunk/src/common/CPlayer.h 2010-06-24 10:22:44 UTC (rev 1275)
+++ cgenius/trunk/src/common/CPlayer.h 2010-06-24 12:45:12 UTC (rev 1276)
@@ -120,7 +120,8 @@
unsigned long mapplayx;
signed int mapplayy;
- unsigned char pfalling,plastfalling,pfallspeed;
+ bool pfalling;
+ unsigned char plastfalling,pfallspeed;
unsigned char pwalking,playspeed;
unsigned char pslowingdown;
Modified: cgenius/trunk/src/engine/infoscenes/CHighScores.cpp
===================================================================
--- cgenius/trunk/src/engine/infoscenes/CHighScores.cpp 2010-06-24 10:22:44 UTC (rev 1275)
+++ cgenius/trunk/src/engine/infoscenes/CHighScores.cpp 2010-06-24 12:45:12 UTC (rev 1276)
@@ -332,7 +332,7 @@
ScoreTableFile.seekp(8*8*sizeof(char),ios_base::cur);
ScoreTableFile.write((char*)(c_extra), 8*4*sizeof(unsigned char));
ScoreTableFile.seekp(8*4*sizeof(char),ios_base::cur);
- ScoreTableFile.write((char*) c_cities, 8*sizeof(int));
+ ScoreTableFile.write((char*)(c_cities), 8*sizeof(int));
ScoreTableFile.close();
Modified: cgenius/trunk/src/engine/vorticon/ai/door.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/ai/door.cpp 2010-06-24 10:22:44 UTC (rev 1275)
+++ cgenius/trunk/src/engine/vorticon/ai/door.cpp 2010-06-24 12:45:12 UTC (rev 1276)
@@ -34,6 +34,7 @@
object.ai.door.timer = 0;
if (doorsprite.getHeight() == 0)
{
+ object.kill();
deleteObj(object);
return;
}
Modified: cgenius/trunk/src/engine/vorticon/playgame/CPlayGameGameState.cpp
===================================================================
--- cgenius/trunk/src/engine/vorticon/playgame/CPlayGameGameState.cpp 2010-06-24 10:22:44 UTC (rev 1275)
+++ cgenius/trunk/src/engine/vorticon/playgame/CPlayGameGameState.cpp 2010-06-24 12:45:12 UTC (rev 1276)
@@ -65,11 +65,11 @@
player->setupforLevelPlay();
m_SavedGame.decodeData(x);
m_SavedGame.decodeData(y);
+ player->moveToForce(x,y-(4<<STC));
m_SavedGame.decodeData(player->blockedd);
m_SavedGame.decodeData(player->blockedu);
m_SavedGame.decodeData(player->blockedl);
m_SavedGame.decodeData(player->blockedr);
- player->moveToForce(x,y-1);
m_SavedGame.decodeData(player->inventory);
}
@@ -102,7 +102,8 @@
m_SavedGame.decodeData(object.honorPriority);
m_SavedGame.decodeData(object.sprite);
m_SavedGame.decodeData(object.ai);
- m_Object.push_back(object);
+ if(object.m_type != OBJ_DOOR) // small workaround for doors which might be opening
+ m_Object.push_back(object);
}
// TODO: An algorithm for comparing the number of players saved and we actually have need to be in sync
Modified: cgenius/trunk/src/fileio/CExeFile.cpp
===================================================================
--- cgenius/trunk/src/fileio/CExeFile.cpp 2010-06-24 10:22:44 UTC (rev 1275)
+++ cgenius/trunk/src/fileio/CExeFile.cpp 2010-06-24 12:45:12 UTC (rev 1276)
@@ -18,11 +18,13 @@
#define SAFE_DELETE_ARRAY(x) if(x) { delete[] x; x=NULL; }
CExeFile::CExeFile() :
+m_datasize(0),
m_episode(0),
-m_datadirectory(""),
+m_crc(0),
+m_data(NULL),
+m_headerdata(NULL),
m_rawdata(NULL),
-m_data(NULL),
-m_headerdata(NULL)
+m_datadirectory("")
{}
char CExeFile::getEpisode()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <piz...@us...> - 2010-06-24 10:22:50
|
Revision: 1275
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1275&view=rev
Author: pizza2004
Date: 2010-06-24 10:22:44 +0000 (Thu, 24 Jun 2010)
Log Message:
-----------
I created new icons for when we release with Galaxy support. I like the current icon, but I think having it be Keen's head just seems more Keenish.
Added Paths:
-----------
cgenius/trunk/V0.4.ico
cgenius/trunk/build/Xcode/V0.4.icns
Added: cgenius/trunk/V0.4.ico
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/V0.4.ico
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/build/Xcode/V0.4.icns
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/build/Xcode/V0.4.icns
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ger...@us...> - 2010-06-24 09:28:32
|
Revision: 1274
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1274&view=rev
Author: gerstrong
Date: 2010-06-24 09:28:26 +0000 (Thu, 24 Jun 2010)
Log Message:
-----------
Updated cmakelists.txt so Windows builds are compiled at a better way
Modified Paths:
--------------
cgenius/trunk/CMakeLists.txt
Modified: cgenius/trunk/CMakeLists.txt
===================================================================
--- cgenius/trunk/CMakeLists.txt 2010-06-24 09:06:22 UTC (rev 1273)
+++ cgenius/trunk/CMakeLists.txt 2010-06-24 09:28:26 UTC (rev 1274)
@@ -131,10 +131,10 @@
AUX_SOURCE_DIRECTORY(src/sdl/video SDLVIDEO_S)
AUX_SOURCE_DIRECTORY(src/vorbis VORBIS_S)
-SET(ALL_SRCS ${ROOT_S} ${COMMON_S} ${MENU_S} ${DIALOG_S} ${ENGINE_S}
+SET(ALL_SRCS ${COMMON_S} ${MENU_S} ${DIALOG_S} ${ENGINE_S}
${AI_S} ${GALAXY_S} ${INFOSCENES_S} ${PLAYGAME_S} ${VORTICON_S} ${FINALE_S} ${VPLAYGAME_S} ${FILEIO_S}
${COMPRESSION_S} ${GRAPHICS_S} ${EFFECTS_S} ${HQP_S} ${SCALE2X_S} ${SDL_S} ${SDLSOUND_S} ${SDLSYS_S}
- ${SDLVIDEO_S} )
+ ${SDLVIDEO_S} ${ROOT_S})
IF(UNIX)
# Compilation under Linux
@@ -189,7 +189,7 @@
ENDIF (SDL)
IF (OPENGL)
- ADD_DEFINITIONS(-DUSE_OPENGL)
+ ADD_DEFINITIONS(-DGL)
ENDIF (OPENGL)
IF(DEBUG)
@@ -199,11 +199,6 @@
# Executable definition
ADD_EXECUTABLE(commandergenius ${ALL_SRCS})
-# The Windows Version has an icon in the executable
-IF(BUILD_TYPE STREQUAL WIN32)
- SET_TARGET_PROPERTIES(commandergenius PROPERTIES LINK_FLAGS ./src/CGLogo.o)
-ENDIF(BUILD_TYPE STREQUAL WIN32)
-
# Linking part under Linux
IF(SDL)
IF(BUILD_TYPE STREQUAL WIN32)
@@ -250,6 +245,12 @@
ENDIF(BUILD_TYPE STREQUAL WIN32)
ENDIF(OGG)
+# The Windows Version has an icon in the executable
+IF(BUILD_TYPE STREQUAL WIN32)
+ SET_TARGET_PROPERTIES(commandergenius PROPERTIES LINK_FLAGS ${CMAKE_CURRENT_SOURCE_DIR}/src/CGLogo.o)
+ MESSAGE( "Will build with the CG-Icon for Windows" )
+ENDIF(BUILD_TYPE STREQUAL WIN32)
+
# Set binary(executable) file name. In Windows this filename needs the exe extension
IF(BUILD_TYPE STREQUAL WIN32)
SET_TARGET_PROPERTIES(commandergenius PROPERTIES OUTPUT_NAME "build/${BUILD_DIR}/CGenius.exe")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ger...@us...> - 2010-06-24 09:06:28
|
Revision: 1273
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1273&view=rev
Author: gerstrong
Date: 2010-06-24 09:06:22 +0000 (Thu, 24 Jun 2010)
Log Message:
-----------
removed old comments
Modified Paths:
--------------
cgenius/trunk/src/engine/infoscenes/CHighScores.cpp
Modified: cgenius/trunk/src/engine/infoscenes/CHighScores.cpp
===================================================================
--- cgenius/trunk/src/engine/infoscenes/CHighScores.cpp 2010-06-24 07:28:06 UTC (rev 1272)
+++ cgenius/trunk/src/engine/infoscenes/CHighScores.cpp 2010-06-24 09:06:22 UTC (rev 1273)
@@ -170,15 +170,6 @@
m_Name[m_Place].append(g_pInput->getPressedTypingKey());
}
- /*// Add or character depending on what the user writes
- for(int i=KA ; i<=KZ ; i++)
- {
- if (g_pInput->getHoldedKey(KSHIFT) && g_pInput->getPressedKey(i) && m_Name[m_Place].size() < 13)
- m_Name[m_Place].push_back('A' + i - KA);
- else if(g_pInput->getPressedKey(i) && m_Name[m_Place].size() < 13)
- m_Name[m_Place].push_back('a' + i - KA);
- }*/
-
if(g_pInput->getPressedKey(KBCKSPCE) && (m_Name[m_Place].length() > 0))
{
m_Name[m_Place].erase(m_Name[m_Place].length()-1);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <piz...@us...> - 2010-06-24 07:28:15
|
Revision: 1272
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1272&view=rev
Author: pizza2004
Date: 2010-06-24 07:28:06 +0000 (Thu, 24 Jun 2010)
Log Message:
-----------
I added KeenX and Yorphius to the bundle, to give players more games to play from download.
I also fixed the archaic Highscore input, allowing only letters.
Modified Paths:
--------------
cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj
cgenius/trunk/src/engine/infoscenes/CHighScores.cpp
Added Paths:
-----------
cgenius/trunk/vfsroot/games/keenx/CK1PATCH.EXE
cgenius/trunk/vfsroot/games/keenx/EGAHEAD.CK1
cgenius/trunk/vfsroot/games/keenx/EGALATCH.CK1
cgenius/trunk/vfsroot/games/keenx/EGASPRIT.CK1
cgenius/trunk/vfsroot/games/keenx/ENDTEXT.CK1
cgenius/trunk/vfsroot/games/keenx/FINALE.CK1
cgenius/trunk/vfsroot/games/keenx/HELPTEXT.CK1
cgenius/trunk/vfsroot/games/keenx/KEEN1.DOC
cgenius/trunk/vfsroot/games/keenx/KEEN1.EXE
cgenius/trunk/vfsroot/games/keenx/LEVEL01.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL02.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL03.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL04.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL05.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL06.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL07.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL08.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL09.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL10.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL11.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL12.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL13.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL14.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL15.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL16.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL22.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL29.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL80.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL81.CK1
cgenius/trunk/vfsroot/games/keenx/LEVEL90.CK1
cgenius/trunk/vfsroot/games/keenx/PREVIEW2.CK1
cgenius/trunk/vfsroot/games/keenx/PREVIEW3.CK1
cgenius/trunk/vfsroot/games/keenx/PREVIEWS.CK1
cgenius/trunk/vfsroot/games/keenx/ReadMe.txt
cgenius/trunk/vfsroot/games/keenx/SOUNDS.CK1
cgenius/trunk/vfsroot/games/keenx/STORYTXT.CK1
cgenius/trunk/vfsroot/games/keenx/XkyKeen.pat
cgenius/trunk/vfsroot/games/keenx/XkyKeen1.bat
cgenius/trunk/vfsroot/games/yorphius/CK1PATCH.EXE
cgenius/trunk/vfsroot/games/yorphius/DUMP.BEH
cgenius/trunk/vfsroot/games/yorphius/EGAHEAD.CK1
cgenius/trunk/vfsroot/games/yorphius/EGALATCH.CK1
cgenius/trunk/vfsroot/games/yorphius/EGASPRIT.CK1
cgenius/trunk/vfsroot/games/yorphius/ENDTEXT.CK1
cgenius/trunk/vfsroot/games/yorphius/FINALE.CK1
cgenius/trunk/vfsroot/games/yorphius/HELPTEXT.CK1
cgenius/trunk/vfsroot/games/yorphius/KEEN1.EXE
cgenius/trunk/vfsroot/games/yorphius/LEVEL01.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL02.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL03.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL04.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL05.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL06.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL07.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL08.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL09.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL10.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL11.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL12.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL13.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL14.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL15.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL16.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL80.CK1
cgenius/trunk/vfsroot/games/yorphius/LEVEL90.CK1
cgenius/trunk/vfsroot/games/yorphius/PREVIEW2.CK1
cgenius/trunk/vfsroot/games/yorphius/PREVIEW3.CK1
cgenius/trunk/vfsroot/games/yorphius/PREVIEWS.CK1
cgenius/trunk/vfsroot/games/yorphius/SOUNDS.CK1
cgenius/trunk/vfsroot/games/yorphius/STATUS.CK1
cgenius/trunk/vfsroot/games/yorphius/STORYTXT.CK1
cgenius/trunk/vfsroot/games/yorphius/Yorphius.BAT
cgenius/trunk/vfsroot/games/yorphius/readme.txt
cgenius/trunk/vfsroot/games/yorphius/yorp.pat
Modified: cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj
===================================================================
--- cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj 2010-06-24 07:23:34 UTC (rev 1271)
+++ cgenius/trunk/build/Xcode/CommanderGenius.xcodeproj/project.pbxproj 2010-06-24 07:28:06 UTC (rev 1272)
@@ -59,6 +59,80 @@
638890BF1162A490009810AC /* extratiles.bmp in Copy Res Files */ = {isa = PBXBuildFile; fileRef = 638890BE1162A490009810AC /* extratiles.bmp */; };
63999E3A10D151BA00EDB6CD /* fonts.bmp in Copy Keen 1 GFX Files */ = {isa = PBXBuildFile; fileRef = 63999E3910D151BA00EDB6CD /* fonts.bmp */; };
63AB8C2F107C62D0001EE22F /* cglogo.icns in Resources */ = {isa = PBXBuildFile; fileRef = 63AB8C2E107C62D0001EE22F /* cglogo.icns */; };
+ 63CB728D11D339D50069EAC6 /* CK1PATCH.EXE in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB71F511D339BC0069EAC6 /* CK1PATCH.EXE */; };
+ 63CB728E11D339D50069EAC6 /* EGAHEAD.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB71F611D339BC0069EAC6 /* EGAHEAD.CK1 */; };
+ 63CB728F11D339D50069EAC6 /* EGALATCH.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB71F711D339BC0069EAC6 /* EGALATCH.CK1 */; };
+ 63CB729011D339D50069EAC6 /* EGASPRIT.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB71F811D339BC0069EAC6 /* EGASPRIT.CK1 */; };
+ 63CB729111D339D50069EAC6 /* ENDTEXT.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB71F911D339BC0069EAC6 /* ENDTEXT.CK1 */; };
+ 63CB729211D339D50069EAC6 /* FINALE.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB71FA11D339BC0069EAC6 /* FINALE.CK1 */; };
+ 63CB729311D339D50069EAC6 /* HELPTEXT.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB71FB11D339BC0069EAC6 /* HELPTEXT.CK1 */; };
+ 63CB729411D339D50069EAC6 /* KEEN1.DOC in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB71FC11D339BC0069EAC6 /* KEEN1.DOC */; };
+ 63CB729511D339D50069EAC6 /* KEEN1.EXE in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB71FD11D339BC0069EAC6 /* KEEN1.EXE */; };
+ 63CB729611D339D50069EAC6 /* LEVEL01.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB71FE11D339BC0069EAC6 /* LEVEL01.CK1 */; };
+ 63CB729711D339D50069EAC6 /* LEVEL02.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB71FF11D339BC0069EAC6 /* LEVEL02.CK1 */; };
+ 63CB729811D339D50069EAC6 /* LEVEL03.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720011D339BC0069EAC6 /* LEVEL03.CK1 */; };
+ 63CB729911D339D50069EAC6 /* LEVEL04.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720111D339BC0069EAC6 /* LEVEL04.CK1 */; };
+ 63CB729A11D339D50069EAC6 /* LEVEL05.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720211D339BC0069EAC6 /* LEVEL05.CK1 */; };
+ 63CB729B11D339D50069EAC6 /* LEVEL06.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720311D339BC0069EAC6 /* LEVEL06.CK1 */; };
+ 63CB729C11D339D50069EAC6 /* LEVEL07.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720411D339BC0069EAC6 /* LEVEL07.CK1 */; };
+ 63CB729D11D339D50069EAC6 /* LEVEL08.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720511D339BC0069EAC6 /* LEVEL08.CK1 */; };
+ 63CB729E11D339D50069EAC6 /* LEVEL09.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720611D339BC0069EAC6 /* LEVEL09.CK1 */; };
+ 63CB729F11D339D50069EAC6 /* LEVEL10.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720711D339BC0069EAC6 /* LEVEL10.CK1 */; };
+ 63CB72A011D339D50069EAC6 /* LEVEL11.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720811D339BC0069EAC6 /* LEVEL11.CK1 */; };
+ 63CB72A111D339D50069EAC6 /* LEVEL12.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720911D339BC0069EAC6 /* LEVEL12.CK1 */; };
+ 63CB72A211D339D50069EAC6 /* LEVEL13.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720A11D339BC0069EAC6 /* LEVEL13.CK1 */; };
+ 63CB72A311D339D50069EAC6 /* LEVEL14.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720B11D339BC0069EAC6 /* LEVEL14.CK1 */; };
+ 63CB72A411D339D50069EAC6 /* LEVEL15.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720C11D339BC0069EAC6 /* LEVEL15.CK1 */; };
+ 63CB72A511D339D50069EAC6 /* LEVEL16.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720D11D339BC0069EAC6 /* LEVEL16.CK1 */; };
+ 63CB72A611D339D50069EAC6 /* LEVEL22.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720E11D339BC0069EAC6 /* LEVEL22.CK1 */; };
+ 63CB72A711D339D50069EAC6 /* LEVEL29.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB720F11D339BC0069EAC6 /* LEVEL29.CK1 */; };
+ 63CB72A811D339D50069EAC6 /* LEVEL80.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB721011D339BC0069EAC6 /* LEVEL80.CK1 */; };
+ 63CB72A911D339D50069EAC6 /* LEVEL81.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB721111D339BC0069EAC6 /* LEVEL81.CK1 */; };
+ 63CB72AA11D339D50069EAC6 /* LEVEL90.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB721211D339BC0069EAC6 /* LEVEL90.CK1 */; };
+ 63CB72AB11D339D50069EAC6 /* PREVIEW2.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB721311D339BC0069EAC6 /* PREVIEW2.CK1 */; };
+ 63CB72AC11D339D50069EAC6 /* PREVIEW3.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB721411D339BC0069EAC6 /* PREVIEW3.CK1 */; };
+ 63CB72AD11D339D50069EAC6 /* PREVIEWS.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB721511D339BC0069EAC6 /* PREVIEWS.CK1 */; };
+ 63CB72AE11D339D50069EAC6 /* ReadMe.txt in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB721611D339BC0069EAC6 /* ReadMe.txt */; };
+ 63CB72AF11D339D50069EAC6 /* SOUNDS.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB721711D339BC0069EAC6 /* SOUNDS.CK1 */; };
+ 63CB72B011D339D50069EAC6 /* STORYTXT.CK1 in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB721811D339BC0069EAC6 /* STORYTXT.CK1 */; };
+ 63CB72B111D339D50069EAC6 /* XkyKeen.pat in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB721911D339BC0069EAC6 /* XkyKeen.pat */; };
+ 63CB72B211D339D50069EAC6 /* XkyKeen1.bat in Copy Keen X Files */ = {isa = PBXBuildFile; fileRef = 63CB721A11D339BC0069EAC6 /* XkyKeen1.bat */; };
+ 63CB72B311D339DF0069EAC6 /* CK1PATCH.EXE in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB721C11D339BC0069EAC6 /* CK1PATCH.EXE */; };
+ 63CB72B411D339DF0069EAC6 /* DUMP.BEH in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB721D11D339BC0069EAC6 /* DUMP.BEH */; };
+ 63CB72B511D339DF0069EAC6 /* EGAHEAD.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB721E11D339BC0069EAC6 /* EGAHEAD.CK1 */; };
+ 63CB72B611D339DF0069EAC6 /* EGALATCH.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB721F11D339BC0069EAC6 /* EGALATCH.CK1 */; };
+ 63CB72B711D339DF0069EAC6 /* EGASPRIT.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722011D339BC0069EAC6 /* EGASPRIT.CK1 */; };
+ 63CB72B811D339DF0069EAC6 /* ENDTEXT.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722111D339BC0069EAC6 /* ENDTEXT.CK1 */; };
+ 63CB72B911D339DF0069EAC6 /* FINALE.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722211D339BC0069EAC6 /* FINALE.CK1 */; };
+ 63CB72BA11D339DF0069EAC6 /* HELPTEXT.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722311D339BC0069EAC6 /* HELPTEXT.CK1 */; };
+ 63CB72BB11D339DF0069EAC6 /* KEEN1.EXE in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722411D339BD0069EAC6 /* KEEN1.EXE */; };
+ 63CB72BC11D339DF0069EAC6 /* LEVEL01.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722511D339BD0069EAC6 /* LEVEL01.CK1 */; };
+ 63CB72BD11D339DF0069EAC6 /* LEVEL02.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722611D339BD0069EAC6 /* LEVEL02.CK1 */; };
+ 63CB72BE11D339DF0069EAC6 /* LEVEL03.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722711D339BD0069EAC6 /* LEVEL03.CK1 */; };
+ 63CB72BF11D339DF0069EAC6 /* LEVEL04.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722811D339BD0069EAC6 /* LEVEL04.CK1 */; };
+ 63CB72C011D339DF0069EAC6 /* LEVEL05.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722911D339BD0069EAC6 /* LEVEL05.CK1 */; };
+ 63CB72C111D339DF0069EAC6 /* LEVEL06.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722A11D339BD0069EAC6 /* LEVEL06.CK1 */; };
+ 63CB72C211D339DF0069EAC6 /* LEVEL07.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722B11D339BD0069EAC6 /* LEVEL07.CK1 */; };
+ 63CB72C311D339DF0069EAC6 /* LEVEL08.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722C11D339BD0069EAC6 /* LEVEL08.CK1 */; };
+ 63CB72C411D339DF0069EAC6 /* LEVEL09.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722D11D339BD0069EAC6 /* LEVEL09.CK1 */; };
+ 63CB72C511D339DF0069EAC6 /* LEVEL10.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722E11D339BD0069EAC6 /* LEVEL10.CK1 */; };
+ 63CB72C611D339DF0069EAC6 /* LEVEL11.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB722F11D339BD0069EAC6 /* LEVEL11.CK1 */; };
+ 63CB72C711D339DF0069EAC6 /* LEVEL12.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723011D339BD0069EAC6 /* LEVEL12.CK1 */; };
+ 63CB72C811D339DF0069EAC6 /* LEVEL13.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723111D339BD0069EAC6 /* LEVEL13.CK1 */; };
+ 63CB72C911D339DF0069EAC6 /* LEVEL14.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723211D339BD0069EAC6 /* LEVEL14.CK1 */; };
+ 63CB72CA11D339DF0069EAC6 /* LEVEL15.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723311D339BD0069EAC6 /* LEVEL15.CK1 */; };
+ 63CB72CB11D339DF0069EAC6 /* LEVEL16.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723411D339BD0069EAC6 /* LEVEL16.CK1 */; };
+ 63CB72CC11D339DF0069EAC6 /* LEVEL80.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723511D339BD0069EAC6 /* LEVEL80.CK1 */; };
+ 63CB72CD11D339DF0069EAC6 /* LEVEL90.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723611D339BD0069EAC6 /* LEVEL90.CK1 */; };
+ 63CB72CE11D339DF0069EAC6 /* PREVIEW2.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723711D339BD0069EAC6 /* PREVIEW2.CK1 */; };
+ 63CB72CF11D339DF0069EAC6 /* PREVIEW3.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723811D339BD0069EAC6 /* PREVIEW3.CK1 */; };
+ 63CB72D011D339DF0069EAC6 /* PREVIEWS.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723911D339BD0069EAC6 /* PREVIEWS.CK1 */; };
+ 63CB72D111D339DF0069EAC6 /* readme.txt in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723A11D339BD0069EAC6 /* readme.txt */; };
+ 63CB72D211D339DF0069EAC6 /* SOUNDS.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723B11D339BD0069EAC6 /* SOUNDS.CK1 */; };
+ 63CB72D311D339DF0069EAC6 /* STATUS.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723C11D339BD0069EAC6 /* STATUS.CK1 */; };
+ 63CB72D411D339DF0069EAC6 /* STORYTXT.CK1 in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723D11D339BD0069EAC6 /* STORYTXT.CK1 */; };
+ 63CB72D511D339DF0069EAC6 /* yorp.pat in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723E11D339BD0069EAC6 /* yorp.pat */; };
+ 63CB72D611D339DF0069EAC6 /* Yorphius.BAT in Copy Yorphius Files */ = {isa = PBXBuildFile; fileRef = 63CB723F11D339BD0069EAC6 /* Yorphius.BAT */; };
63CD120311CFF5FC00F60BC8 /* arguments.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10A511CFF5FB00F60BC8 /* arguments.cpp */; };
63CD120411CFF5FC00F60BC8 /* CGame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10A711CFF5FB00F60BC8 /* CGame.cpp */; };
63CD120511CFF5FC00F60BC8 /* CGameControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CD10A911CFF5FB00F60BC8 /* CGameControl.cpp */; };
@@ -335,14 +409,52 @@
name = "Copy Text Files";
runOnlyForDeploymentPostprocessing = 0;
};
- 637F48BC105C96AF00DE486C /* Copy Game Data Files */ = {
+ 637F48BC105C96AF00DE486C /* Copy Keen X Files */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
- dstPath = data/games;
+ dstPath = data/games/keenx;
dstSubfolderSpec = 7;
files = (
+ 63CB728D11D339D50069EAC6 /* CK1PATCH.EXE in Copy Keen X Files */,
+ 63CB728E11D339D50069EAC6 /* EGAHEAD.CK1 in Copy Keen X Files */,
+ 63CB728F11D339D50069EAC6 /* EGALATCH.CK1 in Copy Keen X Files */,
+ 63CB729011D339D50069EAC6 /* EGASPRIT.CK1 in Copy Keen X Files */,
+ 63CB729111D339D50069EAC6 /* ENDTEXT.CK1 in Copy Keen X Files */,
+ 63CB729211D339D50069EAC6 /* FINALE.CK1 in Copy Keen X Files */,
+ 63CB729311D339D50069EAC6 /* HELPTEXT.CK1 in Copy Keen X Files */,
+ 63CB729411D339D50069EAC6 /* KEEN1.DOC in Copy Keen X Files */,
+ 63CB729511D339D50069EAC6 /* KEEN1.EXE in Copy Keen X Files */,
+ 63CB729611D339D50069EAC6 /* LEVEL01.CK1 in Copy Keen X Files */,
+ 63CB729711D339D50069EAC6 /* LEVEL02.CK1 in Copy Keen X Files */,
+ 63CB729811D339D50069EAC6 /* LEVEL03.CK1 in Copy Keen X Files */,
+ 63CB729911D339D50069EAC6 /* LEVEL04.CK1 in Copy Keen X Files */,
+ 63CB729A11D339D50069EAC6 /* LEVEL05.CK1 in Copy Keen X Files */,
+ 63CB729B11D339D50069EAC6 /* LEVEL06.CK1 in Copy Keen X Files */,
+ 63CB729C11D339D50069EAC6 /* LEVEL07.CK1 in Copy Keen X Files */,
+ 63CB729D11D339D50069EAC6 /* LEVEL08.CK1 in Copy Keen X Files */,
+ 63CB729E11D339D50069EAC6 /* LEVEL09.CK1 in Copy Keen X Files */,
+ 63CB729F11D339D50069EAC6 /* LEVEL10.CK1 in Copy Keen X Files */,
+ 63CB72A011D339D50069EAC6 /* LEVEL11.CK1 in Copy Keen X Files */,
+ 63CB72A111D339D50069EAC6 /* LEVEL12.CK1 in Copy Keen X Files */,
+ 63CB72A211D339D50069EAC6 /* LEVEL13.CK1 in Copy Keen X Files */,
+ 63CB72A311D339D50069EAC6 /* LEVEL14.CK1 in Copy Keen X Files */,
+ 63CB72A411D339D50069EAC6 /* LEVEL15.CK1 in Copy Keen X Files */,
+ 63CB72A511D339D50069EAC6 /* LEVEL16.CK1 in Copy Keen X Files */,
+ 63CB72A611D339D50069EAC6 /* LEVEL22.CK1 in Copy Keen X Files */,
+ 63CB72A711D339D50069EAC6 /* LEVEL29.CK1 in Copy Keen X Files */,
+ 63CB72A811D339D50069EAC6 /* LEVEL80.CK1 in Copy Keen X Files */,
+ 63CB72A911D339D50069EAC6 /* LEVEL81.CK1 in Copy Keen X Files */,
+ 63CB72AA11D339D50069EAC6 /* LEVEL90.CK1 in Copy Keen X Files */,
+ 63CB72AB11D339D50069EAC6 /* PREVIEW2.CK1 in Copy Keen X Files */,
+ 63CB72AC11D339D50069EAC6 /* PREVIEW3.CK1 in Copy Keen X Files */,
+ 63CB72AD11D339D50069EAC6 /* PREVIEWS.CK1 in Copy Keen X Files */,
+ 63CB72AE11D339D50069EAC6 /* ReadMe.txt in Copy Keen X Files */,
+ 63CB72AF11D339D50069EAC6 /* SOUNDS.CK1 in Copy Keen X Files */,
+ 63CB72B011D339D50069EAC6 /* STORYTXT.CK1 in Copy Keen X Files */,
+ 63CB72B111D339D50069EAC6 /* XkyKeen.pat in Copy Keen X Files */,
+ 63CB72B211D339D50069EAC6 /* XkyKeen1.bat in Copy Keen X Files */,
);
- name = "Copy Game Data Files";
+ name = "Copy Keen X Files";
runOnlyForDeploymentPostprocessing = 0;
};
639C98D511B2BC1400D239D1 /* Copy Keen 1 GFX Files */ = {
@@ -356,6 +468,52 @@
name = "Copy Keen 1 GFX Files";
runOnlyForDeploymentPostprocessing = 0;
};
+ 63CB728A11D339BD0069EAC6 /* Copy Yorphius Files */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = data/games/yorphius;
+ dstSubfolderSpec = 7;
+ files = (
+ 63CB72B311D339DF0069EAC6 /* CK1PATCH.EXE in Copy Yorphius Files */,
+ 63CB72B411D339DF0069EAC6 /* DUMP.BEH in Copy Yorphius Files */,
+ 63CB72B511D339DF0069EAC6 /* EGAHEAD.CK1 in Copy Yorphius Files */,
+ 63CB72B611D339DF0069EAC6 /* EGALATCH.CK1 in Copy Yorphius Files */,
+ 63CB72B711D339DF0069EAC6 /* EGASPRIT.CK1 in Copy Yorphius Files */,
+ 63CB72B811D339DF0069EAC6 /* ENDTEXT.CK1 in Copy Yorphius Files */,
+ 63CB72B911D339DF0069EAC6 /* FINALE.CK1 in Copy Yorphius Files */,
+ 63CB72BA11D339DF0069EAC6 /* HELPTEXT.CK1 in Copy Yorphius Files */,
+ 63CB72BB11D339DF0069EAC6 /* KEEN1.EXE in Copy Yorphius Files */,
+ 63CB72BC11D339DF0069EAC6 /* LEVEL01.CK1 in Copy Yorphius Files */,
+ 63CB72BD11D339DF0069EAC6 /* LEVEL02.CK1 in Copy Yorphius Files */,
+ 63CB72BE11D339DF0069EAC6 /* LEVEL03.CK1 in Copy Yorphius Files */,
+ 63CB72BF11D339DF0069EAC6 /* LEVEL04.CK1 in Copy Yorphius Files */,
+ 63CB72C011D339DF0069EAC6 /* LEVEL05.CK1 in Copy Yorphius Files */,
+ 63CB72C111D339DF0069EAC6 /* LEVEL06.CK1 in Copy Yorphius Files */,
+ 63CB72C211D339DF0069EAC6 /* LEVEL07.CK1 in Copy Yorphius Files */,
+ 63CB72C311D339DF0069EAC6 /* LEVEL08.CK1 in Copy Yorphius Files */,
+ 63CB72C411D339DF0069EAC6 /* LEVEL09.CK1 in Copy Yorphius Files */,
+ 63CB72C511D339DF0069EAC6 /* LEVEL10.CK1 in Copy Yorphius Files */,
+ 63CB72C611D339DF0069EAC6 /* LEVEL11.CK1 in Copy Yorphius Files */,
+ 63CB72C711D339DF0069EAC6 /* LEVEL12.CK1 in Copy Yorphius Files */,
+ 63CB72C811D339DF0069EAC6 /* LEVEL13.CK1 in Copy Yorphius Files */,
+ 63CB72C911D339DF0069EAC6 /* LEVEL14.CK1 in Copy Yorphius Files */,
+ 63CB72CA11D339DF0069EAC6 /* LEVEL15.CK1 in Copy Yorphius Files */,
+ 63CB72CB11D339DF0069EAC6 /* LEVEL16.CK1 in Copy Yorphius Files */,
+ 63CB72CC11D339DF0069EAC6 /* LEVEL80.CK1 in Copy Yorphius Files */,
+ 63CB72CD11D339DF0069EAC6 /* LEVEL90.CK1 in Copy Yorphius Files */,
+ 63CB72CE11D339DF0069EAC6 /* PREVIEW2.CK1 in Copy Yorphius Files */,
+ 63CB72CF11D339DF0069EAC6 /* PREVIEW3.CK1 in Copy Yorphius Files */,
+ 63CB72D011D339DF0069EAC6 /* PREVIEWS.CK1 in Copy Yorphius Files */,
+ 63CB72D111D339DF0069EAC6 /* readme.txt in Copy Yorphius Files */,
+ 63CB72D211D339DF0069EAC6 /* SOUNDS.CK1 in Copy Yorphius Files */,
+ 63CB72D311D339DF0069EAC6 /* STATUS.CK1 in Copy Yorphius Files */,
+ 63CB72D411D339DF0069EAC6 /* STORYTXT.CK1 in Copy Yorphius Files */,
+ 63CB72D511D339DF0069EAC6 /* yorp.pat in Copy Yorphius Files */,
+ 63CB72D611D339DF0069EAC6 /* Yorphius.BAT in Copy Yorphius Files */,
+ );
+ name = "Copy Yorphius Files";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
63D4A718107FEC1100E43500 /* Copy Res Files */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
@@ -480,6 +638,80 @@
638890BE1162A490009810AC /* extratiles.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = extratiles.bmp; sourceTree = "<group>"; };
63999E3910D151BA00EDB6CD /* fonts.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = fonts.bmp; sourceTree = "<group>"; };
63AB8C2E107C62D0001EE22F /* cglogo.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = cglogo.icns; sourceTree = "<group>"; };
+ 63CB71F511D339BC0069EAC6 /* CK1PATCH.EXE */ = {isa = PBXFileReference; lastKnownFileType = file; path = CK1PATCH.EXE; sourceTree = "<group>"; };
+ 63CB71F611D339BC0069EAC6 /* EGAHEAD.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = EGAHEAD.CK1; sourceTree = "<group>"; };
+ 63CB71F711D339BC0069EAC6 /* EGALATCH.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = EGALATCH.CK1; sourceTree = "<group>"; };
+ 63CB71F811D339BC0069EAC6 /* EGASPRIT.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = EGASPRIT.CK1; sourceTree = "<group>"; };
+ 63CB71F911D339BC0069EAC6 /* ENDTEXT.CK1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ENDTEXT.CK1; sourceTree = "<group>"; };
+ 63CB71FA11D339BC0069EAC6 /* FINALE.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = FINALE.CK1; sourceTree = "<group>"; };
+ 63CB71FB11D339BC0069EAC6 /* HELPTEXT.CK1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HELPTEXT.CK1; sourceTree = "<group>"; };
+ 63CB71FC11D339BC0069EAC6 /* KEEN1.DOC */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = KEEN1.DOC; sourceTree = "<group>"; };
+ 63CB71FD11D339BC0069EAC6 /* KEEN1.EXE */ = {isa = PBXFileReference; lastKnownFileType = file; path = KEEN1.EXE; sourceTree = "<group>"; };
+ 63CB71FE11D339BC0069EAC6 /* LEVEL01.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL01.CK1; sourceTree = "<group>"; };
+ 63CB71FF11D339BC0069EAC6 /* LEVEL02.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL02.CK1; sourceTree = "<group>"; };
+ 63CB720011D339BC0069EAC6 /* LEVEL03.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL03.CK1; sourceTree = "<group>"; };
+ 63CB720111D339BC0069EAC6 /* LEVEL04.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL04.CK1; sourceTree = "<group>"; };
+ 63CB720211D339BC0069EAC6 /* LEVEL05.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL05.CK1; sourceTree = "<group>"; };
+ 63CB720311D339BC0069EAC6 /* LEVEL06.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL06.CK1; sourceTree = "<group>"; };
+ 63CB720411D339BC0069EAC6 /* LEVEL07.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL07.CK1; sourceTree = "<group>"; };
+ 63CB720511D339BC0069EAC6 /* LEVEL08.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL08.CK1; sourceTree = "<group>"; };
+ 63CB720611D339BC0069EAC6 /* LEVEL09.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL09.CK1; sourceTree = "<group>"; };
+ 63CB720711D339BC0069EAC6 /* LEVEL10.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL10.CK1; sourceTree = "<group>"; };
+ 63CB720811D339BC0069EAC6 /* LEVEL11.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL11.CK1; sourceTree = "<group>"; };
+ 63CB720911D339BC0069EAC6 /* LEVEL12.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL12.CK1; sourceTree = "<group>"; };
+ 63CB720A11D339BC0069EAC6 /* LEVEL13.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL13.CK1; sourceTree = "<group>"; };
+ 63CB720B11D339BC0069EAC6 /* LEVEL14.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL14.CK1; sourceTree = "<group>"; };
+ 63CB720C11D339BC0069EAC6 /* LEVEL15.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL15.CK1; sourceTree = "<group>"; };
+ 63CB720D11D339BC0069EAC6 /* LEVEL16.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL16.CK1; sourceTree = "<group>"; };
+ 63CB720E11D339BC0069EAC6 /* LEVEL22.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL22.CK1; sourceTree = "<group>"; };
+ 63CB720F11D339BC0069EAC6 /* LEVEL29.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL29.CK1; sourceTree = "<group>"; };
+ 63CB721011D339BC0069EAC6 /* LEVEL80.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL80.CK1; sourceTree = "<group>"; };
+ 63CB721111D339BC0069EAC6 /* LEVEL81.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL81.CK1; sourceTree = "<group>"; };
+ 63CB721211D339BC0069EAC6 /* LEVEL90.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL90.CK1; sourceTree = "<group>"; };
+ 63CB721311D339BC0069EAC6 /* PREVIEW2.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = PREVIEW2.CK1; sourceTree = "<group>"; };
+ 63CB721411D339BC0069EAC6 /* PREVIEW3.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = PREVIEW3.CK1; sourceTree = "<group>"; };
+ 63CB721511D339BC0069EAC6 /* PREVIEWS.CK1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PREVIEWS.CK1; sourceTree = "<group>"; };
+ 63CB721611D339BC0069EAC6 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadMe.txt; sourceTree = "<group>"; };
+ 63CB721711D339BC0069EAC6 /* SOUNDS.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = SOUNDS.CK1; sourceTree = "<group>"; };
+ 63CB721811D339BC0069EAC6 /* STORYTXT.CK1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = STORYTXT.CK1; sourceTree = "<group>"; };
+ 63CB721911D339BC0069EAC6 /* XkyKeen.pat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = XkyKeen.pat; sourceTree = "<group>"; };
+ 63CB721A11D339BC0069EAC6 /* XkyKeen1.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = XkyKeen1.bat; sourceTree = "<group>"; };
+ 63CB721C11D339BC0069EAC6 /* CK1PATCH.EXE */ = {isa = PBXFileReference; lastKnownFileType = file; path = CK1PATCH.EXE; sourceTree = "<group>"; };
+ 63CB721D11D339BC0069EAC6 /* DUMP.BEH */ = {isa = PBXFileReference; lastKnownFileType = file; path = DUMP.BEH; sourceTree = "<group>"; };
+ 63CB721E11D339BC0069EAC6 /* EGAHEAD.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = EGAHEAD.CK1; sourceTree = "<group>"; };
+ 63CB721F11D339BC0069EAC6 /* EGALATCH.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = EGALATCH.CK1; sourceTree = "<group>"; };
+ 63CB722011D339BC0069EAC6 /* EGASPRIT.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = EGASPRIT.CK1; sourceTree = "<group>"; };
+ 63CB722111D339BC0069EAC6 /* ENDTEXT.CK1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ENDTEXT.CK1; sourceTree = "<group>"; };
+ 63CB722211D339BC0069EAC6 /* FINALE.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = FINALE.CK1; sourceTree = "<group>"; };
+ 63CB722311D339BC0069EAC6 /* HELPTEXT.CK1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HELPTEXT.CK1; sourceTree = "<group>"; };
+ 63CB722411D339BD0069EAC6 /* KEEN1.EXE */ = {isa = PBXFileReference; lastKnownFileType = file; path = KEEN1.EXE; sourceTree = "<group>"; };
+ 63CB722511D339BD0069EAC6 /* LEVEL01.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL01.CK1; sourceTree = "<group>"; };
+ 63CB722611D339BD0069EAC6 /* LEVEL02.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL02.CK1; sourceTree = "<group>"; };
+ 63CB722711D339BD0069EAC6 /* LEVEL03.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL03.CK1; sourceTree = "<group>"; };
+ 63CB722811D339BD0069EAC6 /* LEVEL04.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL04.CK1; sourceTree = "<group>"; };
+ 63CB722911D339BD0069EAC6 /* LEVEL05.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL05.CK1; sourceTree = "<group>"; };
+ 63CB722A11D339BD0069EAC6 /* LEVEL06.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL06.CK1; sourceTree = "<group>"; };
+ 63CB722B11D339BD0069EAC6 /* LEVEL07.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL07.CK1; sourceTree = "<group>"; };
+ 63CB722C11D339BD0069EAC6 /* LEVEL08.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL08.CK1; sourceTree = "<group>"; };
+ 63CB722D11D339BD0069EAC6 /* LEVEL09.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL09.CK1; sourceTree = "<group>"; };
+ 63CB722E11D339BD0069EAC6 /* LEVEL10.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL10.CK1; sourceTree = "<group>"; };
+ 63CB722F11D339BD0069EAC6 /* LEVEL11.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL11.CK1; sourceTree = "<group>"; };
+ 63CB723011D339BD0069EAC6 /* LEVEL12.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL12.CK1; sourceTree = "<group>"; };
+ 63CB723111D339BD0069EAC6 /* LEVEL13.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL13.CK1; sourceTree = "<group>"; };
+ 63CB723211D339BD0069EAC6 /* LEVEL14.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL14.CK1; sourceTree = "<group>"; };
+ 63CB723311D339BD0069EAC6 /* LEVEL15.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL15.CK1; sourceTree = "<group>"; };
+ 63CB723411D339BD0069EAC6 /* LEVEL16.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL16.CK1; sourceTree = "<group>"; };
+ 63CB723511D339BD0069EAC6 /* LEVEL80.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL80.CK1; sourceTree = "<group>"; };
+ 63CB723611D339BD0069EAC6 /* LEVEL90.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = LEVEL90.CK1; sourceTree = "<group>"; };
+ 63CB723711D339BD0069EAC6 /* PREVIEW2.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = PREVIEW2.CK1; sourceTree = "<group>"; };
+ 63CB723811D339BD0069EAC6 /* PREVIEW3.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = PREVIEW3.CK1; sourceTree = "<group>"; };
+ 63CB723911D339BD0069EAC6 /* PREVIEWS.CK1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PREVIEWS.CK1; sourceTree = "<group>"; };
+ 63CB723A11D339BD0069EAC6 /* readme.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = readme.txt; sourceTree = "<group>"; };
+ 63CB723B11D339BD0069EAC6 /* SOUNDS.CK1 */ = {isa = PBXFileReference; lastKnownFileType = file; path = SOUNDS.CK1; sourceTree = "<group>"; };
+ 63CB723C11D339BD0069EAC6 /* STATUS.CK1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = STATUS.CK1; sourceTree = "<group>"; };
+ 63CB723D11D339BD0069EAC6 /* STORYTXT.CK1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = STORYTXT.CK1; sourceTree = "<group>"; };
+ 63CB723E11D339BD0069EAC6 /* yorp.pat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = yorp.pat; sourceTree = "<group>"; };
+ 63CB723F11D339BD0069EAC6 /* Yorphius.BAT */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Yorphius.BAT; sourceTree = "<group>"; };
63CD10A511CFF5FB00F60BC8 /* arguments.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = arguments.cpp; sourceTree = "<group>"; };
63CD10A611CFF5FB00F60BC8 /* arguments.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = arguments.h; sourceTree = "<group>"; };
63CD10A711CFF5FB00F60BC8 /* CGame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CGame.cpp; sourceTree = "<group>"; };
@@ -935,6 +1167,8 @@
63FFE148109FA461002FF190 /* keen2 */,
63FFE151109FA4A4002FF190 /* keen3 */,
63FC18281144447200D7BB0C /* keen4 */,
+ 63CB71F411D339BC0069EAC6 /* keenx */,
+ 63CB721B11D339BC0069EAC6 /* yorphius */,
);
includeInIndex = 1;
path = games;
@@ -980,6 +1214,94 @@
path = keen1;
sourceTree = "<group>";
};
+ 63CB71F411D339BC0069EAC6 /* keenx */ = {
+ isa = PBXGroup;
+ children = (
+ 63CB71F511D339BC0069EAC6 /* CK1PATCH.EXE */,
+ 63CB71F611D339BC0069EAC6 /* EGAHEAD.CK1 */,
+ 63CB71F711D339BC0069EAC6 /* EGALATCH.CK1 */,
+ 63CB71F811D339BC0069EAC6 /* EGASPRIT.CK1 */,
+ 63CB71F911D339BC0069EAC6 /* ENDTEXT.CK1 */,
+ 63CB71FA11D339BC0069EAC6 /* FINALE.CK1 */,
+ 63CB71FB11D339BC0069EAC6 /* HELPTEXT.CK1 */,
+ 63CB71FC11D339BC0069EAC6 /* KEEN1.DOC */,
+ 63CB71FD11D339BC0069EAC6 /* KEEN1.EXE */,
+ 63CB71FE11D339BC0069EAC6 /* LEVEL01.CK1 */,
+ 63CB71FF11D339BC0069EAC6 /* LEVEL02.CK1 */,
+ 63CB720011D339BC0069EAC6 /* LEVEL03.CK1 */,
+ 63CB720111D339BC0069EAC6 /* LEVEL04.CK1 */,
+ 63CB720211D339BC0069EAC6 /* LEVEL05.CK1 */,
+ 63CB720311D339BC0069EAC6 /* LEVEL06.CK1 */,
+ 63CB720411D339BC0069EAC6 /* LEVEL07.CK1 */,
+ 63CB720511D339BC0069EAC6 /* LEVEL08.CK1 */,
+ 63CB720611D339BC0069EAC6 /* LEVEL09.CK1 */,
+ 63CB720711D339BC0069EAC6 /* LEVEL10.CK1 */,
+ 63CB720811D339BC0069EAC6 /* LEVEL11.CK1 */,
+ 63CB720911D339BC0069EAC6 /* LEVEL12.CK1 */,
+ 63CB720A11D339BC0069EAC6 /* LEVEL13.CK1 */,
+ 63CB720B11D339BC0069EAC6 /* LEVEL14.CK1 */,
+ 63CB720C11D339BC0069EAC6 /* LEVEL15.CK1 */,
+ 63CB720D11D339BC0069EAC6 /* LEVEL16.CK1 */,
+ 63CB720E11D339BC0069EAC6 /* LEVEL22.CK1 */,
+ 63CB720F11D339BC0069EAC6 /* LEVEL29.CK1 */,
+ 63CB721011D339BC0069EAC6 /* LEVEL80.CK1 */,
+ 63CB721111D339BC0069EAC6 /* LEVEL81.CK1 */,
+ 63CB721211D339BC0069EAC6 /* LEVEL90.CK1 */,
+ 63CB721311D339BC0069EAC6 /* PREVIEW2.CK1 */,
+ 63CB721411D339BC0069EAC6 /* PREVIEW3.CK1 */,
+ 63CB721511D339BC0069EAC6 /* PREVIEWS.CK1 */,
+ 63CB721611D339BC0069EAC6 /* ReadMe.txt */,
+ 63CB721711D339BC0069EAC6 /* SOUNDS.CK1 */,
+ 63CB721811D339BC0069EAC6 /* STORYTXT.CK1 */,
+ 63CB721911D339BC0069EAC6 /* XkyKeen.pat */,
+ 63CB721A11D339BC0069EAC6 /* XkyKeen1.bat */,
+ );
+ path = keenx;
+ sourceTree = "<group>";
+ };
+ 63CB721B11D339BC0069EAC6 /* yorphius */ = {
+ isa = PBXGroup;
+ children = (
+ 63CB721C11D339BC0069EAC6 /* CK1PATCH.EXE */,
+ 63CB721D11D339BC0069EAC6 /* DUMP.BEH */,
+ 63CB721E11D339BC0069EAC6 /* EGAHEAD.CK1 */,
+ 63CB721F11D339BC0069EAC6 /* EGALATCH.CK1 */,
+ 63CB722011D339BC0069EAC6 /* EGASPRIT.CK1 */,
+ 63CB722111D339BC0069EAC6 /* ENDTEXT.CK1 */,
+ 63CB722211D339BC0069EAC6 /* FINALE.CK1 */,
+ 63CB722311D339BC0069EAC6 /* HELPTEXT.CK1 */,
+ 63CB722411D339BD0069EAC6 /* KEEN1.EXE */,
+ 63CB722511D339BD0069EAC6 /* LEVEL01.CK1 */,
+ 63CB722611D339BD0069EAC6 /* LEVEL02.CK1 */,
+ 63CB722711D339BD0069EAC6 /* LEVEL03.CK1 */,
+ 63CB722811D339BD0069EAC6 /* LEVEL04.CK1 */,
+ 63CB722911D339BD0069EAC6 /* LEVEL05.CK1 */,
+ 63CB722A11D339BD0069EAC6 /* LEVEL06.CK1 */,
+ 63CB722B11D339BD0069EAC6 /* LEVEL07.CK1 */,
+ 63CB722C11D339BD0069EAC6 /* LEVEL08.CK1 */,
+ 63CB722D11D339BD0069EAC6 /* LEVEL09.CK1 */,
+ 63CB722E11D339BD0069EAC6 /* LEVEL10.CK1 */,
+ 63CB722F11D339BD0069EAC6 /* LEVEL11.CK1 */,
+ 63CB723011D339BD0069EAC6 /* LEVEL12.CK1 */,
+ 63CB723111D339BD0069EAC6 /* LEVEL13.CK1 */,
+ 63CB723211D339BD0069EAC6 /* LEVEL14.CK1 */,
+ 63CB723311D339BD0069EAC6 /* LEVEL15.CK1 */,
+ 63CB723411D339BD0069EAC6 /* LEVEL16.CK1 */,
+ 63CB723511D339BD0069EAC6 /* LEVEL80.CK1 */,
+ 63CB723611D339BD0069EAC6 /* LEVEL90.CK1 */,
+ 63CB723711D339BD0069EAC6 /* PREVIEW2.CK1 */,
+ 63CB723811D339BD0069EAC6 /* PREVIEW3.CK1 */,
+ 63CB723911D339BD0069EAC6 /* PREVIEWS.CK1 */,
+ 63CB723A11D339BD0069EAC6 /* readme.txt */,
+ 63CB723B11D339BD0069EAC6 /* SOUNDS.CK1 */,
+ 63CB723C11D339BD0069EAC6 /* STATUS.CK1 */,
+ 63CB723D11D339BD0069EAC6 /* STORYTXT.CK1 */,
+ 63CB723E11D339BD0069EAC6 /* yorp.pat */,
+ 63CB723F11D339BD0069EAC6 /* Yorphius.BAT */,
+ );
+ path = yorphius;
+ sourceTree = "<group>";
+ };
63CD10A211CFF5FB00F60BC8 /* src */ = {
isa = PBXGroup;
children = (
@@ -1582,12 +1904,13 @@
235755D1101A5E5900275638 /* Resources */,
6350FA7D104490F300A992D5 /* Copy Data Files */,
23575637101A5E5900275638 /* Copy Frameworks */,
- 637F48BC105C96AF00DE486C /* Copy Game Data Files */,
6350FA7E104490F300A992D5 /* Copy Keen 1 Files */,
639C98D511B2BC1400D239D1 /* Copy Keen 1 GFX Files */,
63FFE15D109FA521002FF190 /* Copy Keen 2 Fix Files */,
63FFE15E109FA521002FF190 /* Copy Keen 3 Fix Files */,
63FC1860114444B900D7BB0C /* Copy Keen 4 Files */,
+ 637F48BC105C96AF00DE486C /* Copy Keen X Files */,
+ 63CB728A11D339BD0069EAC6 /* Copy Yorphius Files */,
63D4A718107FEC1100E43500 /* Copy Res Files */,
6350FB5010449E3C00A992D5 /* Copy Text Files */,
6350FC7A1044F7DE00A992D5 /* Create DMG */,
Modified: cgenius/trunk/src/engine/infoscenes/CHighScores.cpp
===================================================================
--- cgenius/trunk/src/engine/infoscenes/CHighScores.cpp 2010-06-24 07:23:34 UTC (rev 1271)
+++ cgenius/trunk/src/engine/infoscenes/CHighScores.cpp 2010-06-24 07:28:06 UTC (rev 1272)
@@ -29,7 +29,7 @@
{
m_Map.setScrollSurface(g_pVideoDriver->ScrollSurface);
m_Map.setTileMap(g_pGfxEngine->getTileMap(0));
-
+
// Set default Scores
m_Name[0] = "Gerstrong";
m_Name[1] = "Tulip";
@@ -45,35 +45,35 @@
memset(m_Extra, 0, 8*4*sizeof(bool));
memset(m_Cities, 0, 8*sizeof(unsigned int));
-
+
// Which process function will be cycled trough
mp_process = &CHighScores::processShow;
-
+
m_Episode = Episode;
m_DataDirectory = DataDirectory;
-
+
loadHighScoreTable();
-
+
// Load the map for the background
CMapLoader MapLoader(&m_Map);
MapLoader.load(m_Episode, 90, DataDirectory, false);
-
+
m_Map.gotoPos(HIGHSCORETABLE_X, HIGHSCORETABLE_Y);
-
+
// Draw Background. This is only needed once, since Scrollsurface
// won't be cleared every update screen
m_Map.drawAll();
-
+
// Setup the Bitmaps that will be shown
stBitmap bmp;
-
+
bmp.p_Bitmap = g_pGfxEngine->getBitmap("HIGHSCOR");
bmp.rect.x = 160-(bmp.p_Bitmap->getWidth()/2);
bmp.rect.y = 6;
bmp.rect.w = bmp.p_Bitmap->getWidth();
bmp.rect.h = bmp.p_Bitmap->getHeight();
m_Bitmaps.push_back(bmp);
-
+
if(m_Episode == 2)
{
bmp.p_Bitmap = g_pGfxEngine->getBitmap("SAVED");
@@ -86,14 +86,14 @@
}
else if(m_Episode == 1)
{
-
+
bmp.p_Bitmap = g_pGfxEngine->getBitmap("PARTS");
bmp.rect.x = 232;
bmp.rect.y = 32;
bmp.rect.w = bmp.p_Bitmap->getWidth();
bmp.rect.h = bmp.p_Bitmap->getHeight();
m_Bitmaps.push_back(bmp);
-
+
// Put the Tiles, of the parts that were collected
if(!saving_mode)
{
@@ -124,14 +124,14 @@
void CHighScores::process()
{
SDL_Surface *sfc = g_pVideoDriver->FGLayerSurface;
-
+
// draw the Bitmaps
std::vector<stBitmap>::iterator it_bmp = m_Bitmaps.begin();
for(; it_bmp != m_Bitmaps.end() ; it_bmp++)
{
it_bmp->p_Bitmap->draw(sfc, it_bmp->rect.x, it_bmp->rect.y);
}
-
+
// Print the text of the highscores
for( Uint8 i=0 ; i<8 ; i++ )
{
@@ -141,16 +141,16 @@
g_pGfxEngine->getFont(0).drawFont(sfc, m_Name[i],x,y+(i<<4), true);
g_pGfxEngine->getFont(0).drawFont(sfc, m_Score[i],x2-((m_Score[i].size())<<3),y+(i<<4), true);
}
-
+
// Here it must be split up into Episodes 1, 2 and 3.
if(m_Episode == 2)
{
for( Uint8 i=0 ; i<8 ; i++ )
g_pGfxEngine->getFont(0).drawFont(sfc, itoa(m_Cities[i]), 252, 56+(i<<4), true);
}
-
+
(this->*mp_process)();
-
+
m_Map.animateAllTiles();
}
@@ -163,34 +163,40 @@
void CHighScores::processWriting()
{
SDL_Surface *sfc = g_pVideoDriver->FGLayerSurface;
-
- // Add or character depending on what the user writes
+
+ // Get the input
+ if(g_pInput->getPressedIsTypingKey() && (m_Name[m_Place].length() < 13))
+ {
+ m_Name[m_Place].append(g_pInput->getPressedTypingKey());
+ }
+
+ /*// Add or character depending on what the user writes
for(int i=KA ; i<=KZ ; i++)
{
if (g_pInput->getHoldedKey(KSHIFT) && g_pInput->getPressedKey(i) && m_Name[m_Place].size() < 13)
m_Name[m_Place].push_back('A' + i - KA);
else if(g_pInput->getPressedKey(i) && m_Name[m_Place].size() < 13)
m_Name[m_Place].push_back('a' + i - KA);
- }
-
- if(g_pInput->getPressedKey(KBCKSPCE) && (m_Name[m_Place].size() > 0))
+ }*/
+
+ if(g_pInput->getPressedKey(KBCKSPCE) && (m_Name[m_Place].length() > 0))
{
- m_Name[m_Place].erase(m_Name[m_Place].size()-1);
+ m_Name[m_Place].erase(m_Name[m_Place].length()-1);
}
-
+
if(g_pInput->getPressedKey(KENTER))
{
// Save the Table and change to show mode, which can be closed by any other key
saveHighScoreTable();
mp_process = &CHighScores::processShow;
}
-
-
+
+
int x = (m_Episode == 3) ? 69 : 40;
int y = (m_Episode == 2) ? 56 : 52;
if(m_blink) g_pGfxEngine->getFont(0).drawFont(sfc, m_Name[m_Place]+"_",x, y+(m_Place<<4), true);
else g_pGfxEngine->getFont(0).drawFont(sfc, m_Name[m_Place]+" ",x, y+(m_Place<<4), true);
-
+
if(m_blinkctr > BLINK_TIME){
m_blinkctr = 0;
m_blink = !m_blink;
@@ -202,7 +208,7 @@
{
writeHighScoreCommon(score);
memcpy(m_Extra[m_Place], extra,4*sizeof(bool));
-
+
// Set the tiles if EP1 (collected parts)
if(m_Episode == 1)
{
@@ -227,15 +233,15 @@
{
m_Place=6;
int num;
-
+
num = atoi(m_Score[m_Place]);
if(num > score)
return; // Sorry, but score not high enough
-
+
// Enough Points,
// change the Highscore config to writing..
mp_process = &CHighScores::processWriting;
-
+
while(m_Place>0 && score > num)
{
m_Name[m_Place] = m_Name[m_Place-1];
@@ -243,20 +249,20 @@
memcpy(m_Extra[m_Place], m_Extra[m_Place-1], 4);
m_Cities[m_Place] = m_Cities[m_Place-1];
m_Place--;
-
+
if(m_Place > 0)
num = atoi(m_Score[m_Place-1]);
}
-
+
m_Score[m_Place] = itoa(score);
-
+
m_Name[m_Place+1] = m_Name[m_Place];
-
+
if(score < 999999)
m_Score[m_Place] = itoa(score);
else
m_Score[m_Place] = "*MAX*";
-
+
m_Name[m_Place] = "";
}
@@ -265,19 +271,19 @@
ifstream ScoreTableFile;
std::string buf = "highscoreep"+itoa(m_Episode)+".dat";
OpenGameFileR(ScoreTableFile, buf, ios::binary);
-
+
if(!ScoreTableFile) return false;
-
+
char c_name[8][16];
char c_score[8][8];
unsigned char c_extra[8][4];
int c_cities[8];
-
+
memset(c_name, 0, 8*16*sizeof(char));
memset(c_score, 0, 8*8*sizeof(char));
memset(c_extra, 0, 8*4*sizeof(char));
memset(c_cities, 0, 8*sizeof(char));
-
+
ScoreTableFile.read((char*)c_name, 8*16*sizeof(char));
ScoreTableFile.seekg(8*16*sizeof(char),ios_base::cur);
ScoreTableFile.read((char*)c_score, 8*8*sizeof(char));
@@ -285,7 +291,7 @@
ScoreTableFile.read((char*)(c_extra), 8*4*sizeof(unsigned char));
ScoreTableFile.seekg(8*4*sizeof(char),ios_base::cur);
ScoreTableFile.read((char*)(c_cities), 8*sizeof(int));
-
+
// Format the name to C++ Strings
for(size_t i=0 ; i<8 ; i++)
{
@@ -294,9 +300,9 @@
memcpy(&m_Extra[i], &c_extra[i], 4);
m_Cities[i] = c_cities[i];
}
-
+
ScoreTableFile.close();
-
+
return true;
}
@@ -305,19 +311,19 @@
ofstream ScoreTableFile;
std::string buf = "highscoreep"+itoa(m_Episode)+".dat";
OpenGameFileW(ScoreTableFile, buf, ios::binary);
-
+
if(!ScoreTableFile) return false;
-
+
char c_name[8][16];
char c_score[8][8];
unsigned char c_extra[8][4];
int c_cities[8];
-
+
memset(c_name, 0, 8*16*sizeof(char));
memset(c_score, 0, 8*8*sizeof(char));
memset(c_extra, 0, 8*4*sizeof(char));
memset(c_cities, 0, 8*sizeof(char));
-
+
// Format the C++ strings to C Strings
for(size_t i=0 ; i<8 ; i++)
{
@@ -328,7 +334,7 @@
memcpy(c_extra[i], m_Extra[i], 4);
c_cities[i] = m_Cities[i];
}
-
+
ScoreTableFile.write((char*)(c_name), 8*16*sizeof(char));
ScoreTableFile.seekp(8*16*sizeof(char),ios_base::cur);
ScoreTableFile.write((char*)(c_score), 8*8*sizeof(char));
@@ -336,9 +342,9 @@
ScoreTableFile.write((char*)(c_extra), 8*4*sizeof(unsigned char));
ScoreTableFile.seekp(8*4*sizeof(char),ios_base::cur);
ScoreTableFile.write((char*) c_cities, 8*sizeof(int));
-
+
ScoreTableFile.close();
-
+
return true;
}
Added: cgenius/trunk/vfsroot/games/keenx/CK1PATCH.EXE
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/CK1PATCH.EXE
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/EGAHEAD.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/EGAHEAD.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/EGALATCH.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/EGALATCH.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/EGASPRIT.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/EGASPRIT.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/ENDTEXT.CK1
===================================================================
--- cgenius/trunk/vfsroot/games/keenx/ENDTEXT.CK1 (rev 0)
+++ cgenius/trunk/vfsroot/games/keenx/ENDTEXT.CK1 2010-06-24 07:28:06 UTC (rev 1272)
@@ -0,0 +1,34 @@
+~
+~ TO BE CONTINUED...
+~
+
+
+Keen flies into the Wormhole, utilizing what little information he could
+get his hands on about Mortimer's 2nd Fleet. Will he find it? Will he stop
+it in time? Only you can help find out!
+
+
+And from there, what lies ahead? What evil scheme is Mortimer planning? What
+nefarious defenses does he have lying in wait for Keen? Will the final
+confrontation be a toe-to-toe, lasers blasting showdown? Or will there be some
+unforseen strings attatched?
+
+ONLY ID SOFTWARE KNOWS FOR SURE--GAH!
+
+
+
+
+
+
+Thank you for playing my Keen1 Mod!
+
+--Xkylyr Rauh
+
+
+
+ \x97\x98 Commander Keen says:
+ \x99\x9A "Hope you enjoyed
+ the game. I did!"
+
+
+~ THE END (for now...)
\ No newline at end of file
Property changes on: cgenius/trunk/vfsroot/games/keenx/ENDTEXT.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: cgenius/trunk/vfsroot/games/keenx/FINALE.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/FINALE.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/HELPTEXT.CK1
===================================================================
--- cgenius/trunk/vfsroot/games/keenx/HELPTEXT.CK1 (rev 0)
+++ cgenius/trunk/vfsroot/games/keenx/HELPTEXT.CK1 2010-06-24 07:28:06 UTC (rev 1272)
@@ -0,0 +1,88 @@
+ \x9F \x9F \x9F\x9F\x9F\x9F \x9F \x9F\x9F\x9F
+ \x9F \x9F \x9F \x9F \x9F \x9F
+ \x9F\x9F\x9F\x9F \x9F\x9F\x9F \x9F \x9F\x9F\x9F
+ \x9F \x9F \x9F \x9F \x9F
+ \x9F \x9F \x9F\x9F\x9F\x9F \x9F\x9F\x9F\x9F \x9F
+
+
+You can move Commander Keen with the joystick or keyboard.
+
+
+When you first start Keen, you will be in keyboard mode. Let's look at the
+keys you need to know to play the game.
+
+KEY WHAT IT DOES
+
+Arrows Move Keen around
+
+Ctrl Jump
+
+Alt Use Pogo/Stop Pogo
+ (Pogo jumps higher)
+
+Ctrl AND Alt Fire Neural Stunner
+ (if it has charges)
+
+You can redefine these keys by pressing F3.
+
+
+OTHER IMPORTANT KEYS
+
+Spacebar Status screen
+
+F1 Help!
+
+F2 Sound on/off
+
+F3 Keyboard mode
+
+F4 Joystick mode
+
+F5 Save Game
+
+ESC Quit
+
+
+If you use the joystick, press button 1 to jump, button 2 to use the
+pogo, and both to fire the Neural Stunner. Controlling Keen while using the pogo is
+more difficult.
+
+When you are on the Ship map, you may be blocked by a Security Station, Device Center, or other
+obstacle. You must enter the area (press Ctrl or button 1) and finish it
+before proceeding.
+
+Optional levels are marked by Yellow Buildings. These are additional levels that may not work
+on all systems.
+
+When you enter an area, you can collect things by simply running into them.
+
+If you cannot pass through a door, there may be a "keygem" that the door
+requires. This keygem will be the same color as the door.
+
+
+~ TREASURES
+
+ Little \x84\x85 100 points
+ Candies \x86\x87
+
+ Yummy \x88\x89 200 points
+ Cookie \x8A\x8B
+
+ Juicy \x80\x81 500 points
+ Hot Dog \x82\x83
+
+ Fruit \x8C\x8D 1000 points
+ Snacks \x8E\x90
+
+ Bowl of \x91\x92 5000 points
+ Nachos \x94\x95
+
+You get an extra Keen every 20,000 points.
+
+
+ \x97\x98 Commander Keen says:
+ \x99\x9A "All this junk
+ food gives me a
+ tummyache!"
+
+~ END OF HELP
\ No newline at end of file
Property changes on: cgenius/trunk/vfsroot/games/keenx/HELPTEXT.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: cgenius/trunk/vfsroot/games/keenx/KEEN1.DOC
===================================================================
--- cgenius/trunk/vfsroot/games/keenx/KEEN1.DOC (rev 0)
+++ cgenius/trunk/vfsroot/games/keenx/KEEN1.DOC 2010-06-24 07:28:06 UTC (rev 1272)
@@ -0,0 +1,47 @@
+ COMMANDER KEEN: EPISODE ONE -- "INVASION OF THE VORTICONS"
+
+ >>> Version 1.31 <<<
+
+ Published by
+ Apogee Software Productions
+
+ Developed and Programmed by
+ Id Software
+
+ Never before has the shareware market seen a game of the quality of
+ Commander Keen. Ultra-high speed EGA scrolling graphics and animation
+ at 40 frames per second! (Cartoons are animated at just 24 frames/second.)
+
+ You will need 640 RAM, with at least 530 free RAM to play Commander Keen.
+ In other words, don't have too many RAM resident (TSR) programs running
+ while you attempt to play Commander Keen. You will also need an EGA or
+ VGA system. CGA is not supported, sorry.
+
+ Joystick and keyboard are both supported, but not the mouse.
+ In some rare cases Commander Keen will detect a joystick when you really
+ don't have one. This might cause the joystick mode to automatically be
+ activated, when you really want to use the keyboard! To switch back to
+ keyboard control after the game begins, simply press F4, then Esc.
+
+ Apogee Software has many other exciting games, please send $6 if you would
+ like a sample disk of other great games. Mention disk size and the type
+ of graphics system (CGA, EGA or VGA) that you have.
+
+ If you notice any peculiar keyboard related problems, like a beeping
+ keyboard, try starting Keen with the /K option, i.e. "KEEN1 /K".
+
+ *** COMMANDER KEEN: GOODBYE GALAXY ***
+ Finally released December 1991, the thrilling sequel of the shareware's
+ most popular shareware game ever! Over 1.6 MEGs of action-packed graphics
+ and animation, with ingenious TILTED VIEW levels, AD LIB/SOUNDBLASTER MUSIC,
+ three skills levels, 18 GIGANTIC, smooth-scrolling levels, and more...!
+
+ To order GOODBYE GALAXY, an epic two-episode saga, call Apogee at
+ 1-800-GAME123, during business hours: Mon-Fri, between 8am - 7pm, CST.
+
+ Thanks, and have fun with Commander Keen!
+
+ Scott Miller, President, Apogee
+
+
+
\ No newline at end of file
Property changes on: cgenius/trunk/vfsroot/games/keenx/KEEN1.DOC
___________________________________________________________________
Added: svn:executable
+ *
Added: cgenius/trunk/vfsroot/games/keenx/KEEN1.EXE
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/KEEN1.EXE
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/LEVEL01.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/LEVEL01.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/LEVEL02.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/LEVEL02.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/LEVEL03.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/LEVEL03.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/LEVEL04.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/LEVEL04.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/LEVEL05.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/LEVEL05.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/LEVEL06.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/LEVEL06.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/LEVEL07.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/LEVEL07.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/LEVEL08.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/LEVEL08.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/LEVEL09.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/LEVEL09.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/LEVEL10.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/LEVEL10.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/LEVEL11.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/LEVEL11.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/games/keenx/LEVEL12.CK1
===================================================================
(Binary files differ)
Property changes on: cgenius/trunk/vfsroot/games/keenx/LEVEL12.CK1
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: cgenius/trunk/vfsroot/...
[truncated message content] |
|
From: <piz...@us...> - 2010-06-24 07:23:40
|
Revision: 1271
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1271&view=rev
Author: pizza2004
Date: 2010-06-24 07:23:34 +0000 (Thu, 24 Jun 2010)
Log Message:
-----------
Adding Yorphius to repository for bundle.
Added Paths:
-----------
cgenius/trunk/vfsroot/games/yorphius/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <piz...@us...> - 2010-06-24 07:23:24
|
Revision: 1270
http://clonekeenplus.svn.sourceforge.net/clonekeenplus/?rev=1270&view=rev
Author: pizza2004
Date: 2010-06-24 07:23:17 +0000 (Thu, 24 Jun 2010)
Log Message:
-----------
Adding KeenX to repository for bundle.
Added Paths:
-----------
cgenius/trunk/vfsroot/games/keenx/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|