Only in games/crimson/src/cf/: .cvsignore
Only in crimson-0.4.9/src/cf/: .deps
Only in games/crimson/src/cf/: CVS
Only in crimson-0.4.9/src/cf/: Makefile
Only in crimson-0.4.9/src/cf/: Makefile.in
diff -u games/crimson/src/cf/ai.cpp crimson-0.4.9/src/cf/ai.cpp
--- games/crimson/src/cf/ai.cpp	2005-12-06 10:13:26.000000000 +0100
+++ crimson-0.4.9/src/cf/ai.cpp	2005-07-11 19:52:20.000000000 +0200
@@ -34,12 +34,11 @@
 // does not allow for collecting and analyzing long-term intelligence
 // data, so maybe this should be changed in the future.
 ////////////////////////////////////////////////////////////////////////
+
 #include "ai.h"
 #include "game.h"
 #include "misc.h"
 
-#include "YDKmenu.h"
-
 ////////////////////////////////////////////////////////////////////////
 // NAME       : AI::AI
 // DESCRIPTION: Initialize a computer controlled player.
@@ -376,9 +375,6 @@
         n; n = static_cast<AIObj::AIAllocNode *>(n->Next()) ) {
     Unit *u = n->unit;
 
-    // PALMOS port, reset auto-off timer
-    EvtResetAutoOffTimer();
-
     if ( u->IsReady() ) {
       Gam->SelectUnit( u );
       CommandUnit( u, obj );
Only in crimson-0.4.9/src/cf/: crimson.exe
diff -u games/crimson/src/cf/event.cpp crimson-0.4.9/src/cf/event.cpp
--- games/crimson/src/cf/event.cpp	2006-08-29 11:46:26.000000000 +0200
+++ crimson-0.4.9/src/cf/event.cpp	2005-07-09 18:32:40.000000000 +0200
@@ -390,7 +390,7 @@
 
 void Event::DisplayMessage( Player *p, short msg, short title, Mission *m,
                             bool show, View *view ) const {
-  if ( (msg == -1) || !p->IsHuman() || ((m->GetFlags() & GI_2PLAY) && !p->IsLocal())) show = false;
+  if ( (msg == -1) || !p->IsHuman() ) show = false;
 
   if ( show ) {
     MapWindow *mwin = Gam->GetMapWindow();
diff -u games/crimson/src/cf/game.cpp crimson-0.4.9/src/cf/game.cpp
--- games/crimson/src/cf/game.cpp	2006-10-04 00:27:34.000000000 +0200
+++ crimson-0.4.9/src/cf/game.cpp	2005-04-06 18:43:48.000000000 +0200
@@ -36,11 +36,6 @@
 #include "strutil.h"
 #include "msgs.h"
 
-#include "YDKmenu.h"
-#include "network.h"
-
-#define keyBitRockerCenter	    0x00100000  // 5-way rocker center/press
-
 extern Options CFOptions;
 
 // button identifiers used by the game hook function dispatcher
@@ -308,7 +303,6 @@
     if ( !(flags & GI_SAVEFILE) ) {
       flags &= ~(GI_AI|GI_CAMPAIGN|GI_SKIRMISH);
       flags |= ((CFOptions.IsPBEM() ? GI_PBEM : 0)|
-                (CFOptions.Is2PLAY() ? GI_2PLAY : 0)|
                (CFOptions.GetCampaign() ? GI_CAMPAIGN : 0));
     }
     mission->SetFlags( flags );
@@ -339,8 +333,6 @@
 
   unsigned char p1type = mission->GetPlayer(PLAYER_ONE).Type();
   unsigned char p2type = mission->GetPlayer(PLAYER_TWO).Type();
-  bool p1local = mission->GetPlayer(PLAYER_ONE).IsLocal();
-  bool p2local = mission->GetPlayer(PLAYER_TWO).IsLocal();
 
   // remove current game data
   delete shader;
@@ -356,8 +348,6 @@
   if ( !rc ) {
     mission->GetPlayer(PLAYER_ONE).SetType( p1type );
     mission->GetPlayer(PLAYER_TWO).SetType( p2type );
-    mission->GetPlayer(PLAYER_ONE).SetLocal( p1local );
-    mission->GetPlayer(PLAYER_TWO).SetLocal( p2local );
   }
   return rc;
 }
@@ -379,7 +369,7 @@
   view->SetFGPen( player.LightColor() );   // set player color scheme
   view->SetBGPen( player.DarkColor() );
 
-  if ( player.IsHuman() && player.IsLocal() ) {
+  if ( player.IsHuman() ) {
     NoteWindow *nw;
 
     // show turn information and greeting dialog
@@ -414,13 +404,11 @@
     }
 
     // begin new turn
-    if ( !(mission->GetFlags() & GI_2PLAY) || player.IsLocal() ) {
     if ( mission->GetOtherPlayer(player).IsHuman() ) {
       history = new History();
       history->StartRecording( mission->GetUnits() );
       mission->SetHistory( history );
     }
-    }
 
     // check for victory conditions
     if ( mission->GetFlags() & GI_GAME_OVER )
@@ -430,129 +418,11 @@
     mv->SetCursorImage( IMG_CURSOR_IDLE );
   }
 
-Sys_PrintF("id %ld role %ld", player.ID(), gbl2PlayerRole);
-//menu_info("ok");
   if ( !player.IsHuman() ) {
     CheckEvents();
     AI ai( *mission );
     ai.Play();
     EndTurn();
-  } else if ( (mission->GetFlags() & GI_2PLAY) && !player.IsLocal() ) {
-    CheckEvents();
-
-    // wait for the opponent to send its packet
-    unsigned long  data_size = 0;
-    unsigned long  crc16 = 0;
-    unsigned char *data_ptr = NULL;
-    tagNetHeader packet;
-
-    int progress = 0;
-    while (1)
-    {
-      if (progress == 0)
-        Sys_PrintF("Waiting.   (Press [Select] to abort)");
-      else if (progress == 1)
-        Sys_PrintF("Waiting..  (Press [Select] to abort)");
-      else
-        Sys_PrintF("Waiting... (Press [Select] to abort)");
-      progress++;
-      if (progress > 2)
-        progress = 0;
-
-      if (KeyCurrentState() & keyBitRockerCenter)
-        return GUI_QUIT;
-
-      // receive packet from opponent
-      if (receive(&packet, sizeof(tagNetHeader)) != sizeof(tagNetHeader))
-        continue;
-
-      // check header
-      if (SDL_SwapLE32(packet.id) != 0xdeadbeef)
-        continue;
-      if (SDL_SwapLE32(packet.type) != GAME_STATE)
-        continue;
-
-      data_size = SDL_SwapLE32(packet.size);
-
-      data_ptr = (unsigned char *) malloc(data_size);
-      if (!data_ptr)
-        break;
-
-      // read data
-      if (receive(data_ptr, data_size) != data_size)
-      {
-        free(data_ptr);
-        continue;
-      }
-
-      // read src16
-      if (receive(&crc16, sizeof(unsigned long)) != sizeof(unsigned long))
-      {
-        free(data_ptr);
-        continue;
-      }
-
-      // check data
-      crc16 = SDL_SwapLE32(crc16);
-//Sys_PrintF("crc16: %ld", crc16);
-//menu_info("got data and crc16");
-
-      // send acknowledge
-      packet.type = SDL_SwapLE32(GAME_ACK);
-      while (send(&packet, sizeof(tagNetHeader)) != sizeof(tagNetHeader))
-      {
-        if (progress == 0)
-          Sys_PrintF("Sending.   (Press [Select] to abort)");
-        else if (progress == 1)
-          Sys_PrintF("Sending..  (Press [Select] to abort)");
-        else
-          Sys_PrintF("Sending... (Press [Select] to abort)");
-        progress++;
-        if (progress > 2)
-          progress = 0;
-
-        if (KeyCurrentState() & keyBitRockerCenter)
-        {
-          free(data_ptr);
-          return GUI_QUIT;
-        }
-      }
-
-      // save to file
-//menu_info("create save game name");
-      string filebuf( get_home_dir() );
-      filebuf.append( "temp.sav" );
-
-      File file( filebuf );
-      if ( !file.Open( "wb", false ) ) {
-        NoteWindow *nw = new NoteWindow( MSG(MSG_ERROR), MSG(MSG_ERR_WRITE), WIN_CLOSE_ESC, view );
-        nw->SetButtonID( 0, GUI_RESTART );
-      }
-
-//menu_info("file open");
-      file.Write(data_ptr, data_size);
-      file.Close();
-
-      free(data_ptr);
-
-      // play the opponents game
-      if ( !file.Open( "rb", false ) ) {
-        NoteWindow *nw = new NoteWindow( MSG(MSG_ERROR), "Couldn't open for read.", WIN_CLOSE_ESC, view );
-        nw->SetButtonID( 0, GUI_RESTART );
-      }
-      
-      History *history = new History();
-      history->Load( file, *mission );
-      history->ReplayForReal( mwin );
-//      mission->SetHistory( history );
-      delete history;
-      
-      file.Close();
-
-      break;
-    }
-
-    EndTurn();
   } else {
 
     mv->Enable();
@@ -814,119 +684,6 @@
         NoteWindow *nw = new NoteWindow( MSG(MSG_ERROR), MSG(MSG_ERR_SAVE), WIN_CLOSE_ESC, view );
         nw->SetButtonID( 0, GUI_RESTART );
       }
-    } else if ((mission->GetFlags() & GI_2PLAY) && !p.IsLocal()) { // already next player
-      unsigned long data_size = 0;
-
-      // save game state
-      string filebuf( get_home_dir() );
-      filebuf.append( "temp.sav" );
-
-      File file( filebuf );
-      if ( !file.Open( "wb", false ) ) {
-        NoteWindow *nw = new NoteWindow( MSG(MSG_ERROR), MSG(MSG_ERR_WRITE), WIN_CLOSE_ESC, view );
-        nw->SetButtonID( 0, GUI_RESTART );
-      }
-
-      History *history = mission->GetHistory();
-      if ( history ) {
-        history->Save( file );
-        mission->SetHistory( NULL );
-        delete history;
-        history = NULL;
-      }
-
-      data_size = file.GetFileSize();
-      file.Close();
-
-      // create and fill packet
-      tagNetHeader *packet = NULL;
-      unsigned long crc16;
-      unsigned long unique = SDL_GetTicks();
-
-      // fill header
-      packet = (tagNetHeader *) malloc(sizeof(tagNetHeader) + data_size + sizeof(unsigned long));
-      if (!packet)
-      {
-        Sys_PrintF("Couldn't allocate: %ld", sizeof(tagNetHeader) + data_size + sizeof(unsigned long));
-        menu_info("exit");
-      }
-      packet->id = SDL_SwapLE32(0xdeadbeef);    // to mark the beginning of a crimson packet
-      packet->type = SDL_SwapLE32(GAME_STATE);  // game state or acknowledge
-      packet->unique = SDL_SwapLE32(unique);  // unique for each game state, used for acknowledge
-      packet->version = SDL_SwapLE32(1); // version number at the moment 1
-      packet->size = SDL_SwapLE32(data_size);    // size of following data without crc16 field
-
-      // file game state
-      if ( !file.Open( "rb", false ) ) {
-        NoteWindow *nw = new NoteWindow( MSG(MSG_ERROR), "Couldn't read.", WIN_CLOSE_ESC, view );
-        nw->SetButtonID( 0, GUI_RESTART );
-      }
-      file.Read(packet->data, data_size);
-      file.Close();
-
-      // calc checksum and save it
-      crc16 = 0;
-      (((unsigned char *) packet) + sizeof(tagNetHeader) + data_size)[0] = crc16 & 0xff;
-      (((unsigned char *) packet) + sizeof(tagNetHeader) + data_size)[1] = (crc16 >> 8) & 0xff;
-      (((unsigned char *) packet) + sizeof(tagNetHeader) + data_size)[2] = (crc16 >> 16) & 0xff;
-      (((unsigned char *) packet) + sizeof(tagNetHeader) + data_size)[3] = (crc16 >> 24) & 0xff;
-
-      bool done = false;
-      int progress = 0;
-      do
-      {
-        if (progress == 0)
-          Sys_PrintF("Sending.   (Press [Select] to abort)");
-        else if (progress == 1)
-          Sys_PrintF("Sending..  (Press [Select] to abort)");
-        else
-          Sys_PrintF("Sending... (Press [Select] to abort)");
-        progress++;
-        if (progress > 2)
-          progress = 0;
-
-        if (KeyCurrentState() & keyBitRockerCenter)
-        {
-          free(packet);
-          return GUI_QUIT;
-        }
-
-        // send packet to opponent
-        if (send(packet, sizeof(tagNetHeader) + data_size + sizeof(unsigned long)) != (sizeof(tagNetHeader) + data_size + sizeof(unsigned long)))
-        	continue;
-      
-        // resend until we get the acknowledge
-        while (receive(packet, sizeof(tagNetHeader)) != sizeof(tagNetHeader))
-        {
-          if (progress == 0)
-            Sys_PrintF("Waiting.   (Press [Select] to abort)");
-          else if (progress == 1)
-            Sys_PrintF("Waiting..  (Press [Select] to abort)");
-          else
-            Sys_PrintF("Waiting... (Press [Select] to abort)");
-          progress++;
-          if (progress > 2)
-            progress = 0;
-
-          if (KeyCurrentState() & keyBitRockerCenter)
-          {
-            free(packet);
-            return GUI_QUIT;
-          }
-        }
-        if ((SDL_SwapLE32(packet->id) == 0xdeadbeef)
-              && (SDL_SwapLE32(packet->type) == GAME_ACK)
-              && (SDL_SwapLE32(packet->unique) == unique))
-          done = true;
-
-      } while (!done);
-
-      free(packet);
-      mwin->GetMapView()->Disable();
-      mwin->Draw();
-      mwin->Show();
-
-      rc = StartTurn();
     } else {
       mwin->GetMapView()->Disable();
       mwin->Draw();
@@ -1081,11 +838,7 @@
 
     Path path( map );
     if ( path.Find( u, pos, dest ) == -1 ) {
-#ifdef PALMOS
-      Sys_PrintF("Internal error: FindPath() failed!");
-#else
       cerr << "Internal error: FindPath() failed!" << endl;
-#endif
       return u;
     }
 
@@ -1435,7 +1188,6 @@
   GUI_Status rc = GUI_OK;
   MapView *mv = mwin->GetMapView();
   Map &map = mission->GetMap();
-//Sys_PrintF("%s %d", __FILE__, __LINE__);
 
   // check for keyboard commands
   if ( event.type == SDL_KEYDOWN ) {
@@ -1452,10 +1204,6 @@
     case SDLK_LEFT: case SDLK_RIGHT: case SDLK_UP: case SDLK_DOWN:
       MoveCommand( event.key.keysym.sym );
       break;
-    // PALMOS port: use a key to signal quit
-    case SDLK_F12:
-      Quit();
-      break;
     case SDLK_SPACE:      // select the unit underneath the cursor
       SelectCommand( mv->Cursor() );
       break;
@@ -1550,20 +1298,7 @@
   }
 
   Point cursor = mwin->MoveCursor( dir );
-  if ( cursor != mwin->GetMapView()->Cursor() )
-  {
-    SetCursor( cursor );
-    // PALMOS port
-    // we can now scroll the map
-    view->DisableUpdates();
-    // make sure we always scroll an even number of columns
-    // to avoid strong vertical drift
-    Point pt = mwin->GetMapView()->Cursor();
-    pt.x &= 0xFFFE;
-    mwin->GetMapView()->CenterOnHex( pt );
-    view->EnableUpdates();
-    view->Refresh();
-  }
+  if ( cursor != mwin->GetMapView()->Cursor() ) SetCursor( cursor );
 }
 
 ////////////////////////////////////////////////////////////////////////
@@ -1639,8 +1374,9 @@
   case SDLK_KP7: pos.x -= sw; pos.y -= sh; break;
   case SDLK_KP8:              pos.y -= sh; break;
   case SDLK_KP9: pos.x += sw; pos.y -= sh; break;
-  default: break;
+  default: return;
   }
+
   const Map *map = mv->GetMap();
   if ( pos.x < 0 ) pos.x = 0;
   else if ( pos.x >= map->Width() ) pos.x = map->Width() - 1;
@@ -1824,7 +1560,7 @@
 #endif
   menu->AddBar( 0 );
   menu->AddItem( 0, G_BUTTON_SAVE, 
-                 (mission->GetFlags() & (GI_PBEM | GI_2PLAY)) ? WIDGET_DISABLED : 0,
+                 (mission->GetFlags() & GI_PBEM) ? WIDGET_DISABLED : 0,
                  MSG(MSG_B_SAVE_GAME) );
   menu->AddItem( 0, G_BUTTON_ABORT,    0, MSG(MSG_B_MAIN_MENU) );
   menu->AddItem( 0, G_BUTTON_QUIT,     0, MSG(MSG_B_QUIT) );
@@ -1946,18 +1682,10 @@
     req->SetButtonID( 0, G_BUTTON_SHUTDOWN );
     req->SetButtonHook( 0, this );
     break; }
-  case G_BUTTON_QUIT: {
+  case G_BUTTON_QUIT:
     view->CloseWindow( win );
-    string filebuf( get_save_dir() );
-    filebuf.append( last_file_name );
-    filebuf.append( ".sa0" );
-    int err = Save( filebuf.c_str() );
-    if ( err ) {
-      NoteWindow *nw = new NoteWindow( MSG(MSG_ERROR), MSG(MSG_ERR_SAVE), WIN_CLOSE_ESC, view );
-//      break;
-    }
     Quit();
-    break; }
+    break;
   case G_BUTTON_SHUTDOWN:
     Shutdown();
     rc = GUI_RESTART;
diff -u games/crimson/src/cf/history.cpp crimson-0.4.9/src/cf/history.cpp
--- games/crimson/src/cf/history.cpp	2006-09-12 23:15:22.000000000 +0200
+++ crimson-0.4.9/src/cf/history.cpp	2005-02-06 10:56:46.000000000 +0100
@@ -25,8 +25,6 @@
 #include "options.h"
 #include "msgs.h"
 
-#include "YDKmenu.h"
-
 extern Options CFOptions;
 
 ////////////////////////////////////////////////////////////////////////
@@ -129,73 +127,6 @@
 }
 
 ////////////////////////////////////////////////////////////////////////
-// NAME       : History::ReplayForReal
-// DESCRIPTION: Play all events that have been stored during the last
-//              turn. Does really change the map.
-// PARAMETERS : mapwin - pointer to MapWindow
-// RETURNS    : -
-////////////////////////////////////////////////////////////////////////
-
-void History::ReplayForReal( MapWindow *mapwin ) {
-  if ( events.IsEmpty() ) return;
-
-  View *view = mapwin->GetView();
-  MapView *mv = mapwin->GetMapView();
-  Map *map = mv->GetMap();
-  ProgressWindow *progwin = NULL;
-  HistEvent *he = static_cast<HistEvent *>( events.Head() );
-
-  bool quick = CFOptions.GetQuickReplay();
-
-  if ( quick ) delay = 0;
-  else {
-    unsigned short count = events.CountNodes();
-
-    // undo the map tile changes which have been recorded this turn
-    while ( he && (he->type == HIST_TILE_INTERNAL) ) {
-      map->SetHexType( he->data[1], he->data[2], he->data[0] );
-      he = static_cast<HistEvent *>( he->Next() );
-      --count;
-    }
-
-    delay = DEFAULT_DELAY;
-    mv->Enable();
-    mapwin->Draw();
-    mapwin->Show();
-
-    progwin = new ProgressWindow( mapwin->Width() / 4,
-            mapwin->Height() - view->SmallFont()->Height() - 30,
-            mapwin->Width() / 2, view->SmallFont()->Height() + 20,
-            0, count, 0, view );
-  }
-
-  while ( he ) {
-
-    if ( he->type == HIST_MOVE )
-      ReplayMoveEvent( *he, mapwin );
-    else if ( he->type == HIST_COMBAT )
-      ReplayCombatEvent( *he, mapwin );
-    else if ( he->type == HIST_MSG )
-      ReplayMessageEvent( *he, view );
-    else if ( he->type == HIST_TILE )
-      ReplayTileEvent( *he, mapwin );
-    else if ( he->type == HIST_UNIT )
-      ReplayUnitEvent( *he, mapwin );
-    else if ( he->type == HIST_ATTACK )
-      ReplayAttackEvent( *he, mapwin );
-
-    if ( !quick ) {
-      progwin->Advance( 1 );
-    }
-
-    he = static_cast<HistEvent *>( he->Next() );
-  }
-
-  if ( progwin ) view->CloseWindow( progwin );
-  SDL_Delay( delay * 2 );
-}
-
-////////////////////////////////////////////////////////////////////////
 // NAME       : History::Replay
 // DESCRIPTION: Play all events that have been stored during the last
 //              turn.
diff -u games/crimson/src/cf/history.h crimson-0.4.9/src/cf/history.h
--- games/crimson/src/cf/history.h	2006-09-12 22:40:30.000000000 +0200
+++ crimson-0.4.9/src/cf/history.h	2005-01-29 14:04:36.000000000 +0100
@@ -66,7 +66,6 @@
   int RecordUnitEvent( const Unit &u );
 
   void Replay( MapWindow *mapwin );
-  void ReplayForReal( MapWindow *mapwin );
 
   void EraseMoveEvents( const Unit &u );
 
diff -u games/crimson/src/cf/initwindow.cpp crimson-0.4.9/src/cf/initwindow.cpp
--- games/crimson/src/cf/initwindow.cpp	2005-12-16 22:52:44.000000000 +0100
+++ crimson-0.4.9/src/cf/initwindow.cpp	2005-07-02 11:50:24.000000000 +0200
@@ -31,8 +31,6 @@
 #include "options.h"
 #include "msgs.h"
 
-#include "YDKmenu.h"
-
 #define IW_WIDGET_TYPE		0
 #define IW_WIDGET_MAPTYPE	1
 #define IW_WIDGET_LEVELS	2
@@ -522,11 +520,7 @@
 TitleWindow::TitleWindow( View *view ) : Window( WIN_CENTER, view ) {
   string tname = get_data_dir();
   append_path_delim( tname );
-  // PALMOS port
-  if (view->Width() > 320)
-    tname.append( CF_TITLE_SCREEN_480 );
-  else
-    tname.append( CF_TITLE_SCREEN_320 );
+  tname.append( CF_TITLE_SCREEN );
 
   if ( LoadBMP( tname.c_str() ) ) SetSize( 0, 0, 0, 0 );
   else {
@@ -547,7 +541,6 @@
 
 GUI_Status TitleWindow::HandleEvent( const SDL_Event &event ) {
   GUI_Status rc = GUI_OK;
-//Sys_PrintF("%s %d", __FILE__, __LINE__);
   if ( (event.type == SDL_KEYDOWN) || (event.type == SDL_MOUSEBUTTONDOWN) )
     rc = GUI_CLOSE;
   return rc;
@@ -927,20 +920,12 @@
       ++i;
     } else {
       if ( num == -1 ) {
-#ifdef PALMOS
-      Sys_PrintF("Error: Could not load language resources from %s", n->Name());
-#else
         cerr << "Error: Could not load language resources from "
              << n->Name() << endl;
-#endif
       } else {
-#ifdef PALMOS
-      Sys_PrintF("Error: Language catalog '%s' contains %d strings, expected %d", n->Name(), num, CF_MSGS);
-#else
         cerr << "Error: Language catalog '" << n->Name()
              << "' contains " << num << " strings, expected "
              << CF_MSGS << endl;
-#endif
       }
       delete l;
       delete n;
diff -u games/crimson/src/cf/main.cpp crimson-0.4.9/src/cf/main.cpp
--- games/crimson/src/cf/main.cpp	2006-08-29 10:05:56.000000000 +0200
+++ crimson-0.4.9/src/cf/main.cpp	2005-01-09 19:05:48.000000000 +0100
@@ -24,7 +24,6 @@
 #include <string.h>
 #include <iostream>
 #include <fstream>
-#include <fcntl.h>
 
 #ifndef _WIN32_WCE
 # include <time.h>
@@ -43,15 +42,6 @@
 #include "strutil.h"
 #include "msgs.h"
 
-#include "YDKmenu.h"
-#include "Starter.h"
-
-extern UInt32 screenWidth;
-extern UInt32 screenHeight;
-
-extern UInt32 game_type; // Campaign, Saved Game, vs. AI, vs. 2nd Player
-
-
 // global vars
 Game *Gam;
 Image *Images[NUM_IMAGES] = { NULL };
@@ -91,7 +81,6 @@
 # define time(n) GetTickCount()
 #endif
 
-
 // Start of program functions //////////////////////////////////////////
 
 #ifdef _WIN32_WCE
@@ -99,10 +88,8 @@
 #else
 int main( int argc, char **argv ) {
 #endif
-//  struct GUIOptions guiopts = { 800, 600, DISPLAY_BPP, true, true,
-//                    MIX_MAX_VOLUME*3/4, MIX_MAX_VOLUME/2, SDL_HWSURFACE, NULL };
-  struct GUIOptions guiopts = { 480, 320, DISPLAY_BPP, false, false,
-                    MIX_MAX_VOLUME*3/4, MIX_MAX_VOLUME/2, SDL_HWSURFACE, "levels/Uprising.lev" };
+  struct GUIOptions guiopts = { 800, 600, DISPLAY_BPP, true, true,
+                    MIX_MAX_VOLUME*3/4, MIX_MAX_VOLUME/2, SDL_HWSURFACE, NULL };
 
 #ifdef _WIN32_WCE
   if ( !init_wince( guiopts ) ) return 0;
@@ -111,8 +98,8 @@
 #endif
 
   display = init( guiopts );
-  if ( display )
-  {
+  if ( display ) {
+
     // only open intro screen if the user didn't supply a level on the command line
     int intro = 1;
     if ( guiopts.level ) {
@@ -165,157 +152,6 @@
   return 0;
 }
 
-
-int palmos_main( int argc, char **argv )
-{
-	struct GUIOptions guiopts = { 480, 320, DISPLAY_BPP, false, false,
-                    MIX_MAX_VOLUME*3/4, MIX_MAX_VOLUME/2, SDL_HWSURFACE, "levels/GreatBattle.lev" };
-
-Sys_PrintF("Start Crimson Fields");
-
-	parse_options( argc, argv, guiopts );
-
-    guiopts.px_width = screenWidth;
-    guiopts.px_height = screenHeight;
-
-	display = init( guiopts );
-	if ( display )
-	{
-		// always open intro screen
-		int intro = 1;
-
-		display->Refresh();
-		TitleWindow *twin = new TitleWindow( display );
-		SDL_ShowCursor(1);
-
-		// if title image was successfully loaded, wait for click
-		if ( twin->Width() > 0 )
-		{
-			display->SelectWindow( twin );
-			twin->EventLoop();
-			display->CloseWindow( twin );
-		}
-
-		if (game_type == GAME_TYPE_CAMPAIGN)
-		{
-			CFOptions.SetCampaign( true );
-		}
-		else if (game_type == GAME_TYPE_SAVED)
-		{
-			CFOptions.SetCampaign( false );
-		}
-		else if (game_type == GAME_TYPE_COMPUTER)
-		{
-			CFOptions.SetCampaign( false );
-			CFOptions.SetGameType( 1 );
-		}
-		else if (game_type == GAME_TYPE_2_PLAYER)
-		{
-			CFOptions.SetCampaign( false );
-			CFOptions.SetGameType( 0 );
-		}
-		else if (game_type == GAME_TYPE_BLUETOOTH)
-		{
-			CFOptions.SetCampaign( false );
-			CFOptions.SetGameType( 3 );
-		}
-		else if (game_type == GAME_TYPE_TCPIP)
-		{
-			CFOptions.SetCampaign( false );
-			CFOptions.SetGameType( 3 );
-		}
-
-		if ( guiopts.level )
-		{
-			Gam = new Game( display );
-			intro = Gam->Load( guiopts.level );
-			Mission *m = Gam->GetMission();
-			if ( !intro )
-			{
-				// default is to play single-player single-map
-				if ( !(m->GetFlags() & GI_SAVEFILE) )
-				{
-					if (game_type == GAME_TYPE_CAMPAIGN)
-					{
-						m->GetPlayer(PLAYER_ONE).SetType( HUMAN );
-					}
-					else if (game_type == GAME_TYPE_COMPUTER)
-					{
-						string pnames( "" );
-						pnames += m->GetPlayer(PLAYER_ONE).Name();
-						pnames += "|";
-						pnames += m->GetPlayer(PLAYER_TWO).Name();
-
-						DialogWindow *pwin = new DialogWindow( MSG(MSG_PLAYER_SELECTION), MSG(MSG_ASK_SIDE), pnames, 0, 0, display );
-						pwin->SetButtonID( 0, PLAYER_ONE );
-						pwin->SetButtonID( 1, PLAYER_TWO );
-						short rc = pwin->EventLoop();
-						display->CloseWindow( pwin );
-						m->GetPlayer( rc ).SetType( HUMAN );
-					}
-					else if (game_type == GAME_TYPE_2_PLAYER)
-					{
-						m->GetPlayer(PLAYER_ONE).SetType( HUMAN );
-						m->GetPlayer(PLAYER_TWO).SetType( HUMAN );
-					}
-					else if (game_type == GAME_TYPE_BLUETOOTH)
-					{
-						m->GetPlayer(PLAYER_ONE).SetType( HUMAN );
-						m->GetPlayer(PLAYER_TWO).SetType( HUMAN );
-						if (gbl2PlayerRole == 0)
-						{
-							m->GetPlayer(PLAYER_ONE).SetLocal( true );
-							m->GetPlayer(PLAYER_TWO).SetLocal( false );
-						}
-						else
-						{
-							m->GetPlayer(PLAYER_ONE).SetLocal( false );
-							m->GetPlayer(PLAYER_TWO).SetLocal( true );
-						}
-					}
-					else if (game_type == GAME_TYPE_TCPIP)
-					{
-						m->GetPlayer(PLAYER_ONE).SetType( HUMAN );
-						m->GetPlayer(PLAYER_TWO).SetType( HUMAN );
-						if (gbl2PlayerRole == 0)
-						{
-							m->GetPlayer(PLAYER_ONE).SetLocal( true );
-							m->GetPlayer(PLAYER_TWO).SetLocal( false );
-						}
-						else
-						{
-							m->GetPlayer(PLAYER_ONE).SetLocal( false );
-							m->GetPlayer(PLAYER_TWO).SetLocal( true );
-						}
-					}
-
-					// FIXME: Difficulty
-//					m->SetHandicap( 1 << diffwidget->GetValue() );
-				}
-
-				display->Flood( Color(CF_COLOR_SHADOW) );
-				display->Update();
-				Gam->InitWindows();
-				Gam->StartTurn();
-
-				GUI_Status status;
-				do
-				{
-					status = display->HandleEvents();
-				} while ( (status != GUI_QUIT) && (status != GUI_RESTART) );
-			}
-
-			delete Gam;
-			Gam = NULL;
-		}
-		display->CloseAllWindows();
-	}
-
-Sys_PrintF("Close Crimson Fields");
-	do_exit();
-	return 0;
-}
-
 ////////////////////////////////////////////////////////////////////////
 // NAME       : parse_options
 // DESCRIPTION: Process any options given to the program on the command
@@ -348,12 +184,10 @@
       if ( atoi( argv[argc] ) ) opts.sfx = opts.music = true;
       else opts.sfx = opts.music = false;
     } else {
-#ifndef PALMOS
       if (strcmp(argv[argc], "--version") == 0)
         cout << PROGRAMNAME" "VERSION << endl;
       else print_usage( argv[0] );
       exit ( 0 );
-#endif
     }
     --argc;
   }
@@ -398,8 +232,8 @@
   Surface *icons = NULL;
   bool ok = false;
 
-  if ( SDL_Init( SDL_INIT_VIDEO ) >= 0 )
-  {
+  if ( SDL_Init( SDL_INIT_VIDEO ) >= 0 ) {
+
     // load locale
     if ( !init_locale() ) return NULL;
 
@@ -409,8 +243,8 @@
     if ( datfile.Open( "rb" ) ) {
 
       icons = new Surface;		// load icons surface
-      if ( !icons->LoadImageData( datfile ) )
-      {
+      if ( !icons->LoadImageData( datfile ) ) {
+
         set_icon( *icons, Rect(64, 0, 32, 32) );
 
         view = new View( opts.px_width, opts.px_height, opts.bpp,
@@ -423,47 +257,12 @@
           if ( !f1->Load( datpath.c_str(), CF_FONT_SMALL ) &&
                !f2->Load( datpath.c_str(), CF_FONT_LARGE ) )
             ok = true;
-          else
-          {
-#ifdef PALMOS
-           Sys_PrintF("Error: Couldn't load font %s", datpath);
-#else
-           cerr << "Error: Couldn't load font " << datpath << endl;
-#endif
-          }
-        }
-        else
-        {
-#ifdef PALMOS
-         Sys_PrintF("Error: Couldn't set video mode (%s)", SDL_GetError());
-#else
-         cerr << "Error: Couldn't set video mode (" << SDL_GetError() << ')' << endl;
-#endif
-        }
-      } else
-      {
-#ifdef PALMOS
-       Sys_PrintF("Error: Couldn't read data file");
-#else
-       cerr << "Error: Couldn't read data file" << endl;
-#endif
-      }
-    } else
-    {
-#ifdef PALMOS
-     Sys_PrintF("Error: Couldn't open %s", datpath);
-#else
-     cerr << "Error: Couldn't open " << datpath << endl;
-#endif
-    }
-  } else
-  {
-#ifdef PALMOS
-   Sys_PrintF("Error: Couldn't initialize (%s)", SDL_GetError());
-#else
-   cerr << "Error: Couldn't initialize ( " << SDL_GetError() << ')' << endl;
-#endif
-  }
+          else cerr << "Error: Couldn't load font " << datpath << endl;
+        } else cerr << "Error: Couldn't set video mode (" << SDL_GetError() << ')' << endl;
+
+      } else cerr << "Error: Couldn't read data file" << endl;
+    } else cerr << "Error: Couldn't open " << datpath << endl;
+  } else cerr << "Error: Couldn't initialize ( " << SDL_GetError() << ')' << endl;
 
   if ( ok ) {
     // set main window title
@@ -479,9 +278,6 @@
       Images[ICON_XP_BASE+i] = new Image( icons, 64 + i * XP_ICON_WIDTH, 32, XP_ICON_WIDTH, XP_ICON_HEIGHT );
 
     icons->DisplayFormat();
-#ifdef PALMOS
-    SDL_MoveToStorage(icons->s_surface);
-#endif
 
     view->SetSmallFont( f1 );
     view->SetLargeFont( f2 );
@@ -521,30 +317,18 @@
     string lfile( ldir + lid + ".dat" );
     short num = Lang.ReadCatalog( lfile.c_str() );
     if ( num == -1 ) {
-#ifdef PALMOS
-      Sys_PrintF("Error: Couldn't load language resources for language %s", lid.c_str());
-#else
       cerr << "Error: Couldn't load language resources for language '"
                 << lid << "'" << endl;
-#endif
-    } else if ( num < /*!=*/ CF_MSGS ) {
-#ifdef PALMOS
-      Sys_PrintF("Error: Language catalog for %s contains %d strings, expected %d", lid.c_str(), num, CF_MSGS);
-#else
+    } else if ( num != CF_MSGS ) {
       cerr << "Error: Language catalog for '" << lid << "' contains "
                 << num << " strings, expected " << CF_MSGS << endl;
-#endif
     } else rc = true;
 
     // only retry once
     if ( (rc == false) && (retry == false) &&
          (lid != CF_LANG_DEFAULT) ) {
       lid.assign( CF_LANG_DEFAULT );
-#ifdef PALMOS
-      Sys_PrintF("Using default locale (%s) instead", lid.c_str());
-#else
       cerr << "Using default locale (" << lid << ") instead" << endl;
-#endif
       retry = true;
     } else {
       retry = false;
@@ -570,53 +354,48 @@
 // RETURNS    : -
 ////////////////////////////////////////////////////////////////////////
 
-// PALMOS port
-extern "C"
-int close(int fd);
-
 void load_settings( GUIOptions &opts ) {
   string crimsonrc( get_config_dir() );
   crimsonrc.append( CRIMSONRC );
 
-  int fd;
-  fd = open( crimsonrc.c_str(), O_RDONLY );
-  if ( fd > -1 )
-  {
-    char buf[256];
+  ifstream file( crimsonrc.c_str() );
+  if ( file.is_open() ) {
+    string buf;
     const char *val, *linebuf;
     unsigned int line = 0;
+    size_t pos;
 
-    while (mygets(fd, buf, sizeof(buf)) >= 0)
-    {
+    while (!file.eof()) {
+      getline(file, buf);
       ++line;
 
-      if ( strlen(buf) > 0 )
-      {
-        // ignore empty lines
-        linebuf = buf;
-        val = strchr( buf, ' ' );
-        if ( val != NULL )
-        {
-          while ( *val == ' ' )
-            ++val;
-
-          if ( !strncmp( linebuf, "sfxvol", 6 ) ) opts.sfx_vol = atoi(val);
+      if ( buf.size() > 0 ) { // ignore empty lines
+        pos = buf.find( ' ' );
+        if ( pos != string::npos ) {
+          linebuf = buf.c_str();
+          val = &linebuf[pos+1];
+          while ( *val == ' ' ) ++val;
+
+          if ( !strncmp( linebuf, "width", 5 ) ) opts.px_width = atoi(val);
+          else if ( !strncmp( linebuf, "height", 6 ) ) opts.px_height = atoi(val);
+          else if ( !strncmp( linebuf, "fullscreen", 10 ) ) {
+            if ( atoi(val) != 0 ) opts.sdl_flags |= SDL_FULLSCREEN;
+          } else if ( !strncmp( linebuf, "sfxvol", 6 ) ) opts.sfx_vol = atoi(val);
           else if ( !strncmp( linebuf, "musicvol", 8 ) ) opts.music_vol = atoi(val);
           else if ( !strncmp( linebuf, "sfx", 3 ) ) opts.sfx = (atoi(val) != 0);
           else if ( !strncmp( linebuf, "music", 5 ) ) opts.music = (atoi(val) != 0);
           else if ( !strncmp( linebuf, "locale", 6 ) ) CFOptions.SetLanguage(val);
           else if ( !strncmp( linebuf, "showdamage", 10 ) ) CFOptions.SetDamageIndicator( atoi(val) != 0 );
           else if ( !strncmp( linebuf, "unlock", 6 ) ) CFOptions.Unlock( val );
-          else if ( !strncmp( linebuf, "showreplay", 10 ) )
-          {
+          else if ( !strncmp( linebuf, "showreplay", 10 ) ) {
             int rep = atoi(val);
             CFOptions.SetTurnReplay( rep != 0 );
             CFOptions.SetQuickReplay( rep == 1 );
-          }
+          } else cerr << "Warning: unrecognized config option in line " << line << endl;
         }
       }
     }
-    close(fd);
+    file.close();
   }
 }
 
@@ -627,36 +406,29 @@
 // RETURNS    : -
 ////////////////////////////////////////////////////////////////////////
 
-// PALMOS port
-extern "C"
-int write(int fd, void* buf, size_t len);
-
-void save_settings( View *display )
-{
+void save_settings( View *display ) {
   string crimsonrc( get_config_dir() );
   crimsonrc.append( CRIMSONRC );
 
-  int fd;
-  fd = open( crimsonrc.c_str(), O_WRONLY | O_CREAT | O_TRUNC );
-  if ( fd > -1 )
-  {
-    char buf[256];
-
-    sprintf(buf, "sfx %d\n", Audio::GetSfxState());
-    write(fd, buf, strlen(buf));
-    sprintf(buf, "music %d\n", Audio::GetMusicState());
-    write(fd, buf, strlen(buf));
-    sprintf(buf, "sfxvol %d\n", Audio::GetSfxVolume());
-    write(fd, buf, strlen(buf));
-    sprintf(buf, "musicvol %d\n", Audio::GetMusicVolume());
-    write(fd, buf, strlen(buf));
-    sprintf(buf, "locale %s\n", CFOptions.GetLanguage());
-    write(fd, buf, strlen(buf));
-    sprintf(buf, "showdamage %d\n", CFOptions.GetDamageIndicator());
-    write(fd, buf, strlen(buf));
-    sprintf(buf, "showreplay %d\n", CFOptions.GetTurnReplay() ? (CFOptions.GetQuickReplay() ? 1 : 2) : 0 );
-    write(fd, buf, strlen(buf));
-    close(fd);
+  ofstream file( crimsonrc.c_str() );
+  if ( file.is_open() ) {
+    file << "width " << display->Width() << '\n';
+    file << "height " << display->Height() << '\n';
+    file << StringUtil::strprintf("fullscreen %d", display->IsFullScreen()) << '\n';
+    file << StringUtil::strprintf("sfx %d", Audio::GetSfxState()) << '\n';
+    file << StringUtil::strprintf("music %d", Audio::GetMusicState()) << '\n';
+    file << StringUtil::strprintf("sfxvol %d", Audio::GetSfxVolume()) << '\n';
+    file << StringUtil::strprintf("musicvol %d", Audio::GetMusicVolume()) << '\n';
+    file << "locale " << CFOptions.GetLanguage() << '\n';
+    file << StringUtil::strprintf("showdamage %d", CFOptions.GetDamageIndicator()) << '\n';
+    file << StringUtil::strprintf("showreplay %d",
+            CFOptions.GetTurnReplay() ? (CFOptions.GetQuickReplay() ? 1 : 2) : 0 ) << '\n';
+
+    const vector<string> &maps = CFOptions.GetUnlockedMaps();
+    for ( vector<string>::const_iterator i = maps.begin(); i != maps.end(); ++i )
+      file << "unlock " << *i << '\n';
+
+    file.close();
   }
 }
 
@@ -744,26 +516,21 @@
 // RETURNS    : -
 ////////////////////////////////////////////////////////////////////////
 
-void do_exit( void )
-{
-	delete Gam;
-	if ( display )
-	{
-		save_settings( display );
-		delete display;
-	}
-
-	Audio::ShutdownSfx();
-	Audio::ShutdownMusic();
+void do_exit( void ) {
+  delete Gam;
 
-	for ( int i = 0; i < NUM_IMAGES; ++i )
-		delete Images[i];
+  if ( display ) {
+    save_settings( display );
+    delete display;
+  }
 
-	TTF_Quit();
-	SDL_Quit();
+  Audio::ShutdownSfx();
+  Audio::ShutdownMusic();
 
-#ifndef PALMOS
-	exit( 0 );
-#endif
+  for ( int i = 0; i < NUM_IMAGES; ++i ) delete Images[i];
+
+  TTF_Quit();
+  SDL_Quit();
+  exit( 0 );
 }
 
diff -u games/crimson/src/cf/mapwindow.cpp crimson-0.4.9/src/cf/mapwindow.cpp
--- games/crimson/src/cf/mapwindow.cpp	2005-11-30 23:07:00.000000000 +0100
+++ crimson-0.4.9/src/cf/mapwindow.cpp	2005-03-25 11:32:54.000000000 +0100
@@ -24,8 +24,6 @@
 #include "game.h"
 #include "msgs.h"
 
-#include "YDKmenu.h"
-
 ////////////////////////////////////////////////////////////////////////
 // NAME       : MapWindow::MapWindow
 // DESCRIPTION: Set the basic map window variables.
@@ -54,7 +52,6 @@
 ////////////////////////////////////////////////////////////////////////
 
 GUI_Status MapWindow::HandleEvent( const SDL_Event &event ) {
-//Sys_PrintF("%s %d", __FILE__, __LINE__);
   return Gam->HandleEvent(event);
 }
 
@@ -395,7 +392,6 @@
 ////////////////////////////////////////////////////////////////////////
 
 GUI_Status Panel::HandleEvent( const SDL_Event &event ) {
-//Sys_PrintF("%s %d", __FILE__, __LINE__);
   return mapwin->HandleEvent( event );
 }
 
diff -u games/crimson/src/cf/mission.cpp crimson-0.4.9/src/cf/mission.cpp
--- games/crimson/src/cf/mission.cpp	2005-12-05 21:19:48.000000000 +0100
+++ crimson-0.4.9/src/cf/mission.cpp	2005-02-12 11:09:30.000000000 +0100
@@ -27,8 +27,6 @@
 #include "strutil.h"
 #include "globals.h"
 
-#include "YDKmenu.h"
-
 ////////////////////////////////////////////////////////////////////////
 // NAME       : Mission::~Mission
 // DESCRIPTION: Free mission resources.
@@ -78,17 +76,9 @@
     len = file.Read16();            // load name of unit set
     uset = file.ReadS( len );
 
-    // PALMOS port
-    if (len == 0)
-      uset = "default";
-
     File ufile( uset + ".units" );
     if ( !ufile.OpenData("rb") || unit_set.Load( ufile, uset.c_str() ) ) {
-#ifdef PALMOS
-      Sys_PrintF("Error: Unit set '%s' not available", uset);
-#else
       cerr << "Error: Unit set '" << uset << "' not available" << endl;
-#endif
       return -1;
     }
     ufile.Close();
@@ -96,17 +86,9 @@
     len = file.Read16();            // load name of terrain set
     tset = file.ReadS( len );
 
-    // PALMOS port
-    if (len == 0)
-      tset = "default";
-
     File tfile( tset + ".tiles" );
     if ( !tfile.OpenData("rb") || terrain_set.Load( tfile, tset.c_str() ) ) {
-#ifdef PALMOS
-      Sys_PrintF("Error: Terrain set '%s' not available", tset);
-#else
       cerr << "Error: Terrain set '" << tset << "' not available" << endl;
-#endif
       return -1;
     }
     tfile.Close();
@@ -161,14 +143,8 @@
 
     rc = 0;
   } else
-  {
-#ifdef PALMOS
-    Sys_PrintF("Warning: Couldn't load %s (incompatible format)", file.Name());
-#else
     cerr << "Warning: Couldn't load " << file.Name()
          << " (incompatible format)" << endl;
-#endif
-  }
 
   return rc;
 }
@@ -270,10 +246,10 @@
   map.Save( file );     // save map
 
   // save mission set info
-  file.Write16( unit_set.GetName()->length() );
-  file.WriteSp( unit_set.GetName()->c_str(), unit_set.GetName()->size() );
-  file.Write16( terrain_set.GetName()->length() );
-  file.WriteSp( terrain_set.GetName()->c_str(), terrain_set.GetName()->size() );
+  file.Write16( unit_set.GetName().length() );
+  file.WriteS( unit_set.GetName() );
+  file.Write16( terrain_set.GetName().length() );
+  file.WriteS( terrain_set.GetName() );
 
   // save shops
   file.Write16( shops.CountNodes() );
diff -u games/crimson/src/cf/options.h crimson-0.4.9/src/cf/options.h
--- games/crimson/src/cf/options.h	2006-08-27 22:45:32.000000000 +0200
+++ crimson-0.4.9/src/cf/options.h	2005-01-23 14:51:00.000000000 +0100
@@ -27,8 +27,7 @@
 #ifndef _INCLUDE_OPTIONS_H
 #define _INCLUDE_OPTIONS_H
 
-// PALMOS port
-//#include <algorithm>
+#include <algorithm>
 #include "lang.h"
 
 class Options {
@@ -53,7 +52,6 @@
 
   bool IsAI( void ) const { return (gametype == 1) || GetCampaign(); }
   bool IsPBEM( void ) const { return (gametype == 2) && !GetCampaign(); }
-  bool Is2PLAY( void ) const { return (gametype == 3) && !GetCampaign(); }
 
   bool IsLocked( const string &map ) const
     { return find(unlocked_maps.begin(), unlocked_maps.end(), map)
@@ -64,7 +62,7 @@
     { return unlocked_maps; }
 
 private:
-  unsigned short gametype; // hot seat, ai, or pbem or 2player net
+  unsigned short gametype; // hot seat, ai, or pbem
   bool show_damage;   // show damage indicator
   bool replay;        // show turn replays
   bool quick_replay;  // show only combat results
diff -u games/crimson/src/cf/path.cpp crimson-0.4.9/src/cf/path.cpp
--- games/crimson/src/cf/path.cpp	2005-12-01 22:23:28.000000000 +0100
+++ crimson-0.4.9/src/cf/path.cpp	2005-01-03 18:07:36.000000000 +0100
@@ -26,8 +26,6 @@
 
 #include "path.h"
 
-#include "YDKmenu.h"
-
 ////////////////////////////////////////////////////////////////////////
 // NAME       : BasicPath::BasicPath
 // DESCRIPTION: Create a new path object.
@@ -43,7 +41,7 @@
 BasicPath::BasicPath( Map *map, signed char *buffer ) {
   this->map = map;
   buf_private = false;
-  
+
   SetBuffer( buffer );
 }
 
@@ -233,7 +231,7 @@
   Direction dir = (Direction)path[index];
   unsigned short steps = 0;
 
-  while ( dir != (Direction)-1 ) {
+  while ( dir != -1 ) {
     map->Dir2Hex( p, dir, p );
     index = map->Hex2Index( p );
     dir = (Direction)path[index];
diff -u games/crimson/src/cf/player.h crimson-0.4.9/src/cf/player.h
--- games/crimson/src/cf/player.h	2006-08-29 10:02:26.000000000 +0200
+++ crimson-0.4.9/src/cf/player.h	2005-01-21 23:18:22.000000000 +0100
@@ -47,14 +47,12 @@
   const char *Password( void ) const;
   unsigned char Type( void ) const { return p_type; }
   bool IsHuman( void ) const { return p_type == HUMAN; }
-  bool IsLocal( void ) const { return p_local; }
 
   void SetBriefing( signed char brief ) { p_briefing = brief; }
   void SetMode( unsigned char mode ) { p_mode = mode; }
   void SetType( unsigned char type ) { p_type = type; }
   void SetPassword( const char *password );
   void SetName( const char *name ) { p_name = name; }
-  void SetLocal( bool local ) { p_local = local; }
 
   unsigned char Success( signed char success ) { p_success += success; return p_success; }
   unsigned short Units( short delta );
@@ -67,7 +65,6 @@
   unsigned char p_mode;
   unsigned char p_type;       // COMPUTER or HUMAN
   unsigned short p_units;
-  bool p_local;
 
   unsigned char p_success;    // if p_success == 100 the level is completed
   signed char p_briefing;
diff -u games/crimson/src/cf/unitwindow.cpp crimson-0.4.9/src/cf/unitwindow.cpp
--- games/crimson/src/cf/unitwindow.cpp	2005-11-30 23:07:48.000000000 +0100
+++ crimson-0.4.9/src/cf/unitwindow.cpp	2005-07-09 18:46:50.000000000 +0200
@@ -27,8 +27,6 @@
 #include "strutil.h"
 #include "msgs.h"
 
-#include "YDKmenu.h"
-
 #define ICON_MINI_WIDTH		15
 #define ICON_MINI_HEIGHT	15
 #define ICON_MINI_REPAIR1_X	93
@@ -355,7 +353,6 @@
 
 GUI_Status ContainerWindow::HandleEvent( const SDL_Event &event ) {
   GUI_Status rc;
-//Sys_PrintF("%s %d", __FILE__, __LINE__);
 
   if ( (event.type == SDL_KEYDOWN) && (event.key.keysym.sym == SDLK_SPACE) &&
        listwidget->Selected() ) {
