You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(136) |
Dec
(218) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(214) |
Feb
(208) |
Mar
(186) |
Apr
(15) |
May
(3) |
Jun
(35) |
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2005 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(58) |
Aug
(123) |
Sep
(31) |
Oct
(9) |
Nov
|
Dec
(1) |
| 2006 |
Jan
(25) |
Feb
(10) |
Mar
(25) |
Apr
(61) |
May
|
Jun
(78) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
(12) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(10) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Rob <geo...@us...> - 2005-07-11 16:57:45
|
Update of /cvsroot/timewarp/interfaces/sc1arena In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23147/sc1arena Log Message: Directory /cvsroot/timewarp/interfaces/sc1arena added to the repository |
|
From: Rob <geo...@us...> - 2005-07-11 00:26:59
|
Update of /cvsroot/timewarp/source/gamex In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/source/gamex Modified Files: gameplanetmission.cpp Log Message: big update to the final version. Index: gameplanetmission.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gameplanetmission.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gameplanetmission.cpp 24 Mar 2004 23:51:36 -0000 1.4 --- gameplanetmission.cpp 11 Jul 2005 00:25:13 -0000 1.5 *************** *** 328,332 **** ); ! init_lag(); log_int(channel_server, lag_frames); log_int(channel_init, lag_frames); --- 328,332 ---- ); ! // init_lag(); log_int(channel_server, lag_frames); log_int(channel_init, lag_frames); |
|
From: Rob <geo...@us...> - 2005-07-11 00:26:57
|
Update of /cvsroot/timewarp/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/lib Modified Files: alld.lib Log Message: big update to the final version. Index: alld.lib =================================================================== RCS file: /cvsroot/timewarp/lib/alld.lib,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvslzIdsZ and /tmp/cvsQRlbhL differ |
|
From: Rob <geo...@us...> - 2005-07-11 00:26:57
|
Update of /cvsroot/timewarp/source/games In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/source/games Modified Files: gamehierarchy.cpp gflmelee.cpp ggob.cpp ggob.h gleague.cpp gmissions.cpp gplanets.cpp gplexplr.cpp gplexplr.h gsample.cpp gsarena.cpp gtrug.cpp gtrug.h vanguard.cpp vgGenSys.cpp Log Message: big update to the final version. Index: gsample.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/gsample.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** gsample.cpp 24 Mar 2004 23:51:35 -0000 1.15 --- gsample.cpp 11 Jul 2005 00:25:12 -0000 1.16 *************** *** 60,67 **** enemies = new_team(); ! //this creates a keyboard controller, using configuration 0 by default, since we don't specify another configuration ! Control *c = create_control(channel_server, "Human"); ! //the first parameter is channel_server, which means that this player is on the server computer ! //the second parameter is "Human", the name of a controller type //this creates a ship --- 60,65 ---- enemies = new_team(); ! // use the local (network) player, that was initialized by the Game::init function. ! Control *c = player[p_local]->control;//create_control(channel_server, "Human"); //this creates a ship *************** *** 158,161 **** --- 156,163 ---- void SampleGame2::init_players() { + + Game::init_players(); + + // re-use the same fleet for all players. //this is where we deviate from SampleGame1 *************** *** 166,182 **** int p; ! // check all the (human) players, allowing one per connected computer (not checking ! // for hotseat players). ! Control *c; int slot[100]; for ( p = 0; p < num_network; ++p ) { - player[p] = new_player(); - player[p]->channel = channel_network[p]; - - if (p == p_local) - { - c = create_control(channel_network[p], "Human"); //to load a fleet from disk you say fleet.load(filename, fleetname); (fleetname is usually "Fleet", because that is the standard name used in .scf files) --- 168,176 ---- int p; ! // check all the (human) players, allowing one per connected computer int slot[100]; for ( p = 0; p < num_network; ++p ) { //to load a fleet from disk you say fleet.load(filename, fleetname); (fleetname is usually "Fleet", because that is the standard name used in .scf files) *************** *** 184,205 **** //BTW, the cost of the fleet is fleet.cost and the size is fleet.size //(if fleet is a pointer, then fleet->cost, fleet->size, and fleet->load instead) - slot[p] = c->choose_ship(window, "Hey You!\nPick a ship!", &fleet); - //note that we said &fleet instead of fleet because choose_ship expects a pointer at a fleet instead of just a fleet - } else { ! c = create_control(channel_network[p], "VegetableBot"); ! } - player[p]->control = c; - player[p]->color = p + 1; //now i is the number of the ship that the user selected from that list // (or if it's a remote player, it's chosen remotely, and isn't know here yet - it // will be after the share_update, so specify the slot here already ! share(p, &slot[p]);//log_int(channel_server, i); } - num_players = num_network; ! // send/receive all choices. share_update(); --- 178,196 ---- //BTW, the cost of the fleet is fleet.cost and the size is fleet.size //(if fleet is a pointer, then fleet->cost, fleet->size, and fleet->load instead) ! // the local player chooses (and sends to others) ! if ( player[p]->islocal() ) ! slot[p] = player[p]->control->choose_ship(window, "Hey You!\nPick a ship!", &fleet); ! //note that we said &fleet instead of fleet because choose_ship expects a pointer at a fleet instead of just a fleet + // all players have the receive (and local needs to send) //now i is the number of the ship that the user selected from that list // (or if it's a remote player, it's chosen remotely, and isn't know here yet - it // will be after the share_update, so specify the slot here already ! share(p, &slot[p]); } ! // send/receive all choices. These are written to the correct memory locations. share_update(); *************** *** 287,291 **** ! init_players(); --- 278,283 ---- ! // no need here: is already called by Game::init. ! //init_players(); *************** *** 316,333 **** Ship *e; ! e = create_ship(channel_server, "kzedr", "WussieBot", size/4, random(PI2), enemies); add(e->get_ship_phaser()); ! e = create_ship(channel_server, "kohma", "WussieBot", Vector2(size.x*3/4, size.y/4), random(PI2), enemies); add(e->get_ship_phaser()); ! e = create_ship(channel_server, "druma", "WussieBot", size*3/4, random(PI2), enemies); add(e->get_ship_phaser()); ! e = create_ship(channel_server, "yehte", "WussieBot", Vector2(size.x/4, size.y*3/4), random(PI2), enemies); add(e->get_ship_phaser()); ! //note that all the enemy AIs are located on the server ! //you can also have AIs colocated //to do that, you pass channel_none - //benefits: an AI that is colocated uses no network bandwidth - //disadvantages: colocating an AI may not work with all AI types; if it doesn't work, it will cause desynchs - //Of course, only AIs can be colocated; you can't colocate a Human control, or bad things will happen change_view("Hero"); --- 308,321 ---- Ship *e; ! e = create_ship(channel_none, "kzedr", "WussieBot", size/4, random(PI2), enemies); add(e->get_ship_phaser()); ! e = create_ship(channel_none, "kohma", "WussieBot", Vector2(size.x*3/4, size.y/4), random(PI2), enemies); add(e->get_ship_phaser()); ! e = create_ship(channel_none, "druma", "WussieBot", size*3/4, random(PI2), enemies); add(e->get_ship_phaser()); ! e = create_ship(channel_none, "yehte", "WussieBot", Vector2(size.x/4, size.y*3/4), random(PI2), enemies); add(e->get_ship_phaser()); ! //you should have AIs colocated //to do that, you pass channel_none change_view("Hero"); *************** *** 348,352 **** ! /* TimeWarp Sample 3: Eternal Arena! --- 336,341 ---- ! /* mwoah, not much need to maintain this gametype... there's not much additional info here compared ! to games 1 and 2. TimeWarp Sample 3: Eternal Arena! *************** *** 364,368 **** { //declaring our game type virtual void init(Log *_log) ; //happens when our game is first started ! Control *human_control[2]; virtual void calculate() ; //TeamCode human_team, enemy_team; //the two teams --- 353,358 ---- { //declaring our game type virtual void init(Log *_log) ; //happens when our game is first started ! // Control *human_control[2]; ! virtual void init_players(); virtual void calculate() ; //TeamCode human_team, enemy_team; //the two teams *************** *** 375,387 **** { Game::calculate(); ! if (respawn_time == -1) { int i; ! unsigned int humans = 0, enemies = 0; ! for (i = 0; i < gametargets.N; i += 1) { ! if (gametargets.item[i]->get_team() == humans) humans += 1; ! if (gametargets.item[i]->get_team() == enemies) enemies += 1; } //if either team has no targetable items remaining (generally ships), pick new ships ! if (!humans || !enemies) respawn_time = game_time + 5000; //5000 milliseconds is 5 seconds } else if (respawn_time <= game_time) pick_new_ships(); --- 365,379 ---- { Game::calculate(); ! ! if (respawn_time == -1) ! { int i; ! unsigned int Nhumans = 0, Nenemies = 0; ! for (i = 0; i < targets->N; i += 1) { ! if (targets->item[i]->get_team() == humans) Nhumans += 1; ! if (targets->item[i]->get_team() == enemies) Nenemies += 1; } //if either team has no targetable items remaining (generally ships), pick new ships ! if (!Nhumans || !Nenemies) respawn_time = game_time + 5000; //5000 milliseconds is 5 seconds } else if (respawn_time <= game_time) pick_new_ships(); *************** *** 389,393 **** } ! void SampleGame3::pick_new_ships() { int i; window->lock();//call before writting to window --- 381,409 ---- } ! void SampleGame3::init_players() ! { ! Game::init_players(); ! ! ! // each player loads/shares his fleet. ! int p; ! for ( p = 0; p < num_network; ++p ) ! { ! // adjust the team setting for the human player. ! player[p]->team = humans; ! ! //fleet.load("fleets/all.scf", "Fleet"); ! player[p]->fleet = new Fleet(); ! ! if (player[p]->islocal()) ! player[p]->fleet->load("fleets/all.scf", "Fleet"); ! ! share_fleet(p); // shares the fleet of player p. ! } ! } ! ! ! void SampleGame3::pick_new_ships() ! { int i; window->lock();//call before writting to window *************** *** 399,421 **** //remove all existing items ! //player 1 selects a new ship ! i = human_control[0]->choose_ship(window, "Hey You!\nPick a ship!", reference_fleet); ! log_int(i, channel_server); ! if (i == -1) i = random() % reference_fleet->getSize(); ! Ship *s = create_ship(reference_fleet->getShipType(i)->id, human_control[0], size/2 + Vector2(100, 0), 0, humans); ! add(s->get_ship_phaser()); ! //notice that we DON'T call add_focus on the ship here? ! //that's because there's a focus on the ships controller already ! //look in SampleGame3::init ! ShipPanel *sp = new ShipPanel(s); ! sp->window->init(window); ! sp->window->locate( ! 0, 0.8, ! 0, 0, ! 0, 0.2, ! 0, 100.0/240 ! ); ! add(sp); if (glog->type == Log::log_net) { log_file("fleets/all.scf"); --- 415,458 ---- //remove all existing items ! int slot[100]; ! ! int p; ! for ( p = 0; p < num_network; ++p ) ! { ! ! if (player[p]->islocal()) ! { ! // local player selects a new ship ! slot[p] = player[p]->control->choose_ship(window, "Hey You!\nPick a ship!", reference_fleet); ! } ! share(p, &slot[p]); ! } ! share_update(); ! ! for ( p = 0; p < num_network; ++p ) ! { + int i = slot[p]; + + if (i == -1) + i = random() % reference_fleet->getSize(); + + Ship *s = create_ship(reference_fleet->getShipType(i)->id, player[p]->control, size/2 + Vector2(100, 0), 0, humans); + add(s->get_ship_phaser()); + //notice that we DON'T call add_focus on the ship here? + //that's because there's a focus on the ships controller already + //look in SampleGame3::init + ShipPanel *sp = new ShipPanel(s); + sp->window->init(window); + sp->window->locate( + 0, 0.8, + 0, 0, + 0, 0.2, + 0, 100.0/240 + ); + add(sp); + } + + /* outdated, stemming from 2-player era: if (glog->type == Log::log_net) { log_file("fleets/all.scf"); *************** *** 435,438 **** --- 472,476 ---- add(sp); } + */ *************** *** 461,465 **** } ! void SampleGame3::init(Log *_log) { Game::init(_log); --- 499,509 ---- } ! void SampleGame3::init(Log *_log) ! { ! prepare(); ! ! humans = new_team(); ! enemies = new_team(); ! Game::init(_log); *************** *** 470,481 **** //but you probably shouldn't be modifying it later. //The normal size is 3840x3840 - prepare(); add(new Stars()); - humans = new_team(); - enemies = new_team(); ! init_players(); respawn_time = 500; --- 514,523 ---- //but you probably shouldn't be modifying it later. //The normal size is 3840x3840 add(new Stars()); ! // is already called in Game. ! //init_players(); respawn_time = 500; *************** *** 484,489 **** for (i = 0; i < 7; i += 1) add(new Asteroid()); ! if (p_local == 0) fleet.load("fleets/all.scf", "Fleet"); ! log_fleet(channel_server, &fleet); //this time, instead of transmitting the fleet file over the network and then loading //it on both sides --- 526,535 ---- for (i = 0; i < 7; i += 1) add(new Asteroid()); ! ! ! // // share the fleet info with all the other players. ! // outdated: ! // share_fleet(channel_server, &fleet); ! //this time, instead of transmitting the fleet file over the network and then loading //it on both sides Index: gsarena.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/gsarena.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** gsarena.cpp 24 Mar 2004 23:51:35 -0000 1.13 --- gsarena.cpp 11 Jul 2005 00:25:12 -0000 1.14 *************** *** 1,3 **** --- 1,4 ---- /* $Id$ */ + #include <allegro.h> //allegro library header #include <stdio.h> *************** *** 53,57 **** --- 54,63 ---- int n; for ( n = 0; n < num_players; ++n ) + { + if (!player[n]) + continue; + t[n] = 0; + } for (i = 0; i < gametargets.N; i += 1) *************** *** 76,79 **** --- 82,88 ---- for ( n = 0; n < num_players; ++n ) { + if (!player[n]) + continue; + if (t[n] > 0) ++nalive; *************** *** 86,89 **** --- 95,100 ---- for (int num=1; num < num_players; num+=1) { + if (!player[num]) + continue; // CRASH s is invalid if ( (died[num]!=1) && (!s[num]->exists()) ) Index: gleague.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/gleague.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** gleague.cpp 24 Mar 2004 23:51:35 -0000 1.11 --- gleague.cpp 11 Jul 2005 00:25:11 -0000 1.12 *************** *** 154,157 **** --- 154,160 ---- for ( i = 0; i < num_players; ++i ) { + if (!player[i]) + continue; + player[i]->team = team; } Index: gplexplr.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/gplexplr.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** gplexplr.cpp 24 Mar 2004 23:51:35 -0000 1.13 --- gplexplr.cpp 11 Jul 2005 00:25:12 -0000 1.14 *************** *** 88,91 **** --- 88,92 ---- weaponrange = 300.0; // short range? viewrange = 500.0; // detecting ships at this range? + } *************** *** 161,165 **** } ! if (min_delta(pos, o->pos).length() < weaponrange && weaponperiod.ready()) { game->add( new Missile(this, Vector2(0,50), angle, weaponvel, weapondamage, weaponrange, 1, --- 162,167 ---- } ! double d = min_delta(pos, o->pos).length(); ! if (d < weaponrange && weaponperiod.ready()) { game->add( new Missile(this, Vector2(0,50), angle, weaponvel, weapondamage, weaponrange, 1, *************** *** 546,550 **** enemies = new_team(); ! Control *c = create_control(channel_server, "Human"); Ship *s = create_ship("plopl", c, 0.5*map_size, 0, human); --- 548,552 ---- enemies = new_team(); ! Control *c = player[p_local]->control;//create_control(channel_server, "Human"); Ship *s = create_ship("plopl", c, 0.5*map_size, 0, human); Index: ggob.h =================================================================== RCS file: /cvsroot/timewarp/source/games/ggob.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ggob.h 24 Mar 2004 23:51:35 -0000 1.21 --- ggob.h 11 Jul 2005 00:25:11 -0000 1.22 *************** *** 1,149 **** - /* $Id$ */ - #ifndef __GGOB_H__ - #define __GGOB_H__ ! #ifdef ALLEGRO_MSVC ! #pragma warning (disable:4786) // identifier was truncated to '255' characters in the browser information #endif ! #include <list> ! #include <string> ! #include <map> ! ! #include "melee.h" ! #include "melee/mframe.h" ! #include "melee/mgame.h" ! ! #include "melee/mitems.h" ! #include "melee/mcbodies.h" ! ! #include "other/gquest.h" ! #include "other/gevent.h" class Upgrade; class GobStation; - class GobGame; class GobPlayer { ! public: ! ! int channel; ! ~GobPlayer(); ! Ship *ship; ! Control *control; ! ShipPanel *panel; ! ! std::map<std::string, int> pair; ! ! int total; //total upgrades purchased, used in calculating price of future upgrades ! int starbucks; ! int buckazoids; ! int kills; ! int value_starbucks; ! int value_buckazoids; ! TeamCode team; ! void init(Control *c, TeamCode team, GobGame * g); ! void died(SpaceLocation *killer); ! void new_ship(ShipType *type); ! int charge (char *name, int price_starbucks, int price_buckazoids) ; ! Upgrade **upgrade_list; ! //std::list<Upgrade_Listade*> upgrade_list; } ; class GobEnemy { ! public: ! Ship *ship; ! int starbucks; ! int buckazoids; ! void init(Ship *ship, int kill_starbucks, int kill_buckazoids); ! void died (SpaceLocation *what); } ; class GobAsteroid : public Asteroid { ! public: ! virtual int handle_damage (SpaceLocation *source, double normal, double direct); ! virtual void death(); }; ! class GobGame : public Game, public EventHandler { ! ! public: ! QuestSource* quest_source; ! virtual ~GobGame(); ! ! TeamCode enemy_team; ! ! virtual void calculate(); ! virtual void ship_died(Ship *who, SpaceLocation *source); ! virtual void preinit(); ! virtual void init (Log *log); ! ! virtual void play_sound (SAMPLE *sample, SpaceLocation *source, int vol = 256, int freq = 1000); ! ! int gobplayers; ! // GobPlayer **gobplayer; ! std::list<GobPlayer*> gobplayer; ! virtual void add_gobplayer(Control *control); ! virtual GobPlayer* get_player(SpaceLocation *what); ! unsigned int max_enemies; ! std::list<GobEnemy*> gobenemy; ! // virtual int get_enemy_index(SpaceLocation *what); ! virtual GobEnemy* get_enemy(SpaceLocation *what); ! // protected: ! virtual void fps (); ! ! ! void add_new_enemy(std::string type = "", Vector2* pos = NULL); ! ! int next_add_new_enemy_time; ! ! SpaceSprite *defenderSprite; ! ! public: ! int num_planets; ! ! // void save_game(); ! // void load_game(); ! // void config(bool option); ! // virtual void quit(const char *message); ! }; ! class GobStation : public Orbiter { ! std::string name; ! public: ! const char *build_type; ! std::string background_pic; ! GobStation ( SpaceSprite *pic, SpaceLocation *orbit_me, ! const char *ship, const char *background, ! std::string sname ); ! virtual ~GobStation(); - std::string GetStationName(){return name;} ! virtual void buy_new_ship_menu(GobPlayer *s) ; ! virtual void inflict_damage(SpaceObject *other); ! virtual void station_screen (GobPlayer *s); ! virtual void upgrade_menu(GobStation *station, GobPlayer *gs) ; }; class Upgrade { ! public: ! enum { ! active, inactive ! }; ! char *name; ! int starbucks; ! int buckazoids; ! int status; ! int num; ! int index; virtual bool update(Ship *ship, GobStation *station, GobPlayer *gp) = 0; ! //true if listed virtual void execute(Ship *ship, GobStation *station, GobPlayer *gp) = 0; virtual void charge(GobPlayer *gp); --- 1,139 ---- ! #ifndef _MELEE_H ! #include "../melee.h" ! #endif ! #ifndef _MFRAME_H ! #include "../melee/mframe.h" ! #endif ! #ifndef _MGAME_H ! #include "../melee/mgame.h" #endif ! #include "../melee/mitems.h" class Upgrade; class GobStation; class GobPlayer { ! public: ! int channel; ! ~GobPlayer(); ! Ship *ship; ! Control *control; ! ShipPanel *panel; ! struct pair { ! char *id; ! int value; ! }; ! pair *pair_list; ! int num_pairs; ! void _add_pair(const char *id, int value); ! pair *_get_pair(const char *id); ! void write_pair(const char *id, int value); ! int read_pair(const char *id); ! int total; //total upgrades purchased, used in calculating price of future upgrades ! int starbucks; ! int buckazoids; ! int kills; ! int value_starbucks; ! int value_buckazoids; ! TeamCode team; ! void init(Control *c, TeamCode team); ! void died(SpaceLocation *killer); ! void new_ship(ShipType *type); ! int charge (char *name, int price_starbucks, int price_buckazoids) ; ! Upgrade **upgrade_list; } ; class GobEnemy { ! public: ! Ship *ship; ! int starbucks; ! int buckazoids; ! void init(Ship *ship, int kill_starbucks, int kill_buckazoids); ! void died (SpaceLocation *what); } ; class GobAsteroid : public Asteroid { ! public: ! virtual int handle_damage (SpaceLocation *source, double normal, double direct); ! virtual void death(); }; ! class GobGame : public Game { ! public: ! virtual ~GobGame(); ! TeamCode enemy_team; ! virtual void calculate(); ! virtual void ship_died(Ship *who, SpaceLocation *source); ! virtual void preinit(); ! virtual void init (Log *log); ! virtual void play_sound (SAMPLE *sample, SpaceLocation *source, int vol = 256, int freq = 1000); ! int gobplayers; ! GobPlayer **gobplayer; ! virtual void add_gobplayer(Control *control); ! virtual GobPlayer *get_player(SpaceLocation *what); ! int gobenemies, max_enemies; ! GobEnemy **gobenemy; ! virtual int get_enemy_index(SpaceLocation *what); ! int difficulty; ! virtual bool GobGame::handle_key(int k); ! // protected: ! virtual void fps (); ! ! ! void add_new_enemy(); ! ! int next_add_new_enemy_time; ! ! SpaceSprite *stationSprite[3]; ! char *station_pic_name[3]; ! char *station_build_name[3]; ! SpaceSprite *defenderSprite; ! ! public: ! int num_planets; ! Planet *planet[16]; ! GobStation *station[16]; ! void add_planet_and_station ( SpaceSprite *planet_sprite, int planet_index, SpaceSprite *station_sprite, const char *builds, const char *background); ! ! // stuff required by networking: ! virtual void register_events(); ! void event_inc_difficulty(int iplayer); ! }; ! ! class GobStation : public Orbiter { ! public: ! const char *build_type; ! const char *background_pic; ! GobStation ( SpaceSprite *pic, SpaceLocation *orbit_me, const char *ship, const char *background); ! virtual void buy_new_ship_menu(GobPlayer *s) ; ! virtual void inflict_damage(SpaceObject *other); ! virtual void station_screen (GobPlayer *s); ! virtual void upgrade_menu(GobStation *station, GobPlayer *gs) ; }; class Upgrade { ! public: ! enum { ! active, inactive ! }; ! char *name; ! int starbucks; ! int buckazoids; ! int status; ! int num; ! int index; virtual bool update(Ship *ship, GobStation *station, GobPlayer *gp) = 0; ! //true if listed virtual void execute(Ship *ship, GobStation *station, GobPlayer *gp) = 0; virtual void charge(GobPlayer *gp); *************** *** 153,167 **** class RainbowRift : public SpaceLocation { ! public: ! enum { n = 2 }; ! float p[n * 6 + 2]; ! RGB c[n]; ! int next_time, next_time2; ! RainbowRift (); ! virtual void animate ( Frame *frame ); ! virtual void calculate () ; ! void squiggle(); }; - #endif // __GGOB_H__ --- 143,156 ---- class RainbowRift : public SpaceLocation { ! public: ! enum { n = 2 }; ! float p[n * 6 + 2]; ! RGB c[n]; ! int next_time, next_time2; ! RainbowRift (); ! virtual void animate ( Frame *frame ); ! virtual void calculate () ; ! void squiggle(); }; Index: gflmelee.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/gflmelee.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** gflmelee.cpp 27 Mar 2004 11:35:53 -0000 1.27 --- gflmelee.cpp 11 Jul 2005 00:25:11 -0000 1.28 *************** *** 174,177 **** --- 174,179 ---- { public: + FlPlayer(); + Control *oldcontrol; // remember the original control when you take possession of a ship *************** *** 181,184 **** --- 183,192 ---- }; + FlPlayer::FlPlayer() + { + lastkey_playership = 0; + panel = 0; + } + static const int Nradarmodes = 3; // off, all, and medium *************** *** 244,248 **** bool underplayercontrol(SpaceObject *o); ! virtual PlayerInformation *new_player(); // should return a pointer to a new player-class }; --- 252,256 ---- bool underplayercontrol(SpaceObject *o); ! virtual NPI *new_player(); // should return a pointer to a new player-class }; *************** *** 328,331 **** --- 336,342 ---- for ( i = 0; i < num_players; ++i ) { + if (!player[i]) + continue; + if (player[i]->channel != channel_none && player[i]->control->ship == o) *************** *** 340,348 **** ! PlayerInformation *FlMelee::new_player() // should return a pointer to a new player-class { FlPlayer *p = new FlPlayer(); - p->lastkey_playership = 0; - p->panel = 0; return p; } --- 351,357 ---- ! NPI *FlMelee::new_player() // should return a pointer to a new player-class { FlPlayer *p = new FlPlayer(); return p; } *************** *** 360,364 **** NormalGame::init(_log); ! //prepare needs to be called before you add items, or do physics or graphics or anything like that. Don't ask why. prepare(); --- 369,373 ---- NormalGame::init(_log); ! //prepare needs to be called before you add items, or do physics or graphics or anything like that. prepare(); *************** *** 498,514 **** */ ! log_file("gflmelee.ini"); ! if (p_local == 0) { start_menu(allyfleet); } ! log_file("gflmelee.ini"); ! // send (or receive) ... channel_server is locally either the server, or the client. // fleet numbers are fixed: fleet 0 vs fleet 1 ! channel_current = channel_server; ! log_int(allyfleet[0]); ! log_int(allyfleet[1]); --- 507,527 ---- */ ! set_config_file("gflmelee.ini"); ! if (hostcomputer()) { start_menu(allyfleet); } ! set_config_file("gflmelee.ini"); ! // both are chosen by the server: // fleet numbers are fixed: fleet 0 vs fleet 1 ! ! //channel_current = channel_server; ! ! // use the init channels to share this ! share(-1, &allyfleet[0]); ! share(-1, &allyfleet[1]); ! share_update(); *************** *** 517,524 **** alliance[1] = new_team(); ! // players are distributed over the fleets int i; ! for ( i = 0; i < num_players; ++i ) player[i]->team = alliance[i % 2]; --- 530,543 ---- alliance[1] = new_team(); ! // (human) players are distributed over the fleets. You don't have to concern about bots, those ! // are irrelevant here... int i; ! for ( i = 0; i < num_network; ++i ) ! { ! if (!player[i]) ! continue; ! player[i]->team = alliance[i % 2]; + } *************** *** 617,621 **** // have to do this, since the ship-init loads different ini files. // and it's best placed here, right after the last call to a different ini. ! log_file("gflmelee.ini"); } --- 636,640 ---- // have to do this, since the ship-init loads different ini files. // and it's best placed here, right after the last call to a different ini. ! set_config_file("gflmelee.ini"); } *************** *** 628,631 **** --- 647,653 ---- for ( i = 0; i < num_players; ++i ) { + if (!player[i]) + continue; + // the players should take over a ship int ifleet; *************** *** 712,715 **** --- 734,740 ---- for ( i = 0; i < num_players; ++i ) { + if (!player[i]) + continue; + if (player[i]->control->ship) message.print(1500, 15, "player[%i] team[%i] ship[%s]", i, player[i]->team, player[i]->control->ship->get_shiptype()->name); *************** *** 957,960 **** --- 982,987 ---- for ( iplayer = 0; iplayer < num_players; ++iplayer ) { + if (!player[iplayer]) + continue; if (player[iplayer]->channel == channel_none) *************** *** 1084,1087 **** --- 1111,1117 ---- for ( iplayer = 0; iplayer < num_players; ++iplayer ) { + if (!player[iplayer]) + continue; + FlPlayer *p = (FlPlayer*) player[iplayer]; *************** *** 1278,1281 **** --- 1308,1314 ---- for ( i = 0; i < num_players; ++i ) { + if (!player[i]) + continue; + FlPlayer *p = (FlPlayer*) player[i]; Index: ggob.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/ggob.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** ggob.cpp 24 Mar 2004 23:51:34 -0000 1.39 --- ggob.cpp 11 Jul 2005 00:25:11 -0000 1.40 *************** *** 1,14 **** ! /* $Id$ */ #include <stdlib.h> #include <string.h> #include <stdio.h> - #include <assert.h> #include <allegro.h> - #ifdef ALLEGRO_MSVC - #pragma warning (disable:4786) [...2242 lines suppressed...] ! ! ! /* intended upgrades: ! ! faster marines == faster Orz Marines, cost 4s ! upgrade battle armor == tougher Orz Marines, cost 4s/4b ! improve range == long range Orz cannons, cost 3s ! regeneration == crew regeneration for Orz, cost 10s/25b, only purchasable once ! sharper shurikens == +1 damage for Kohr-Ah blades, cost 5s ! faster shurikens == higher velocity for Kohr-Ah blades, cost 4s ! larger corona == longer range for Kohr-Ah FRIED, cost 15s, only purchasable once ! hotter corona == double damage for Kohr-Ah FRIED, cost 10s, only purchasable once ! divine favor == pkunk respawn, only available from one base, cost 48s/0b, only purchasable once, kept when ship is sold ! sentinel system == Chmmr ZapSats, only available from one base, cost 30s/30b ! ! long range scanners == can zoom farther out, gives radar, only available from one base, cost 8s/20b ! ! */ \ No newline at end of file Index: gtrug.h =================================================================== RCS file: /cvsroot/timewarp/source/games/gtrug.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** gtrug.h 24 Mar 2004 23:51:35 -0000 1.8 --- gtrug.h 11 Jul 2005 00:25:12 -0000 1.9 *************** *** 93,97 **** virtual void init(View *old); }; ! class TrugOrderEvent : public GameEvent { --- 93,97 ---- virtual void init(View *old); }; ! /* class TrugOrderEvent : public GameEvent { *************** *** 105,109 **** int serial; }; ! class TrugGame : public Game { public: --- 105,109 ---- int serial; }; ! */ class TrugGame : public Game { public: Index: vgGenSys.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/vgGenSys.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** vgGenSys.cpp 24 Mar 2004 23:51:35 -0000 1.13 --- vgGenSys.cpp 11 Jul 2005 00:25:12 -0000 1.14 *************** *** 282,298 **** game->add(OH); OH = new OrbitHandler(mapCenter, Vector2(0, 0), ! 0, YS, HP, scale_range(15), scale_velocity(3.75), 1); game->add(OH); OH = new OrbitHandler(mapCenter, Vector2(0, 0), ! 0, YS, GG, scale_range(22.5), scale_velocity(2.5), 1); game->add(OH); OH = new OrbitHandler(GG, GG->pos, ! 0, GG, M1, scale_range(2), scale_velocity(4), 0); game->add(OH); OH = new OrbitHandler(GG, GG->pos, ! PI/2, GG, M2, scale_range(3), scale_velocity(3), 0); game->add(OH); OH = new OrbitHandler(GG, GG->pos, ! PI, GG, M3, scale_range(4), scale_velocity(2), 0); game->add(OH); for(i=0; i<4; i++) --- 282,298 ---- game->add(OH); OH = new OrbitHandler(mapCenter, Vector2(0, 0), ! 0, YS, HP, scale_range(18), scale_velocity(3.75), 1); game->add(OH); OH = new OrbitHandler(mapCenter, Vector2(0, 0), ! 0, YS, GG, scale_range(29.5), scale_velocity(2.5), 1); game->add(OH); OH = new OrbitHandler(GG, GG->pos, ! 0, GG, M1, scale_range(3), scale_velocity(4), 0); game->add(OH); OH = new OrbitHandler(GG, GG->pos, ! PI/2, GG, M2, scale_range(4.5), scale_velocity(3), 0); game->add(OH); OH = new OrbitHandler(GG, GG->pos, ! PI, GG, M3, scale_range(6), scale_velocity(2), 0); game->add(OH); for(i=0; i<4; i++) *************** *** 580,586 **** char dataStr[100]; ! for(int num=0; num<numSprites; num++) { ! sprintf(dataStr,cmdStr,num); spr = GetSprite(fileName, dataStr, attribs, 64); if(!spr) --- 580,592 ---- char dataStr[100]; ! // for(int num=0; num<numSprites; num++) ! // { ! // sprintf(dataStr,cmdStr,num); ! if (numSprites != 1) { ! tw_error("Vgensystem: trying to initialize >1 sprites, only 1 allowed"); ! } ! ! strcpy(dataStr, cmdStr); spr = GetSprite(fileName, dataStr, attribs, 64); if(!spr) *************** *** 589,593 **** } Pics = spr; ! } return TRUE; } --- 595,599 ---- } Pics = spr; ! // } return TRUE; } *************** *** 754,758 **** ! void VGenSystem::init_objects() { size *= 1; prepare(); --- 760,765 ---- ! void VGenSystem::init_objects() ! { size *= 1; prepare(); *************** *** 786,793 **** //int i = random(Ninit); ! int i; // initialization is for non-clients only ... ! if (p_local == 0) // if you're the server { --- 793,800 ---- //int i = random(Ninit); ! int i = -1; // initialization is for non-clients only ... ! if (hostcomputer()) // if you're the server { *************** *** 828,832 **** // share the result of the initialization. // send (or receive) ... channel_server is locally either the server, or the client. ! log_int(i, channel_server); --- 835,856 ---- // share the result of the initialization. // send (or receive) ... channel_server is locally either the server, or the client. ! share(-1, &i); ! share_update(); ! ! int ichoice = i; ! ! if (i == -1) ! tw_error("Vgensys: map type choice (-1) error"); ! ! /* ! int k1 = random(1000); ! int k2 = k1; ! share(-1, &k2); ! ! message.print(1500, 15, "k1 = %i k2 = %i", k1, k2); ! message.animate(0); ! readkey(); ! */ ! *************** *** 839,845 **** VMetalAsteroid::InitStatics(); - // call the selected init routine : ! (this->*funclist[i])(); } --- 863,868 ---- VMetalAsteroid::InitStatics(); // call the selected init routine : ! (this->*funclist[ichoice])(); } Index: gamehierarchy.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/gamehierarchy.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** gamehierarchy.cpp 24 Mar 2004 23:51:34 -0000 1.11 --- gamehierarchy.cpp 11 Jul 2005 00:25:11 -0000 1.12 *************** *** 38,42 **** _STACKTRACE("Game::play - Game physics"); ! gen_buffered_data(); glog->flush_noblock(); glog->listen(); --- 38,42 ---- _STACKTRACE("Game::play - Game physics"); ! // gen_buffered_data(); glog->flush_noblock(); glog->listen(); *************** *** 82,85 **** --- 82,92 ---- asubgame->maingame = this; + // clear the log ... + glog->reset(); + + // clear the events .. and reread this for this at least ? + events.clear(); // hmmm... + //register_events(); + //videosystem.window.lock(); //clear_to_color(videosystem.window.surface, palette_color[8]); *************** *** 94,97 **** --- 101,106 ---- // this init should reference the already-initialized melee-data of the maingame + + subgame[Nsubgames] = asubgame; ++Nsubgames; Index: gplanets.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/gplanets.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** gplanets.cpp 24 Mar 2004 23:51:35 -0000 1.13 --- gplanets.cpp 11 Jul 2005 00:25:12 -0000 1.14 *************** *** 1540,1544 **** PlanetPlGrav, PlanetPlGravRange; ! if (p_local == 0) { // the host can choose the planet system ; the rest has to wait a short while. --- 1540,1544 ---- PlanetPlGrav, PlanetPlGravRange; ! if (hostcomputer()) { // the host can choose the planet system ; the rest has to wait a short while. Index: gmissions.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/gmissions.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** gmissions.cpp 24 Mar 2004 23:51:35 -0000 1.27 --- gmissions.cpp 11 Jul 2005 00:25:12 -0000 1.28 *************** *** 999,1002 **** --- 999,1003 ---- team_badguys = new_team(); + // this is a purely single-player game ... control structure is different... playercontrol = create_control(channel_server, "Human"); playercontrol->target_sign_color = 4; *************** *** 1046,1049 **** --- 1047,1055 ---- void Play::calculate() { + if (playercontrol) + { + playercontrol->keys = playercontrol->think(); + } + SubGame::calculate(); *************** *** 1215,1219 **** // reset the keys for this ship ! shp->nextkeys = 0; // re-define the keys --- 1221,1225 ---- // reset the keys for this ship ! shp->control->keys = 0; // re-define the keys *************** *** 1249,1259 **** if (da > 0.01*PI) { ! shp->nextkeys |= keyflag::right; ! shp->nextkeys |= keyflag::thrust; // you _must_ thrust, otherwise you can't steer. } if (da < -0.01*PI) { ! shp->nextkeys |= keyflag::left; ! shp->nextkeys |= keyflag::thrust; } --- 1255,1265 ---- if (da > 0.01*PI) { ! shp->control->keys |= keyflag::right; ! shp->control->keys |= keyflag::thrust; // you _must_ thrust, otherwise you can't steer. } if (da < -0.01*PI) { ! shp->control->keys |= keyflag::left; ! shp->control->keys |= keyflag::thrust; } *************** *** 1262,1266 **** if (shp->vel.length() < 0.01*pspeed * d * shp->speed_max) // move at some percentage of max speed ! shp->nextkeys |= keyflag::thrust; else shp->vel *= (1 - 0.1*frame_time*1E-3); // ok, very artificial, but, what the heck ;) --- 1268,1272 ---- if (shp->vel.length() < 0.01*pspeed * d * shp->speed_max) // move at some percentage of max speed ! shp->control->keys |= keyflag::thrust; else shp->vel *= (1 - 0.1*frame_time*1E-3); // ok, very artificial, but, what the heck ;) *************** *** 1368,1378 **** if (da > 0.01*PI) { ! shp->nextkeys |= keyflag::right; ! shp->nextkeys |= keyflag::thrust; // you _must_ thrust, otherwise you can't steer. } if (da < -0.01*PI) { ! shp->nextkeys |= keyflag::left; ! shp->nextkeys |= keyflag::thrust; } } --- 1374,1384 ---- if (da > 0.01*PI) { ! shp->control->keys |= keyflag::right; ! shp->control->keys |= keyflag::thrust; // you _must_ thrust, otherwise you can't steer. } if (da < -0.01*PI) { ! shp->control->keys |= keyflag::left; ! shp->control->keys |= keyflag::thrust; } } *************** *** 1411,1416 **** if (!(enemy && enemy->exists()) || Rt > Rattack) { ! // reset the keys for this ship ! shp->nextkeys = 0; if (Rs > Rmove) // move back --- 1417,1426 ---- if (!(enemy && enemy->exists()) || Rt > Rattack) { ! // take external control over the control->keys ! shp->control->auto_update = false; ! ! // reset the keys for this ship-ai ! shp->control->keys = 0; ! //shp->nextkeys = 0; if (Rs > Rmove) // move back *************** *** 1421,1434 **** { case 0: ! shp->nextkeys |= keyflag::right; break; case 1: ! shp->nextkeys |= keyflag::left; break; } } ! shp->nextkeys |= keyflag::thrust; ! return; } --- 1431,1447 ---- { case 0: ! shp->control->keys |= keyflag::right; break; case 1: ! shp->control->keys |= keyflag::left; break; } } ! shp->control->keys |= keyflag::thrust; ! //return; ! } else { ! // give back control over the control->keys ! shp->control->auto_update = true; } *************** *** 1436,1441 **** // otherwise ... there's a ship within range... // ... do nothing then : let the normal AI handle it !! - - // shp->AI(); } --- 1449,1452 ---- *************** *** 1958,1961 **** --- 1969,1974 ---- ambassador = create_allied_ship(0.6, 0.52, "yehte"); + ambassador->control->auto_update = false; // first, place under external control + ambassador->crew = 1; missionpointer->target(ambassador); *************** *** 2054,2057 **** --- 2067,2071 ---- switch_team(terrorist->ally_flag, team_goodguys); missionpointer->target(centralplanet); + terrorist->control->auto_update = false; // place under external control (disabling ai) ship_change_speed(terrorist, 90, 100, 100); // make them slightly slower than before *************** *** 2346,2350 **** a = i * PI2 / Nphedar; guardloc[i] = Vector2(0.5 + 0.25 * cos(a), 0.5 + 0.25 * sin(a)); ! phedar[i] = create_enemy_ship(guardloc[i].x, guardloc[i].y, "phepa", "VegetableBot"); guardloc[i] = guardloc[i] * map_size; phedar[i]->hashotspots = false; // disable their hotspot trail -- too many objects. --- 2360,2367 ---- a = i * PI2 / Nphedar; guardloc[i] = Vector2(0.5 + 0.25 * cos(a), 0.5 + 0.25 * sin(a)); ! ! phedar[i] = create_enemy_ship(guardloc[i].x, guardloc[i].y, "phepa", "MoronBot"); ! phedar[i]->control->auto_update = false; ! guardloc[i] = guardloc[i] * map_size; phedar[i]->hashotspots = false; // disable their hotspot trail -- too many objects. Index: vanguard.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/vanguard.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** vanguard.cpp 24 Mar 2004 23:51:35 -0000 1.15 --- vanguard.cpp 11 Jul 2005 00:25:12 -0000 1.16 *************** *** 465,469 **** } ! void Vanguard::calculate() { STACKTRACE; --- 465,471 ---- } ! void Vanguard::calculate() ! { ! STACKTRACE; *************** *** 471,479 **** // if (human_panel[0] && !human_panel[0]->exists()) human_panel[0] = NULL; // if (human_panel[1] && !human_panel[1]->exists()) human_panel[1] = NULL; ! if (respawn_time == -1) { int i, humans = 0, enemies = 0; ! for (i = 0; i < gametargets.N; i += 1) { ! if (gametargets.item[i]->get_team() == human_team) humans += 1; ! if (gametargets.item[i]->get_team() == enemy_team) enemies += 1; } //if either team has no targetable items remaining (generally ships), pick new ships --- 473,485 ---- // if (human_panel[0] && !human_panel[0]->exists()) human_panel[0] = NULL; // if (human_panel[1] && !human_panel[1]->exists()) human_panel[1] = NULL; ! ! if (respawn_time == -1) ! { int i, humans = 0, enemies = 0; ! ! for (i = 0; i < targets->N; i += 1) ! { ! if (targets->item[i]->get_team() == human_team) humans += 1; ! if (targets->item[i]->get_team() == enemy_team) enemies += 1; } //if either team has no targetable items remaining (generally ships), pick new ships *************** *** 491,494 **** --- 497,503 ---- for ( i = 0; i < num_players; ++i ) { + if (!player[i]) + continue; + Ship *s; s = player[i]->control->ship; *************** *** 561,564 **** --- 570,576 ---- for ( i = 0; i < num_players; ++i ) { + if (!player[i]) + continue; + player[i]->control->ship = 0; } *************** *** 592,596 **** --- 604,613 ---- log_file("fleets/all.scf"); for ( i = 0; i < num_players; ++i ) + { + if (!player[i]) + continue; + ((NPI*)player[i])->fleet->load(NULL, "Fleet"); + } // use the default mechanism for choosing ships. *************** *** 833,855 **** STACKTRACE; ! int minbots = 1; if (num_bots < minbots) // require a minimum number of bots { - int k; - k = minbots - num_bots; num_bots = minbots; - int i; - for ( i = 0; i < 5; ++i ) - { - message.print(1500, 14, "Adding bots to your game !! You need at least 4 bots."); - message.animate(0); - } - idle(500); // wait half a second. - - // you've to adjust the num_players as well if this is the case ... // otherwise the extra bots will be skipped (=safeguard). ! num_players += k; } --- 850,861 ---- STACKTRACE; ! int minbots = 4; // bots are the enemy, so ... if (num_bots < minbots) // require a minimum number of bots { num_bots = minbots; // you've to adjust the num_players as well if this is the case ... // otherwise the extra bots will be skipped (=safeguard). ! num_players = num_network + num_bots; } *************** *** 884,887 **** --- 890,896 ---- for ( i = 0; i < num_players; ++i ) { + if (!player[i]) + continue; + jammer[i] = new HyperJammer(NULL,150); game->add(jammer[i]); *************** *** 924,928 **** for ( i = 0; i < num_players; ++i ) { ! if (player[i]->channel == channel_none) player[i]->team = enemy_team; else --- 933,940 ---- for ( i = 0; i < num_players; ++i ) { ! if (!player[i]) ! continue; ! ! if (player[i]->channel == channel_none) //bots... player[i]->team = enemy_team; else Index: gtrug.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/gtrug.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** gtrug.cpp 24 Mar 2004 23:51:35 -0000 1.14 --- gtrug.cpp 11 Jul 2005 00:25:12 -0000 1.15 *************** *** 233,237 **** add(create_ship("chebr", cp, random(size), random(PI2))); ! if (p_local != 0) add(gui = new TrugGUI( cp )); else --- 233,237 ---- add(create_ship("chebr", cp, random(size), random(PI2))); ! if (!hostcomputer()) add(gui = new TrugGUI( cp )); else Index: gplexplr.h =================================================================== RCS file: /cvsroot/timewarp/source/games/gplexplr.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gplexplr.h 24 Mar 2004 23:51:35 -0000 1.5 --- gplexplr.h 11 Jul 2005 00:25:12 -0000 1.6 *************** *** 116,120 **** double ZoomDefault; // is camera.z, see struct CameraPosition { ! Ship *player; Plsurface *plsurface; }; --- 116,120 ---- double ZoomDefault; // is camera.z, see struct CameraPosition { ! Ship *playership; Plsurface *plsurface; }; |
|
From: Rob <geo...@us...> - 2005-07-11 00:26:57
|
Update of /cvsroot/timewarp/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/source Modified Files: ais.h melee.h sc1ships.h sc2ships.h scp.cpp scp.h Log Message: big update to the final version. Index: sc1ships.h =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sc1ships.h 24 Mar 2004 23:51:34 -0000 1.4 --- sc1ships.h 11 Jul 2005 00:25:10 -0000 1.5 *************** *** 2,5 **** --- 2,7 ---- class AndrosynthGuardian : public Ship { public: + IDENTITY(AndrosynthGuardian); + public: double weaponRange; double weaponVelocity; *************** *** 39,42 **** --- 41,46 ---- class ArilouSkiff : public Ship { public: + IDENTITY(ArilouSkiff); + public: int weaponColor; double weaponRange; *************** *** 68,71 **** --- 72,77 ---- class ChenjesuBroodhome : public Ship { + public: + IDENTITY(ChenjesuBroodhome); protected: double weaponVelocity, shardRange; *************** *** 96,99 **** --- 102,107 ---- class EarthlingCruiser : public Ship { public: + IDENTITY(EarthlingCruiser); + public: double weaponRange; double weaponVelocity; *************** *** 118,121 **** --- 126,131 ---- class IlwrathAvenger : public Ship { public: + IDENTITY(IlwrathAvenger); + public: double weaponRange; double weaponVelocity; *************** *** 141,144 **** --- 151,156 ---- class KzerZaDreadnought : public Ship { public: + IDENTITY(KzerZaDreadnought); + public: double weaponRange; double weaponVelocity; *************** *** 166,169 **** --- 178,183 ---- class MmrnmhrmXForm : public Ship { public: + IDENTITY(MmrnmhrmXForm); + public: struct { public: *************** *** 209,212 **** --- 223,228 ---- class MyconPodship : public Ship { public: + IDENTITY(MyconPodship); + public: double weaponRange; double weaponVelocity; *************** *** 223,226 **** --- 239,244 ---- class ShofixtiScout : public Ship { + public: + IDENTITY(ShofixtiScout); public: double weaponRange; *************** *** 245,248 **** --- 263,268 ---- class SpathiEluder : public Ship { public: + IDENTITY(SpathiEluder); + public: double weaponRange; double weaponVelocity; *************** *** 266,269 **** --- 286,291 ---- class SyreenPenetrator : public Ship { public: + IDENTITY(SyreenPenetrator); + public: double weaponRange; double weaponVelocity; *************** *** 286,289 **** --- 308,313 ---- class UmgahDrone : public Ship { public: + IDENTITY(UmgahDrone); + public: int weaponDamage; int weaponCone; *************** *** 306,309 **** --- 330,335 ---- class VuxIntruder : public Ship { public: + IDENTITY(VuxIntruder); + public: int weaponColor; double weaponRange; *************** *** 328,331 **** --- 354,359 ---- class YehatTerminator : public Ship { public: + IDENTITY(YehatTerminator); + public: double weaponRange; double weaponVelocity; Index: scp.cpp =================================================================== RCS file: /cvsroot/timewarp/source/scp.cpp,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** scp.cpp 22 Jun 2004 21:28:13 -0000 1.72 --- scp.cpp 11 Jul 2005 00:25:10 -0000 1.73 *************** *** 9,13 **** * - key jamming tester revised to accomodate joystick. * - re-added d_tw_yeildslice stuff ! * - improved "debug" ::Button * - SHIPVIEW dialog object positions and size modified. * - SHIPVIEW dialog function modified to load text and ini files according to shp*.* --- 9,13 ---- * - key jamming tester revised to accomodate joystick. * - re-added d_tw_yeildslice stuff ! * - improved "debug" button * - SHIPVIEW dialog object positions and size modified. [...967 lines suppressed...] + video_screen = 0; + } } *************** *** 2990,3002 **** return tmp - dest; } - - - /****************************/ - #include "MASkinG.h" - - #include <vector> - using namespace MAS; - using namespace std; - //////////////////////////////////////////// // DIAGNOSTICS - dialog function --- 3241,3244 ---- Index: scp.h =================================================================== RCS file: /cvsroot/timewarp/source/scp.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** scp.h 21 Jun 2004 22:47:54 -0000 1.10 --- scp.h 11 Jul 2005 00:25:11 -0000 1.11 *************** *** 3,8 **** #define __SCP_H__ ! #include "melee/mlog.h" ! #include "melee.h" const char *tw_version(); --- 3,8 ---- #define __SCP_H__ ! #include "melee/mlog.h" ! #include "melee/mview.h" const char *tw_version(); *************** *** 25,34 **** void log_data (void *data, int length, int channel = channel_current); //helper for using the logging system bool is_local (int channel); void log_file (const char *fname); ! void test_net(); - void play_game(const char *_gametype_name, Log *_log = NULL) ; - void play_single(const char *_gametype_name, Log *_log = NULL); extern SAMPLE * menuAccept; --- 25,33 ---- void log_data (void *data, int length, int channel = channel_current); //helper for using the logging system bool is_local (int channel); + bool is_bot (int channel); void log_file (const char *fname); ! void test_net(); extern SAMPLE * menuAccept; *************** *** 37,39 **** --- 36,42 ---- extern SAMPLE * menuSpecial; + extern BITMAP *video_screen; + + extern bool game_networked; + #endif // __SCP_H__ Index: ais.h =================================================================== RCS file: /cvsroot/timewarp/source/ais.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ais.h 24 Mar 2004 23:51:33 -0000 1.9 --- ais.h 11 Jul 2005 00:25:10 -0000 1.10 *************** *** 39,48 **** /*! \brief AI with no brain */ ! class ControlVegetable : public Control { public: virtual const char *getTypeName(); virtual int think(); virtual int choose_ship(VideoWindow *window, char *prompt, class Fleet *fleet); - ControlVegetable (const char *name, int channel) ; }; --- 39,52 ---- /*! \brief AI with no brain */ ! class ControlVegetable : public Control ! { public: + + // sets auto-update to false, cause this is not supposed to do anything really.. + ControlVegetable(const char *name, int channel); + virtual const char *getTypeName(); virtual int think(); virtual int choose_ship(VideoWindow *window, char *prompt, class Fleet *fleet); }; Index: melee.h =================================================================== RCS file: /cvsroot/timewarp/source/melee.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** melee.h 18 Jun 2004 00:55:12 -0000 1.20 --- melee.h 11 Jul 2005 00:25:10 -0000 1.21 *************** *** 8,13 **** #ifndef PI ! # define PI 3.14159265358979323846 ! //#define PI AL_PI #endif #ifdef PI2 --- 8,13 ---- #ifndef PI ! //# define PI 3.14159265358979323846 ! #define PI AL_PI #endif #ifdef PI2 *************** *** 326,330 **** DATAFILE *font_data; //fonts FONT *basic_font; //font to use if no other is available ! ::Color *palette; volatile bool screen_corrupted; int last_poll; --- 326,330 ---- DATAFILE *font_data; //fonts FONT *basic_font; //font to use if no other is available ! Color *palette; volatile bool screen_corrupted; int last_poll; *************** *** 337,342 **** int poll_redraw(); int set_resolution (int width, int height, int bpp, int fullscreen) ; //returns 0 on failure ! void set_palette(::Color *pal); ! void (*color_effects)(::Color *color); void update_colors(); void redraw(); --- 337,342 ---- int poll_redraw(); int set_resolution (int width, int height, int bpp, int fullscreen) ; //returns 0 on failure ! void set_palette(Color *pal); ! void (*color_effects)(Color *color); void update_colors(); void redraw(); *************** *** 345,349 **** int get_gamma(); void set_gamma(int gamma); ! void gamma_color_effects (::Color *color) ; --- 345,349 ---- int get_gamma(); void set_gamma(int gamma); ! void gamma_color_effects (Color *color) ; *************** *** 434,440 **** class SpaceSprite { ! public: static int mip_min, mip_max, mip_bias; ! protected: enum { MAX_MIP_LEVELS = 8 }; int count; --- 434,440 ---- class SpaceSprite { ! public: static int mip_min, mip_max, mip_bias; ! protected: enum { MAX_MIP_LEVELS = 8 }; int count; *************** *** 451,456 **** char *attributes; enum { DEALLOCATE_IMAGE = 0x01, DEALLOCATE_MASK = 0x02 }; unsigned int general_attributes; - public: enum { MATCH_SCREEN_FORMAT = 0x001, --- 451,456 ---- char *attributes; enum { DEALLOCATE_IMAGE = 0x01, DEALLOCATE_MASK = 0x02 }; + public: unsigned int general_attributes; enum { MATCH_SCREEN_FORMAT = 0x001, *************** *** 549,553 **** Ship *(*_get_ship)(Vector2 pos, double angle, ShipData *data, unsigned int code); }; ! extern ShipClass *shipclasses; extern int num_shipclasses; ShipClass *shipclass(const char *name); --- 549,554 ---- Ship *(*_get_ship)(Vector2 pos, double angle, ShipData *data, unsigned int code); }; ! const int max_shipclasses = 512; ! extern ShipClass *shipclasses[max_shipclasses]; extern int num_shipclasses; ShipClass *shipclass(const char *name); *************** *** 653,655 **** --- 654,665 ---- int d_tw_yield_proc(int msg, DIALOG *d, int c); + + BITMAP *create_video_bmp(int w, int h); + void destroy_video_bmp(BITMAP *bmp); + void destroy_bmp(BITMAP **bmp); + void destroy_rle(RLE_SPRITE **bmp); + void destroy_sprite(SpaceSprite **sprite); + + + #endif // __MELEE_H__ Index: sc2ships.h =================================================================== RCS file: /cvsroot/timewarp/source/sc2ships.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sc2ships.h 24 Mar 2004 23:51:34 -0000 1.7 --- sc2ships.h 11 Jul 2005 00:25:10 -0000 1.8 *************** *** 2,5 **** --- 2,7 ---- class ChmmrAvatar : public Ship { public: + IDENTITY(ChmmrAvatar); + public: double weaponRange; int weaponDamage; *************** *** 29,32 **** --- 31,36 ---- class DruugeMauler : public Ship { public: + IDENTITY(DruugeMauler); + public: double weaponRange; double weaponVelocity; *************** *** 48,51 **** --- 52,57 ---- class KohrAhMarauder : public Ship { + public: + IDENTITY(KohrAhMarauder); public: double weaponRange; *************** *** 77,80 **** --- 83,88 ---- class MelnormeTrader : public Ship { public: + IDENTITY(MelnormeTrader); + public: double weaponRange; double weaponRangeUp; *************** *** 109,112 **** --- 117,122 ---- class OrzNemesis : public Ship { + public: + IDENTITY(OrzNemesis); public: *************** *** 150,153 **** --- 160,165 ---- class PkunkFury : public Ship { public: + IDENTITY(PkunkFury); + public: int reborn; *************** *** 172,175 **** --- 184,189 ---- class SlylandroProbe : public Ship { public: + IDENTITY(SlylandroProbe); + public: int frame; int thrustActive; *************** *** 207,210 **** --- 221,226 ---- class SupoxBlade : public Ship { + public: + IDENTITY(SupoxBlade); public: double weaponRange; *************** *** 229,232 **** --- 245,250 ---- class ThraddashTorch : public Ship { public: + IDENTITY(ThraddashTorch); + public: double weaponRange; double weaponVelocity; *************** *** 250,253 **** --- 268,273 ---- class UtwigJugger : public Ship { + public: + IDENTITY(UtwigJugger); public: *************** *** 273,276 **** --- 293,298 ---- class ZoqFotPikStinger : public Ship { + public: + IDENTITY(ZoqFotPikStinger); public: double weaponRange; |
|
From: Rob <geo...@us...> - 2005-07-11 00:26:57
|
Update of /cvsroot/timewarp/interfaces/multiplayer/gamelist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/interfaces/multiplayer/gamelist Modified Files: backgr.bmp info.txt list_backgr.bmp Log Message: big update to the final version. Index: list_backgr.bmp =================================================================== RCS file: /cvsroot/timewarp/interfaces/multiplayer/gamelist/list_backgr.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvswXwuF1 and /tmp/cvspEZRNM differ Index: info.txt =================================================================== RCS file: /cvsroot/timewarp/interfaces/multiplayer/gamelist/info.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** info.txt 12 Mar 2004 20:21:46 -0000 1.1 --- info.txt 11 Jul 2005 00:25:06 -0000 1.2 *************** *** 1,4 **** ! interfaces/multiplayer/gamelist/list_backgr_y = 6 ! interfaces/multiplayer/gamelist/list_backgr_x = 6 res = 800 autoplace = 1 --- 1,6 ---- ! locy = -365 ! locx = -215 ! interfaces/multiplayer/gamelist/list_backgr_y = 19 ! interfaces/multiplayer/gamelist/list_backgr_x = 20 res = 800 autoplace = 1 Index: backgr.bmp =================================================================== RCS file: /cvsroot/timewarp/interfaces/multiplayer/gamelist/backgr.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsSJhHJm and /tmp/cvskIpA77 differ |
Update of /cvsroot/timewarp/ships In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/ships Modified Files: shparitr.ini shpcrapl.ini shpducla.ini shpfopsl.ini shpforsh.ini shpfresc.ini shpgahmo.ini shpglacr.ini shpkabwe.ini shpklidr.ini shpleimu.ini shpneodr.ini shppanav.ini shpphepa.ini shpquawr.ini shpradfi.ini shprogsq.ini shpsclfr.ini shptelno.ini shptougr.ini shpuosli.ini shpuxjba.ini shpvioge.dat shpvioge.ini shpvioge.txt shpxaaar.ini shpxaaar.txt shpxilcr.ini Log Message: big update to the final version. Index: shpleimu.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpleimu.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shpleimu.ini 5 Jan 2004 21:59:54 -0000 1.5 --- shpleimu.ini 11 Jul 2005 00:25:09 -0000 1.6 *************** *** 22,30 **** RechargeRate = 15 ! WeaponDrain = 2 WeaponRate = 6 ! SpecialDrain = 0 ! SpecialRate = 6 ; mimic weaponrate HotspotRate = 5 --- 22,30 ---- RechargeRate = 15 ! WeaponDrain = 4 WeaponRate = 6 ! SpecialDrain = 2 ! SpecialRate = 4 HotspotRate = 5 *************** *** 34,45 **** Range = 10 Velocity = 70 ! Damage = 4 ! Armour = 3 [Special] ! Range = 20 ! Velocity = 90 Damage = 1 ! Armour = 2 [AI3_Default] --- 34,45 ---- Range = 10 Velocity = 70 ! Damage = 6 ! Armour = 2 [Special] ! Range = 15 ! Velocity = 80 Damage = 1 ! Armour = 1 [AI3_Default] Index: shpducla.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpducla.ini,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** shpducla.ini 5 Jan 2004 21:59:54 -0000 1.7 --- shpducla.ini 11 Jul 2005 00:25:09 -0000 1.8 *************** *** 1,4 **** [Info] ! TWCost = 14 Name1 = Ducly Name2 = Lanternjaws --- 1,4 ---- [Info] ! TWCost = 12 Name1 = Ducly Name2 = Lanternjaws *************** *** 12,20 **** Crew = 24 CrewMax = 24 ! Batt = 10 ! BattMax = 10 SpeedMax = 18 AccelRate = 6 ! TurnRate = 8 RechargeAmount = 1 --- 12,20 ---- Crew = 24 CrewMax = 24 ! Batt = 12 ! BattMax = 12 SpeedMax = 18 AccelRate = 6 ! TurnRate = 7 RechargeAmount = 1 *************** *** 44,53 **** [Lantern] ; the energy exhaust at the back ! Accel = 100 ; extra accel applied to the ship for each laser fired Intensity = 0.2 ; starting intensity (1 = full power) IntensityIncrease = 0.1 ; intensity increase per time a weapon is fired MaxRadius = 50 ; max length in pixels of a laser beam MaxDensity = 50 ; laser parts per second (on average; it's random) ! LaserSpread = 15 ; emitting arc range in degrees Damage = 1 ColorR = 150 --- 44,53 ---- [Lantern] ; the energy exhaust at the back ! Accel = 50 ; extra accel applied to the ship for each laser fired Intensity = 0.2 ; starting intensity (1 = full power) IntensityIncrease = 0.1 ; intensity increase per time a weapon is fired MaxRadius = 50 ; max length in pixels of a laser beam MaxDensity = 50 ; laser parts per second (on average; it's random) ! LaserSpread = 12.5 ; emitting arc range in degrees Damage = 1 ColorR = 150 Index: shprogsq.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shprogsq.ini,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shprogsq.ini 5 Jan 2004 21:59:54 -0000 1.6 --- shprogsq.ini 11 Jul 2005 00:25:09 -0000 1.7 *************** *** 45,51 **** [AI3_Default] ! Weapon = Missile ! Special = Attack ! SpecialFreq = 10 [Formations] --- 45,54 ---- [AI3_Default] ! ;Weapon = Missile ! Special = Field ! Special_Timer = 1000 ! Tactic = Range ! Tactic_Min = 15 ! Tactic_Max = 50 [Formations] Index: shpxaaar.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpxaaar.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpxaaar.ini 5 Jan 2004 21:59:54 -0000 1.4 --- shpxaaar.ini 11 Jul 2005 00:25:09 -0000 1.5 *************** *** 13,18 **** BattMax = 30 SpeedMax = 41 ! AccelRate = 11 ! TurnRate = 5 RechargeAmount = 1 RechargeRate = 4 --- 13,18 ---- BattMax = 30 SpeedMax = 41 ! AccelRate = 20 ! TurnRate = 3 RechargeAmount = 1 RechargeRate = 4 Index: shpvioge.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpvioge.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpvioge.ini 5 Jan 2004 21:59:54 -0000 1.3 --- shpvioge.ini 11 Jul 2005 00:25:09 -0000 1.4 *************** *** 1,4 **** [Info] ! TWCost = 8 Name1 = Viogen Name2 = Genesis --- 1,4 ---- [Info] ! TWCost = 14 Name1 = Viogen Name2 = Genesis *************** *** 8,14 **** [Ship] ! Crew = 20 ! CrewMax = 20 ! Batt = 10 BattMax = 20 SpeedMax = 60 --- 8,14 ---- [Ship] ! Crew = 24 ! CrewMax = 24 ! Batt = 20 BattMax = 20 SpeedMax = 60 *************** *** 19,23 **** WeaponDrain = 5 WeaponRate = 10 ! SpecialDrain = -1 SpecialRate = 5 HotspotRate = 10 --- 19,23 ---- WeaponDrain = 5 WeaponRate = 10 ! SpecialDrain = 10 SpecialRate = 5 HotspotRate = 10 *************** *** 30,31 **** --- 30,39 ---- Armour = 2 + [Special] + + Range = 15 ; is multiplied by the armour level+1 + Velocity = 50 + Damage = 2 + Armour = 2 + + [AI3_Default] Index: shpgahmo.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpgahmo.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpgahmo.ini 5 Jan 2004 21:59:54 -0000 1.3 --- shpgahmo.ini 11 Jul 2005 00:25:09 -0000 1.4 *************** *** 34,43 **** [Weapon] MinBatteryToCharge = 2.5 ! MinChargeTime = 150 ! MaxChargeTime = 4000 MinChargeRange = 10 MaxChargeRange = 85 ! MinChargeVelocity = 15 ! MaxChargeVelocity = 55 SpeedChangeFactor = 0.0000 --- 34,43 ---- [Weapon] MinBatteryToCharge = 2.5 ! MinChargeTime = 200 ! MaxChargeTime = 2000 ;4000 MinChargeRange = 10 MaxChargeRange = 85 ! MinChargeVelocity = 25 ;15 ! MaxChargeVelocity = 65 ;55 SpeedChangeFactor = 0.0000 *************** *** 66,70 **** [Special] NormalDamagePerSecond = 0 ! DirectDamagePerSecond = 1 LengthMultiplier = 1.0 PowerMultiplier = 5.0 --- 66,72 ---- [Special] NormalDamagePerSecond = 0 ! DirectDamagePerSecond = 0 ;1 ! ; well, imo it's not so cool if the special also deals damage [GeomanNL] ! LengthMultiplier = 1.0 PowerMultiplier = 5.0 Index: shpuxjba.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpuxjba.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpuxjba.ini 5 Jan 2004 21:59:54 -0000 1.4 --- shpuxjba.ini 11 Jul 2005 00:25:09 -0000 1.5 *************** *** 15,19 **** SpeedMax = 16 AccelRate = 4 ! TurnRate = 9 RechargeAmount = 1 --- 15,19 ---- SpeedMax = 16 AccelRate = 4 ! TurnRate = 7 RechargeAmount = 1 Index: shpvioge.dat =================================================================== RCS file: /cvsroot/timewarp/ships/shpvioge.dat,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsELj3hR and /tmp/cvsaKFhFD differ Index: shpkabwe.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpkabwe.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpkabwe.ini 5 Jan 2004 21:59:54 -0000 1.4 --- shpkabwe.ini 11 Jul 2005 00:25:09 -0000 1.5 *************** *** 1,4 **** [Info] ! TWCost = 14 Name1 = Kabo Name2 = Weakener --- 1,4 ---- [Info] ! TWCost = 10 Name1 = Kabo Name2 = Weakener *************** *** 14,26 **** Batt = 10 BattMax = 20 ! SpeedMax = 40 ! AccelRate = 20 ! TurnRate = 2 RechargeAmount = 1 RechargeRate = 6 ! WeaponDrain = 3 ! WeaponRate = 4 ! SpecialDrain = 16 SpecialRate = 4 --- 14,26 ---- Batt = 10 BattMax = 20 ! SpeedMax = 30 ! AccelRate = 16 ! TurnRate = 3 RechargeAmount = 1 RechargeRate = 6 ! WeaponDrain = 6 ! WeaponRate = 14 ! SpecialDrain = 12 SpecialRate = 4 *************** *** 29,34 **** [Weapon] ! Range = 10 ! Velocity = 105 Damage = 1 Armour = 1 --- 29,34 ---- [Weapon] ! Range = 20 ! Velocity = 90 Damage = 1 Armour = 1 *************** *** 36,40 **** [Pod] ; delivers mines over a safe (for the ship) distance ! Range = 20 Velocity = 30 Damage = 1 --- 36,40 ---- [Pod] ; delivers mines over a safe (for the ship) distance ! Range = 2000 Velocity = 30 Damage = 1 *************** *** 43,47 **** [Mine] ! LifeTime = 60.0 ; in seconds HostileTime = 3.0 ; after 3 seconds, the mines can also damage the mothership. Velocity = 5 --- 43,47 ---- [Mine] ! LifeTime = 30.0 ; in seconds HostileTime = 3.0 ; after 3 seconds, the mines can also damage the mothership. Velocity = 5 Index: shppanav.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shppanav.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shppanav.ini 5 Jan 2004 21:59:54 -0000 1.3 --- shppanav.ini 11 Jul 2005 00:25:09 -0000 1.4 *************** *** 1,4 **** [Info] ! TWCost = 9 Name1 = PanCoh Name2 = Avian --- 1,4 ---- [Info] ! TWCost = 6 Name1 = PanCoh Name2 = Avian *************** *** 42,43 **** --- 42,52 ---- CaptName1 = c'Gegner + [AI3_Default] + Weapon = Narrow + Weapon1 = Front + Special = Mine + Weapon_Range = 30 + WeaponRel = 0 + Tactic = Range + Tactic_Min = 15 + Tactic_Max = 30 Index: shpfopsl.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpfopsl.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpfopsl.ini 5 Jan 2004 21:59:54 -0000 1.3 --- shpfopsl.ini 11 Jul 2005 00:25:09 -0000 1.4 *************** *** 36,40 **** --- 36,43 ---- [Special] + ; the shorter the period, the faster they'll go Period = 1.0 + ; oscillation wavelength + specialR = 50 [AI3_Default] Index: shpvioge.txt =================================================================== RCS file: /cvsroot/timewarp/ships/shpvioge.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** shpvioge.txt 26 Oct 2003 10:43:17 -0000 1.2 --- shpvioge.txt 11 Jul 2005 00:25:09 -0000 1.3 *************** *** 3,7 **** Fire: two long range missiles, 1d each. ! Special: converts speed to energy Quirk: very slow acceleration, and very slow recharge. --- 3,7 ---- Fire: two long range missiles, 1d each. ! Special: a plasma cloud that feeds on weapons (borrowed from the Woldanish) Quirk: very slow acceleration, and very slow recharge. Index: shpforsh.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpforsh.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shpforsh.ini 5 Jan 2004 21:59:54 -0000 1.5 --- shpforsh.ini 11 Jul 2005 00:25:09 -0000 1.6 *************** *** 3,7 **** Name1 = Forevian-Zekfahan Name2 = Shocker ! Origin = TWb Code = ForevianShocker --- 3,7 ---- Name1 = Forevian-Zekfahan Name2 = Shocker ! Origin = TWa Code = ForevianShocker Index: shpphepa.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpphepa.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpphepa.ini 5 Jan 2004 21:59:54 -0000 1.4 --- shpphepa.ini 11 Jul 2005 00:25:09 -0000 1.5 *************** *** 41,47 **** [AI3_Default] ! Weapon = Homing Special = Defense ! SpecialFreq = 3 --- 41,51 ---- [AI3_Default] ! Weapon = Front Special = Defense ! Special2 = Field + SpecialFreq = 4 + Tactic = Indirect + Weapon_Velocity = 99 + Special_Timer = 300 Index: shpglacr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpglacr.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shpglacr.ini 5 Jan 2004 21:59:54 -0000 1.5 --- shpglacr.ini 11 Jul 2005 00:25:09 -0000 1.6 *************** *** 21,25 **** WeaponDrain = 18 WeaponRate = 10 ! SpecialDrain = 1 SpecialRate = 1 HotspotRate = 4 --- 21,25 ---- WeaponDrain = 18 WeaponRate = 10 ! SpecialDrain = 4 SpecialRate = 1 HotspotRate = 4 *************** *** 44,48 **** [Special] ! Velocity = 80 [AI3_Default] --- 44,52 ---- [Special] ! Range = 7 ! Damage = 1 ! Armour = 1 ! Relativity = 0 ! Velocity = 60 [AI3_Default] Index: shpklidr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpklidr.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpklidr.ini 5 Jan 2004 21:59:54 -0000 1.4 --- shpklidr.ini 11 Jul 2005 00:25:09 -0000 1.5 *************** *** 28,32 **** [Weapon] ! StartVelocity = 102.5 StartDamage = 5 EndDamage = 1 --- 28,32 ---- [Weapon] ! StartVelocity = 10 StartDamage = 5 EndDamage = 1 *************** *** 34,40 **** EndArmour = 1 Relativity = 0.5 ! StartFriction = 0.0000 ! EndFriction = 0.00275 ! Lifetime = 2500 [Special] --- 34,40 ---- EndArmour = 1 Relativity = 0.5 ! StartFriction = 0.000 ! EndFriction = -0.002 ! Lifetime = 3000 [Special] Index: shpfresc.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpfresc.ini,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shpfresc.ini 5 Jan 2004 21:59:54 -0000 1.6 --- shpfresc.ini 11 Jul 2005 00:25:09 -0000 1.7 *************** *** 1,4 **** [Info] ! TWCost = 15 Name1 = Frein Name2 = Schizm --- 1,4 ---- [Info] ! TWCost = 13 Name1 = Frein Name2 = Schizm *************** *** 13,18 **** Batt = 24 BattMax = 24 ! SpeedMax = 44 ! AccelRate = 30 TurnRate = 3 --- 13,18 ---- Batt = 24 BattMax = 24 ! SpeedMax = 42 ! AccelRate = 25 TurnRate = 3 *************** *** 36,41 **** [Special] ! Range = 35 ! Velocity = 75 Damage = -1 Armour = 1 --- 36,41 ---- [Special] ! Range = 45 ! Velocity = 80 Damage = -1 Armour = 1 Index: shptelno.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptelno.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shptelno.ini 5 Jan 2004 21:59:54 -0000 1.3 --- shptelno.ini 11 Jul 2005 00:25:09 -0000 1.4 *************** *** 1,4 **** [Info] ! TWCost = 16 Name1 = Telluri Name2 = Nova --- 1,4 ---- [Info] ! TWCost = 12 Name1 = Telluri Name2 = Nova *************** *** 27,32 **** [Weapon] Range = 25 ! Velocity = 50 ! Damage = 2 DamagePeriod = 1.0 --- 27,32 ---- [Weapon] Range = 25 ! Velocity = 60 ! Damage = 10 DamagePeriod = 1.0 Index: shpquawr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpquawr.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpquawr.ini 5 Jan 2004 21:59:54 -0000 1.4 --- shpquawr.ini 11 Jul 2005 00:25:09 -0000 1.5 *************** *** 45,49 **** [AI3_Default] ! Weapon = Feild Weapon_Range = 8 Special = Homing --- 45,49 ---- [AI3_Default] ! Weapon = Field Weapon_Range = 8 Special = Homing Index: shpxaaar.txt =================================================================== RCS file: /cvsroot/timewarp/ships/shpxaaar.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** shpxaaar.txt 26 Oct 2003 10:43:17 -0000 1.2 --- shpxaaar.txt 11 Jul 2005 00:25:09 -0000 1.3 *************** *** 1,8 **** Xaaxees Arrowhead - quirk: grows 2 mines on the sides; during recharge time. ! main: release mines. Travel relative to the ship (with same velocity, and slowly sideways). Not such a very long lifetime. ! special: active shield on the mines. This makes them invulnerable, but takes a lot of energy. A mine does a lot of damage: 8. Slow recharge rate. --- 1,9 ---- Xaaxees Arrowhead ! main: release mines. The mines are released with a velocity close to that of the ship. ! special: actives a shield on the mines. This makes them invulnerable, but takes a lot of energy. ! ! Tactics: launch the mines, activate their shield, and hide behind them. Or, head for the enemy, release the mines so that they'll move at a decent speed towards the enemy, and run away. Index: shptougr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptougr.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shptougr.ini 5 Jan 2004 21:59:54 -0000 1.4 --- shptougr.ini 11 Jul 2005 00:25:09 -0000 1.5 *************** *** 1,4 **** [Info] ! TWCost = 19 Name1 = To'Ul Name2 = Rockblaster --- 1,4 ---- [Info] ! TWCost = 16 Name1 = To'Ul Name2 = Rockblaster *************** *** 20,34 **** RechargeRate = 8 ! WeaponDrain = 15 ! WeaponRate = 10 SpecialDrain = 1 ! SpecialRate = 1 HotspotRate = 8 ! Mass = 14 [Weapon] ! Range = 30 Velocity = 26 Damage = 1 --- 20,34 ---- RechargeRate = 8 ! WeaponDrain = 8 ! WeaponRate = 24 SpecialDrain = 1 ! SpecialRate = 2 HotspotRate = 8 ! Mass = 24 [Weapon] ! Range = 20 Velocity = 26 Damage = 1 Index: shpsclfr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpsclfr.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpsclfr.ini 5 Jan 2004 21:59:54 -0000 1.4 --- shpsclfr.ini 11 Jul 2005 00:25:09 -0000 1.5 *************** *** 41,45 **** Relativity = 0.0 MaxPower = 9 ! FiresBackwards = 0 [AI3_Default] --- 41,45 ---- Relativity = 0.0 MaxPower = 9 ! FiresBackwards = 1 [AI3_Default] Index: shpcrapl.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpcrapl.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shpcrapl.ini 5 Jan 2004 21:59:54 -0000 1.5 --- shpcrapl.ini 11 Jul 2005 00:25:09 -0000 1.6 *************** *** 8,18 **** [Ship] ! Crew = 36 ! CrewMax = 36 ! Batt = 18 ! BattMax = 18 ! SpeedMax = 55 AccelRate = 16 ! TurnRate = 5 TurnRateRight = 2 RechargeAmount = 1 --- 8,18 ---- [Ship] ! Crew = 24 ! CrewMax = 24 ! Batt = 20 ! BattMax = 20 ! SpeedMax = 47 AccelRate = 16 ! TurnRate = 3 TurnRateRight = 2 RechargeAmount = 1 *************** *** 32,36 **** Ndebris = 16 SpreadAngle = 50 ; in degrees ! ActionRange = 500 ; in pixels (duh) [Special] --- 32,36 ---- Ndebris = 16 SpreadAngle = 50 ; in degrees ! ActionRange = 500 ; in pixels [Special] Index: shpradfi.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpradfi.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpradfi.ini 5 Jan 2004 21:59:54 -0000 1.4 --- shpradfi.ini 11 Jul 2005 00:25:09 -0000 1.5 *************** *** 10,24 **** [Ship] ! Crew = 28 ! CrewMax = 28 ! Batt = 2 ! BattMax = 20 ! SpeedMax = 30 AccelRate = 4 TurnRate = 4 RechargeAmount = 1 ! RechargeRate = 20 ! WeaponDrain = 6 ! WeaponRate = 15 SpecialDrain = 1 SpecialRate = 10 --- 10,24 ---- [Ship] ! Crew = 30 ! CrewMax = 30 ! Batt = 4 ! BattMax = 36 ! SpeedMax = 36 AccelRate = 4 TurnRate = 4 RechargeAmount = 1 ! RechargeRate = 90 ! WeaponDrain = 2 ! WeaponRate = 6 SpecialDrain = 1 SpecialRate = 10 Index: shparitr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shparitr.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shparitr.ini 5 Jan 2004 21:59:54 -0000 1.4 --- shparitr.ini 11 Jul 2005 00:25:09 -0000 1.5 *************** *** 1,4 **** [Info] ! TWCost = 28 Name1 = Arilou Name2 = Trapper --- 1,4 ---- [Info] ! TWCost = 22 Name1 = Arilou Name2 = Trapper *************** *** 8,13 **** [Ship] ! Crew = 10 ! CrewMax = 10 rechargeAmount = 1 Batt = 16 --- 8,13 ---- [Ship] ! Crew = 6 ! CrewMax = 6 rechargeAmount = 1 Batt = 16 *************** *** 34,41 **** [Trap] trapTurn = 1 ! drainDelay = 3 drainAmount = 1 initialVelocity = 0.2 ! Accel = 0.15 [AI3_Default] --- 34,41 ---- [Trap] trapTurn = 1 ! drainDelay = 4 drainAmount = 1 initialVelocity = 0.2 ! Accel = 0.05 [AI3_Default] Index: shpuosli.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpuosli.ini,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shpuosli.ini 5 Jan 2004 21:59:54 -0000 1.6 --- shpuosli.ini 11 Jul 2005 00:25:09 -0000 1.7 *************** *** 22,26 **** WeaponDrain = 4 ! WeaponRate = 4 SpecialDrain = 2 SpecialRate = 4 --- 22,26 ---- WeaponDrain = 4 ! WeaponRate = 10 SpecialDrain = 2 SpecialRate = 4 *************** *** 30,37 **** [Weapon] ! Range = 30 ! Velocity = 80 Damage = 4 ! Armour = 4 [Special] --- 30,37 ---- [Weapon] ! Range = 40 ! Velocity = 90 Damage = 4 ! Armour = 6 [Special] Index: shpneodr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpneodr.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpneodr.ini 5 Jan 2004 21:59:54 -0000 1.4 --- shpneodr.ini 11 Jul 2005 00:25:09 -0000 1.5 *************** *** 1,5 **** [Info] ! TWCost = 12 Name1 = Neo Name2 = Drain --- 1,5 ---- [Info] ! TWCost = 8 Name1 = Neo Name2 = Drain *************** *** 15,35 **** BattMax = 10 SpeedMax = 38 ! AccelRate = 15 TurnRate = 1 RechargeAmount = 1 ! RechargeRate = 8 WeaponDrain = 1 WeaponRate = 4 ! SpecialDrain = 0 SpecialRate = 1 HotspotRate = 8 ! Mass = 14 [Weapon] ! Range = 12 Velocity = 78 Damage = 1 --- 15,35 ---- BattMax = 10 SpeedMax = 38 ! AccelRate = 20 TurnRate = 1 RechargeAmount = 1 ! RechargeRate = 1 WeaponDrain = 1 WeaponRate = 4 ! SpecialDrain = 1 SpecialRate = 1 HotspotRate = 8 ! Mass = 0 [Weapon] ! Range = 14 Velocity = 78 Damage = 1 Index: shpxilcr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpxilcr.ini,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** shpxilcr.ini 5 Jan 2004 21:59:54 -0000 1.8 --- shpxilcr.ini 11 Jul 2005 00:25:09 -0000 1.9 *************** *** 42,50 **** [Special] ! N = 2 ; number of orbiters that can exist simultaneously ! Armour = 10 Mass = 20 ; mass=0, then no collision - make high mass for collisions ; if nonzero, accel is scaled by mass of enemy ship; otherwise, it isn't. ! AccelRate = 8 ; 6 ; the force of the orbiters applied to ships / shots. Velocity = 20 ; missile velocity Range = 18 ; range within which a ship is detected, or a ship remains target --- 42,50 ---- [Special] ! N = 4 ; number of orbiters that can exist simultaneously ! Armour = 2 Mass = 20 ; mass=0, then no collision - make high mass for collisions ; if nonzero, accel is scaled by mass of enemy ship; otherwise, it isn't. ! AccelRate = 4 ; the force of the orbiters applied to ships / shots. Velocity = 20 ; missile velocity Range = 18 ; range within which a ship is detected, or a ship remains target |
Update of /cvsroot/timewarp/source/sc2ships In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/source/sc2ships Modified Files: shpchmav.cpp shpdruma.cpp shpkohma.cpp shpmeltr.cpp shporzne.cpp shpslypr.cpp shpthrto.cpp shpzfpst.cpp Log Message: big update to the final version. Index: shpthrto.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc2ships/shpthrto.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** shpthrto.cpp 24 Mar 2004 23:51:44 -0000 1.13 --- shpthrto.cpp 11 Jul 2005 00:25:59 -0000 1.14 *************** *** 6,9 **** --- 6,11 ---- class ThraddashFlame : public Animation { + public: + IDENTITY(ThraddashFlame); int armour; Index: shpkohma.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc2ships/shpkohma.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** shpkohma.cpp 24 Mar 2004 23:51:44 -0000 1.8 --- shpkohma.cpp 11 Jul 2005 00:25:58 -0000 1.9 *************** *** 7,10 **** --- 7,12 ---- class KohrAhBlade : public AnimatedShot { + public: + IDENTITY(KohrAhBlade); bool persist; int passive; *************** *** 24,27 **** --- 26,31 ---- class KohrAhBladeDecay : public Animation { + public: + IDENTITY(KohrAhBladeDecay); public: KohrAhBladeDecay(SpaceLocation *creator, Vector2 opos, Vector2 ovel, *************** *** 30,33 **** --- 34,39 ---- class KohrAhFRIED : public Shot { + public: + IDENTITY(KohrAhFRIED); int frame_count; Index: shpzfpst.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc2ships/shpzfpst.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** shpzfpst.cpp 24 Mar 2004 23:51:44 -0000 1.11 --- shpzfpst.cpp 11 Jul 2005 00:25:59 -0000 1.12 *************** *** 8,11 **** --- 8,13 ---- class ZoqFotPikShot : public Shot { + public: + IDENTITY(ZoqFotPikShot); int frame_count; *************** *** 19,22 **** --- 21,26 ---- class ZoqFotPikTongue : public SpaceObject { + public: + IDENTITY(ZoqFotPikTongue); double dist; Ship *ship; *************** *** 82,141 **** ZoqFotPikTongue::ZoqFotPikTongue(double odist, int odamage, Ship *oship, ! SpaceSprite *osprite, int ofcount, int ofsize) : ! SpaceObject(oship, oship->normal_pos()/*, oship->normal_y()*/, 0.0, ! osprite), ! dist(odist), ! ship(oship), ! lick_factor(odamage), ! frame(0), ! frame_size(ofsize), ! frame_count(ofcount), ! frame_step(0) { ! layer = LAYER_SHOTS; ! set_depth(DEPTH_SHOTS); ! damage_factor = abs(lick_factor); ! // x = ship->normal_x() + (cos(ship->get_angle()) * dist); ! // y = ship->normal_y() + (sin(ship->get_angle()) * dist); ! pos = ship->normal_pos() + dist * unit_vector(ship->get_angle()); ! // vx = ship->get_vx(); vy = ship->get_vy(); ! vel = ship->get_vel(); ! sprite_index = get_index(ship->get_angle()); ! sprite_index += (64 * frame); ! ! isblockingweapons = true; debug_id = 1049; } ! void ZoqFotPikTongue::calculate() { ! int current_frame = frame; ! ! if (!(ship && ship->exists())) ! { ! ship = 0; ! state = 0; ! return; ! } ! ! frame_step+= frame_time; ! while(frame_step >= frame_size) { ! frame_step -= frame_size; ! frame++; ! if(frame == frame_count) ! state = 0; ! } ! if((current_frame != frame) && (lick_factor > 0)) ! damage_factor = lick_factor; ! ! // x = ship->normal_x() + cos(ship->get_angle()) * dist; ! // y = ship->normal_y() + sin(ship->get_angle()) * dist; ! pos = ship->normal_pos() + dist * unit_vector(ship->get_angle()); ! // vx = ship->get_vx(); vy = ship->get_vy(); ! vel = ship->get_vel(); ! sprite_index = get_index(ship->get_angle()); ! sprite_index += (64 * frame); ! ! SpaceObject::calculate(); } --- 86,149 ---- ZoqFotPikTongue::ZoqFotPikTongue(double odist, int odamage, Ship *oship, ! SpaceSprite *osprite, int ofcount, int ofsize) ! : ! SpaceObject(oship, oship->normal_pos()/*, oship->normal_y()*/, 0.0, osprite), ! dist(odist), ! ship(oship), ! lick_factor(odamage), ! frame(0), ! frame_size(ofsize), ! frame_count(ofcount), ! frame_step(0) { ! layer = LAYER_SHOTS; ! set_depth(DEPTH_SHOTS); ! damage_factor = abs(lick_factor); ! // x = ship->normal_x() + (cos(ship->get_angle()) * dist); ! // y = ship->normal_y() + (sin(ship->get_angle()) * dist); ! pos = ship->normal_pos() + dist * unit_vector(ship->get_angle()); ! // vx = ship->get_vx(); vy = ship->get_vy(); ! vel = ship->get_vel(); ! sprite_index = get_index(ship->get_angle()); ! sprite_index += (64 * frame); ! ! isblockingweapons = true; debug_id = 1049; } ! void ZoqFotPikTongue::calculate() { ! int current_frame = frame; ! ! if (!(ship && ship->exists())) ! { ! ship = 0; ! state = 0; ! return; ! } ! ! frame_step+= frame_time; ! while(frame_step >= frame_size) ! { ! frame_step -= frame_size; ! frame++; ! if(frame == frame_count) ! { ! state = 0; ! return; // you must return here, otherwise sprite-index will overflow. ! } ! } ! if((current_frame != frame) && (lick_factor > 0)) ! damage_factor = lick_factor; ! ! // x = ship->normal_x() + cos(ship->get_angle()) * dist; ! // y = ship->normal_y() + sin(ship->get_angle()) * dist; ! pos = ship->normal_pos() + dist * unit_vector(ship->get_angle()); ! // vx = ship->get_vx(); vy = ship->get_vy(); ! vel = ship->get_vel(); ! sprite_index = get_index(ship->get_angle()); ! sprite_index += (64 * frame); ! ! SpaceObject::calculate(); } Index: shpmeltr.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc2ships/shpmeltr.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** shpmeltr.cpp 24 Mar 2004 23:51:44 -0000 1.11 --- shpmeltr.cpp 11 Jul 2005 00:25:58 -0000 1.12 *************** *** 6,10 **** --- 6,19 ---- #include "../sc2ships.h" + // allows other ships to affect control over a ship. + class OverrideControlMelnorme : public OverrideControl + { + public: + virtual void calculate(short *key); + }; + class MelnormeShot : public Shot { + public: + IDENTITY(MelnormeShot); double v; int frame; *************** *** 29,32 **** --- 38,44 ---- class MelnormeDisable : public SpaceObject { + public: + IDENTITY(MelnormeDisable); + OverrideControlMelnorme *ocm; Ship *ship; int disableframe; *************** *** 44,47 **** --- 56,61 ---- class MelnormeSpecial : public AnimatedShot { + public: + IDENTITY(MelnormeSpecial); int disableFrames; SpaceSprite *disableSprite; *************** *** 182,185 **** --- 196,204 ---- int MelnormeShot::handle_damage(SpaceLocation *source, double normal, double direct) { + if (source->isShip()) + { + die(); + return 1; + } int old = iround(armour); Shot::handle_damage(source, normal, direct); *************** *** 204,207 **** --- 223,236 ---- } + + + void OverrideControlMelnorme::calculate(short *key) + { + *key &= ~(keyflag::left | keyflag::right | keyflag::special); + *key |= keyflag::right; + } + + + MelnormeDisable::MelnormeDisable(Ship *creator, Ship *oship, SpaceSprite *osprite, int ofcount, int ofsize, int disableFrames) : *************** *** 217,223 **** set_depth(DEPTH_EXPLOSIONS); debug_id = 1036; } ! void MelnormeDisable::calculate() { frame_step+= frame_time; while (frame_step >= frame_size) { --- 246,256 ---- set_depth(DEPTH_EXPLOSIONS); debug_id = 1036; + + ocm = new OverrideControlMelnorme(); + ship->set_override_control(ocm); } ! void MelnormeDisable::calculate() ! { frame_step+= frame_time; while (frame_step >= frame_size) { *************** *** 236,246 **** // y = ship->normal_y(); pos = ship->normal_pos(); - ship->nextkeys &= ~(keyflag::left | keyflag::right | keyflag::special); - ship->nextkeys |= keyflag::right; disableframe += frame_time; ! if (disableframe >= disableframe_count) state = 0; SpaceObject::calculate(); } MelnormeSpecial::MelnormeSpecial(Vector2 opos, double oangle, double ov, int oframes, double orange, int oarmour, Ship *oship, --- 269,288 ---- // y = ship->normal_y(); pos = ship->normal_pos(); disableframe += frame_time; ! if (disableframe >= disableframe_count) ! { ! state = 0; ! ship->del_override_control(ocm); ! } ! SpaceObject::calculate(); + + if (!exists()) + { + ship->del_override_control(ocm); } + } + MelnormeSpecial::MelnormeSpecial(Vector2 opos, double oangle, double ov, int oframes, double orange, int oarmour, Ship *oship, *************** *** 257,266 **** void MelnormeSpecial::animateExplosion() {} ! void MelnormeSpecial::inflict_damage(SpaceObject *other) { if (other->isShip()) add(new MelnormeDisable( ship, (Ship *)(other), disableSprite, 20, 50, disableFrames)); state = 0; return; ! } --- 299,309 ---- void MelnormeSpecial::animateExplosion() {} ! void MelnormeSpecial::inflict_damage(SpaceObject *other) ! { if (other->isShip()) add(new MelnormeDisable( ship, (Ship *)(other), disableSprite, 20, 50, disableFrames)); state = 0; return; ! } Index: shporzne.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc2ships/shporzne.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** shporzne.cpp 24 Mar 2004 23:51:44 -0000 1.16 --- shporzne.cpp 11 Jul 2005 00:25:58 -0000 1.17 *************** *** 9,12 **** --- 9,14 ---- class OrzMissile : public Missile { + public: + IDENTITY(OrzMissile); public: OrzMissile(double oangle, double ov, int odamage, double orange, *************** *** 15,18 **** --- 17,22 ---- class OrzMarine : public SpaceObject { + public: + IDENTITY(OrzMarine); double accel_rate; double speed_max; Index: shpchmav.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc2ships/shpchmav.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** shpchmav.cpp 24 Mar 2004 23:51:44 -0000 1.14 --- shpchmav.cpp 11 Jul 2005 00:25:58 -0000 1.15 *************** *** 8,11 **** --- 8,13 ---- class ChmmrLaser : public Laser { + public: + IDENTITY(ChmmrLaser); public: ChmmrLaser(double langle, double lrange, int ldamage, int lfcount, *************** *** 14,17 **** --- 16,21 ---- class ChmmrBeam : public SpaceObject { + public: + IDENTITY(ChmmrBeam); int frame; int frame_count; *************** *** 27,30 **** --- 31,36 ---- class ChmmrZapSat : public SpaceObject { + public: + IDENTITY(ChmmrZapSat); int frame; Index: shpdruma.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc2ships/shpdruma.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** shpdruma.cpp 24 Mar 2004 23:51:44 -0000 1.9 --- shpdruma.cpp 11 Jul 2005 00:25:58 -0000 1.10 *************** *** 7,10 **** --- 7,12 ---- class DruugeMissile : public Missile { + public: + IDENTITY(DruugeMissile); public: Index: shpslypr.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc2ships/shpslypr.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** shpslypr.cpp 24 Mar 2004 23:51:44 -0000 1.15 --- shpslypr.cpp 11 Jul 2005 00:25:59 -0000 1.16 *************** *** 27,30 **** --- 27,32 ---- class SlylandroLaserNew : public Presence { + public: + IDENTITY(SlylandroLaserNew); SpaceLocation *mother, *target; double max_length, lifetime, existtime, seglength, perturbamount; *************** *** 300,304 **** if ( directedbeam ) ! D = min_delta(target->normal_pos(), mother->normal_pos(), map_size); else D = Vector2(1,1); // just some arbitrary value, so that the math works at least --- 302,306 ---- if ( directedbeam ) ! D = min_delta(target->pos, mother->pos, map_size); else D = Vector2(1,1); // just some arbitrary value, so that the math works at least |
Update of /cvsroot/timewarp/source/sc1ships In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/source/sc1ships Modified Files: shpandgu.cpp shpchebr.cpp shpearcr.cpp shpilwav.cpp shpkzedr.cpp shpmycpo.cpp shpsyrpe.cpp shpumgdr.cpp shpvuxin.cpp Log Message: big update to the final version. Index: shpandgu.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpandgu.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** shpandgu.cpp 24 Mar 2004 23:51:44 -0000 1.12 --- shpandgu.cpp 11 Jul 2005 00:25:58 -0000 1.13 *************** *** 6,9 **** --- 6,11 ---- class AndrosynthBubble : public AnimatedShot { + public: + IDENTITY(AndrosynthBubble); int courseFrames; Index: shpmycpo.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpmycpo.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** shpmycpo.cpp 24 Mar 2004 23:51:44 -0000 1.9 --- shpmycpo.cpp 11 Jul 2005 00:25:58 -0000 1.10 *************** *** 6,9 **** --- 6,11 ---- class MyconPlasma : public HomingMissile { + public: + IDENTITY(MyconPlasma); //double v; Index: shpearcr.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpearcr.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** shpearcr.cpp 24 Mar 2004 23:51:44 -0000 1.7 --- shpearcr.cpp 11 Jul 2005 00:25:58 -0000 1.8 *************** *** 6,9 **** --- 6,11 ---- class EarthlingMissile : public HomingMissile { + public: + IDENTITY(EarthlingMissile); public: EarthlingMissile(Vector2 opos, double oangle, double ov, Index: shpumgdr.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpumgdr.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** shpumgdr.cpp 26 Mar 2004 17:55:49 -0000 1.16 --- shpumgdr.cpp 11 Jul 2005 00:25:58 -0000 1.17 *************** *** 6,9 **** --- 6,11 ---- class UmgahCone : public SpaceObject { + public: + IDENTITY(UmgahCone); double dist; Index: shpchebr.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpchebr.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** shpchebr.cpp 13 Jan 2005 02:39:23 -0000 1.11 --- shpchebr.cpp 11 Jul 2005 00:25:58 -0000 1.12 *************** *** 10,13 **** --- 10,15 ---- { public: + IDENTITY(ChenjesuShot); + public: ChenjesuShot(Vector2 opos, double oangle, double ov, int odamage, int oarmour, SpaceLocation *creator, SpaceSprite *osprite); *************** *** 18,21 **** --- 20,25 ---- class ChenjesuDOGI : public AnimatedShot { + public: + IDENTITY(ChenjesuDOGI); int sap_factor; double accel_rate; *************** *** 187,190 **** --- 191,195 ---- if(sameTeam(other)) return; if ( !other->isShip()) return; + play_sound(data->sampleExtra[1]); Index: shpsyrpe.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpsyrpe.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** shpsyrpe.cpp 24 Mar 2004 23:51:44 -0000 1.12 --- shpsyrpe.cpp 11 Jul 2005 00:25:58 -0000 1.13 *************** *** 6,9 **** --- 6,11 ---- class CrewPod : public SpaceObject { + public: + IDENTITY(CrewPod); int frame_count; int frame_size; Index: shpilwav.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpilwav.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** shpilwav.cpp 24 Mar 2004 23:51:44 -0000 1.8 --- shpilwav.cpp 11 Jul 2005 00:25:58 -0000 1.9 *************** *** 4,7 **** --- 4,8 ---- #include "../sc1ships.h" + #include "../scp.h" int IlwrathAvenger::cloak_color[3] = { 15, 11, 9 }; *************** *** 88,99 **** } ! void IlwrathAvenger::animate(Frame *space) { if((cloak_frame > 0) && (cloak_frame < 300)) sprite->animate_character( pos, sprite_index, pallete_color[cloak_color[cloak_frame / 100]], space); ! else if ((cloak_frame >= 300)) { ! sprite->animate_character( pos, sprite_index, pallete_color[255], space); ! } ! else Ship::animate(space); return; } --- 89,107 ---- } ! void IlwrathAvenger::animate(Frame *space) ! { if((cloak_frame > 0) && (cloak_frame < 300)) sprite->animate_character( pos, sprite_index, pallete_color[cloak_color[cloak_frame / 100]], space); ! else if ((cloak_frame >= 300)) ! { ! if (is_bot(control->channel) || !is_local(control->channel) || (!game_networked && num_network>1)) // bots and remote players are "hidden" ! sprite->animate_character( pos, sprite_index, pallete_color[255], space); ! else ! sprite->animate_character( pos, sprite_index, pallete_color[4], space); ! } ! else ! Ship::animate(space); ! return; } Index: shpvuxin.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpvuxin.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** shpvuxin.cpp 26 Mar 2004 17:55:49 -0000 1.11 --- shpvuxin.cpp 11 Jul 2005 00:25:58 -0000 1.12 *************** *** 6,9 **** --- 6,11 ---- class VuxLimpet : public AnimatedShot { + public: + IDENTITY(VuxLimpet); double slowdown_factor; *************** *** 183,186 **** --- 185,190 ---- class VuxPhaser : public Phaser { + public: + IDENTITY(VuxPhaser); public: VuxPhaser(Vector2 opos, Vector2 n, VuxIntruder *ship, Index: shpkzedr.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpkzedr.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** shpkzedr.cpp 24 Mar 2004 23:51:44 -0000 1.9 --- shpkzedr.cpp 11 Jul 2005 00:25:58 -0000 1.10 *************** *** 7,10 **** --- 7,12 ---- class KzerZaMissile : public Missile { + public: + IDENTITY(KzerZaMissile); public: KzerZaMissile(Vector2 opos, double oangle, double ov, int odamage, *************** *** 13,16 **** --- 15,20 ---- class KzerZaFighter : public Missile { + public: + IDENTITY(KzerZaFighter); int air_frames; int max_air_frames; |
|
From: Rob <geo...@us...> - 2005-07-11 00:26:53
|
Update of /cvsroot/timewarp/interfaces/multiplayer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/interfaces/multiplayer Modified Files: accept_default.bmp backgr.bmp bots_backgr.bmp bots_dec_default.bmp bots_inc_default.bmp cancel_default.bmp humans_backgr.bmp humans_dec_default.bmp humans_inc_default.bmp info.txt type_backgr.bmp Log Message: big update to the final version. Index: bots_inc_default.bmp =================================================================== RCS file: /cvsroot/timewarp/interfaces/multiplayer/bots_inc_default.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsTbvnc5 and /tmp/cvsqxYMgN differ Index: accept_default.bmp =================================================================== RCS file: /cvsroot/timewarp/interfaces/multiplayer/accept_default.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsfwXIv6 and /tmp/cvspACtCO differ Index: cancel_default.bmp =================================================================== RCS file: /cvsroot/timewarp/interfaces/multiplayer/cancel_default.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsI3Hmhc and /tmp/cvscsIkqU differ Index: humans_backgr.bmp =================================================================== RCS file: /cvsroot/timewarp/interfaces/multiplayer/humans_backgr.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsF7ai6d and /tmp/cvsopYhiW differ Index: bots_backgr.bmp =================================================================== RCS file: /cvsroot/timewarp/interfaces/multiplayer/bots_backgr.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvs7RPDBi and /tmp/cvszkgNQ0 differ Index: humans_inc_default.bmp =================================================================== RCS file: /cvsroot/timewarp/interfaces/multiplayer/humans_inc_default.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvss8tgfF and /tmp/cvsQrs8Gn differ Index: humans_dec_default.bmp =================================================================== RCS file: /cvsroot/timewarp/interfaces/multiplayer/humans_dec_default.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvspASmtG and /tmp/cvsTFtEXo differ Index: info.txt =================================================================== RCS file: /cvsroot/timewarp/interfaces/multiplayer/info.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** info.txt 12 Mar 2004 20:21:45 -0000 1.1 --- info.txt 11 Jul 2005 00:25:03 -0000 1.2 *************** *** 1,20 **** ! interfaces/multiplayer/type_backgr_y = 159 ! interfaces/multiplayer/type_backgr_x = 94 ! interfaces/multiplayer/bots_inc_default_y = 282 ! interfaces/multiplayer/bots_inc_default_x = 590 ! interfaces/multiplayer/bots_dec_default_y = 282 ! interfaces/multiplayer/bots_dec_default_x = 61 ! interfaces/multiplayer/bots_backgr_y = 288 ! interfaces/multiplayer/bots_backgr_x = 220 ! interfaces/multiplayer/humans_inc_default_y = 60 ! interfaces/multiplayer/humans_inc_default_x = 583 ! interfaces/multiplayer/humans_dec_default_y = 56 ! interfaces/multiplayer/humans_dec_default_x = 81 ! interfaces/multiplayer/humans_backgr_y = 46 ! interfaces/multiplayer/humans_backgr_x = 219 ! interfaces/multiplayer/cancel_default_y = 150 ! interfaces/multiplayer/cancel_default_x = 1 ! interfaces/multiplayer/accept_default_y = 153 ! interfaces/multiplayer/accept_default_x = 707 autoplace = 1 ! res = 800 --- 1,22 ---- ! locy = 39 ! locx = 39 ! interfaces/multiplayer/type_backgr_y = 160 ! interfaces/multiplayer/type_backgr_x = 98 ! interfaces/multiplayer/bots_inc_default_y = 290 ! interfaces/multiplayer/bots_inc_default_x = 600 ! interfaces/multiplayer/bots_dec_default_y = 291 ! interfaces/multiplayer/bots_dec_default_x = 128 ! interfaces/multiplayer/bots_backgr_y = 290 ! interfaces/multiplayer/bots_backgr_x = 225 ! interfaces/multiplayer/humans_inc_default_y = 70 ! interfaces/multiplayer/humans_inc_default_x = 591 ! interfaces/multiplayer/humans_dec_default_y = 70 ! interfaces/multiplayer/humans_dec_default_x = 127 ! interfaces/multiplayer/humans_backgr_y = 54 ! interfaces/multiplayer/humans_backgr_x = 223 ! interfaces/multiplayer/cancel_default_y = 160 ! interfaces/multiplayer/cancel_default_x = 9 ! interfaces/multiplayer/accept_default_y = 160 ! interfaces/multiplayer/accept_default_x = 716 autoplace = 1 ! res = 1024 Index: backgr.bmp =================================================================== RCS file: /cvsroot/timewarp/interfaces/multiplayer/backgr.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsbWE6CP and /tmp/cvsj1MDly differ Index: bots_dec_default.bmp =================================================================== RCS file: /cvsroot/timewarp/interfaces/multiplayer/bots_dec_default.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsUxTT51 and /tmp/cvsmPdZSK differ Index: type_backgr.bmp =================================================================== RCS file: /cvsroot/timewarp/interfaces/multiplayer/type_backgr.bmp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsBEWbs3 and /tmp/cvsIhdpiM differ |
|
From: Rob <geo...@us...> - 2005-07-11 00:26:53
|
Update of /cvsroot/timewarp/source/sc3ships In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/source/sc3ships Modified Files: shpclapi.cpp shpdakvi.cpp shpdooco.cpp shpexqen.cpp shpharra.cpp shpherex.cpp shpktacr.cpp shplk_sa.cpp shpowavo.cpp shpplopl.cpp shpvyrin.cpp shpxchex.cpp Log Message: big update to the final version. Index: shpowavo.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc3ships/shpowavo.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** shpowavo.cpp 24 Mar 2004 23:51:44 -0000 1.10 --- shpowavo.cpp 11 Jul 2005 00:25:59 -0000 1.11 *************** *** 8,11 **** --- 8,13 ---- class OwaVoyager : public Ship { + public: + IDENTITY(OwaVoyager); double weaponRange; *************** *** 40,43 **** --- 42,47 ---- class OwaMissile : public HomingMissile { + public: + IDENTITY(OwaMissile); int missileArming; *************** *** 65,68 **** --- 69,74 ---- class OwaShrapnel : public HomingMissile { + public: + IDENTITY(OwaShrapnel); int missileArming; *************** *** 79,82 **** --- 85,90 ---- class OwaSpecial : public Missile { + public: + IDENTITY(OwaSpecial); int disableFrames; *************** *** 91,94 **** --- 99,104 ---- class OwaDisable : public SpaceObject { + public: + IDENTITY(OwaDisable); int disableframe; int disableframe_count; Index: shpclapi.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc3ships/shpclapi.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** shpclapi.cpp 24 Mar 2004 23:51:44 -0000 1.8 --- shpclapi.cpp 11 Jul 2005 00:25:59 -0000 1.9 *************** *** 5,8 **** --- 5,10 ---- class ClairconctlarPinnacle : public Ship { + public: + IDENTITY(ClairconctlarPinnacle); double weaponRange; double weaponVelocity; *************** *** 28,31 **** --- 30,35 ---- class ClairconctlarBeacon : public Shot { + public: + IDENTITY(ClairconctlarBeacon); ClairconctlarPinnacle *mother; Index: shpdooco.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc3ships/shpdooco.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shpdooco.cpp 24 Mar 2004 23:51:44 -0000 1.6 --- shpdooco.cpp 11 Jul 2005 00:25:59 -0000 1.7 *************** *** 4,7 **** --- 4,9 ---- class DoogConstructor : public Ship { + public: + IDENTITY(DoogConstructor); double weaponRange; double weaponVelocity; Index: shplk_sa.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc3ships/shplk_sa.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shplk_sa.cpp 24 Mar 2004 23:51:44 -0000 1.6 --- shplk_sa.cpp 11 Jul 2005 00:25:59 -0000 1.7 *************** *** 6,9 **** --- 6,11 ---- class LkSanctorum : public Ship { + public: + IDENTITY(LkSanctorum); double weaponRange; double weaponVelocity; Index: shpxchex.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc3ships/shpxchex.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** shpxchex.cpp 24 Mar 2004 23:51:44 -0000 1.12 --- shpxchex.cpp 11 Jul 2005 00:25:59 -0000 1.13 *************** *** 7,11 **** --- 7,20 ---- #define XCHAGGERDISABLE_SPEC 0x37 + // allows other ships to affect control over a ship. + class OverrideControlXchagger : public OverrideControl + { + public: + virtual void calculate(short *key); + }; + class XchaggerExclave : public Ship { + public: + IDENTITY(XchaggerExclave); double weaponRange; double weaponVelocity; *************** *** 27,30 **** --- 36,43 ---- }; class XchaggerDisable : public SpaceObject { + public: + IDENTITY(XchaggerDisable); + OverrideControlXchagger *ocx; + Ship *affectship; int disableframe; int disableframe_count; *************** *** 44,47 **** --- 57,62 ---- class XchaggerSpecial : public Missile { + public: + IDENTITY(XchaggerSpecial); int disableFrames; SpaceSprite *disableSprite; *************** *** 92,95 **** --- 107,125 ---- } + + void OverrideControlXchagger::calculate(short *key) + { + int keyleft,keyright; + keyleft = *key & (keyflag::left); + keyright = *key & (keyflag::right); + + *key &= ~(keyflag::left | keyflag::right); + + if (keyleft) + *key |= (keyflag::right); + if (keyright) + *key |= (keyflag::left); + } + XchaggerDisable::XchaggerDisable(SpaceObject *creator, Ship *oship, SpaceSprite *osprite, int ofcount, int ofsize, int disableFrames,int lowerFrames) : *************** *** 107,113 **** if (!lowerindex) layer = 5; target = oship; } ! void XchaggerDisable::calculate() { if (!(ship && ship->exists())) --- 137,148 ---- if (!lowerindex) layer = 5; target = oship; + + affectship = oship; + ocx = new OverrideControlXchagger(); + affectship->set_override_control(ocx); } ! void XchaggerDisable::calculate() ! { if (!(ship && ship->exists())) *************** *** 117,121 **** } - int keyleft,keyright; frame_step+= frame_time; while (frame_step >= frame_size) { --- 152,155 ---- *************** *** 133,136 **** --- 167,171 ---- target = 0; state = 0; + affectship->del_override_control(ocx); return; } *************** *** 140,150 **** if (!lowerindex) { pos = t->normal_pos(); - keyleft = t->nextkeys & (keyflag::left); - keyright = t->nextkeys & (keyflag::right); - t->nextkeys &= ~(keyflag::left | keyflag::right); - if (keyleft) - t->nextkeys |= (keyflag::right); - if (keyright) - t->nextkeys |= (keyflag::left); } else { --- 175,178 ---- *************** *** 153,160 **** } disableframe += frame_time; ! if (disableframe >= disableframe_count) state = 0; ! return; } Ship *XchaggerDisable::return_disable() { --- 181,197 ---- } disableframe += frame_time; ! if (disableframe >= disableframe_count) ! { ! affectship->del_override_control(ocx); ! state = 0; } + if (!exists()) + { + affectship->del_override_control(ocx); + } + return; + } + Ship *XchaggerDisable::return_disable() { Index: shpexqen.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc3ships/shpexqen.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** shpexqen.cpp 24 Mar 2004 23:51:44 -0000 1.8 --- shpexqen.cpp 11 Jul 2005 00:25:59 -0000 1.9 *************** *** 10,13 **** --- 10,15 ---- class ExquivanEnigma : public Ship { + public: + IDENTITY(ExquivanEnigma); double weaponRange; double weaponVelocity; *************** *** 35,38 **** --- 37,42 ---- class ExquivanBarrier : public Missile { + public: + IDENTITY(ExquivanBarrier); double safedist; Index: shpharra.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc3ships/shpharra.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shpharra.cpp 24 Mar 2004 23:51:44 -0000 1.6 --- shpharra.cpp 11 Jul 2005 00:25:59 -0000 1.7 *************** *** 8,11 **** --- 8,13 ---- class HarikaYornRavager : public Ship { + public: + IDENTITY(HarikaYornRavager); int regenrateFrames; int regenrateCount; *************** *** 35,38 **** --- 37,42 ---- class LassoMissile : public Missile { + public: + IDENTITY(LassoMissile); public: LassoMissile(Vector2 opos, double oangle, double ov, int odam, *************** *** 41,44 **** --- 45,50 ---- class LassoLaser : public Laser { + public: + IDENTITY(LassoLaser); double oldnx[BCC]; double oldny[BCC]; Index: shpplopl.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc3ships/shpplopl.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shpplopl.cpp 24 Mar 2004 23:51:44 -0000 1.6 --- shpplopl.cpp 11 Jul 2005 00:25:59 -0000 1.7 *************** *** 6,9 **** --- 6,11 ---- class PloxisPlunderer : public Ship { + public: + IDENTITY(PloxisPlunderer); double weaponRange; double weaponVelocity; Index: shpvyrin.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc3ships/shpvyrin.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** shpvyrin.cpp 24 Mar 2004 23:51:44 -0000 1.10 --- shpvyrin.cpp 11 Jul 2005 00:25:59 -0000 1.11 *************** *** 45,48 **** --- 45,50 ---- class VyroIngoInvader : public Ship { + public: + IDENTITY(VyroIngoInvader); public: *************** *** 64,67 **** --- 66,71 ---- class VyroIngoSheild : public SpaceObject { + public: + IDENTITY(VyroIngoSheild); int frames_left; *************** *** 83,86 **** --- 87,92 ---- class VyroIngoWake : public AnimatedShot { + public: + IDENTITY(VyroIngoWake); int frames_total; Index: shpdakvi.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc3ships/shpdakvi.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** shpdakvi.cpp 24 Mar 2004 23:51:44 -0000 1.7 --- shpdakvi.cpp 11 Jul 2005 00:25:59 -0000 1.8 *************** *** 6,9 **** --- 6,11 ---- class DaktaklakpakVivisector : public Ship { + public: + IDENTITY(DaktaklakpakVivisector); int weaponFrames; *************** *** 44,47 **** --- 46,51 ---- class DaktaklakpakMine : public AnimatedShot { + public: + IDENTITY(DaktaklakpakMine); double missileVelocity; Index: shpktacr.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc3ships/shpktacr.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shpktacr.cpp 24 Mar 2004 23:51:44 -0000 1.6 --- shpktacr.cpp 11 Jul 2005 00:25:59 -0000 1.7 *************** *** 6,9 **** --- 6,11 ---- class KtangCrippler : public Ship { + public: + IDENTITY(KtangCrippler); double weaponRange; *************** *** 33,36 **** --- 35,40 ---- class KtangMine : public Shot { + public: + IDENTITY(KtangMine); double missileVelocity; Index: shpherex.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc3ships/shpherex.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shpherex.cpp 24 Mar 2004 23:51:44 -0000 1.6 --- shpherex.cpp 11 Jul 2005 00:25:59 -0000 1.7 *************** *** 1,7 **** --- 1,10 ---- /* $Id$ */ #include "../ship.h" + #include "../scp.h" REGISTER_FILE class HeraldExterminator : public Ship { + public: + IDENTITY(HeraldExterminator); double weaponRange; double weaponVelocity; *************** *** 98,108 **** } ! void HeraldExterminator::animate(Frame *space) { if((cloak_frame > 0) && (cloak_frame < 300)) sprite->animate_character( pos, sprite_index, pallete_color[cloak_color[cloak_frame / 100]], space); ! else if ((cloak_frame >= 300)) sprite->animate_character( pos, ! sprite_index, pallete_color[0], space); ! else Ship::animate(space); return; } --- 101,118 ---- } ! void HeraldExterminator::animate(Frame *space) ! { if((cloak_frame > 0) && (cloak_frame < 300)) + { sprite->animate_character( pos, sprite_index, pallete_color[cloak_color[cloak_frame / 100]], space); ! } else if ((cloak_frame >= 300)) ! { ! if (is_bot(control->channel) || !is_local(control->channel) || (!game_networked && num_network>1)) // bots and remote players are "hidden" ! sprite->animate_character( pos, sprite_index, pallete_color[0], space); ! else ! sprite->animate_character( pos, sprite_index, pallete_color[4], space); ! } ! else Ship::animate(space); return; } |
|
From: Rob <geo...@us...> - 2005-07-11 00:26:53
|
Update of /cvsroot/timewarp/source/ais In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/source/ais Modified Files: c_input.cpp c_other.cpp c_wussie.cpp Log Message: big update to the final version. Index: c_input.cpp =================================================================== RCS file: /cvsroot/timewarp/source/ais/c_input.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** c_input.cpp 24 Mar 2004 23:51:34 -0000 1.14 --- c_input.cpp 11 Jul 2005 00:25:11 -0000 1.15 *************** *** 183,187 **** } ! ControlHuman::ControlHuman(const char *name, int channel) : Control(name, channel) {} #define KEY_DIALOG_MODIFY 0 --- 183,192 ---- } ! ControlHuman::ControlHuman(const char *name, int channel) ! : ! Control(name, channel) ! { ! auto_update = false; // networked player need think() to be called externally, so that it's synched... ! } #define KEY_DIALOG_MODIFY 0 Index: c_other.cpp =================================================================== RCS file: /cvsroot/timewarp/source/ais/c_other.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** c_other.cpp 24 Mar 2004 23:51:34 -0000 1.10 --- c_other.cpp 11 Jul 2005 00:25:11 -0000 1.11 *************** *** 8,27 **** } /*! \brief This AI do nothing */ ! int ControlVegetable::think() { return 0; ! } /*! \brief This function do nothing \return -1 */ int ControlVegetable::choose_ship(VideoWindow *window, char * prompt, class Fleet *fleet ) { return -1; } ! ControlVegetable::ControlVegetable (const char *name, int channel) : Control(name, channel) { ! } ! const char *ControlMoron::getTypeName() { return "MoronBot"; ! } /*! \brief Simple AI --- 8,35 ---- } /*! \brief This AI do nothing */ ! int ControlVegetable::think() ! { return 0; ! } /*! \brief This function do nothing \return -1 */ + int ControlVegetable::choose_ship(VideoWindow *window, char * prompt, class Fleet *fleet ) { return -1; } ! ControlVegetable::ControlVegetable (const char *name, int channel) ! : ! Control(name, channel) ! { ! // this is "nothing". ! auto_update = false; ! } ! const char *ControlMoron::getTypeName() ! { return "MoronBot"; ! } /*! \brief Simple AI Index: c_wussie.cpp =================================================================== RCS file: /cvsroot/timewarp/source/ais/c_wussie.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** c_wussie.cpp 24 Mar 2004 23:51:34 -0000 1.13 --- c_wussie.cpp 11 Jul 2005 00:25:11 -0000 1.14 *************** *** 92,97 **** STACKTRACE; ! double closetime = 500; ! double angle, dodgeangle = -1; Query b; SpaceObject *shot; --- 92,111 ---- STACKTRACE; ! double check_range; ! ! double frac = ship->turn_rate*1E3 / PI2; // turning-arc-fraction in 1 second. ! // a small value means that it turns slowly. ! if (frac < 0.5) ! frac = 0.5; ! if (frac > 1.5) ! frac = 1.5; ! ! // minimum check-range is 500 pixels; but, for ships that turn slowly, you should anticipate ! // further ahead... ! check_range = 400.0 / frac; ! ! ! double closetime = 1000 / frac; // 1000 ms, scaled by more if you can respond only slowly ! double desiredangle = 0; Query b; SpaceObject *shot; *************** *** 102,109 **** double xs = 0, ys = 0; double velship, velshot; ! for (b. ! begin (ship, ! OBJECT_LAYERS & ~bit (LAYER_CBODIES) & ~bit (LAYER_SHIPS), ! 500); b.current; b.next ()) { shot = b.currento; --- 116,120 ---- double xs = 0, ys = 0; double velship, velshot; ! for ( b.begin (ship, OBJECT_LAYERS & ~bit (LAYER_CBODIES) & ~bit (LAYER_SHIPS), check_range); b.current; b.next() ) { shot = b.currento; *************** *** 150,157 **** if (fabs (shottime - shiptime) < closetime) { ! angle = ! ship->get_angle () - ! ship->trajectory_angle (shot); closetime = fabs (shottime - shiptime); if ((angle < PI/12) || (angle > PI2-PI/12)) angle += PI; --- 161,169 ---- if (fabs (shottime - shiptime) < closetime) { ! double a = ship->trajectory_angle (shot); ! double da = ship->get_angle() - a; ! closetime = fabs (shottime - shiptime); + /* if ((angle < PI/12) || (angle > PI2-PI/12)) angle += PI; *************** *** 161,165 **** else angle += PI/2; ! dodgeangle = normalize (angle, PI2); } } --- 173,187 ---- else angle += PI/2; ! */ ! ! while (da < -PI) da += PI2; ! while (da > PI) da -= PI2; ! // angle is now between -PI and +PI ! ! // steer away from the dangerous object. ! if (da < 0) ! desiredangle = a - 0.75*PI; ! else ! desiredangle = a + 0.75*PI; } } *************** *** 167,171 **** } } ! return dodgeangle; } --- 189,193 ---- } } ! return desiredangle; } *************** *** 174,177 **** --- 196,204 ---- STACKTRACE; + if (channel != channel_none) + { + tw_error("WussieBot is not on a local channel. It should be, though."); + } + if (!ship) return 0; *************** *** 179,190 **** int action = 0; float velocity, distance; ! double angle = 0, va, pangle, dangle; int avoid_planet = FALSE; Query ap; SpaceObject *p; if (ship->target && !ship->target->isInvisible ()) last_seen_time = game->game_time; ! else if ((rand () & 32767) < frame_time) last_seen_time = game->game_time - 1000; for (ap.begin (ship, bit (LAYER_CBODIES), planet_safe[state]); ap.current; ap.next ()) --- 206,225 ---- int action = 0; float velocity, distance; ! ! double angle_aim = 0, va, pangle; ! double angle_fire = PI; ! int avoid_planet = FALSE; Query ap; SpaceObject *p; + if (ship->target && !ship->target->isInvisible ()) + { last_seen_time = game->game_time; ! } else if ((random () & 32767) < frame_time) ! { last_seen_time = game->game_time - 1000; + } + for (ap.begin (ship, bit (LAYER_CBODIES), planet_safe[state]); ap.current; ap.next ()) *************** *** 200,222 **** if (normalize (pangle - va, PI2) < normalize (va - pangle, PI2)) ! angle = ! -PI/2 + ship->get_angle () - ! ship->trajectory_angle (p); else ! angle = ! PI/2 + ship->get_angle () - ! ship->trajectory_angle (p); } } } if (!avoid_planet) { if (!ship->target || (last_seen_time < game->game_time - 3000)) { ! if ((rand() & 4095) < frame_time) { ! if (rand() & 3) return keyflag::closest; else return keyflag::next; } return 0; } if (!ship->target->exists ()) { --- 235,261 ---- if (normalize (pangle - va, PI2) < normalize (va - pangle, PI2)) ! angle_aim = -PI/2 + ship->get_angle ();// - ! //ship->trajectory_angle (p); else ! angle_aim = PI/2 + ship->get_angle ();// - ! //ship->trajectory_angle (p); } } } + if (!avoid_planet) { if (!ship->target || (last_seen_time < game->game_time - 3000)) { ! if ((random() & 4095) < frame_time) { ! if (random() & 3) return keyflag::closest; else return keyflag::next; } return 0; } + } + + if (!avoid_planet && (ship && ship->target && !ship->target->isInvisible()) ) + { + if (!ship->target->exists ()) { *************** *** 229,250 **** default: case TACTIC_UNKNOWN: ! case TACTIC_INDIRECT_INTERCEPT: { ! //modified by orz ! double rel = 0; if (distance < option_range[state][0]) { velocity = option_velocity[state][0]; if (velocity == 0) velocity = MAX_SPEED; ! rel = game->shot_relativity; } else { velocity = ship->speed_max; } ! angle = intercept_angle2( ship->normal_pos(), ! ship->get_vel() * rel, ! velocity, ship->target->normal_pos(), ship->target->get_vel() ! ) - ship->get_angle(); /*double rx, ry; rx = -ship->normal_pos().x + ship->target->normal_pos().x + --- 268,386 ---- default: case TACTIC_UNKNOWN: ! case TACTIC_INDIRECT_INTERCEPT: ! { ! //xxx comment: ! // I'm afraid this approach is flawed, because it only takes the primary weapon ! // into account, not the secondary weapon. Thus, the AI can only aim the main, ! // not the special weapon. ! ! double relativity = 0; if (distance < option_range[state][0]) { velocity = option_velocity[state][0]; if (velocity == 0) velocity = MAX_SPEED; ! relativity = rel[state][0];//game->shot_relativity; } else { velocity = ship->speed_max; } ! ! angle_aim = intercept_angle2( ship->normal_pos(), ! ship->get_vel() * relativity, // ship velocity ! velocity, // weapon velocity ship->target->normal_pos(), ship->target->get_vel() ! ); ! //- ship->get_angle(); ! ! ! // do another test, namely, check if the enemy ship is not moving away from you. If ! // it does, then you've a problem, cause hot pursuit can be deadly. ! ! double a; ! a = ship->target->vel.atan() - ship->vel.atan(); ! while (a < -PI) a += PI2; ! while (a > PI) a -= PI2; ! ! if (fabs(a) < 0.3 * PI) ! { ! // and is moving away from you... ! // then, try engaging the enemy from another angle of attack ... ! ! ! if (distance > 0.9*option_range[state][0]) ! { ! if (ship->target->vel.length() > 0.3 * ship->speed_max) ! { ! // if the enemy is too fast for you... ! // just move to some other direction ! ! // hmm, actually, this is good practice in almost any occasion... ! // except if you're really much faster than the enemy ! ! double b; ! b = ship->trajectory_angle(target); ! a = ship->angle - b; ! while (a < -PI) a += PI2; ! while (a > PI) a -= PI2; ! ! if ( a < 0 ) ! angle_aim = b + 0.5*PI; ! else ! angle_aim = b - 0.5*PI; ! } ! } ! ! } ! ! Ship *t; ! if (ship->target->isShip()) ! { ! t = (Ship*) ship->target; ! } else { ! t = 0; ! } ! ! // and what, if the enemy is facing you ? You should be really scared then ... unless ... ! if (t && ! (t->vel - ship->vel).length() > 0.9 * ship->speed_max && // be scared if enemy is moving away very fast ! ship->speed_max > 1.1 * t->vel.length() && // be scared if you are able to run away from the enemy ! (t->crew/t->crew_max > 0.3 && t->crew > 6) && // be scared if the enemy has much crew left ! !ship->isInvisible() && // be scared if you're visible ! (distance > option_range[state][0] || // be scared if you're out of firing range ! distance < 200) // or be scared if you're *very* close. ! ) ! { ! // well... only if the enemy isn't faster than you, otherwise, evading or running ! // away doesn't help you anything. ! // and, only if the enemy has lots of life left (say, 6 life, or only a small fraction of life). ! // and, if you're cloaked you don't have to worry either ! // and, if you're not within fire-range ! ! double d = 2.0 * option_range[state][0]; ! if (d > 1000) ! d = 1000; ! ! // evade the enemy ! // the enemy is close ! if (distance < d) ! { ! double b = ship->trajectory_angle(ship->target) + PI; ! a = ship->target->angle - b; ! while (a < -PI) a += PI2; ! while (a > PI) a -= PI2; ! ! // the enemy is facing you ! if (fabs(a) < 0.2 * PI) ! { ! if (a > 0) ! angle_aim = b + 0.5*PI; ! else ! angle_aim = b - 0.5*PI; ! } ! } ! } ! ! /*double rx, ry; rx = -ship->normal_pos().x + ship->target->normal_pos().x + *************** *** 262,302 **** case TACTIC_DIRECT_INTERCEPT: ! angle = ! ship->trajectory_angle (ship->target) - ! ship->get_angle (); break; case TACTIC_RANGE: - if (tactic_state == STATE_TOO_FAR) { ! angle = ! ship->trajectory_angle (ship->target) - ! ship->get_angle (); ! if (distance < min_range[state]) ! tactic_state = STATE_TOO_CLOSE; ! } ! else ! { ! angle = ! ship->trajectory_angle (ship->target) - ! ship->get_angle () + PI; ! if (distance > max_range[state]) ! tactic_state = STATE_TOO_FAR; } break; } ! dangle = evasion (ship); ! if (dangle >= 0) ! angle = dangle; } ! while (angle < 0) ! angle += PI2; ! while (angle > PI2) ! angle -= PI2; ! if (angle > PI) { ! angle -= PI2; action |= keyflag::left; } --- 398,498 ---- case TACTIC_DIRECT_INTERCEPT: ! { ! angle_aim = ship->trajectory_angle (ship->target); ! //-ship->get_angle (); ! } break; case TACTIC_RANGE: { ! if (distance > max_range[state])//(tactic_state == STATE_TOO_FAR) ! { ! // you're too far... ! angle_aim = ship->trajectory_angle (ship->target); ! // - ship->get_angle (); ! //if (distance < min_range[state]) ! // tactic_state = STATE_TOO_CLOSE; ! } ! else if ( (tactic_state == 1 && distance < 0.5*(min_range[state]+max_range[state])) || // retreat to the middle distance ! (tactic_state == 2 && distance < min_range[state]) // check for min-boundary while you're attacking ! )//(tactic_state == STATE_TOO_CLOSE) ! { ! tactic_state = 1; ! ! // you're too close, try to get away. ! angle_aim = ship->trajectory_angle (ship->target) + PI; ! //- ship->get_angle (); ! } ! else ! { ! // in good range: ! ! tactic_state = 2; ! ! velocity = option_velocity[state][0]; ! angle_aim = intercept_angle2( ! ship->normal_pos(), ! ship->get_vel(), // ship velocity ! velocity, // primary weapon velocity ! ship->target->normal_pos(), ! ship->target->get_vel() ! ); ! //- ship->get_angle(); ! ! ! //if (distance > max_range[state]) ! // tactic_state = STATE_TOO_FAR; ! } } break; } ! ! // if aim is good, you can fire. ! // that's checked here... ! velocity = option_velocity[state][0]; ! double relativity = rel[state][0]; ! angle_fire = intercept_angle2( ! ship->normal_pos(), ! ship->get_vel() * relativity, // ship velocity ! velocity, // primary weapon velocity ! ship->target->normal_pos(), ! ship->target->get_vel() ! ); ! // here, angle_fire is an absolute value. ! ! ! // if you're out of range anyway, then it makes sense to check for threats. Otherwise, ! // you shouldn't break off an attack to evade a lousy missile. ! if (distance > 0.5*option_range[state][0]) ! { ! double a; ! a = evasion (ship); ! ! if (a != 0) ! angle_aim = a; ! } } ! // and what, if the enemy is invisible ! if (ship && ship->target && ship->target->isInvisible()) { ! angle_aim = random(PI2); ! if (ship->batt > 0.5*ship->batt_max || ! ship->batt >= ship->batt_max - ship->weapon_drain) ! action |= keyflag::fire; ! } ! ! double da; ! da = angle_aim - ship->get_angle(); // so that it's the increment that you've to make, to achieve the desired angle ! while (da < -PI) ! da += PI2; ! while (da > PI) ! da -= PI2; ! ! ! if (da < 0) ! { ! //angle_aim -= PI2; action |= keyflag::left; } *************** *** 305,309 **** --- 501,515 ---- action |= keyflag::right; } + action |= keyflag::thrust; + + // note, that angle_fire is RELATIVE, that's assumed in the rest of the routine... + angle_fire -= ship->get_angle(); + while (angle_fire < -PI) + angle_fire += PI2; + while (angle_fire > PI) + angle_fire -= PI2; + + int i, j; if (!ship->target) *************** *** 338,345 **** --- 544,553 ---- else range_fire = FALSE; + if (j == 0) fire_front = TRUE; else fire_front = FALSE; + if (j == 0) field_fire = FALSE; *************** *** 358,362 **** { if ((distance < option_range[state][j]) ! && (fabs (angle) < sweep[j])) fireoption[0] = TRUE; } --- 566,570 ---- { if ((distance < option_range[state][j]) ! && (fabs (angle_fire) < sweep[j])) fireoption[0] = TRUE; } *************** *** 376,380 **** case OPTION_BACK: ! if (fabs (angle) > (PI - sweep[j])) fireoption[j] = TRUE; field_fire = FALSE; --- 584,588 ---- case OPTION_BACK: ! if (fabs (angle_fire) > (PI - sweep[j])) fireoption[j] = TRUE; field_fire = FALSE; *************** *** 382,387 **** case OPTION_SIDES: ! if ((fabs (angle) < PI/2 + sweep[j]) ! && (fabs (angle) > PI/2 - sweep[j])) fireoption[j] = TRUE; field_fire = FALSE; --- 590,595 ---- case OPTION_SIDES: ! if ((fabs (angle_fire) < PI/2 + sweep[j]) ! && (fabs (angle_fire) > PI/2 - sweep[j])) fireoption[j] = TRUE; field_fire = FALSE; *************** *** 389,393 **** case OPTION_FEILD: ! fireoption[j] = TRUE; field_fire = TRUE; break; --- 597,601 ---- case OPTION_FEILD: ! //fireoption[j] = TRUE; //xxx should you disable this here? I think so... field_fire = TRUE; break; *************** *** 400,407 **** --- 608,621 ---- if (distance < option_range[state][j]) dontfireoption[j] = TRUE; + else + fireoption[j] = TRUE; // added... is needed for mrmrm state-change range_fire = FALSE; break; case OPTION_PROXIMITY: + if (distance > option_range[state][j]) + dontfireoption[j] = TRUE; + else + fireoption[j] = TRUE; // added... is needed for mrmrm state-change range_fire = TRUE; break; *************** *** 439,444 **** --- 653,660 ---- case OPTION_MAX_BATT: if (ship->batt != ship->batt_max) + { if (!option_held[j]) dontfireoption[j] = TRUE; + } break; *************** *** 478,492 **** if (range_fire) if (distance > option_range[state][j]) dontfireoption[j] = TRUE; if (fire_front) ! if (fabs (angle) < sweep[j]) fireoption[j] = TRUE; ! if (field_fire) fireoption[j] = TRUE; } for (j = 0; j < 2; j++) for (i = 0; i < MAX_OPTION; i++) { --- 694,715 ---- if (range_fire) + { if (distance > option_range[state][j]) dontfireoption[j] = TRUE; + } if (fire_front) ! { ! if (fabs (angle_fire) < sweep[j] && distance < option_range[state][j]) fireoption[j] = TRUE; + } ! if (field_fire && distance < option_range[state][j]) ! { fireoption[j] = TRUE; + } } for (j = 0; j < 2; j++) + { for (i = 0; i < MAX_OPTION; i++) { *************** *** 530,545 **** } } for (j = 0; j < 2; j++) for (i = 0; i < MAX_OPTION; i++) { - if (option_time[j] > 0) - { - option_time[j] -= frame_time; - dontfireoption[j] = TRUE; - } if (option_type[state][j][i] == OPTION_PRECEDENCE) if (fireoption[j] && (!dontfireoption[j])) ! dontfireoption[(!j)] = TRUE; if (option_type[state][j][i] == OPTION_ALWAYS_WHEN_FULL) if (ship->batt >= ship->batt_max) { --- 753,786 ---- } } + } + + for (j = 0; j < 2; j++) + { + if (option_time[j] > 0) + { + option_time[j] -= frame_time; + dontfireoption[j] = TRUE; + } + for (i = 0; i < MAX_OPTION; i++) { if (option_type[state][j][i] == OPTION_PRECEDENCE) + { if (fireoption[j] && (!dontfireoption[j])) ! { ! int k; ! if ( j == 0 ) ! k = 1; ! else ! k = 0; ! ! dontfireoption[k] = TRUE; ! } ! } ! ! if (option_type[state][j][i] == OPTION_ALWAYS_WHEN_FULL) + { if (ship->batt >= ship->batt_max) { *************** *** 547,554 **** --- 788,799 ---- dontfireoption[j] = FALSE; } + } + } + } int newstate = state; for (j = 0; j < 2; j++) + { if (fireoption[j] && (!dontfireoption[j])) { *************** *** 557,561 **** --- 802,808 ---- else action |= keyflag::special; + option_time[j] = option_timer[state][j]; + for (i = 0; i < MAX_OPTION; i++) { *************** *** 575,584 **** } else option_held[j] = FALSE; state = newstate; ! if ((rand () % 4000) < frame_time) { ! int r = rand(); if (r & 3) action |= keyflag::closest; else if (r & 4) { --- 822,834 ---- } else + { option_held[j] = FALSE; + } + } state = newstate; ! if ((random () % 4000) < frame_time) { ! int r = random(); if (r & 3) action |= keyflag::closest; else if (r & 4) { *************** *** 694,698 **** scale_range (get_config_float (states, "Tactic_Max", 20)); ! tactic_state = 0; option_held[j] = FALSE; batt_level[k][j] = --- 944,948 ---- scale_range (get_config_float (states, "Tactic_Max", 20)); ! //tactic_state = 0; option_held[j] = FALSE; batt_level[k][j] = *************** *** 741,746 **** scale_frames (get_config_int (states, "Special_Timer", -999)); ! rel[k][0] = get_config_float (states, "WeaponRel", .5); ! rel[k][1] = get_config_float (states, "SpecialRel", .5); option_time[0] = option_timer[0][0]; option_time[1] = option_timer[0][1]; --- 991,996 ---- scale_frames (get_config_int (states, "Special_Timer", -999)); ! rel[k][0] = get_config_float (states, "WeaponRel", game->shot_relativity); ! rel[k][1] = get_config_float (states, "SpecialRel", game->shot_relativity); option_time[0] = option_timer[0][0]; option_time[1] = option_timer[0][1]; |
|
From: Rob <geo...@us...> - 2005-07-11 00:26:52
|
Update of /cvsroot/timewarp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776 Modified Files: Doxyfile alld40.dll changes.txt client.ini code.txt fleets.ini gflmelee.ini ingame.txt makefile scp.ini scpwin.rc server.ini twwin.dsp vankey.log version.txt Log Message: big update to the final version. Index: gflmelee.ini =================================================================== RCS file: /cvsroot/timewarp/gflmelee.ini,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** gflmelee.ini 26 Mar 2004 18:03:01 -0000 1.10 --- gflmelee.ini 11 Jul 2005 00:25:01 -0000 1.11 *************** *** 17,26 **** Radarpos = 0 [FleetInit] ! Nalliances = 23 ! PlayerAlliance = 22 ! EnemyAlliance = 23 [Alliance01] --- 17,30 ---- Radarpos = 0 + [Environment] + + Asteroids = 30 + [FleetInit] ! Nalliances = 21 ! PlayerAlliance = 1 ! EnemyAlliance = 2 [Alliance01] *************** *** 59,80 **** [Alliance04] Name = Union of the Rim Worlds ! Nships = 8 ship01 = druma ship02 = orzne ship03 = meltr ship04 = supbl ! ship05 = utwju ! ship06 = zfpst ship07 = thrto - ship08 = pkufu [Alliance05] Name = Empire of the New Dawn ! Nships = 5 ! ship01 = chmav ship02 = kohma ship03 = slypr ! ship04 = earc2 ! ship05 = staba [Alliance06] --- 63,85 ---- [Alliance04] Name = Union of the Rim Worlds ! Nships = 7 ship01 = druma ship02 = orzne ship03 = meltr ship04 = supbl ! ship05 = pkufu ! ship06 = earc2 ship07 = thrto [Alliance05] Name = Empire of the New Dawn ! Nships = 7 ! ship01 = glacr ship02 = kohma ship03 = slypr ! ship04 = zfpst ! ship05 = utwju ! ship06 = crapl ! ship07 = qlore [Alliance06] *************** *** 87,91 **** ship05 = jygst ship06 = kahbo ! ship07 = zeksh [Alliance07] --- 92,96 ---- ship05 = jygst ship06 = kahbo ! ship07 = forsh [Alliance07] *************** *** 107,111 **** ship03 = dajem ship04 = dyzha ! ship05 = glacr ship06 = hydcr ship07 = koapa --- 112,116 ---- ship03 = dajem ship04 = dyzha ! ship05 = chmav ship06 = hydcr ship07 = koapa *************** *** 116,120 **** ship01 = lyrwa ship02 = neccr ! ship03 = nisha ship04 = sclfr ship05 = velcr --- 121,125 ---- ship01 = lyrwa ship02 = neccr ! ship03 = bubbo ship04 = sclfr ship05 = velcr *************** *** 126,130 **** Nships = 7 ship01 = virli ! ship02 = bubbo ship03 = narlu ship04 = estgu --- 131,135 ---- Nships = 7 ship01 = virli ! ship02 = nisha ship03 = narlu ship04 = estgu *************** *** 146,150 **** [Alliance12] Name = Empire of Katana ! Nships = 8 ship01 = impka ship02 = rekas --- 151,155 ---- [Alliance12] Name = Empire of Katana ! Nships = 7 ship01 = impka ship02 = rekas *************** *** 154,158 **** ship06 = conho ship07 = tulra ! ship08 = qlore [Alliance13] --- 159,163 ---- ship06 = conho ship07 = tulra ! [Alliance13] *************** *** 176,180 **** ship05 = wassu ship06 = raame ! ship07 = sefna [Alliance15] --- 181,185 ---- ship05 = wassu ship06 = raame ! ship07 = sefn2 [Alliance15] *************** *** 219,223 **** ship03 = earc2 ship04 = tougr ! ship05 = ulzin ship06 = fresc ship07 = quasi --- 224,228 ---- ship03 = earc2 ship04 = tougr ! ship05 = vioge ship06 = fresc ship07 = quasi *************** *** 242,265 **** ship04 = neccr ship05 = neodr ! ship06 = vioge ship07 = taugl [Alliance21] Name = The Disciples of the Exiled Goddess - Nships = 3 - ship01 = crapl - ship02 = alabc - ship03 = taumc - - [Alliance22] - Name = test01 Nships = 2 ! ship01 = phepa ! ship02 = vioge ! ! [Alliance23] ! Name = test02 ! Nships = 2 ! ship01 = alhdr ! ship02 = xaaar --- 247,257 ---- ship04 = neccr ship05 = neodr ! ship06 = ulzin ship07 = taugl [Alliance21] Name = The Disciples of the Exiled Goddess Nships = 2 ! ship01 = alabc ! ship02 = taumc Index: client.ini =================================================================== RCS file: /cvsroot/timewarp/client.ini,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** client.ini 3 May 2004 21:32:45 -0000 1.34 --- client.ini 11 Jul 2005 00:25:00 -0000 1.35 *************** *** 3,12 **** Prediction = 0 Port = 15515 ! Address = 192.168.0.4 NetworkMeleeUseTeams = 0 GameName = Melee ! Nhumans = 2 ! Nbots = 0 [System] --- 3,13 ---- Prediction = 0 Port = 15515 ! Address = 11.1.1.1 NetworkMeleeUseTeams = 0 + OptimizeLatency = 1 GameName = Melee ! Nhumans = 3 ! Nbots = 3 [System] *************** *** 17,24 **** ScreenHeight = 600 ! BitsPerPixel = 16 ;valid = values are 8 (ugly), 15, 16, 24 (slow), and 32 ! FullScreen = 0 ; = 0 = windowed, 1 = fullscreen --- 18,25 ---- ScreenHeight = 600 ! BitsPerPixel = 32 ;valid = values are 8 (ugly), 15, 16, 24 (slow), and 32 ! FullScreen = 2 ; = 0 = windowed, 1 = fullscreen *************** *** 32,37 **** SoundOn = 2 MusicOn = 2 ! SoundVolume = 30 ! MusicVolume = 42 Music = melee.dat#MELEEMUS_MOD ;melee.dat = #PLANETMUSIC_MOD , #MELEEMUS_MOD --- 33,38 ---- SoundOn = 2 MusicOn = 2 ! SoundVolume = 138 ! MusicVolume = 137 Music = melee.dat#MELEEMUS_MOD ;melee.dat = #PLANETMUSIC_MOD , #MELEEMUS_MOD *************** *** 39,45 **** [View] ! View = Hero ;determines = where the camera goes ! InterpolateFrames = 1 ;0 = low quality, 1 = high quality Mip_min = 0 --- 40,46 ---- [View] ! View = Enemy ;determines = where the camera goes ! InterpolateFrames = 0 ;0 = low quality, 1 = high quality Mip_min = 0 *************** *** 62,66 **** [Rendering] ! AA_Mode = 35 --- 63,67 ---- [Rendering] ! AA_Mode = 32768 *************** *** 76,79 **** [Menu] skin = interfaces/gametest ! SelectGame = 1 --- 77,80 ---- [Menu] skin = interfaces/gametest ! SelectGame = 19 Index: server.ini =================================================================== RCS file: /cvsroot/timewarp/server.ini,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** server.ini 3 May 2004 21:32:46 -0000 1.11 --- server.ini 11 Jul 2005 00:25:01 -0000 1.12 *************** *** 1,4 **** --- 1,7 ---- [Network] Lag = 5 + SyncLag = 0 + DesyncTest = 0 + OptimizeLatency = 1 [Game] *************** *** 13,19 **** F4Turbo = 4.0 ; = the value of turbo used when f4 is pressed ! FriendlyFire = 1 ; = 0 is no friendly fire, 1 is friendly fire ! ShotRelativity = 0.490000 ; = fraction of shooter velocity inherited by a shot, 0.5 recomended MapWidth = 3840 --- 16,22 ---- F4Turbo = 4.0 ; = the value of turbo used when f4 is pressed ! FriendlyFire = 0 ; = 0 is no friendly fire, 1 is friendly fire ! ShotRelativity = 0.114000 ; = fraction of shooter velocity inherited by a shot, 0.5 recomended MapWidth = 3840 *************** *** 22,26 **** [View] ! ; = value of 1 is not sc2-ish .. change it to 0 for sc2 mode CameraHidesCloakers = 1 ;ServerSideStars = 1 //not yet implemented --- 25,29 ---- [View] ! ; = the TW default (has to do with ship cost and peoples preferences) CameraHidesCloakers = 1 ;ServerSideStars = 1 //not yet implemented *************** *** 33,37 **** Layers = 15 ;Number = of layers the stars are in; should be between 3 and 15 ! Depth = 127 ;3d = depth of starfield, should be between 0 and 255 ;TwinkleAmplitude = 1.0 --- 36,40 ---- Layers = 15 ;Number = of layers the stars are in; should be between 3 and 15 ! Depth = 29 ;3d = depth of starfield, should be between 0 and 255 ;TwinkleAmplitude = 1.0 *************** *** 49,53 **** --- 52,58 ---- GravityMinDist = 6 ;weakens strength of gravity at short range GravityRange = 18 ;cut-off range beyond which gravity stops + PlanetDimension = 2 + PlanetUsespec = 1 [Sun] Index: makefile =================================================================== RCS file: /cvsroot/timewarp/makefile,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** makefile 3 May 2004 21:32:46 -0000 1.17 --- makefile 11 Jul 2005 00:25:01 -0000 1.18 *************** *** 1,4 **** ############################################################################## ! # Compiling TimeWarp: make {win32=1} {debug=1} {NO_JGMOD=1} {NO_NET=1} # # # # Define win32=1 when compiling with Mingw32 gcc compiler for windows # --- 1,4 ---- ############################################################################## ! # Compiling TimeWarp: make {win32=1} {debug=1} {NO_JGMOD=1} # # # # Define win32=1 when compiling with Mingw32 gcc compiler for windows # *************** *** 10,16 **** # (Linux, FreeBSD, ...) # # # ! # The game depends on Allegro (4.0.x), FreeType, alfont, MASkinG, # ! # and Lua (5.0.x) libraries, so you need to install them before running # ! # make # # # ############################################################################## --- 10,15 ---- # (Linux, FreeBSD, ...) # # # ! # The game depends on Allegro (4.0.x) and Lua (5.0.x) libraries, so you need # ! # to install them before running make # # # ############################################################################## *************** *** 28,32 **** source/gamex/dialogs source/jpgalleg ! FILELIST= ${shell find source -type f "(" -name "*.c" -o -name "*.cpp" ")"| grep -v masking[/] | grep -v alfont[/]} BASE_NAMES = $(basename $(notdir $(FILELIST))) --- 27,31 ---- source/gamex/dialogs source/jpgalleg ! FILELIST= ${shell find source -type f "(" -name "*.c" -o -name "*.cpp" ")"} BASE_NAMES = $(basename $(notdir $(FILELIST))) *************** *** 71,79 **** endif ! CFLAGS += -I./source #CFLAGS += ${addprefix -I./, $(VPATH)} ! LIBS += -llualib -llua -lalfont -lmasking OBJS = $(addprefix $(OBJDIR)/,$(POBJS)) --- 70,78 ---- endif ! CFLAGS += -I./source #CFLAGS += ${addprefix -I./, $(VPATH)} ! LIBS += -llualib -llua OBJS = $(addprefix $(OBJDIR)/,$(POBJS)) Index: alld40.dll =================================================================== RCS file: /cvsroot/timewarp/alld40.dll,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsCxE3EV and /tmp/cvsn5BReC differ Index: scpwin.rc =================================================================== RCS file: /cvsroot/timewarp/scpwin.rc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** scpwin.rc 25 Oct 2003 16:40:17 -0000 1.4 --- scpwin.rc 11 Jul 2005 00:25:01 -0000 1.5 *************** *** 1 **** ! ALLEGRO_ICON ICON scpwin.ico --- 1,51 ---- ! //Microsoft Developer Studio generated resource script. ! // ! #include "resource.h" ! ///////////////////////////////////////////////////////////////////////////// ! // Dutch (Netherlands) resources ! ! #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLD) ! #ifdef _WIN32 ! LANGUAGE LANG_DUTCH, SUBLANG_DUTCH ! #pragma code_page(1252) ! #endif //_WIN32 ! ! #ifdef APSTUDIO_INVOKED ! ///////////////////////////////////////////////////////////////////////////// ! // ! // TEXTINCLUDE ! // ! ! 1 TEXTINCLUDE DISCARDABLE ! BEGIN ! "resource.h\0" ! END ! ! 2 TEXTINCLUDE DISCARDABLE ! BEGIN ! "\0" ! END ! ! 3 TEXTINCLUDE DISCARDABLE ! BEGIN ! "\r\n" ! "\0" ! END ! ! #endif // APSTUDIO_INVOKED ! ! #endif // Dutch (Netherlands) resources ! ///////////////////////////////////////////////////////////////////////////// ! ! ! ! #ifndef APSTUDIO_INVOKED ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Generated from the TEXTINCLUDE 3 resource. ! // ! ! ! ///////////////////////////////////////////////////////////////////////////// ! #endif // not APSTUDIO_INVOKED ! Index: ingame.txt =================================================================== RCS file: /cvsroot/timewarp/ingame.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ingame.txt 28 Feb 2004 01:05:49 -0000 1.5 --- ingame.txt 11 Jul 2005 00:25:01 -0000 1.6 *************** *** 14,18 **** F10 quits (so does ESCAPE) F11 saves screenshots ! F12 displays framerates / performance data - zooms out on some viewing modes. + (or =) zooms in on some viewing modes. --- 14,20 ---- F10 quits (so does ESCAPE) F11 saves screenshots ! F12 displays framerates / ping / performance data. ! [ (or {) reduces lag ! ] (or }) increases lag - zooms out on some viewing modes. + (or =) zooms in on some viewing modes. *************** *** 41,44 **** --- 43,48 ---- near: H + GOB: D changes difficulty. + Teams: Select Controller: Index: scp.ini =================================================================== RCS file: /cvsroot/timewarp/scp.ini,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** scp.ini 3 May 2004 21:32:46 -0000 1.40 --- scp.ini 11 Jul 2005 00:25:01 -0000 1.41 *************** *** 28,41 **** [Config1] ! Backwards = 42 ! Thrust = 45 ! Left = 41 ! Right = 43 ! Fire = 67 ! AltFire = 110 ! Special = 108 ! Next_Target = 66 ! Prev_Target = 65 ! Closest_Target = 16 Extra1 = 0 Extra2 = 0 --- 28,41 ---- [Config1] ! Backwards = 19 ! Thrust = 23 ! Left = 1 ! Right = 4 ! Fire = 103 ! AltFire = 14 ! Special = 105 ! Next_Target = 6 ! Prev_Target = 7 ! Closest_Target = 7 Extra1 = 0 Extra2 = 0 *************** *** 44,48 **** Extra5 = 0 Extra6 = 0 ! Communicate = 3 --- 44,48 ---- Extra5 = 0 Extra6 = 0 ! Communicate = 0 *************** *** 73,77 **** [Player1] Type = Human ! Config = 1 Team = 0 --- 73,77 ---- [Player1] Type = Human ! Config = 0 Team = 0 *************** *** 84,88 **** [Player3] ! Type = WussieBot Config = 2 Team = 2 --- 84,88 ---- [Player3] ! Type = none Config = 2 Team = 2 *************** *** 90,100 **** [Player4] ! Type = WussieBot Config = 3 ! Team = 2 [Player5] ! Type = WussieBot Config = 0 Team = 2 --- 90,100 ---- [Player4] ! Type = none Config = 3 ! Team = 3 [Player5] ! Type = none Config = 0 Team = 2 Index: Doxyfile =================================================================== RCS file: /cvsroot/timewarp/Doxyfile,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Doxyfile 11 Apr 2004 08:15:01 -0000 1.8 --- Doxyfile 11 Jul 2005 00:24:58 -0000 1.9 *************** *** 5,9 **** #--------------------------------------------------------------------------- PROJECT_NAME = StarControl:Timewarp ! PROJECT_NUMBER = 0.05u8 OUTPUT_DIRECTORY = ./docs/generated OUTPUT_LANGUAGE = English --- 5,9 ---- #--------------------------------------------------------------------------- PROJECT_NAME = StarControl:Timewarp ! PROJECT_NUMBER = 0.05u7 OUTPUT_DIRECTORY = ./docs/generated OUTPUT_LANGUAGE = English *************** *** 128,132 **** # configuration options related to the XML output #--------------------------------------------------------------------------- ! GENERATE_XML = NO #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output --- 128,132 ---- # configuration options related to the XML output #--------------------------------------------------------------------------- ! GENERATE_XML = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output *************** *** 161,165 **** COLLABORATION_GRAPH = YES TEMPLATE_RELATIONS = YES ! HIDE_UNDOC_RELATIONS = NO INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES --- 161,165 ---- COLLABORATION_GRAPH = YES TEMPLATE_RELATIONS = YES ! HIDE_UNDOC_RELATIONS = YES INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES Index: vankey.log =================================================================== RCS file: /cvsroot/timewarp/vankey.log,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** vankey.log 4 Oct 2003 15:13:07 -0000 1.2 --- vankey.log 11 Jul 2005 00:25:01 -0000 1.3 *************** *** 1,6 **** ! 0: PGUP/80 ! 1: PGDN/81 ! 2: SLASH_PAD/86 ! 3: TAB/64 ! 4: ASTERISK/87 ! 5: SPACE/75 --- 1,6 ---- ! 0: PGUP/80 ! 1: PGDN/81 ! 2: SLASH_PAD/86 ! 3: TAB/64 ! 4: ASTERISK/87 ! 5: SPACE/75 Index: changes.txt =================================================================== RCS file: /cvsroot/timewarp/changes.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** changes.txt 8 Jun 2003 16:07:28 -0000 1.3 --- changes.txt 11 Jul 2005 00:25:00 -0000 1.4 *************** *** 1,5 **** --- 1,15 ---- + + Star Control: TimeWarp ChangeLog + version 0.06u1 + + * new ships added, existing ships revised + * ship classification into A, B (A=good, B=not so good). + * improved AI (?) + * 8 player networking + + Pre-0.05u6 new improvements: * Improved networking lag by a factor of 2 on Windows. Index: code.txt =================================================================== RCS file: /cvsroot/timewarp/code.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** code.txt 30 Mar 2004 23:29:40 -0000 1.6 --- code.txt 11 Jul 2005 00:25:00 -0000 1.7 *************** *** 59,62 **** --- 59,69 ---- 4. All source files should have extensions of either .cpp or .h . No .c or .cc files. Exception: .c files are permitted in the util directory. + 5. The following code is incorrect + for (int i = 0; i < 100; i++) blah(); + instead, do this + int i; + for (i = 0; i < 100; i++) blah(); + Why? Because Visual C and gcc will scope i in different ways in the first + example, potentially causing issues when switching compilers. Collisions: *************** *** 111,115 **** recommended, but you can add your own events to that log. Simply call debug_log() with printf-style parameters and your stuff will be added. ! The log is written to tw_sys.log. The log is used sparingly in TW, primarily for initialization of IO stuff. --- 118,122 ---- recommended, but you can add your own events to that log. Simply call debug_log() with printf-style parameters and your stuff will be added. ! The log is written to tw_sys.log. The log is used very sparingly in TW, primarily for initialization of IO stuff. *************** *** 215,219 **** int ms = scale_frames(sc2_time); Warning: the conversion is non-linear and rather weird. ! Note: Some .ini files use milliseconds externally instead of SC2-time-units Angle: internally Radians, externally Degrees. --- 222,226 ---- int ms = scale_frames(sc2_time); Warning: the conversion is non-linear and rather weird. ! Note: Many .ini files use milliseconds externally instead of SC2-time-units Angle: internally Radians, externally Degrees. Index: version.txt =================================================================== RCS file: /cvsroot/timewarp/version.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** version.txt 11 Apr 2004 08:15:01 -0000 1.7 --- version.txt 11 Jul 2005 00:25:01 -0000 1.8 *************** *** 1,5 **** ! This is an beta version of Star Control: 0.05u9 ! 10 apr 2004 ! (visit http://timewarp.sf.net/ for latest version) --- 1,5 ---- ! This is a alpha version of Star Control: 0.06u1 ! 11 juli 2005 ! (visit http://timewarp.sourceforge.net for latest version) Index: twwin.dsp =================================================================== RCS file: /cvsroot/timewarp/twwin.dsp,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** twwin.dsp 1 Jul 2004 22:50:11 -0000 1.52 --- twwin.dsp 11 Jul 2005 00:25:01 -0000 1.53 *************** *** 44,48 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GR /GX /Zi /O1 /Op /Ob2 /I "./include" /I "./source" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "__i386__" /FR /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 --- 44,48 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /MT /W3 /GX /Zi /O1 /Op /Ob2 /I "./include" /I "./source" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "__i386__" /FR /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 *************** *** 71,75 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Op /Ob1 /I "./include" /I "./source" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "__i386__" /FR /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 --- 71,75 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Op /Ob1 /I "./include" /I "./source" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "__i386__" /FR /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 *************** *** 266,289 **** # Begin Source File - SOURCE=.\source\other\gconfig.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\other\gconfig.h - # End Source File - # Begin Source File - - SOURCE=.\source\other\gdialog.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\other\gevent.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\other\gquest.cpp - # End Source File - # Begin Source File - SOURCE=.\source\other\gup.cpp # End Source File --- 266,269 ---- *************** *** 338,357 **** # Begin Source File - SOURCE=.\source\ais\AIAction.h - # End Source File - # Begin Source File - - SOURCE=.\source\ais\AIBusterBot.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\ais\AIBusterBot.h - # End Source File - # Begin Source File - - SOURCE=.\source\ais\AIDefaultActions.h - # End Source File - # Begin Source File - SOURCE=.\source\ais\c_input.cpp # End Source File --- 318,321 ---- *************** *** 364,375 **** SOURCE=.\source\ais\c_wussie.cpp # End Source File - # Begin Source File - - SOURCE=.\source\ais\ext_ai.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\ais\ext_ai.h - # End Source File # End Group # Begin Group "Games" --- 328,331 ---- *************** *** 442,562 **** # Begin Source File ! SOURCE=.\source\games\gsolar.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\source\games\gtrug.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\source\games\ShipDocGenerator.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\source\games\ShipDocGenerator.h ! # End Source File ! # Begin Source File ! ! SOURCE=.\source\games\vanguard.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\source\games\vgGenSys.cpp ! # End Source File ! # End Group ! # Begin Group "GameX" ! ! # PROP Default_Filter "" ! # Begin Group "edit" ! ! # PROP Default_Filter "" ! # Begin Source File ! ! SOURCE=.\source\gamex\edit\disk_stuff.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\source\gamex\edit\edit_dialogue.cpp ! # End Source File ! # End Group ! # Begin Group "stuff" ! ! # PROP Default_Filter "" ! # Begin Source File ! ! SOURCE=.\source\gamex\stuff\backgr_stars.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\source\gamex\stuff\space_body.cpp ! # End Source File ! # End Group ! # Begin Group "general" ! ! # PROP Default_Filter "" ! # Begin Source File ! ! SOURCE=.\source\gamex\general\sprites.cpp ! # End Source File ! # End Group ! # Begin Source File ! ! SOURCE=.\source\gamex\ai_fleet.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\source\gamex\ai_race.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\source\gamex\gamedata.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\source\gamex\gamedata_map.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\source\gamex\gamedialogue.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\source\gamex\gamegeneral.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\source\gamex\gamehyper.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\source\gamex\gamemelee.cpp # End Source File # Begin Source File ! SOURCE=.\source\gamex\gameplanetmission.cpp # End Source File # Begin Source File ! SOURCE=.\source\gamex\gameplanetscan.cpp # End Source File # Begin Source File ! SOURCE=.\source\gamex\gameplanetview.cpp # End Source File # Begin Source File ! SOURCE=.\source\gamex\gameproject.cpp # End Source File # Begin Source File ! SOURCE=.\source\gamex\gamesolarview.cpp # End Source File # Begin Source File ! SOURCE=.\source\gamex\gamestarmap.cpp # End Source File # Begin Source File ! SOURCE=.\source\gamex\projectx.cpp # End Source File # End Group --- 398,430 ---- # Begin Source File ! SOURCE=.\source\games\gsc1arena.cpp # End Source File # Begin Source File ! SOURCE=.\source\games\gsidescroll.cpp # End Source File # Begin Source File ! SOURCE=.\source\games\gsolar.cpp # End Source File # Begin Source File ! SOURCE=.\source\games\gtrug.cpp # End Source File # Begin Source File ! SOURCE=.\source\games\ShipDocGenerator.cpp # End Source File # Begin Source File ! SOURCE=.\source\games\ShipDocGenerator.h # End Source File # Begin Source File ! SOURCE=.\source\games\vanguard.cpp # End Source File # Begin Source File ! SOURCE=.\source\games\vgGenSys.cpp # End Source File # End Group *************** *** 753,760 **** # Begin Source File - SOURCE=.\source\newships\shpalhha.cpp - # End Source File - # Begin Source File - SOURCE=.\source\newships\shparitr.cpp # End Source File --- 621,624 ---- *************** *** 957,964 **** # Begin Source File - SOURCE=.\source\newships\shpkatas.cpp - # End Source File - # Begin Source File - SOURCE=.\source\newships\shpkatpo.cpp # End Source File --- 821,824 ---- *************** *** 981,984 **** --- 841,852 ---- # Begin Source File + SOURCE=.\source\newships\shpkorsi.cpp + # End Source File + # Begin Source File + + SOURCE=.\source\newships\shpkorsn.cpp + # End Source File + # Begin Source File + SOURCE=.\source\newships\shpktesa.cpp # End Source File *************** *** 1085,1092 **** # Begin Source File - SOURCE=.\source\newships\shpsefna.cpp - # End Source File - # Begin Source File - SOURCE=.\source\newships\shpstaba.cpp # End Source File --- 953,956 ---- *************** *** 1217,1224 **** # Begin Source File - SOURCE=.\source\newships\shpwolmi.cpp - # End Source File - # Begin Source File - SOURCE=.\source\newships\shpxaaar.cpp # End Source File --- 1081,1084 ---- *************** *** 1247,1257 **** SOURCE=.\source\newships\shpyusra.cpp # End Source File - # Begin Source File - - SOURCE=.\source\newships\shpzeksh.cpp - # End Source File # End Group # End Group ! # Begin Group "TW_GUI" # PROP Default_Filter "" --- 1107,1113 ---- SOURCE=.\source\newships\shpyusra.cpp # End Source File # End Group # End Group ! # Begin Group "twgui" # PROP Default_Filter "" *************** *** 1262,1273 **** # Begin Source File - SOURCE=.\source\twgui\gametest2.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\twgui\gametest2.h - # End Source File - # Begin Source File - SOURCE=.\source\twgui\twbutton.cpp # End Source File --- 1118,1121 ---- *************** *** 1361,1680 **** # End Source File # End Group - # Begin Group "MASkinG" - - # PROP Default_Filter "" - # Begin Source File - - SOURCE=.\source\masking\accelerator.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\animator.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\bitmap.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\button.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\checkbox.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\clearscreen.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\color.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\colorsel.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\combobox.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\cursor.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\dialog.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\doublebuffer.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\drs.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\editbox.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\error.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\fileselect.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\font.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\fps.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\gldialog.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\gldriver.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\glviewport.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\groupbox.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\hypertext.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\image.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\label.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\listbox.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\masking.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\menu.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\messagebox.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\mouse.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\pageflipping.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\panel.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\point.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\progress.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\radiobutton.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\rect.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\sample.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\screenupdate.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\scrollbox.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\scroller.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\scrollobj.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\separator.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\settings.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\shortcut.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\size.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\skin.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\slider.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\spinbox.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\splitter.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\tabpanel.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\textarea.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\timer.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\tooltip.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\triplebuffer.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\wallpaper.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\widget.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\masking\window.cpp - # End Source File - # End Group - # Begin Group "AlFont" - - # PROP Default_Filter "" - # Begin Source File - - SOURCE=.\source\alfont\alfont.c - # End Source File - # End Group - # Begin Group "Interface" - - # PROP Default_Filter "" - # Begin Source File - - SOURCE=.\source\interface\GameSessionConfiguration.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\interface\GameSessionConfiguration.h - # End Source File - # Begin Source File - - SOURCE=.\source\interface\HostGameMenu.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\interface\HostGameMenu.h - # End Source File - # Begin Source File - - SOURCE=.\source\interface\Interface.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\interface\Interface.h - # End Source File - # Begin Source File - - SOURCE=.\source\interface\MainMenu.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\interface\MainMenu.h - # End Source File - # Begin Source File - - SOURCE=.\source\interface\OptionsMenu.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\interface\OptionsMenu.h - # End Source File - # Begin Source File - - SOURCE=.\source\interface\OverlayMenu.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\interface\OverlayMenu.h - # End Source File - # Begin Source File - - SOURCE=.\source\interface\PlayLocalMenu.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\interface\PlayLocalMenu.h - # End Source File - # Begin Source File - - SOURCE=.\source\interface\PlayOnlineMenu.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\interface\PlayOnlineMenu.h - # End Source File - # Begin Source File - - SOURCE=.\source\interface\SettingsPage.cpp - # End Source File - # Begin Source File - - SOURCE=.\source\interface\SettingsPage.h - # End Source File - # End Group # Begin Source File --- 1209,1212 ---- *************** *** 2152,2399 **** # PROP Default_Filter "" - # Begin Group "MASkinG No. 1" - - # PROP Default_Filter "" - # Begin Source File - - SOURCE=.\include\MASkinG\accelerator.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\animator.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\bitmap.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\button.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\checkbox.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\clearscreen.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\color.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\colorsel.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\combobox.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\cursor.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\defines.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\dialog.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\doublebuffer.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\drs.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\editbox.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\error.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\fileselect.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\font.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\fps.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\gldialog.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\gldriver.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\global.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\glviewport.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\groupbox.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\hypertext.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\image.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\label.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\listbox.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\menu.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\messagebox.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\mouse.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\pageflipping.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\panel.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\point.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\progress.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\radiobutton.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\rect.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\sample.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\screenupdate.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\scrollbox.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\scroller.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\scrollobj.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\separator.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\settings.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\shortcut.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\size.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\skin.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\slider.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\spinbox.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\splitter.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\tabpanel.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\textarea.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\timer.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\tooltip.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\triplebuffer.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\wallpaper.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\widget.h - # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG\window.h - # End Source File - # End Group - # Begin Source File - - SOURCE=.\include\alfont.h - # End Source File - # Begin Source File - - SOURCE=.\include\alfontdll.h - # End Source File # Begin Source File --- 1684,1687 ---- *************** *** 2408,2415 **** SOURCE=.\include\lualib.h # End Source File - # Begin Source File - - SOURCE=.\include\MASkinG.h - # End Source File # End Group # Begin Source File --- 1696,1699 ---- Index: fleets.ini =================================================================== RCS file: /cvsroot/timewarp/fleets.ini,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** fleets.ini 3 May 2004 21:32:45 -0000 1.84 --- fleets.ini 11 Jul 2005 00:25:00 -0000 1.85 *************** *** 1,127 **** [Player1] ! Slot0 = earcr ! Slot1 = chebr ! Slot2 = andgu ! Slot3 = ilwav ! Size = 77 ! MaxFleetCost = 500 ! Slot4 = kzedr ! Slot5 = yehte ! Slot6 = syrpe [...1460 lines suppressed...] ! Slot144 = uxjba ! Slot145 = velcr ! Slot146 = venke ! Slot147 = vezba ! Slot148 = vioge ! Slot149 = virli ! Slot150 = vuvji ! Slot151 = wassu ! Slot152 = wistr ! Slot153 = wolsw ! Slot154 = xaaar ! Slot155 = xilcr ! Slot156 = xxxas ! Slot157 = xxxma ! Slot158 = yevme ! Slot159 = yurpa ! Slot160 = yusra ! Slot161 = zeksh ! Size = 162 MaxFleetCost = 500 |
|
From: Rob <geo...@us...> - 2005-07-11 00:26:51
|
Update of /cvsroot/timewarp/ships/sc1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/ships/sc1 Modified Files: shpmmrxf.ini Log Message: big update to the final version. Index: shpmmrxf.ini =================================================================== RCS file: /cvsroot/timewarp/ships/sc1/shpmmrxf.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpmmrxf.ini 30 Dec 2003 09:30:15 -0000 1.4 --- shpmmrxf.ini 11 Jul 2005 00:25:10 -0000 1.5 *************** *** 51,54 **** --- 51,55 ---- [AI3_Default] Weapon_Range = 8 + Special_Range = 14 Special = No_Proximity *************** *** 56,63 **** Special3 = Next_State Special4 = Precedence ! Special_Timer = 100 [AI3_Default2] Weapon_Range = 60 Special_Range = 9 Weapon = Homing --- 57,65 ---- Special3 = Next_State Special4 = Precedence ! Special_Timer = 50 [AI3_Default2] Weapon_Range = 60 + Special_Range = 9 Weapon = Homing *************** *** 65,69 **** Special2 = Max_Battery Special3 = Reset_State ! Special_Timer = 100 [Names] --- 67,71 ---- Special2 = Max_Battery Special3 = Reset_State ! Special_Timer = 50 [Names] |
|
From: Rob <geo...@us...> - 2005-07-11 00:26:51
|
Update of /cvsroot/timewarp/source/other In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/source/other Modified Files: fontmorph.cpp fontmorph.h planet3d.cpp ttf.cpp ttf.h vbodies.cpp Log Message: big update to the final version. Index: vbodies.cpp =================================================================== RCS file: /cvsroot/timewarp/source/other/vbodies.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** vbodies.cpp 24 Mar 2004 23:51:44 -0000 1.12 --- vbodies.cpp 11 Jul 2005 00:25:58 -0000 1.13 *************** *** 608,612 **** // int first_frame, int num_frames, int frame_size, double depth, double scale = 1.0) ; game->add(new Animation(this, normal_pos(), ! this->explosionSprite, 0, 6, 20, DEPTH_EXPLOSIONS)); return; --- 608,612 ---- // int first_frame, int num_frames, int frame_size, double depth, double scale = 1.0) ; game->add(new Animation(this, normal_pos(), ! explosionSprite, 0, explosionSprite->frames(), 20, DEPTH_EXPLOSIONS)); return; *************** *** 1214,1218 **** void VMetalShard::animateExplosion(void) { game->add(new Animation(this, normal_pos(), ! explosionSprite, 0, 10, scale_frames(0), DEPTH_EXPLOSIONS)); return; --- 1214,1218 ---- void VMetalShard::animateExplosion(void) { game->add(new Animation(this, normal_pos(), ! explosionSprite, 0, explosionSprite->frames(), scale_frames(0), DEPTH_EXPLOSIONS)); return; *************** *** 1292,1296 **** void VMetalAsteroid::animateExplosion(void) { game->add(new Animation(this, normal_pos(), ! explosionSprite, 0, 10, scale_frames(0), DEPTH_EXPLOSIONS)); return; --- 1292,1296 ---- void VMetalAsteroid::animateExplosion(void) { game->add(new Animation(this, normal_pos(), ! explosionSprite, 0, explosionSprite->frames(), scale_frames(0), DEPTH_EXPLOSIONS)); return; *************** *** 1339,1343 **** this->set_sprite(mySprite); armour = VSmallAsteroid::myArmour; ! damage_factor = VSmallAsteroid::damage_factor; explosionSprite = meleedata.sparkSprite; mass = VSmallAsteroid::mass; --- 1339,1343 ---- this->set_sprite(mySprite); armour = VSmallAsteroid::myArmour; ! damage_factor = VSmallAsteroid::myDamage; explosionSprite = meleedata.sparkSprite; mass = VSmallAsteroid::mass; *************** *** 1396,1400 **** void VSmallAsteroid::animateExplosion(void) { game->add(new Animation(this, normal_pos(), ! explosionSprite, 0, 10, scale_frames(0), DEPTH_EXPLOSIONS)); return; --- 1396,1400 ---- void VSmallAsteroid::animateExplosion(void) { game->add(new Animation(this, normal_pos(), ! explosionSprite, 0, explosionSprite->frames(), scale_frames(0), DEPTH_EXPLOSIONS)); return; *************** *** 1467,1472 **** void VLargeAsteroid::animateExplosion(void) { game->add(new Animation(this, normal_pos(), ! explosionSprite, 0, 10, ! scale_frames(0), DEPTH_EXPLOSIONS)); return; --- 1467,1472 ---- void VLargeAsteroid::animateExplosion(void) { game->add(new Animation(this, normal_pos(), ! explosionSprite, 0, explosionSprite->frames(), ! scale_frames(0), DEPTH_EXPLOSIONS)); return; Index: fontmorph.cpp =================================================================== RCS file: /cvsroot/timewarp/source/other/fontmorph.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** fontmorph.cpp 24 Mar 2004 23:51:43 -0000 1.3 --- fontmorph.cpp 11 Jul 2005 00:25:58 -0000 1.4 *************** *** 1,3 **** ! /* $Id$ */ #include "fontmorph.h" --- 1,8 ---- ! /* ! This file is part of project TWX, homepage http://twx.sourceforge.net/ ! ! This program is distributed under the GNU General Public License as ! published by the Free Software Foundation. ! */ #include "fontmorph.h" *************** *** 67,71 **** { ! font_upgrade_to_color(f); int c; --- 72,78 ---- { ! //font_upgrade_to_color(f); ! // hmm, well ... it's best if it's left at the discretion of the ! // user, to use this properly !! int c; *************** *** 105,110 **** int k; ! if (totcol > 0 && totcol < (2*H+1)*(2*H+1)) ! k = 15; else k = 255; --- 112,117 ---- int k; ! if (totcol > 0)// && totcol < (2*H+1)*(2*H+1)) ! k = makecol8(155,155,155);//15; else k = 255; Index: ttf.cpp =================================================================== RCS file: /cvsroot/timewarp/source/other/ttf.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ttf.cpp 10 Apr 2004 20:51:06 -0000 1.6 --- ttf.cpp 11 Jul 2005 00:25:58 -0000 1.7 *************** *** 1,13 **** ! /* $Id$ */ #include <allegro.h> #include "allegro/internal/aintern.h" #include <ft2build.h> //required by freetype2 headers ! #include FT_FREETYPE_H //required by freetype2 headers #include "freetype/freetype.h" #include "ttf.h" ! #include "util/round.h" // copy ttf bitmap onto an allegro bitmap --- 1,20 ---- ! /* ! This file is part of project TWX, homepage http://twx.sourceforge.net/ ! ! This program is distributed under the GNU General Public License as ! published by the Free Software Foundation. ! */ #include <allegro.h> #include "allegro/internal/aintern.h" #include <ft2build.h> //required by freetype2 headers ! //#include FT_FREETYPE_H //required by freetype2 headers #include "freetype/freetype.h" #include "ttf.h" ! //#include "../math/round.h" ! ! #include "../scp.h" // copy ttf bitmap onto an allegro bitmap *************** *** 31,38 **** { unsigned char v; - v = p[ix >> 8]; - unsigned char mask; ! mask = 1 << (ix & 0x0F); if (v & mask) --- 38,48 ---- { unsigned char v; unsigned char mask; ! ! //v = p[ix >> 8]; ! //mask = 1 << (ix & 0x0F); ! ! v = p[ix/8]; ! mask = 1 << (7 + 8*(ix/8) - ix); if (v & mask) *************** *** 53,58 **** //if (v != 0) ! if (v > 128) // discard too transparent pixels (disregard anti-aliasing...) ! putpixel(dest, ix+dx, iy+dy, 255); } } --- 63,68 ---- //if (v != 0) ! //if (v > 64) // discard too transparent pixels (disregard anti-aliasing...) ! putpixel(dest, ix+dx, iy+dy, v); } } *************** *** 78,82 **** // for debugging (copied from allegro) ! void color_destroy_font(FONT* f) { FONT_COLOR_DATA* cf; --- 88,92 ---- // for debugging (copied from allegro) ! static void color_destroy_font(FONT* f) { FONT_COLOR_DATA* cf; *************** *** 90,94 **** int i = 0; ! for(i = cf->begin; i < cf->end; i++) destroy_bitmap(cf->bitmaps[i - cf->begin]); free(cf->bitmaps); --- 100,105 ---- int i = 0; ! for(i = cf->begin; i < cf->end; i++) ! destroy_bmp(&cf->bitmaps[i - cf->begin]); free(cf->bitmaps); *************** *** 98,106 **** } free(f); } ! FONT* load_ttf_font (const char* filename, const int points, const int smooth) { --- 109,123 ---- } + delete f->vtable; + free(f); } ! ! ! ! FONT* load_ttf_font (const char* filename, const int points, const int smooth, ! double linespacing) { *************** *** 162,181 **** int c; - AL_CONST int num = end - begin; // NOTE: static void color_destroy(FONT* f) destroys bitmaps >=begin, <end - struct FONT *f; - struct FONT_COLOR_DATA *fcd; // Allocate and setup the Allegro font // (copied from allegttf) ! f = (struct FONT*) calloc(1,sizeof(struct FONT)); fcd = (struct FONT_COLOR_DATA*) calloc(1,sizeof(struct FONT_COLOR_DATA)); fcd->begin = begin; fcd->end = end; fcd->bitmaps = (BITMAP**) calloc(num,sizeof(BITMAP*)); fcd->next = NULL; f->data = (void*)fcd; ! f->vtable = font_vtable_color; //f->vtable->destroy = &color_destroy_font; --- 179,202 ---- int c; // NOTE: static void color_destroy(FONT* f) destroys bitmaps >=begin, <end // Allocate and setup the Allegro font // (copied from allegttf) ! struct FONT_COLOR_DATA *fcd; fcd = (struct FONT_COLOR_DATA*) calloc(1,sizeof(struct FONT_COLOR_DATA)); fcd->begin = begin; fcd->end = end; + int num = end - begin; fcd->bitmaps = (BITMAP**) calloc(num,sizeof(BITMAP*)); fcd->next = NULL; + + struct FONT *f; + f = (struct FONT*) calloc(1,sizeof(struct FONT)); f->data = (void*)fcd; ! ! f->vtable = new FONT_VTABLE; ! *f->vtable = *font_vtable_color; ! f->vtable->render = color_render_props; //f->vtable->destroy = &color_destroy_font; *************** *** 193,199 **** int ymin, ymax, yorigin; ! ymin = face->bbox.yMin; // the bounding box for all chars in this font. ! ymax = face->bbox.yMax; // this actually defines the origin position... ! yorigin = iround(points_h * double(ymax) / double(ymax - ymin)); //char c; --- 214,237 ---- int ymin, ymax, yorigin; ! ymin = face->descender; // the bounding box for all chars in this font. ! ymax = face->ascender; // this actually defines the origin position... ! //yorigin = iround(points_h * double(ymax) / double(ymax - ymin)); ! // measured from the top. ! ! // the "real" height is this ... each char would fit in a box of the pixel ! // size, but there's also the line spacing, and some vertical offset to take ! // into account. This creates a higher vertical value... ! double hmax = ymax - ymin; ! yorigin = points_h; // so that a capital aligns at the top? ! ! //points_h = iround(points_h * double(hmax + face->height) / hmax); ! // well ... the default line spacing in the ttf files isn't that great. Better ! // define you own spacing. ! ! // best thing is ... include some spacing: ! points_h = iround(points_h * linespacing); ! ! // override, test this: ! yorigin = points_h * ymax/hmax; // so that a capital aligns at the top? //char c; *************** *** 202,206 **** // load glyph image into the slot (erase previous one) ! error = FT_Load_Char( face, c, FT_LOAD_RENDER ); if (error) continue; --- 240,244 ---- // load glyph image into the slot (erase previous one) ! error = FT_Load_Char( face, c, FT_LOAD_RENDER);// | FT_LOAD_TARGET_MONO | FT_LOAD_NO_AUTOHINT ); if (error) continue; *************** *** 217,222 **** --- 255,267 ---- int dx, dy; + /* Note that bitmap_left is the horizontal distance from the + current pen position to the leftmost border of the glyph bitmap, + while bitmap_top is the vertical distance from the pen position + (on the baseline) to the topmost border of the glyph bitmap. + It is positive to indicate an upwards distance. */ dx = slot->bitmap_left; dy = yorigin - slot->bitmap_top; + //dy = 0; + //dy = points_h - slot->bitmap_top; BITMAP *bmp = 0; *************** *** 240,299 **** return f; ! } ! ! ! FONT* load_font_test (const int points) { ! int w, h, begin, end; ! begin = 32; // space character ! end = 128; // ? ! w = points; ! h = points; - int c; - - AL_CONST int num = end - begin; - // NOTE: static void color_destroy(FONT* f) destroys bitmaps >=begin, <end - - struct FONT *f; - struct FONT_COLOR_DATA *fcd; - - // Allocate and setup the Allegro font - // (copied from allegttf) - f = (struct FONT*) calloc(1,sizeof(struct FONT)); - fcd = (struct FONT_COLOR_DATA*) calloc(1,sizeof(struct FONT_COLOR_DATA)); - fcd->begin = begin; - fcd->end = end; - fcd->bitmaps = (BITMAP**) calloc(num,sizeof(BITMAP*)); - fcd->next = NULL; - f->data = (void*)fcd; - f->vtable = font_vtable_color; - - // f->vtable->destroy = &color_destroy_font; - // STRANGE, this is needed to avoid a crash ?!?! - // WHY ??? - ! //char c; ! for ( c = begin; c < end; ++c ) // not <= end !! ! { ! BITMAP *bmp = 0; ! bmp = create_bitmap_ex(8, w, h); ! clear_to_color(bmp, 0); ! ! fcd->bitmaps[c-begin] = bmp; } ! ! // set the font height ! f->height = h; ! ! return f; ! } ! ! --- 285,462 ---- return f; ! } + static int target_red = 0; + static int target_green = 0; + static int target_blue = 0; ! void set_text_color(int red, int green, int blue) { ! target_red = red; ! target_green = green; ! target_blue = blue; ! } ! void draw_transparent(BITMAP *dest, BITMAP *src, int x, int y) ! { ! if (bitmap_color_depth(dest) != 32) ! return; ! if (bitmap_color_depth(src) != 8) ! return; ! ! // if the char. is offscreen, don't draw it. ! if (x >= dest->w || y >= dest->h || x+src->w < 0 || y+src->h < 0) ! return; ! ! int k = 0; ! int ix, iy; ! for ( iy = 0; iy < src->h; ++iy ) ! { ! for ( ix = 0; ix < src->w; ++ix ) ! { ! int v; ! v = getpixel(src, ix, iy); ! ! if (v) ! { ! // this is the transparency value ! int v_inv; ! v_inv = 256 - v; ! ! // target color: ! // int target_red, target_green, target_blue; ! // target_red = 200; ! // target_green = 100; ! // target_blue = 50; ! ! int w, destx, desty; ! destx = x + ix; ! desty = y + iy; ! ! w = getpixel(dest, destx, desty); ! ! int wr, wg, wb; ! wr = getr32(w); ! wg = getg32(w); ! wb = getb32(w); ! ! int cr, cg, cb; ! cr = ((v_inv * wr) + (v * target_red )) >> 8; ! cg = ((v_inv * wg) + (v * target_green)) >> 8; ! cb = ((v_inv * wb) + (v * target_blue )) >> 8; ! ! putpixel(dest, x+ix, y+iy, makecol32(cr, cg, cb)); ! } ! ! ++k; ! } } + } ! /* color_render_char: ! * (color vtable entry) ! * Renders a color character onto a bitmap, at the specified location, using ! * the specified colors. If fg == -1, render as color, else render as ! * mono; if bg == -1, render as transparent, else render as opaque. ! * Returns the character width, in pixels. ! */ ! ! static int color_render_char_props(AL_CONST FONT* f, int ch, int fg, int bg, BITMAP* bmp, int x, int y, int property) ! { ! int w = 0; ! BITMAP *g = 0; ! ! int old_textmode = _textmode; ! _textmode = bg; ! ! acquire_bitmap(bmp); ! ! if (property & 1) ! { ! rectfill(bmp, x, y, x + f->vtable->char_length(f, ch) - 1, y + f->vtable->font_height(f) - 1, bg); ! } ! ! g = _color_find_glyph(f, ch); ! if(g) { ! ! if (!property & 1) ! { ! //bmp->vtable->draw_256_sprite(bmp, g, x, y); ! draw_transparent(bmp, g, x, y); ! } else { ! bmp->vtable->draw_character(bmp, g, x, y, fg); ! } ! ! w = g->w; ! } ! ! release_bitmap(bmp); ! _textmode = old_textmode; ! ! return w; ! } ! ! ! ! ! static char *color_props = 0; ! // properties (one for each character): ! // 0x01: bit unset: transparent, bit set:with black background ! char color_props_default[256]; ! ! void reset_color_props() ! { ! int i; ! for ( i = 0; i < 256; ++i ) ! color_props_default[i] = 0; ! color_props = color_props_default; ! } ! ! void set_color_props(char *newprops) ! { ! color_props = newprops; ! } ! ! ! /* color_render: ! * (color vtable entry) ! * Renders a color font onto a bitmap, at the specified location, using ! * the specified colors. If fg == -1, render as color, else render as ! * mono; if bg == -1, render as transparent, else render as opaque. ! */ ! static void color_render_props(AL_CONST FONT* f, AL_CONST char* text, int fg, int bg, BITMAP* bmp, int x, int y) ! { ! if (!color_props) ! { ! font_vtable_color->render(f, text, fg, bg, bmp, x, y); ! return; ! } ! ! int i; ! ! AL_CONST char* p = text; ! int ch = 0; ! ! int old_textmode = _textmode; ! _textmode = bg; ! ! acquire_bitmap(bmp); ! ! if(fg < 0 && bg >= 0) { ! rectfill(bmp, x, y, x + text_length(f, text) - 1, y + text_height(f) - 1, bg); ! bg = -1; /* to avoid filling rectangles for each character */ ! } ! ! i = 0; ! while( (ch = ugetxc(&p)) ) { ! x += color_render_char_props(f, ch, fg, bg, bmp, x, y, color_props[i]); ! ++i; ! } ! ! release_bitmap(bmp); ! _textmode = old_textmode; ! } Index: fontmorph.h =================================================================== RCS file: /cvsroot/timewarp/source/other/fontmorph.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fontmorph.h 24 Mar 2004 23:51:43 -0000 1.2 --- fontmorph.h 11 Jul 2005 00:25:58 -0000 1.3 *************** *** 1,3 **** ! /* $Id$ */ #ifndef __FONT_MORPH__ #define __FONT_MORPH__ --- 1,8 ---- ! /* ! This file is part of project TWX, homepage http://twx.sourceforge.net/ ! ! This program is distributed under the GNU General Public License as ! published by the Free Software Foundation. ! */ #ifndef __FONT_MORPH__ #define __FONT_MORPH__ Index: ttf.h =================================================================== RCS file: /cvsroot/timewarp/source/other/ttf.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ttf.h 26 Mar 2004 16:55:43 -0000 1.3 --- ttf.h 11 Jul 2005 00:25:58 -0000 1.4 *************** *** 1,12 **** ! /* $Id$ */ #ifndef __FONT_TTF__ #define __FONT_TTF__ ! FONT* load_ttf_font (const char* filename, const int points, const int smooth); FONT* load_font_test (const int points); void color_destroy_font(FONT* f); #endif --- 1,29 ---- ! /* ! This file is part of project TWX, homepage http://twx.sourceforge.net/ + This program is distributed under the GNU General Public License as + published by the Free Software Foundation. + */ + + /** @file fonts */ #ifndef __FONT_TTF__ #define __FONT_TTF__ ! /** set the drawing color */ ! void set_text_color(int red, int green, int blue); ! ! /** load a true type font */ ! FONT* load_ttf_font (const char* filename, const int points, const int smooth, double linespacing); FONT* load_font_test (const int points); void color_destroy_font(FONT* f); + + void color_render_props(AL_CONST FONT* f, AL_CONST char* text, int fg, int bg, BITMAP* bmp, int x, int y); + void reset_color_props(); + + /** properties for drawing: bit 1, unset=transparent, set=direct against background square */ + void set_color_props(char *newprops); + #endif Index: planet3d.cpp =================================================================== RCS file: /cvsroot/timewarp/source/other/planet3d.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** planet3d.cpp 24 Mar 2004 23:51:43 -0000 1.19 --- planet3d.cpp 11 Jul 2005 00:25:58 -0000 1.20 *************** *** 21,24 **** --- 21,25 ---- #include "planet3d.h" + #include "../melee/mlog.h" *************** *** 128,132 **** // PlanetDimension = 3 ; 2 = standard 2d sprite, 3 = Tau's 3D planet idea. ! game->log_file ("server.ini"); --- 129,133 ---- // PlanetDimension = 3 ; 2 = standard 2d sprite, 3 = Tau's 3D planet idea. ! set_config_file ("server.ini"); *************** *** 135,138 **** --- 136,144 ---- PlanetUsespec = get_config_int("Planet", "PlanetUsespec", 1); + // this is necessary: cause the planets have different sizes. + share(-1, &planetD); + share_update(); + + // check if the 3D data file exists if (!exists("planet3d.dat")) |
Update of /cvsroot/timewarp/source/melee In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/source/melee Modified Files: manim.cpp mcbodies.cpp mcbodies.h mcontrol.cpp mcontrol.h mframe.cpp mframe.h mgame.cpp mgame.h mhelpers.cpp mitems.cpp mlog.cpp mlog.h mmain.cpp mmain.h mnet1.cpp mnet1.h moptions.cpp mship.cpp mship.h mshot.cpp msprite.cpp mview.cpp mview.h Log Message: big update to the final version. Index: mcontrol.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mcontrol.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mcontrol.h 24 Mar 2004 23:51:37 -0000 1.11 --- mcontrol.h 11 Jul 2005 00:25:28 -0000 1.12 *************** *** 11,15 **** Control *getController(const char *type, const char *name, int channel); ! class Control : public Presence { public: --- 11,17 ---- Control *getController(const char *type, const char *name, int channel); ! /** control class */ ! class Control : public Presence ! { public: *************** *** 36,43 **** /*! \brief always-random selection, for the always-random button on the default ship selector */ int always_random; public: /*! \brief handles camera focusing on a controls ship */ virtual SpaceLocation *get_focus(); ! int rand(); /*! \brief loads configuration data from a ini file. \example player1.load("scp.ini", "Keyboard1"); */ --- 38,49 ---- /*! \brief always-random selection, for the always-random button on the default ship selector */ int always_random; + /** auto-update: if true, the control will update each frame. If false, it won't update (namely, + place a call to think()), then this has to be done externally ; this allows one to synch networks. + This is only needed (and in fact, compulsory), for human (ie. networked), players */ + bool auto_update; public: /*! \brief handles camera focusing on a controls ship */ virtual SpaceLocation *get_focus(); ! // int rand(); /*! \brief loads configuration data from a ini file. \example player1.load("scp.ini", "Keyboard1"); */ *************** *** 52,56 **** /*! \brief called every frame of physics */ virtual void calculate(); ! /*! \brief called by calculate... this is where the important stuff goes */ virtual int think(); /*! \brief returns the name of the control type, like "Joystick" */ --- 58,63 ---- /*! \brief called every frame of physics */ virtual void calculate(); ! /*! \brief called by calculate... this is where the important stuff goes. But only if ! the auto_update is true*/ virtual int think(); /*! \brief returns the name of the control type, like "Joystick" */ *************** *** 77,81 **** virtual void _event ( Event *e ); ! virtual void gen_buffered_data(); }; --- 84,88 ---- virtual void _event ( Event *e ); ! // virtual void gen_buffered_data(); }; Index: mframe.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mframe.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** mframe.h 3 May 2004 21:32:46 -0000 1.22 --- mframe.h 11 Jul 2005 00:25:28 -0000 1.23 *************** *** 5,8 **** --- 5,9 ---- #include "melee.h" + //debuging purposes only: extern int total_presences; *************** *** 20,24 **** class Planet; class Presence; ! class ExternalAI; /* --- 21,25 ---- class Planet; class Presence; ! //class ExternalAI; /* *************** *** 168,172 **** // moved ROB - from mgame to here. ! bool friendly_fire; double shot_relativity; --- 169,173 ---- // moved ROB - from mgame to here. ! int friendly_fire; double shot_relativity; *************** *** 224,231 **** --- 225,236 ---- }; + #define IDENTITY(x) virtual const char *get_identity(){return #x;}; + class SpaceLocation : public Presence { // base class for all items in game friend class Physics; friend struct Query; + public: + IDENTITY(SpaceLocation); protected: public: //aught to be protected, but we're lazy Vector2 pos; *************** *** 253,256 **** --- 258,264 ---- Ship *ship; // the ship it's associated with + SpaceLocation *parent; // hmm, this is better: you should not reference a Ship inside a SpaceLocation... but well, too much work to change? + // usually, parent==ship, at least, if it's spawned by a ship... + ShipData *data; // the data module it depends upon SpaceObject *target; // it's target, if it has one *************** *** 342,346 **** double mass; //mass of object bool isblockingweapons; // this object blocks weaponry (shots) ! ExternalAI * ext_ai; // AI of the object protected: SpaceSprite *sprite; //the pictures that this object looks like --- 350,354 ---- double mass; //mass of object bool isblockingweapons; // this object blocks weaponry (shots) ! // ExternalAI * ext_ai; // AI of the object protected: SpaceSprite *sprite; //the pictures that this object looks like *************** *** 368,373 **** virtual void set_sprite ( SpaceSprite *sprite ); ! virtual void install_external_ai(const char* script); ! virtual void destroy_external_ai(); }; --- 376,381 ---- virtual void set_sprite ( SpaceSprite *sprite ); ! // virtual void install_external_ai(const char* script); ! // virtual void destroy_external_ai(); }; Index: mship.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mship.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** mship.h 24 Mar 2004 23:51:38 -0000 1.21 --- mship.h 11 Jul 2005 00:25:28 -0000 1.22 *************** *** 62,68 **** }; ! class Ship : public SpaceObject { ! protected: int hotspot_frame; --- 62,85 ---- }; + // allow other ships to affect control over your ship ?! + class OverrideControl + { + public: + static void add(Ship *s, OverrideControl *newcontrol); + static void del(Ship *s, OverrideControl *oldcontrol); ! OverrideControl *next; ! ! virtual void calculate(short *key) = 0; ! }; ! ! /** ship class */ ! class Ship : public SpaceObject ! { ! ! public: ! OverrideControl *first_override_control, *last_override_control; ! ! protected: int hotspot_frame; *************** *** 167,170 **** --- 184,194 ---- virtual void animate(Frame *frame); virtual void animate_predict(Frame *frame, int time); + + virtual void set_target(SpaceObject *o); + + /** set new external control option */ + virtual void set_override_control(OverrideControl *newcontrol); + /** remove external control option */ + virtual void del_override_control(OverrideControl *delthiscontrol); }; Index: mmain.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mmain.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** mmain.cpp 26 Mar 2004 16:53:59 -0000 1.38 --- mmain.cpp 11 Jul 2005 00:25:28 -0000 1.39 *************** *** 30,38 **** ! PlayerInformation *NormalGame::new_player() { return new NPI(); } /*void Game::player_said(int who, const char *what) { --- 30,39 ---- ! /* PlayerInformation *NormalGame::new_player() { return new NPI(); } + */ /*void Game::player_said(int who, const char *what) { *************** *** 41,47 **** --- 42,50 ---- return; }*/ + /* int NormalGame::add_player (int num, Control *c, int team_index, const char *name, const char *fleet_section, const char *fleet_file) { + STACKTRACE; *************** *** 71,74 **** --- 74,78 ---- strdup(p->name); + if (team_index >= team_table_size) { int i = team_table_size; *************** *** 82,86 **** if (team_index) p->team = team_table[team_index]; ! else p->team = new_team(); char sect[40]; --- 86,91 ---- if (team_index) p->team = team_table[team_index]; ! else ! p->team = new_team(); char sect[40]; *************** *** 122,125 **** --- 127,131 ---- return num; } + */ void NormalGame::init_objects() *************** *** 140,148 **** --- 146,243 ---- } + + void share_fleet(int iplayer) + { + STACKTRACE; + + NPI *p = player[iplayer]; + + if (!p) + tw_error("Share fleet failed: player does not exist"); + + + int N; + char buffer[16384]; + + // if you're the local player, + // or this computer has the host and needs to send bots. + // ( host is always player 0: there is only 1 active player who's host) + if ( p->islocal() || (hostcomputer() && iplayer >= num_network) ) + { + void *tmpdata = p->fleet->serialize(&N); + + if (N > 16000) {tw_error("fleet data exceed limit");} + memcpy(buffer, tmpdata, N); + free(tmpdata); + + } + + int k; + if (iplayer >= num_network) + k = -1; // uses the init channel + else + k = iplayer; // uses the player network channel + + share_array(k, buffer, &N); + + + p->fleet->reset(); + p->fleet->deserialize(buffer, N); + } + + void NormalGame::init_players() { STACKTRACE; + Game::init_players(); + + // for any NormalGame: initialize the fleets from file. + // at least, your local fleet !! And the computer fleet(s) also + + int i; + int count_local = 0; + + for ( i = 0; i < num_network; ++i ) + { + // for each player, load the first defined fleet (player1). + char sect[40]; + + if (player[i]->islocal()) + { + sprintf(sect, "Player%d", count_local+1); // load the player fleet (in case of single-player) + ++count_local; + } else { + sprintf(sect, "Player%d", 1); // load fleet 1 + } + + if ( player[i]->islocal() ) + { + player[i]->fleet->load("fleets.ini", sect); + } + + share_fleet(i); + + } + + // and then the bots .. + + for ( i = num_network; i < num_players; ++i ) + { + char sect[40]; + sprintf(sect, "Player%d", i-num_network + 2); // start with the fleet of player 2 + + if ( hostcomputer() ) + { + player[i]->fleet->load("fleets.ini", sect); + } + + share_fleet(i); + } + + } + + /* switch (glog->type) { *************** *** 257,269 **** - /* - // give overview about the players? - message.print(1500, 14, "local channel = [%i]", channel_local()); - for (j = 0; j < num_network; j += 1) - { - message.print(1500, 14, "[%s] [%s] [%i]", player_name[j], player_control[j]->getTypeName(), player_control[j]->channel); - message.animate(0); - } - */ // adding bots --- 352,355 ---- *************** *** 296,299 **** --- 382,386 ---- return; } + */ void NormalGame::set_resolution(int screen_x, int screen_y) { *************** *** 346,353 **** --- 433,443 ---- set_config_string (NULL, "Ignorethis", ""); + /* was moved to Game::init log_debug("normalgame::init init players\n"); if (!glog->playback) init_players(); + */ + /* log_debug("normalgame::init sharing tmp.ini\n"); log_file("tmp.ini"); *************** *** 376,379 **** --- 466,470 ---- } } + */ log_debug("normalgame::init prepare\n"); *************** *** 513,516 **** --- 604,610 ---- NPI* p = (NPI*)player[i]; + if (!p) + continue; + Fleet *fleet = p->fleet; switch (glog->type) { *************** *** 549,552 **** --- 643,647 ---- } break; + /* case KEY_F9: { if (glog->type != Log::log_normal) return false; *************** *** 556,559 **** --- 651,655 ---- } break; + */ //don't use hardwired normal keys case KEY_H: *************** *** 654,658 **** message.animate(0); int k; ! if (p_local != 0) log_int(k, channel_server); // wait for server data } --- 750,754 ---- message.animate(0); int k; ! if (!hostcomputer()) log_int(k, channel_server); // wait for server data } *************** *** 663,667 **** message.animate(0); int k; ! if (p_local == 0) log_int(k, channel_server); // generate server data } --- 759,763 ---- message.animate(0); int k; ! if (hostcomputer()) log_int(k, channel_server); // generate server data } *************** *** 860,864 **** } ! //if (p_local == 0) readkey(); } --- 956,960 ---- } ! //if (hostcomputer()) readkey(); } *************** *** 892,896 **** for (i = 0; i < num_players; i += 1) { ! NPI* p = (NPI*)player[i]; slot[i] = -2; --- 988,995 ---- for (i = 0; i < num_players; i += 1) { ! NPI* p = player[i]; ! ! if (!p) ! continue; slot[i] = -2; *************** *** 946,949 **** --- 1045,1051 ---- NPI* p = (NPI*)player[i]; + if (!p) + continue; + if (slot[i] == -2) continue; sprintf (tmp, "Player%d", i+1); *************** *** 1066,1069 **** --- 1168,1175 ---- { NPI* p = (NPI*)player[i]; + + if (!p) + tw_error("Checking live state of a player who does not exist."); + return (p->control->ship || p->fleet->getSize() > 0); } *************** *** 1076,1079 **** --- 1182,1188 ---- for ( i = 0; i < num_players; ++i ) { + if (!player[i]) + continue; + if (player_isalive(i)) ++ numalive; *************** *** 1091,1096 **** --- 1200,1210 ---- int i; for ( i = 0; i < num_players; ++i ) + { + if (!player[i]) + continue; + if (is_local(player[i]->channel)) return i; + } return -1; } *************** *** 1116,1123 **** for ( k = 0; k < num_players; ++k ) { // zero indicates an invalid choice (note that valid choices as 1 and 2 --> see the tw_alert menu below int ichoice = 0; ! if (is_local(player[k]->channel)) { // note, that a "local" player can also be an AI ship, but that doesn't matter, --- 1230,1239 ---- for ( k = 0; k < num_players; ++k ) { + if (!player[k]) + continue; // zero indicates an invalid choice (note that valid choices as 1 and 2 --> see the tw_alert menu below int ichoice = 0; ! if (player[k]->islocal())//is_local(player[k]->channel)) { // note, that a "local" player can also be an AI ship, but that doesn't matter, *************** *** 1160,1163 **** --- 1276,1282 ---- for ( i = 0; i < num_players; ++i ) { + if (!player[i]) + continue; + if (!choices[i]) tw_error("an invalid choice was encountered at end of the game"); *************** *** 1192,1195 **** --- 1311,1317 ---- NPI* p = (NPI*)player[i]; + if (!p) + continue; + // first, kill remaining ship(s) if (p->control->ship) Index: mitems.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mitems.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mitems.cpp 24 Mar 2004 23:51:38 -0000 1.8 --- mitems.cpp 11 Jul 2005 00:25:28 -0000 1.9 *************** *** 57,62 **** H -= 1; // for plotting, pixel 0 also counts ! if (ix > space->surface->w) return; ! if (iy > space->surface->h) return; if (ix+len < 0) return; if (iy+H < 0) return; --- 57,62 ---- H -= 1; // for plotting, pixel 0 also counts ! if (ix >= space->surface->w) return; ! if (iy >= space->surface->h) return; if (ix+len < 0) return; if (iy+H < 0) return; *************** *** 66,70 **** rectfill(space->surface, ix+d, iy, ix+len, iy+(int)H, col2); ! space->add_box(ix, iy, ix+len, iy+H); } --- 66,83 ---- rectfill(space->surface, ix+d, iy, ix+len, iy+(int)H, col2); ! //space->add_box(ix, iy, ix+len, iy+H); ! ! if(H<5) ! { ! for(int i = 0; i<=H;i++) ! { ! space->add_line(ix, iy+i, ix+len, iy+i); ! } ! } ! else ! { ! space->add_box(ix, iy, ix+len, iy+H); ! } ! } Index: msprite.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/msprite.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** msprite.cpp 26 Mar 2004 16:55:07 -0000 1.18 --- msprite.cpp 11 Jul 2005 00:25:28 -0000 1.19 *************** *** 1514,1515 **** --- 1514,1576 ---- return(FALSE); } + + + + + + BITMAP *create_video_bmp(int w, int h) + { + BITMAP *bmp; + bmp = create_video_bitmap(w, h); + + if (!bmp) + { + bmp = create_bitmap(w, h); + } + + return bmp; + } + + void destroy_video_bmp(BITMAP *bmp) + { + if (!bmp) + return; + + // allegro function + destroy_bitmap(bmp); + } + + void destroy_bmp(BITMAP **bmp) + { + if (!*bmp) + return; + + if (is_video_bitmap(*bmp)) + destroy_video_bmp(*bmp); + else + // allegro function + destroy_bitmap(*bmp); + *bmp = 0; + } + + + void destroy_rle(RLE_SPRITE **bmp) + { + if (!*bmp) + return; + + // allegro function + destroy_rle_sprite(*bmp); + *bmp = 0; + } + + + void destroy_sprite(SpaceSprite **sprite) + { + if (!*sprite) + return; + + delete *sprite; + + *sprite = 0; + } Index: mshot.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mshot.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** mshot.cpp 24 Mar 2004 23:51:38 -0000 1.16 --- mshot.cpp 11 Jul 2005 00:25:28 -0000 1.17 *************** *** 49,53 **** SpaceObject::calculate(); ! if (!(ship && ship->exists())) { state = 0; --- 49,53 ---- SpaceObject::calculate(); ! if (!( (parent && parent->exists()) || (ship && ship->exists()) )) { state = 0; Index: manim.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/manim.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** manim.cpp 24 Mar 2004 23:51:37 -0000 1.10 --- manim.cpp 11 Jul 2005 00:25:13 -0000 1.11 *************** *** 13,28 **** SpaceSprite *osprite, int first_frame, int num_frames, int frame_length, double depth, double _scale) ! : ! SpaceObject(creator, opos, 0.0, osprite), ! frame_count(num_frames), ! frame_size(frame_length), ! frame_step(frame_length), ! scale(_scale), ! transparency(0) ! {STACKTRACE if (frame_size <= 0) { ! tw_error("Animation::Animation - frame_size == %d", frame_size); frame_size = 1; } sprite_index = first_frame; layer = LAYER_HOTSPOTS; --- 13,37 ---- SpaceSprite *osprite, int first_frame, int num_frames, int frame_length, double depth, double _scale) ! : ! SpaceObject(creator, opos, 0.0, osprite), ! frame_count(num_frames), ! frame_size(frame_length), ! frame_step(frame_length), ! scale(_scale), ! transparency(0) ! { ! STACKTRACE; if (frame_size <= 0) { ! tw_error("Animation::Animation - frame_size == %d in %s", frame_size, get_identity()); frame_size = 1; } + + if (first_frame < 0 || first_frame >= sprite->frames() || first_frame + num_frames > sprite->frames()) + { + // debug info... + SpaceLocation *l = ship; + int N = sprite->frames(); + tw_error("Animation: frame count error in %s.", get_identity()); + } sprite_index = first_frame; layer = LAYER_HOTSPOTS; Index: mlog.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mlog.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mlog.h 24 Mar 2004 23:51:38 -0000 1.10 --- mlog.h 11 Jul 2005 00:25:28 -0000 1.11 *************** *** 33,36 **** --- 33,37 ---- extern int channel_current; + extern int event_player_current; int log_size_ch(int channel); *************** *** 96,99 **** --- 97,102 ---- virtual void reset(); + virtual void clear(); + virtual void use_idle(int time); // is called in the games idle() function *************** *** 123,127 **** --- 126,136 ---- void share(int netnum, char *value, int num = 1); void share(int player, double *value, int num = 1); + void share_string(char *str); + void share_string(int netnum, char *str); void share_update(); + void share_array(int netnum, char *buffer, int *N); + + void reset_share(); + int get_share_num(); /** \brief Helper to synch random numbers between networked computers - this is Index: moptions.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/moptions.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** moptions.cpp 24 Mar 2004 23:51:38 -0000 1.16 --- moptions.cpp 11 Jul 2005 00:25:28 -0000 1.17 *************** *** 425,428 **** --- 425,431 ---- OPTIONS_DIALOG_HIDE_CLOAKERS, OPTIONS_DIALOG_3DPLANET, + OPTIONS_DIALOG_SYNCLAG, + OPTIONS_DIALOG_DESYNCTEST, + OPTIONS_DIALOG_OPTIMIZE4LATENCY, //OPTIONS_DIALOG_TURBO_TEXT //OPTIONS_DIALOG_TURBO_SLIDER *************** *** 458,464 **** { d_text_proc, 40, 94, 160, 20, 255, 0, 0, 0, 0, 0, (void*)"Shot Relativity", NULL, NULL }, { d_slider_proc, 212, 96, 160, 16, 255, 0, 0, 0, 1000,0, NULL, NULL, NULL }, ! { d_check_proc, 40, 144, 184, 20, 255, 0, 0, 0, 1, 0, (void*)"Friendly Fire", NULL, NULL }, //OPTIONS_DIALOG_FRIENDLY_FIRE, ! { d_check_proc, 40, 170, 100, 14, 255, 0, 0, 0, 1, 0, (void*)"Camera hides cloakers", NULL, NULL }, //OPTIONS_DIALOG_HIDE_CLOAKERS, ! { d_check_proc, 40, 190, 100, 14, 255, 0, 0, 0, 1, 0, (void*)"3D Planet", NULL, NULL }, //OPTIONS_DIALOG_3DPLANET, { d_text_proc, 292, 244, 120, 20, 255, 0, 0, 0, 0, 0, (void *)"View", NULL, NULL }, { d_list_proc, 284, 264, 180, 90, 255, 0, 0, 0, 0, 0, (void *) viewListboxGetter, NULL, NULL }, --- 461,470 ---- { d_text_proc, 40, 94, 160, 20, 255, 0, 0, 0, 0, 0, (void*)"Shot Relativity", NULL, NULL }, { d_slider_proc, 212, 96, 160, 16, 255, 0, 0, 0, 1000,0, NULL, NULL, NULL }, ! { d_check_proc, 40, 140, 100, 14, 255, 0, 0, 0, 1, 0, (void*)"Friendly Fire", NULL, NULL }, //OPTIONS_DIALOG_FRIENDLY_FIRE, ! { d_check_proc, 40, 155, 100, 14, 255, 0, 0, 0, 1, 0, (void*)"Camera hides cloakers", NULL, NULL }, //OPTIONS_DIALOG_HIDE_CLOAKERS, ! { d_check_proc, 40, 170, 100, 14, 255, 0, 0, 0, 1, 0, (void*)"3D Planet", NULL, NULL }, //OPTIONS_DIALOG_3DPLANET, ! { d_check_proc, 200, 140, 100, 14, 255, 0, 0, 0, 1, 0, (void*)"Synched-lag", NULL, NULL }, //OPTIONS_DIALOG_SYNCLAG, ! { d_check_proc, 200, 155, 100, 14, 255, 0, 0, 0, 1, 0, (void*)"Desynch-test", NULL, NULL }, //OPTIONS_DIALOG_DESYNCTEST, ! { d_check_proc, 200, 170, 100, 14, 255, 0, 0, 0, 1, 0, (void*)"Optimize latency", NULL, NULL }, //OPTIONS_DIALOG_OPTIMIZE4LATENCY, { d_text_proc, 292, 244, 120, 20, 255, 0, 0, 0, 0, 0, (void *)"View", NULL, NULL }, { d_list_proc, 284, 264, 180, 90, 255, 0, 0, 0, 0, 0, (void *) viewListboxGetter, NULL, NULL }, *************** *** 517,522 **** --- 523,545 ---- old_optionsDialog[OPTIONS_DIALOG_3DPLANET].flags = 0; + if (get_config_int("Network", "SyncLag", 0) == 1) + old_optionsDialog[OPTIONS_DIALOG_SYNCLAG].flags = D_SELECTED; + else + old_optionsDialog[OPTIONS_DIALOG_SYNCLAG].flags = 0; + + if (get_config_int("Network", "DesyncTest", 0) == 1) + old_optionsDialog[OPTIONS_DIALOG_DESYNCTEST].flags = D_SELECTED; + else + old_optionsDialog[OPTIONS_DIALOG_DESYNCTEST].flags = 0; + + + set_config_file("client.ini"); + if (get_config_int("Network", "OptimizeLatency", 0) == 1) + old_optionsDialog[OPTIONS_DIALOG_OPTIMIZE4LATENCY].flags = D_SELECTED; + else + old_optionsDialog[OPTIONS_DIALOG_OPTIMIZE4LATENCY].flags = 0; + i = get_view_num ( get_config_string ( "View", "View", NULL ) ); if (i == -1) i = 0; *************** *** 580,583 **** --- 603,621 ---- twconfig_set_int("/cfg/server.ini/view/camerahidescloakers", i); + if (old_optionsDialog[OPTIONS_DIALOG_SYNCLAG].flags & D_SELECTED) + i = 1; + else i = 0; + twconfig_set_int("/cfg/server.ini/network/SyncLag", i); + + if (old_optionsDialog[OPTIONS_DIALOG_DESYNCTEST].flags & D_SELECTED) + i = 1; + else i = 0; + twconfig_set_int("/cfg/server.ini/network/DesyncTest", i); + + if (old_optionsDialog[OPTIONS_DIALOG_OPTIMIZE4LATENCY].flags & D_SELECTED) + i = 1; + else i = 0; + twconfig_set_int("/cfg/client.ini/network/OptimizeLatency", i); + return; } Index: mgame.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mgame.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** mgame.cpp 27 Mar 2004 10:07:18 -0000 1.46 --- mgame.cpp 11 Jul 2005 00:25:28 -0000 1.47 *************** *** 44,47 **** --- 44,52 ---- #include <stdarg.h> + /** this enables a (costly) network desynch test, by checking all the physics items on position. */ + int do_desynch_test = 0; + + /** this forces each player to experience the same lag */ + int global_lag_synch = 0; /** \brief this causes lots of extra checks to be performed on object-by-object [...2223 lines suppressed...] + for (j = num_network; j < num_players; j += 1) + { + + char name[512], fleetid[512]; + sprintf(name, "Bot_%i", j+1); + sprintf(fleetid, "Player%i", j+1); + + int ch; + ch = channel_none; + add_player(j, create_control(ch, "WussieBot"), team, name, fleetid); + + } + + + } + break; + } + + return; + } Index: mlog.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mlog.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** mlog.cpp 27 Mar 2004 10:07:18 -0000 1.18 --- mlog.cpp 11 Jul 2005 00:25:28 -0000 1.19 *************** *** 10,16 **** --- 10,18 ---- #include "mgame.h" #include "../util/net_tcp.h" + #include "../melee/mnet1.h" #include "../melee/mview.h" int channel_current = -1; + int event_player_current = 0; int channel_file_names = 0; // ISN'T USED ... *************** *** 362,366 **** memset(zeros, 0, size); } ! if ((log_dir[channel] & direction_write) && !log_write_disable) { _log ( channel, data, size); // if (!(log_dir[channel] & direction_immediate)) send_packet(); --- 364,368 ---- memset(zeros, 0, size); } ! if ((log_dir[channel] & direction_write) && (!log_write_disable) ) { _log ( channel, data, size); // if (!(log_dir[channel] & direction_immediate)) send_packet(); *************** *** 449,452 **** --- 451,468 ---- + /** completely clear a log, also get rid of unhandled data */ + void Log::clear() + { + int i; + for (i = 0 ; i < log_num; i += 1) + { + log_len[i] = 0; + log_pos[i] = 0; + } + + } + + + void PlaybackLog::init() {STACKTRACE *************** *** 484,505 **** ! void share_intel_order(int n, int i) { ! switch(share_type[n]) ! { ! case TYPE_SHORT: ! { ! short int &x = *((short int*) (share_address[n]) + i); ! x = intel_ordering_short(x); ! } ! break; ! case TYPE_INT: { ! int &x = *((int*) (share_address[n]) + i); ! x = intel_ordering(x); } - break; } } --- 500,535 ---- + int get_share_num() + { + return Nshare; + } ! void reset_share() { ! Nshare = 0; ! } ! ! void share_intel_order(int n) ! { ! int i; ! for ( i = 0; i < share_num[n]; ++i ) ! { ! switch(share_type[n]) { ! case TYPE_SHORT: ! { ! short int &x = *((short int*) (share_address[n]) + i); ! x = intel_ordering_short(x); ! } ! break; ! ! case TYPE_INT: ! { ! int &x = *((int*) (share_address[n]) + i); ! x = intel_ordering(x); ! } ! break; } } } *************** *** 512,516 **** --- 542,550 ---- else + { + if (!player[iplayer]) + tw_error("Player does not exist - no channel available"); return player[iplayer]->channel; + } } *************** *** 522,525 **** --- 556,560 ---- tw_error("player [%i] exceeds max allowed value [%i] -- perhaps you use share(channel) instead of share(player)", player, num_players); + share_channel[Nshare] = chann(player); share_address[Nshare] = value; *************** *** 531,537 **** // change bit-order of each element in an array ! int i; ! for ( i = 0; i < share_num[Nshare]; ++i ) ! share_intel_order(Nshare, i); // buffer an array --- 566,578 ---- // change bit-order of each element in an array ! share_intel_order(Nshare); ! ! /* ! // check some stuff: (only works on network cause of the cast) ! int ch = share_channel[Nshare]; ! int log_len1 = glog->log_len[ch]; ! int log_transm1 = ((NetLog*)glog)->log_transmitted[ch]; ! */ ! // buffer an array *************** *** 541,549 **** // restore bit-order of each element in an array ! for ( i = 0; i < share_num[Nshare]; ++i ) ! share_intel_order(Nshare, i); //game->log->flush(); ++Nshare; --- 582,603 ---- // restore bit-order of each element in an array ! share_intel_order(Nshare); //game->log->flush(); + /* + // check some stuff: (only works on network cause of the cast) + char dir = glog->get_direction(share_channel[Nshare]); + int bwrite = dir & Log::direction_write; + int bread = dir & Log::direction_read; + int bimm = dir & Log::direction_immediate; + int log_len = glog->log_len[ch]; + int log_transm = ((NetLog*)glog)->log_transmitted[ch]; + + message.print(1500, 14, "SHAREBUFFER: ch[%i] write[%i] read[%i] imm[%i] len[%i->%i] transm[%i->%i]", + ch, bwrite, bread, bimm, log_len1, log_len, log_transm1, log_transm); + message.animate(0); + */ + ++Nshare; *************** *** 592,595 **** --- 646,666 ---- void share_update() { + int n; + + /* + // check some stuff... + for ( n = 0; n < Nshare; ++n ) + { + int ch = share_channel[n]; + char dir = glog->get_direction(share_channel[n]); + int bwrite = dir & Log::direction_write; + int bread = dir & Log::direction_read; + int bimm = dir & Log::direction_immediate; + + message.print(1500, 14, "SHAREUPDATE: ch[%i] write[%i] read[%i] imm[%i]", ch, bwrite, bread, bimm); + message.animate(0); + } + */ + // test the network, whether the log channels are still ok. // by using a call to log_test(); *************** *** 607,611 **** - int n; for ( n = 0; n < Nshare; ++n ) { --- 678,681 ---- *************** *** 614,620 **** // sort out bit-ordering for all values in the array ! int i; ! for ( i = 0; i < share_num[n]; ++i ) ! share_intel_order(n, i); } --- 684,688 ---- // sort out bit-ordering for all values in the array ! share_intel_order(n); } *************** *** 746,763 **** void rand_resync() { - int k; - k = channel_current; - channel_current = channel_server; ! int i; ! i = rand(); ! log_int(i); ! rng.seed(i); ! i = rand(); ! log_int(i); ! rng.seed_more(i); - channel_current = k; } --- 814,829 ---- void rand_resync() { ! int i1, i2; ! i1 = rand(); ! i2 = rand(); ! share(-1, &i1); ! share(-1, &i2); ! share_update(); ! ! rng.seed(i1); ! rng.seed_more(i2); } Index: mcbodies.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mcbodies.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mcbodies.h 1 Jul 2004 22:50:12 -0000 1.10 --- mcbodies.h 11 Jul 2005 00:25:13 -0000 1.11 *************** *** 86,89 **** --- 86,90 ---- }; + /* //helpers for drawing your own starfields void _draw_starfield_raw ( *************** *** 132,186 **** //anti-aliasing mode to use int aa_mode ! ); ! ! void _draw_starfield_cached ( ! //surface to draw starfield on ! Frame *frame, ! //star sprite ! SpaceSprite *sprite, ! //index into star sprite ! int index, ! //number of stars ! int n, ! //center of screen for drawing purposes ! double cx, double cy, ! //scrolly amount ! double x, double y, ! //size of starfield (usually the same as wrap point, sometimes smaller) ! double w, double h, ! //wrap point ! double mx, double my, ! //size of stars ! double zoom, ! //64-bit seed for RNG ! Uint64 s64, ! //anti-aliasing mode to use ! int aa_mode ! ) ; ! ! void _draw_starfield_raw ( ! //surface to draw starfield on ! Frame *frame, ! //star sprite ! SpaceSprite *sprite, ! //index into star sprite ! int index, int num_indeces, ! //number of stars ! int n, ! //center of screen for drawing purposes ! double cx, double cy, ! //scrolly amount ! double x, double y, ! //size of starfield (usually the same as wrap point, sometimes smaller) ! double w, double h, ! //wrap point ! double mx, double my, ! //size of stars ! double zoom, ! //64-bit seed for RNG ! Uint64 s64, ! //anti-aliasing mode to use ! int aa_mode ! ) ; #endif // __MCBODIES_H__ --- 133,138 ---- //anti-aliasing mode to use int aa_mode ! ); ! */ #endif // __MCBODIES_H__ Index: mgame.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mgame.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** mgame.h 24 Mar 2004 23:51:38 -0000 1.19 --- mgame.h 11 Jul 2005 00:25:28 -0000 1.20 *************** *** 6,9 **** --- 6,11 ---- #include "mtarget.h" + #include "mfleet.h" + extern int random_seed[2]; extern int interpolate_frames; *************** *** 13,16 **** --- 15,20 ---- void idle_extra(int time = 5); // adding extra network-share to avoid total standstill which may happen, very occasionally... + void share_fleet(int iplayer); + class GameType { private: *************** *** 66,72 **** // (eg. player 1, player 2 .. player 7). extern int channel_network[max_network]; //data originating on the client extern int p_local, num_network, num_hotseats[max_network], num_bots, num_players; ! extern int channel_conn_recv[100]; // The connection id, where a channel last received data from // This can be used to check which channel belongs to which physical connection. --- 70,80 ---- // (eg. player 1, player 2 .. player 7). extern int channel_network[max_network]; //data originating on the client + extern int net_conn[max_network]; // the network connection index... extern int p_local, num_network, num_hotseats[max_network], num_bots, num_players; ! extern int channel_conn_recv[max_network]; ! ! const int max_synch_check = 4000; ! // The connection id, where a channel last received data from // This can be used to check which channel belongs to which physical connection. *************** *** 81,84 **** --- 89,94 ---- // network channel. + PlayerInformation(); + char name[64]; Control *control; *************** *** 87,94 **** bool status; // true=alive, false=disconnected/dead bool haschannel(int ch); // checks for channel and the buffered channel void die(); }; ! extern PlayerInformation *player[100]; --- 97,126 ---- bool status; // true=alive, false=disconnected/dead + int desynch_Nitems; + double desynch_xpos[max_synch_check], desynch_ypos[max_synch_check]; + bool desynch_received; + + bool islocal(); + bool ishost(); + bool haschannel(int ch); // checks for channel and the buffered channel void die(); }; ! ! // returns true if this computer contain the host player. ! bool hostcomputer(); ! ! ! // normal player information. ! class NPI : public PlayerInformation ! { ! public: ! NPI::NPI(); ! virtual ~NPI(); ! Fleet *fleet; ! }; ! ! ! extern NPI *player[max_network]; *************** *** 101,105 **** { public: ! virtual void calculate(){}; }; --- 133,137 ---- { public: ! virtual void calculate(int iplayer){}; }; *************** *** 109,113 **** { public: ! typedef void (G::* reffunc) (); // store the class-function pointer G *game; // store pointer to the class in memory --- 141,145 ---- { public: ! typedef void (G::* reffunc) (int iplayer); // store the class-function pointer G *game; // store pointer to the class in memory *************** *** 116,124 **** GE(G *agame, reffunc aref) : GameEvent2() { game = agame; ref = aref; }; ! virtual void calculate() {(game->*ref)();}; }; const int max_events = 100; const int max_requests = 1024; class EventClass { --- 148,157 ---- GE(G *agame, reffunc aref) : GameEvent2() { game = agame; ref = aref; }; ! virtual void calculate(int iplayer) {(game->*ref)(iplayer);}; }; const int max_events = 100; const int max_requests = 1024; + class EventClass { *************** *** 128,131 **** --- 161,165 ---- EventClass(); + // this is the list of available event routines. struct ref { *************** *** 134,153 **** } event[max_events]; void reg(GameEvent2 *g, char *id); ! void request(char *id); // adds a requested call to the stack ! void issue(int i); // calls one function of the stack ! int Nreq; ! int req[max_requests]; void handle(); bool sendmode; }; extern EventClass events; #define EVENT(classname, functionname) {events.reg(new GE<classname>(this, &classname::functionname), #functionname);} ! #define CALL(functionname) {events.request( #functionname );} --- 168,194 ---- } event[max_events]; + void set_wait(); + void unset_wait(int i); // and the reset-wait should be done through some event, under game control (to assure that + // all channels are synched when the next game iteration starts). + bool need_more[max_network]; + void reg(GameEvent2 *g, char *id); ! void clear(); // clears the registry and other event-settings (the need_more array). ! void request(char *id, int iplayer); // adds a requested call to the stack ! void issue(int i, int iplayer); // calls one function of the stack void handle(); + bool all_ready(); + bool sendmode; }; extern EventClass events; + #define EVENT(classname, functionname) {events.reg(new GE<classname>(this, &classname::functionname), #functionname);} ! #define CALL(functionname, iplayer) {events.request( #functionname, iplayer );} *************** *** 155,165 **** { public: virtual void register_events(); ! virtual void do_game_events2(); GameType *type; virtual void log_file (const char *fname); // overload to allow networking ! void log_fleet(int channel, class Fleet *fleet); // int is_local ( int channel ) ; --- 196,207 ---- { public: + int lag_buffer; virtual void register_events(); ! //virtual void do_game_events2(); GameType *type; virtual void log_file (const char *fname); // overload to allow networking ! // void log_fleet(int channel, class Fleet *fleet); // int is_local ( int channel ) ; *************** *** 168,175 **** char events_waiting; class GameEvent **waiting_events; ! virtual void do_game_events(); public: ! void send_game_event ( class GameEvent *event ); ! virtual void handle_game_event ( int source, class GameEvent *event ); enum { maximum_events_waiting = 100, --- 210,217 ---- char events_waiting; class GameEvent **waiting_events; ! // virtual void do_game_events(); public: ! // void send_game_event ( class GameEvent *event ); ! // virtual void handle_game_event ( int source, class GameEvent *event ); enum { maximum_events_waiting = 100, *************** *** 185,189 **** virtual ~Game(); //deallocating memory etc. ! virtual void init_lag(); virtual void _event ( Event *e ); --- 227,231 ---- virtual ~Game(); //deallocating memory etc. ! // virtual void init_lag(); virtual void _event ( Event *e ); *************** *** 207,212 **** virtual void ship_died(Ship *who, SpaceLocation *source); ! virtual void compare_checksums() ; ! virtual void handle_desynch( int local_checksum, int server_checksum, int client_checksum ) ; virtual bool game_ready(); --- 249,254 ---- virtual void ship_died(Ship *who, SpaceLocation *source); ! //virtual void check_desynch() ; ! //virtual void handle_desynch( int local_checksum, int server_checksum, int client_checksum ) ; virtual bool game_ready(); *************** *** 236,239 **** --- 278,282 ---- Presence **focus; virtual void add_focus (Presence *focus, int channel = -1); + void set_focus(Control *c); Targets gametargets; *************** *** 293,310 **** // and (2) for safety ;) Cause each has to be called in the correct order so that // different data won't interfere with each other !! ! void gen_buffered_data(); // events int lagchange; ! void change_lag(); ! void chat(); ! void test_event1(); ! void disconnect(); // "extreme" desynch testing. ! void heavy_compare(); --- 336,366 ---- // and (2) for safety ;) Cause each has to be called in the correct order so that // different data won't interfere with each other !! ! // void gen_buffered_data(); // events int lagchange; ! void change_lag(int iplayer); ! void chat(int iplayer); ! void test_event1(int iplayer); ! void start_iteration(int iplayer); ! void disconnect(int iplayer); ! int lag_increase; ! void event_lag_increase(int iplayer); ! int lag_decrease; ! void event_lag_decrease(int iplayer); ! ! int use_player_index; ! void event_sharecontrols(int iplayer); // "extreme" desynch testing. ! //void heavy_compare(); ! void check_desynch(); ! void event_share_desynch(int iplayer); ! ! /** lag initialization, based on ping values */ ! void init_lag(); *************** *** 314,318 **** ! virtual PlayerInformation *new_player(); // should return a pointer to a new player-class }; --- 370,380 ---- ! virtual NPI *new_player(); // should return a pointer to a new player-class ! virtual void init_players(); ! virtual int add_player (int num, Control *c, int team_index, const char *name, const char *fleet, const char *fleet_file = "fleets.ini") ; ! ! void network_share_keys(); ! ! void test_startit(); // just for testing. }; Index: mnet1.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mnet1.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** mnet1.cpp 24 Mar 2004 23:51:38 -0000 1.15 --- mnet1.cpp 11 Jul 2005 00:25:28 -0000 1.16 *************** *** 14,18 **** static int log_show_num = 0; ! GameEventMessage::GameEventMessage (const char *text) {STACKTRACE --- 14,18 ---- static int log_show_num = 0; ! /* GameEventMessage::GameEventMessage (const char *text) {STACKTRACE *************** *** 50,68 **** if (new_lag < old_lag) game->decrease_latency(old_lag - new_lag); - /* - int i; - for (i = old_lag; i != new_lag; ) { - if (i < new_lag) { - game->increase_latency(); - i += 1; - } - else if (i > new_lag) { - game->decrease_latency(); - i -= 1; - } - } - */ } ! --- 50,55 ---- if (new_lag < old_lag) game->decrease_latency(old_lag - new_lag); } ! */ *************** *** 200,210 **** int totsize = 0; ! for (i = 0; i < log_num; i += 1) if (log_dir[i] & direction_write) { j = log_len[i] - log_transmitted[i]; - totsize += j; if (j > 0) { check_bufsize(pos+1); --- 187,202 ---- int totsize = 0; ! for (i = 0; i < log_num; i += 1) { + + + if (!(log_dir[i] & direction_write)) + continue; + j = log_len[i] - log_transmitted[i]; if (j > 0) { + totsize += j; check_bufsize(pos+1); *************** *** 221,224 **** --- 213,229 ---- log_transmitted[i] += j; pos += j; + + if (log_transmitted[i] > log_len[i]) + { + tw_error("Should not happen"); + } + } + } + for (i = 0; i < log_num; i += 1) + { + // check for error + if (log_transmitted[i] > log_len[i]) + { + tw_error("Should not happen"); } } *************** *** 323,328 **** //len = net[conn].recv(4, 4, &buffy); len = net[conn].recv(4, 4, buffy); ! if (len != 4) { tw_error ("NetLog::recv_packet -- net.recv error (1)"); } len = buffy[0] + (buffy[1] << 8) + (buffy[2] << 16) + (buffy[3] << 24); --- 328,342 ---- //len = net[conn].recv(4, 4, &buffy); len = net[conn].recv(4, 4, buffy); + + if (len == 0) + return; //xxx netlog: there is nothing to receive... ! if (len != 4) ! { ! message.print(1500, 15, "netlog error: conn[%i] recv-len[%i]", conn, len); ! message.animate(0); ! tw_error ("NetLog::recv_packet -- net.recv error (1)"); ! } ! len = buffy[0] + (buffy[1] << 8) + (buffy[2] << 16) + (buffy[3] << 24); *************** *** 413,416 **** --- 427,435 ---- } + if (log_transmitted[channel] > log_len[channel]) + { + tw_error("Should not happen"); + } + if (channel >= log_num) expand_logs(channel+1); Log::_log(channel, data, size); *************** *** 428,437 **** if (log_show_data) { ! message.print(1500, 15, "[%i]_unlog: ch[%i] size[%i]", log_show_num, channel, size); message.animate(0); ++log_show_num; } ! while (ready(channel) < size) { //if (game) game->idle(); //else idle(1); --- 447,464 ---- if (log_show_data) { ! int i; ! char logstr[12]; ! for ( i = 0; i < 12; ++i ) ! logstr[i] = log_data[channel][log_pos[channel] + i]; ! logstr[11] = 0; ! ! message.print(1500, 15, "[%i]_unlog: ch[%i] size[%i] logsize[%i] str[%s]", log_show_num, channel, size, ! log_len[channel] - log_pos[channel], logstr); message.animate(0); ++log_show_num; } ! while (ready(channel) < size) ! { //if (game) game->idle(); //else idle(1); *************** *** 633,636 **** --- 660,665 ---- } + strcpy(net[num_connections].addr, address); + ++num_connections; return true; *************** *** 659,662 **** --- 688,705 ---- + void NetLog::optimize4bandwidth() + { + int conn; + // receive packets from all connections + + for ( conn = 0; conn < num_connections; ++conn ) + { + if (!net_status[conn]) continue; + + net[conn].optimize4bandwidth(); + } + } + + *************** *** 712,715 **** --- 755,759 ---- tw_error("NetLog::reset - resetting before all data could be sent in channel [%i] , pos[%i] transm[%i] len[%i]", i, log_pos[i], log_transmitted[i], log_len[i]); + log_transmitted[i] = 0; // no problem, when calling a reset, all data IS sent. } *************** *** 731,732 **** --- 775,788 ---- } + /** completely clear a log, also get rid of unhandled data */ + void NetLog::clear() + { + Log::clear(); + + int i; + for (i = 0 ; i < log_num; i += 1) + { + log_transmitted[i] = 0; + } + + } Index: mview.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mview.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mview.h 1 Jul 2004 22:50:12 -0000 1.9 --- mview.h 11 Jul 2005 00:25:29 -0000 1.10 *************** *** 11,19 **** ! void constrain(double x1, double *x, double x2); //View stuff: READ ONLY! // units extern View *space_view; extern Vector2 space_view_size;// pixels (should be an integer value) --- 11,21 ---- ! //View stuff: READ ONLY! // units extern View *space_view; + void constrain(double x1, double *x, double x2); + extern Vector2 space_view_size;// pixels (should be an integer value) Index: mcontrol.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mcontrol.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** mcontrol.cpp 12 Jun 2004 14:51:49 -0000 1.23 --- mcontrol.cpp 11 Jul 2005 00:25:13 -0000 1.24 *************** *** 15,20 **** #include "mview.h" //remove this #include "mfleet.h" ! #include "../scp.h" ! #include "../ais/AIBusterBot.h" --- 15,19 ---- #include "mview.h" //remove this #include "mfleet.h" ! #include "../scp.h" *************** *** 25,35 **** ai_index_human, ai_index_moron, ! ai_index_wussie, ! ai_index_buster, ai_index_vegetable, ai_index_end }; ! const char num_controls = 5; static char *gcc_sucks_dick[num_controls + 2] = { --- 24,33 ---- ai_index_human, ai_index_moron, ! ai_index_wussie, ai_index_vegetable, ai_index_end }; ! const char num_controls = 4; static char *gcc_sucks_dick[num_controls + 2] = { *************** *** 37,42 **** "Human", "MoronBot", ! "WussieBot", ! "BusterBot", "VegetableBot", NULL}; --- 35,39 ---- "Human", "MoronBot", ! "WussieBot", "VegetableBot", NULL}; *************** *** 90,95 **** case ai_index_human: return new ControlHuman(name, channel); case ai_index_moron: return new ControlMoron(name, channel); ! case ai_index_wussie: return new ControlWussie(name, channel); ! case ai_index_buster: return new AIBusterBot(name, channel); case ai_index_vegetable: return new ControlVegetable(name, channel); } --- 87,91 ---- case ai_index_human: return new ControlHuman(name, channel); case ai_index_moron: return new ControlMoron(name, channel); ! case ai_index_wussie: return new ControlWussie(name, channel); case ai_index_vegetable: return new ControlVegetable(name, channel); } *************** *** 97,101 **** } ! int Control::rand() { --- 93,97 ---- } ! /* int Control::rand() { *************** *** 103,109 **** if (channel == channel_none) return random(); ! // this is local, so uses a local unsynched rand return (::rand() ^ ((::rand() << 12) + (::rand() <<24))) & 0x7fffffff; // local } void Control::setup() {} void Control::select_ship(Ship* ship_pointer, const char* ship_name) {STACKTRACE; --- 99,107 ---- if (channel == channel_none) return random(); ! ! // this is local (and the values will be shared), so uses a local unsynched rand return (::rand() ^ ((::rand() << 12) + (::rand() <<24))) & 0x7fffffff; // local } + */ void Control::setup() {} void Control::select_ship(Ship* ship_pointer, const char* ship_name) {STACKTRACE; *************** *** 316,320 **** */ ! void Control::gen_buffered_data() { --- 314,318 ---- */ ! /* void Control::gen_buffered_data() { *************** *** 330,340 **** // meaningful data anyway (through think()). } ! ! void Control::calculate() {STACKTRACE; if (!exists()) return; target_stuff(); --- 328,343 ---- // meaningful data anyway (through think()). } + */ ! void Control::calculate() ! { ! STACKTRACE; if (!exists()) return; + if (auto_update) + keys = think(); + target_stuff(); *************** *** 402,406 **** // message.animate(0); ! // if (ship && p_local == 0) // readkey(); --- 405,409 ---- // message.animate(0); ! // if (ship && hostcomputer()) // readkey(); *************** *** 420,427 **** } ! Control::Control(const char *name, int _channel) : temporary(false), target_sign_color(255), already(0), channel(_channel), ! ship(NULL), keys(0), ! target(NULL), index(-1), always_random(0), _prediction_keys(NULL) ! {STACKTRACE id |= ID_CONTROL; attributes |= ATTRIB_SYNCHED; --- 423,441 ---- } ! Control::Control(const char *name, int _channel) ! : ! temporary(false), ! target_sign_color(255), ! already(0), ! channel(_channel), ! ship(NULL), ! keys(0), ! target(NULL), ! index(-1), ! always_random(0), ! _prediction_keys(NULL) ! { ! STACKTRACE; ! id |= ID_CONTROL; attributes |= ATTRIB_SYNCHED; *************** *** 435,439 **** } iname = strdup(name); ! } Control::~Control() { STACKTRACE; if (_prediction_keys) delete[] _prediction_keys; --- 449,457 ---- } iname = strdup(name); ! ! auto_update = true; // for bots. ! } ! ! Control::~Control() { STACKTRACE; if (_prediction_keys) delete[] _prediction_keys; Index: mcbodies.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mcbodies.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** mcbodies.cpp 27 Mar 2004 11:35:54 -0000 1.13 --- mcbodies.cpp 11 Jul 2005 00:25:13 -0000 1.14 *************** *** 81,85 **** push_config_state(); ! game->log_file ("server.ini"); sprite_index = index; gravity_mindist = scale_range(get_config_float("Planet", "GravityMinDist", 0)); --- 81,85 ---- push_config_state(); ! set_config_file ("server.ini"); sprite_index = index; gravity_mindist = scale_range(get_config_float("Planet", "GravityMinDist", 0)); *************** *** 446,450 **** ); } ! game->log_file("server.ini"); width = get_config_int("Stars", "Width", 4000); height = get_config_int("Stars", "Height", 4000); --- 446,450 ---- ); } ! set_config_file("server.ini"); width = get_config_int("Stars", "Width", 4000); height = get_config_int("Stars", "Height", 4000); Index: mnet1.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mnet1.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mnet1.h 24 Mar 2004 23:51:38 -0000 1.11 --- mnet1.h 11 Jul 2005 00:25:28 -0000 1.12 *************** *** 8,12 **** #include "mship.h" ! class GameEvent { public: --- 8,12 ---- #include "mship.h" ! /* class GameEvent { public: *************** *** 38,41 **** --- 38,42 ---- void execute ( int source ); }; + */ /* *************** *** 53,58 **** class NetLog : public Log { //Logging system, useful for networking & demo recording/playback ! protected: int *log_transmitted; //the number of bytes transmitted in each channel void expand_logs(int num_channels) ; //intializes these extensions to the logging --- 54,60 ---- class NetLog : public Log { //Logging system, useful for networking & demo recording/playback ! protected: + public: int *log_transmitted; //the number of bytes transmitted in each channel void expand_logs(int num_channels) ; //intializes these extensions to the logging *************** *** 116,120 **** --- 118,125 ---- char *get_address(int n); + /** optimizes all connections for latency */ void optimize4latency(); + /** optimizes all connections for bandwidth */ + void optimize4bandwidth(); virtual void use_idle(int time); *************** *** 130,133 **** --- 135,139 ---- void rem_conn(int conn); + virtual void clear(); }; Index: mship.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mship.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** mship.cpp 27 Mar 2004 18:48:45 -0000 1.31 --- mship.cpp 11 Jul 2005 00:25:28 -0000 1.32 *************** *** 36,40 **** int num_shipclasses = 0; ! ShipClass *shipclasses = NULL; void register_shipclass ( --- 36,40 ---- int num_shipclasses = 0; ! ShipClass *shipclasses[max_shipclasses]; void register_shipclass ( *************** *** 45,54 **** { num_shipclasses += 1; ! shipclasses = (ShipClass*)realloc(shipclasses, num_shipclasses * sizeof(ShipClass)); int i = num_shipclasses-1; ! shipclasses[i].link_order = i; ! shipclasses[i].name = name; ! shipclasses[i].source = source_name; ! shipclasses[i]._get_ship = func; return; } --- 45,60 ---- { num_shipclasses += 1; ! if (num_shipclasses >= max_shipclasses) ! tw_error("Too many ship classes ; increase the array size..."); ! ! //shipclasses = (ShipClass*)realloc(shipclasses, num_shipclasses * sizeof(ShipClass)); ! int i = num_shipclasses-1; ! shipclasses[i] = new ShipClass(); ! shipclasses[i]->link_order = i; ! shipclasses[i]->name = name; ! shipclasses[i]->source = source_name; ! shipclasses[i]->_get_ship = func; ! return; } *************** *** 66,70 **** if (!name) return NULL; for (i = 0; i < num_shipclasses; i += 1) { ! if (!strcmp(shipclasses[i].name, name)) return &shipclasses[i]; } return NULL; --- 72,76 ---- if (!name) return NULL; for (i = 0; i < num_shipclasses; i += 1) { ! if (!strcmp(shipclasses[i]->name, name)) return shipclasses[i]; } return NULL; *************** *** 82,86 **** Ship *ShipType::get_ship(Vector2 pos, double angle, unsigned int team) { ! game->log_file(file); Ship *s = code->get_ship(pos, angle, data, team); s->type = this; --- 88,92 ---- Ship *ShipType::get_ship(Vector2 pos, double angle, unsigned int team) { ! set_config_file(file); Ship *s = code->get_ship(pos, angle, data, team); s->type = this; *************** *** 105,109 **** int i; for (i = 0; i < num_shipclasses; i += 1) { ! if (strstr(shipclasses[i].source, buffy)) return shipclasses[i].name; } return NULL; --- 111,115 ---- int i; for (i = 0; i < num_shipclasses; i += 1) { ! if (strstr(shipclasses[i]->source, buffy)) return shipclasses[i]->name; } return NULL; *************** *** 191,194 **** --- 197,201 ---- else shiptypes[i].text = strdup(text); const char *code = get_config_string("Info", "Code", NULL); + int old = 0; if (!code) { *************** *** 197,200 **** --- 204,211 ---- } shiptypes[i].code = shipclass(code); + + if (!shiptypes[i].code) + tw_error("A ship without code? No way!"); + if (!shiptypes[i].data || !shiptypes[i].code) { if (!data) data = "none"; *************** *** 226,230 **** if (param > 0) { sprintf(buffy, "%s/*", fn); ! for_each_file ( buffy, FA_DIREC|FA_RDONLY, _register_shiptype_dir, param-1 ); } sprintf(buffy, "%s/shp*.ini", fn); --- 237,241 ---- if (param > 0) { sprintf(buffy, "%s/*", fn); ! for_each_file ( buffy, FA_DIREC|FA_RDONLY|FA_ARCH, _register_shiptype_dir, param-1 ); } sprintf(buffy, "%s/shp*.ini", fn); *************** *** 233,237 **** void init_ships() {STACKTRACE ! _register_shiptype_dir ( "ships", FA_DIREC|FA_RDONLY, 3 ); /* shiptype_type tmp; --- 244,248 ---- void init_ships() {STACKTRACE ! _register_shiptype_dir ( "ships", FA_DIREC|FA_RDONLY|FA_ARCH, 3 ); /* shiptype_type tmp; *************** *** 323,327 **** // modified otherwise the kat poly crashes ! if (creator->isShip()) type = ((Ship*) creator)->type; --- 334,338 ---- // modified otherwise the kat poly crashes ! if (creator && creator->isShip()) type = ((Ship*) creator)->type; *************** *** 342,346 **** hashotspots = true; ! } Ship::Ship(Vector2 opos, double shipAngle, ShipData *shipData, unsigned int ally_flag) : --- 353,359 ---- hashotspots = true; ! first_override_control = 0; ! last_override_control = 0; ! } Ship::Ship(Vector2 opos, double shipAngle, ShipData *shipData, unsigned int ally_flag) : *************** *** 356,359 **** --- 369,375 ---- set_depth(DEPTH_SHIPS); + first_override_control = 0; + last_override_control = 0; + type = NULL; code = NULL; *************** *** 449,454 **** } ! Ship::~Ship() {STACKTRACE delete spritePanel; } --- 465,480 ---- } ! Ship::~Ship() ! { ! STACKTRACE; ! delete spritePanel; + + //f (override_control) + //delete override_control; + if (first_override_control) + { + tw_error("Ship deleted before all control overrides are removed..."); + } } *************** *** 554,572 **** if (control) { ! // it makes most sense, to place this in FRONT of these commands here cause it'll give you 1 frame faster control ! // however, it'll be impossible to override the control of the ship in this way... ! //this->nextkeys = control->keys; ! // so .. I'll just put it back for now. ! this->thrust = 1&&(nextkeys & keyflag::thrust); ! this->thrust_backwards = 1&&(nextkeys & keyflag::back); ! this->turn_left = 1&&(nextkeys & keyflag::left); ! this->turn_right = 1&&(nextkeys & keyflag::right); ! this->fire_weapon = 1&&(nextkeys & keyflag::fire); ! this->fire_special = 1&&(nextkeys & key... [truncated message content] |
|
From: Rob <geo...@us...> - 2005-07-11 00:26:51
|
Update of /cvsroot/timewarp/interfaces/gflmelee In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/interfaces/gflmelee Modified Files: info.txt Log Message: big update to the final version. Index: info.txt =================================================================== RCS file: /cvsroot/timewarp/interfaces/gflmelee/info.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** info.txt 26 Mar 2004 18:22:21 -0000 1.5 --- info.txt 11 Jul 2005 00:25:02 -0000 1.6 *************** *** 30,34 **** [FleetInit] ! PlayerAlliance = 0 ! EnemyAlliance = 1 --- 30,34 ---- [FleetInit] ! PlayerAlliance = 16 ! EnemyAlliance = 18 |
|
From: Rob <geo...@us...> - 2005-07-11 00:26:27
|
Update of /cvsroot/timewarp/source/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6776/source/util Modified Files: base.cpp base.h errors.cpp errors.h net_tcp.cpp random.cpp Log Message: big update to the final version. Index: errors.cpp =================================================================== RCS file: /cvsroot/timewarp/source/util/errors.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** errors.cpp 24 Mar 2004 23:51:45 -0000 1.10 --- errors.cpp 11 Jul 2005 00:26:16 -0000 1.11 *************** *** 8,12 **** --- 8,41 ---- REGISTER_FILE + #include "../scp.h" + + void dump_physics(const char *message) + { + char fname[512]; + sprintf(fname, "tw_error.txt"); + FILE *f; + f = fopen(fname, "at"); + if (!f) + return; + + fprintf(f, "timewarp error message is:\n%s\n", message); + + if (!physics) + return; + + int i; + for ( i = 0; i < physics->num_items; ++i ) + { + SpaceLocation *o = physics->item[i]; + // write: address, parent, target pointer, identity, pos, angle, and vel + fprintf(f, "0x%08p p:0x%08p t:0x%08p id:%s\n\t\tx:%9.3f y:%9.3f a:%6.3f vx:%6.4f vy:%6.4f\n", + o, o->parent, o->target, + o->get_identity(), + o->pos.x, o->pos.y, + o->angle, + o->vel.x, o->vel.y); + } + } #if defined DO_STACKTRACE *************** *** 84,87 **** --- 113,119 ---- } #endif + + + static DIALOG tw_alert_dialog1[] = { // (dialog proc) (x) (y) (w) (h) (fg) (bg) (key) (flags) (d1) (d2) (dp) *************** *** 235,238 **** --- 267,271 ---- log_debug("begin error message:\n%s\nend error message\n", message); + #ifdef DO_STACKTRACE //there needs to be enough space for the whole trace... *************** *** 307,310 **** --- 340,346 ---- + // dump the physics content to a file, called... uhh... something? + dump_physics(error_string); + if (videosystem.width <= 0) { allegro_message("Critical Error$: %s\n", error_string); *************** *** 339,342 **** --- 375,380 ---- videosystem.screen_corrupted = true; + //xxx TWERROR + if (selection == ES_DEBUG) {//"Debug" __error_flag |= 1; Index: net_tcp.cpp =================================================================== RCS file: /cvsroot/timewarp/source/util/net_tcp.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** net_tcp.cpp 24 Mar 2004 23:51:45 -0000 1.12 --- net_tcp.cpp 11 Jul 2005 00:26:16 -0000 1.13 *************** *** 421,425 **** }*/ if (tmp == SOCKET_ERROR) throw "NetTCP::recv - socket error"; ! if (tmp == 0) throw "NetTCP::recv other side disconnected"; idle(1); } --- 421,430 ---- }*/ if (tmp == SOCKET_ERROR) throw "NetTCP::recv - socket error"; ! ! ! //if (tmp == 0) throw "NetTCP::recv other side disconnected";//xxx is this an error ?? ! if (tmp == 0) ! return 0; ! idle(1); } Index: base.h =================================================================== RCS file: /cvsroot/timewarp/source/util/base.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** base.h 24 Mar 2004 23:51:45 -0000 1.9 --- base.h 11 Jul 2005 00:26:16 -0000 1.10 *************** *** 67,71 **** virtual int _get_size() const; //returns 0 on failure ! virtual void gen_buffered_data(); // to synch networking. }; --- 67,71 ---- virtual int _get_size() const; //returns 0 on failure ! // virtual void gen_buffered_data(); // to synch networking. }; Index: errors.h =================================================================== RCS file: /cvsroot/timewarp/source/util/errors.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** errors.h 24 Mar 2004 23:51:45 -0000 1.14 --- errors.h 11 Jul 2005 00:26:16 -0000 1.15 *************** *** 39,42 **** --- 39,44 ---- #include "get_time.h" + + struct SOURCE_LINE { int line; // __LINE__ *************** *** 66,69 **** --- 68,72 ---- #endif + #ifdef DO_STACKTRACE int get_stacktrace_data ( SOURCE_LINE **stack, int max ); *************** *** 74,77 **** --- 77,85 ---- + + + + + extern "C" { #endif Index: random.cpp =================================================================== RCS file: /cvsroot/timewarp/source/util/random.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** random.cpp 24 Mar 2004 23:51:45 -0000 1.7 --- random.cpp 11 Jul 2005 00:26:16 -0000 1.8 *************** *** 42,46 **** return _rng_dist_32_flat(max, raw32()); } ! Uint32 RNG_lcg64a::raw32() { # if defined(_MSC_VER) && defined(__i386__) && !defined(NO_ASM) split_int_64 i64 = s64; --- 42,48 ---- return _rng_dist_32_flat(max, raw32()); } ! Uint32 RNG_lcg64a::raw32() ! { ! /* this algorithm is too repetitive # if defined(_MSC_VER) && defined(__i386__) && !defined(NO_ASM) split_int_64 i64 = s64; *************** *** 69,72 **** --- 71,84 ---- s64.whole = (s64.whole * MULTIPLIER) + ADDITIVE; # endif + */ + + // a little less repetitive + const int ran_mult[4] = {1812433253, 2094358901, 1809384569, 1740025465}; + const int ran_add[4] = { 123456789, 239048723, 958178125, 281010345}; + + int k = (s64.s.high) & 3; + //s64.whole = ((s64.whole + ran_add[k]) * ran_mult[k]);// + ran_add[k]; + s64.whole = (s64.whole * ran_mult[k]) + ran_add[k]; + return s64.s.high; } Index: base.cpp =================================================================== RCS file: /cvsroot/timewarp/source/util/base.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** base.cpp 24 Mar 2004 23:51:45 -0000 1.7 --- base.cpp 11 Jul 2005 00:26:07 -0000 1.8 *************** *** 85,92 **** wait for the other). */ void BaseClass::gen_buffered_data() { // do nothing by default } ! --- 85,93 ---- wait for the other). */ + /* void BaseClass::gen_buffered_data() { // do nothing by default } ! */ |
|
From: Paul F. <you...@us...> - 2005-03-13 16:39:28
|
Update of /cvsroot/timewarp/site In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13782/site Modified Files: index.html readme_eng.html Log Message: changing URL of sourceforge logo from sourceforge.net to sflogo.sourceforge.net, as per change in SF policy Index: index.html =================================================================== RCS file: /cvsroot/timewarp/site/index.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** index.html 3 May 2004 21:32:46 -0000 1.4 --- index.html 13 Mar 2005 16:39:15 -0000 1.5 *************** *** 130,134 **** <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td align="left"><a href="http://sourceforge.net"><img ! src="http://sourceforge.net/sflogo.php?group_id=13354" alt="SourceForge Logo" border="0" width="88" height="31"></a> </td></tr></table> --- 130,134 ---- <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td align="left"><a href="http://sourceforge.net"><img ! src="http://sflogo.sourceforge.net/sflogo.php?group_id=13354" alt="SourceForge Logo" border="0" width="88" height="31"></a> </td></tr></table> Index: readme_eng.html =================================================================== RCS file: /cvsroot/timewarp/site/readme_eng.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** readme_eng.html 10 Apr 2004 20:51:06 -0000 1.2 --- readme_eng.html 13 Mar 2005 16:39:15 -0000 1.3 *************** *** 378,382 **** <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td align="left"><a href="http://sourceforge.net"><img ! src="http://sourceforge.net/sflogo.php?group_id=13354" alt="SourceForge Logo" border="0" width="88" height="31"></a> </td></tr></table> --- 378,382 ---- <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td align="left"><a href="http://sourceforge.net"><img ! src="http://sflogo.sourceforge.net/sflogo.php?group_id=13354" alt="SourceForge Logo" border="0" width="88" height="31"></a> </td></tr></table> |
|
From: Paul F. <you...@us...> - 2005-01-13 02:39:34
|
Update of /cvsroot/timewarp/source/sc1ships In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7929/source/sc1ships Modified Files: shpchebr.cpp Log Message: Fixing Chenjesu Broodhome's DOGI's behaviour to be consistent with UQM, and less anoyiing Index: shpchebr.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpchebr.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** shpchebr.cpp 24 Mar 2004 23:51:44 -0000 1.10 --- shpchebr.cpp 13 Jan 2005 02:39:23 -0000 1.11 *************** *** 185,191 **** void ChenjesuDOGI::inflict_damage(SpaceObject *other) { - play_sound(data->sampleExtra[1]); - if(sameTeam(other)) return; other->handle_fuel_sap(this, sap_factor); --- 185,191 ---- void ChenjesuDOGI::inflict_damage(SpaceObject *other) { if(sameTeam(other)) return; + if ( !other->isShip()) return; + play_sound(data->sampleExtra[1]); other->handle_fuel_sap(this, sap_factor); |
|
From: Paul F. <you...@us...> - 2004-07-05 21:01:01
|
Update of /cvsroot/timewarp/source/games In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3035/source/games Modified Files: ShipDocGenerator.h Log Message: updating ShipDocGenerator stuff. Kinda works, but there's a memory leak somewhere :( Index: ShipDocGenerator.h =================================================================== RCS file: /cvsroot/timewarp/source/games/ShipDocGenerator.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ShipDocGenerator.h 1 Jul 2004 22:50:12 -0000 1.1 --- ShipDocGenerator.h 5 Jul 2004 21:00:37 -0000 1.2 *************** *** 56,60 **** #include <stdio.h> - static Ship * ship = NULL; --- 56,59 ---- *************** *** 184,187 **** --- 183,207 ---- ::remove("scrshots/output.html"); + + FILE * fileshipNames = fopen("scrshots/shipnames.txt", "w"); + char shipNames[5000] = ""; + + for (int i=0; i<num_shiptypes; i++) { + ShipType * shiptype = &shiptypes[i]; + if (shiptype) { + + strcat(shipNames, shiptype->name); + strcat(shipNames, "\n"); + + char * space = NULL; + while ((space = strchr(shipNames,' ')) != NULL) { + space[0] = '_'; + } + } + } + fwrite(shipNames,sizeof(char), strlen(shipNames),fileshipNames); + fclose(fileshipNames);/**/ + + //message.out(shipNames); } *************** *** 229,232 **** --- 249,253 ---- ShipType * shiptype = &shiptypes[shipCounter]; + ASSERT(shiptype); shipCounter ++; *************** *** 246,250 **** rand()%(int)size.x, rand()%(int)size.y), ! rand()%(int)(PI2 * 10000)/10000, autoBots); --- 267,271 ---- rand()%(int)size.x, rand()%(int)size.y), ! PI2 - PI/8, autoBots); *************** *** 262,266 **** pause(); ! sprintf(path, "./scrshots/%s_%02i.bmp", filename, i); //replace ' ' characters with '_' --- 283,287 ---- pause(); ! sprintf(path, "./scrshots/%s-%02i.bmp", filename, i); //replace ' ' characters with '_' *************** *** 295,301 **** ASSERT(datafile); ! char stats[3000] = ""; ! char textDesc[2000] = ""; --- 316,322 ---- ASSERT(datafile); ! char stats[7000] = ""; ! char textDesc[5000] = ""; *************** *** 310,336 **** ::fclose(descFile); } - - - - /* - //replace double newlines with <br/> tags - char temp[2000] = ""; - while (char * next = strstr(textDesc,"\n\n")) { - strcpy(temp,""); - //if (next-textDesc > 0) - // strncpy(temp, textDesc, next-textDesc); - strncat(temp, textDesc, (next-textDesc)); - strcat(temp,"<br/>"); - strcat(temp, &next[2]); - //memcpy(textDesc, temp, 2000); - - strcpy(textDesc,temp); - }/**/ } char imageFilename[2000] = ""; - sprintf(imageFilename, "%s.gif", ship->type->name); - char * space = NULL; while ((space = strchr(imageFilename,' ')) != NULL) { --- 331,338 ---- *************** *** 372,375 **** --- 374,379 ---- //fprintf(file, stats); fclose(file); + + /* double crew; double crew_max; |
|
From: Paul F. <you...@us...> - 2004-07-05 07:07:19
|
Update of /cvsroot/timewarp/skins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23402 Added Files: KDE2.dat mouse_default.dat mouse_win95.dat Piper.dat QNXAmiga.dat Selenium.dat sound_set3.dat Windows.dat KDE2.ini Piper.ini QNXAmiga.ini Selenium.ini template.ini Windows.ini SansS.pcx Log Message: adding remaining example Masking skins. Not all should remain, but it showcases the functionality of the library. --- NEW FILE: KDE2.ini --- [Skin] main_data = KDE2.dat cursors = mouse_3D.dat sounds = title = "KDE2" author = "Miran Amon" date = "19.8.2003" dottedrect = 0 focus = 0 [BOX] backColor = 230,230,230 font1 = 0 f_col1 = 0,0,0 s_col1 = -1 offX = 10 offY = 0 alignment = 0 [BUTTON] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 128,128,128 f_col4 = 0,0,0 [CHECKBOX] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 128,128,128 f_col4 = 0,0,0 [RADIO] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 128,128,128 f_col4 = 0,0,0 [LIST] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 128,128,128 f_col4 = 0,0,0 [COMBOBOX] animationType = 2 animationLength = 240 [TEXT] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 128,128,128 f_col4 = 0,0,0 [MENU] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 128,128,128 f_col4 = 0,0,0 height = 18 delay = 250 animationType = 2 animationLength = 240 [WINDOW] font1 = 1 font2 = 1 f_col1 = 255,255,255 f_col2 = 0,0,0 textX = 0 textY = 4 alignment = 2 textBack = 1 exitX = 3 exitY = 3 maxX = -33 maxY = 3 minX = -62 minY = 3 [HYPER] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,128 f_col2 = 128,0,128 f_col3 = 128,128,128 f_col4 = 128,0,128 [FONT0] file = Tahoma.ttf size = 14 [FONT1] file = Tahomabd.ttf size = 14 [COLORS] face = 230,230,230 fontface = 0,0,0 shad1 = 246,242,246 shad2 = 74,76,74 disable = 128,128,128 select = 161,182,206 deselect = 230,230,230 focus = 246,242,246 back = 222,222,222 sunken = 255,255,255 [TILING] TAB_BUTTON_TCKX=56 TAB_BUTTON_TCKY=18 TAB_WINDOW_TCKX=60 TAB_WINDOW_TCKY=60 --- NEW FILE: QNXAmiga.ini --- [Skin] main_data=QNXAmiga.dat cursors=mouse_3D.dat title="QNX Amiga Micro GUI WindowBlinds Conversion" author="Miran Amon" date="23.7.2002" focus = 2 [BOX] backColor=-1 font1=1 f_col1=0,0,0 f_col2=128,128,128 offY=1 alignment=2 [BUTTON] font1=0 f_col1=99,99,95 f_col2=0,0,0 f_col3=128,128,128 f_col4=0,0,0 [HYPER] font1=0 f_col1=0,0,127 f_col2=127,0,127 f_col3=127,127,127 f_col4=127,0,127 [CHECKBOX] font1=0 f_col1=99,99,95 f_col2=0,0,0 f_col3=128,128,128 f_col4=0,0,0 [RADIO] font1=0 f_col1=99,99,95 f_col2=0,0,0 f_col3=128,128,128 f_col4=0,0,0 [LIST] font1=0 f_col1=99,99,95 f_col2=0,0,0 f_col3=128,128,128 f_col4=0,0,0 border_left=2 border_right=2 border_top=2 border_bottom=2 row_height=20 [COMBOBOX] animationType=1 animationLength=240 [TEXT] font1=0 f_col1=0,0,0 f_col2=0,0,0 f_col3=128,128,128 f_col4=0,0,0 [MENU] font1=0 f_col1=99,99,95 f_col2=0,0,0 f_col3=128,128,128 f_col4=0,0,0 height=20 animationType=1 animationLength=400 [WINDOW] font1=0 f_col1=255,255,255 f_col2=160,160,160 textX=8 textY=2 exitX=-18 exitY=1 maxX=-34 maxY=1 minX=-50 minY=1 textBack=1 animationLength=240 animationType=1 [TOOLTIP] animationLength=240 animationType=1 [FONT0] file=SansS.pcx [FONT1] file=SansS.pcx [COLORS] face=217,217,217 fontface=0,0,0 shad1=233,233,233 shad2=128,128,128 disable=128,128,128 select=255,190,0 deselect=217,217,217 focus=255,190,0 back=217,217,217 sunken=233,229,218 [TILING] TAB_BUTTON_TCKX=15 TAB_BUTTON_TCKY=5 TAB_WINDOW_TCKX=44 TAB_WINDOW_TCKY=44 --- NEW FILE: Piper.ini --- [Skin] main_data=Piper.dat cursors=mouse_3D.dat sounds=sound_set3.dat title="Piper WindowBlinds Conversion" author="Miran Amon" date="15.8.2002" [BOX] backcolor=239,235,231 font1=0 f_col1=128,128,128 f_col2=159,159,159 offY=0 offX=10 alignment=0 [BUTTON] font1=0 f_col1=0,0,0 f_col2=0,0,0 f_col3=163,167,141 f_col4=0,0,0 [HYPER] font1=0 f_col1=0,0,127 f_col2=127,0,127 f_col3=127,127,127 f_col4=127,0,127 [CHECKBOX] font1=0 f_col1=0,0,0 f_col2=0,0,0 f_col3=163,167,141 f_col4=0,0,0 [RADIO] font1=0 f_col1=0,0,0 f_col2=0,0,0 f_col3=163,167,141 f_col4=0,0,0 [LIST] font1=0 f_col1=163,167,141 f_col2=163,167,141 f_col3=163,167,141 f_col4=0,0,0 [COMBOBOX] animationType = 2 animationLength = 250 [TEXT] font1=0 f_col1=64,64,64 f_col2=58,110,165 f_col3=163,167,141 f_col4=0,0,0 [MENU] font1=0 f_col1=0,0,0 f_col2=70,115,150 f_col3=163,167,141 f_col4=70,115,150 height=20 animationType=19 animationLength=240 [WINDOW] font1=0 f_col1=212,208,200 f_col2=255,255,255 textX=12 textY=5 exitX=-21 exitY=3 maxX=-41 maxY=3 minX=-59 minY=3 animationType=19 animationLength=240 [TAB] f_col1=0,0,0 f_col2=0,0,0 f_col3=163,167,141 f_col4=0,0,0 [TOOLTIP] animationType = 19 animationLength = 160 [FONT0] file=Tahoma.ttf size=14 [FONT1] file=Bookos.ttf size=10 [COLORS] face=239,232,224 fontface=0,0,0 shad1=206,204,189 shad2=163,167,141 disable=163,167,141 select=218,226,242 deselect=206,204,189 focus=58,110,165 back=240,236,232 sunken=239,235,231 [TILING] BOX_TCKX = 44 BOX_TCKY = 50 BOX_SHADOW_TCKX = 60 BOX_SHADOW_TCKY = 60 BUTTON_TCKX = 30 BUTTON_TCKY = 15 CLEAR_BACK_TCKX = 60 CLEAR_BACK_TCKY = 60 HSLIDER_BACK_TCKX = 60 LIST_TCKX = 44 LIST_TCKY = 16 MENU_BACK_TCKX = 8 MENU_BACK_TCKY = 44 MENU_BUTTON_TCKX = 60 MENU_BUTTON_TCKY = 10 MENU_ITEM_TCKX = 28 MENU_ITEM_TCKY = 14 PANEL_GROOVE_TCKX = 60 PANEL_GROOVE_TCKY = 60 PANEL_RAISED_TCKX = 60 PANEL_RAISED_TCKY = 60 PANEL_RIDGE_TCKX = 60 PANEL_RIDGE_TCKY = 60 PANEL_SUNKEN_TCKX = 60 PANEL_SUNKEN_TCKY = 60 PROGRESSH_TCKX = 42 PROGRESSH_TCKY = 12 PROGRESSV_TCKX = 12 PROGRESSV_TCKY = 42 SCROLL_HBACK_TCKX = 44 SCROLL_HGRIP_TCKX = 44 SCROLL_VBACK_TCKY = 32 SCROLL_VGRIP_TCKY = 20 TAB_BUTTON_TCKX = 42 TAB_BUTTON_TCKY = 10 TAB_WINDOW_TCKX = 44 TAB_WINDOW_TCKY = 44 VSLIDER_BACK_TCKY = 44 WINBOTTOM_TCKX = 44 WINDOW_TCKX = 60 WINDOW_TCKY = 60 WINGRIP_TCKX = 90 WINLEFT_TCKY = 60 WINRIGHT_TCKY = 60 WINTOP_TCKX = 44 --- NEW FILE: Piper.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SansS.pcx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Windows.ini --- [Skin] main_data=Windows.dat cursors=mouse_win95.dat ;sounds=sound_set3.dat title="Windows 95 GUI" author="Miran Amon" date="6.10.2001" dottedRect=1 focus=1 [BOX] f_col1=0,0,0 f_col2=192,192,192 offX=10 offY=0 alignment=0 backColor=212,208,200 [TAB] f_col1=0,0,0 f_col2=0,0,0 f_col3=127,127,127 f_col4=0,0,0 [BUTTON] font1=0 f_col1=0,0,0 f_col2=0,0,0 f_col3=127,127,127 f_col4=0,0,0 s_col3=255,255,255 [HYPER] font1=0 f_col1=0,0,127 f_col2=127,0,127 f_col3=127,127,127 f_col4=127,0,127 s_col3=255,255,255 [CHECKBOX] font1=0 f_col1=0,0,0 f_col2=0,0,0 f_col3=127,127,127 f_col4=0,0,0 s_col3=255,255,255 [RADIO] font1=0 f_col1=0,0,0 f_col2=0,0,0 f_col3=127,127,127 f_col4=0,0,0 s_col3=255,255,255 [LIST] font1=0 f_col1=0,0,0 f_col2=255,255,255 f_col3=127,127,127 s_col3=255,255,255 f_col4=0,0,0 [COMBOBOX] animationType=2 animationLength=100 [TEXT] font1=0 f_col1=0,0,0 f_col2=255,255,255 f_col3=127,127,127 f_col4=0,0,0 s_col3=255,255,255 [MENU] font1=0 f_col1=0,0,0 f_col2=0,0,0 f_col3=127,127,127 f_col4=255,255,255 s_col3=255,255,255 height=21 [WINDOW] font1=0 f_col1=255,255,255 f_col2=255,255,255 f_col3=127,127,127 f_col4=255,255,255 textX=8 textY=5 exitX=-22 exitY=6 maxX=-40 maxY=6 minX=-56 minY=6 [FONT0] file=SSerife.fon [COLORS] face=212,208,200 fontface=0,0,0 shad1=255,255,255 shad2=96,96,96 disable=192,192,192 select=1,39,118 deselect=212,208,200 focus=1,39,118 back=212,208,200 sunken=240,238,232 [TILING] TAB_BUTTON_TCKX=44 TAB_BUTTON_TCKY=15 TAB_WINDOW_TCKX=66 TAB_WINDOW_TCKY=66 --- NEW FILE: Selenium.ini --- [Skin] main_data = Selenium.dat cursors = mouse_3D.dat title = "Selenium WindowBlinds conversion" author = "Miran Amon" date = "18.8.2003" dotted_rect = 0 focus = 1 [MOUSE] shadowColor = 64,64,64 shadowSize = 2 shadowOffsetX = 2 shadowOffsetY = 0 [BOX] backColor = -1 font1=1 f_col1 = 0,0,0 offX = 0 offY = 2 alignment = 2 [BUTTON] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 127,127,127 s_col3 = 255,255,255 f_col4 = 0,0,0 [CHECKBOX] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 127,127,127 s_col3 = 255,255,255 f_col4 = 0,0,0 [RADIO] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 127,127,127 s_col3 = 255,255,255 f_col4 = 0,0,0 [LIST] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 127,127,127 s_col3 = 255,255,255 f_col4 = 0,0,0 [COMBOBOX] animationType = 16 animationLength= 160 [TEXT] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 127,127,127 s_col3 = 255,255,255 f_col4 = 0,0,0 [MENU] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 127,127,127 s_col3 = 255,255,255 f_col4 = 0,0,0 height = 19 delay = 240 animationType = 16 animationLength= 160 [WINDOW] f_col1 = 0,0,0 f_col2 = 80,87,80 textX = 12 textY = 4 alignment = 0 textBack = 1 exitX = -20 exitY = 4 maxX = -35 maxY = 4 minX = -50 minY = 4 animationType = 16 animationLength= 160 [HYPER] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,128 f_col2 = 128,0,128 f_col3 = 127,127,127 s_col3 = 255,255,255 f_col4 = 128,0,128 [FONT0] file = Tahoma.ttf size = 14 [FONT1] file = Dungeon.ttf size = 12 [FONT2] file = Tahomabd.ttf size = 14 [COLORS] face = 229,229,229 fontface = 0,0,0 shad1 = 252,252,252 shad2 = 142,142,142 disable = 128,128,128 select = 119,154,129 deselect = 202,202,202 focus = 198,208,201 back = 229,229,229 sunken = 255,255,255 [TOOLTIP] animationType = 16 animationLength= 160 [TILING] TAB_BUTTON_TCKX=28 TAB_BUTTON_TCKY=1 TAB_WINDOW_TCKX=60 TAB_WINDOW_TCKY=60 MENU_ITEM_TCKY=17 --- NEW FILE: mouse_default.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: sound_set3.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Windows.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mouse_win95.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Selenium.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: KDE2.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: template.ini --- ################################################################################ ### This is a template for writing a skin configuration file. All the ### variables that MASkinG knows are listed and described here. If a ### variable is not set MASkinG will use the default value. This means ### that you can safely ignore a good number of them. In this template ### the default values are used ################################################################################ ################################################################################ ## This section holds some basic skin settings and descriptions [Skin] # path to the data file containing skin bitmaps (can be relative or absolute) main_data = # path to the file containing mouse cursor bitmaps cursors = # path to the file containing sound samples sounds = # the following three strings are not actually used by MASkinG but # you are encouraged to fill them in anyway title = "Skin template" author = "Miran Amon" date = "18.8.2003" # set this to 1 if you want MASkinG to draw a dotted rectangle around some of # the objects when they have focus, set it to 0 if you don't dottedRect = 0 # determines how input focus follows the mouse # possible values: # 0 - focus follows the mouse (Allegro default) # 1 - focus follows the mouse but only objects that can take focus can # steal it from other objects (MASkinG default) # 2 - a mouse click is required to move the focus (like in Windows) focus = 1 ################################################################################ ## This section defines the look of the mouse cursors [MOUSE] # the color of the mouse shadow; usually this is a shade of gray (a darker shade # will produce a thicker shadow) although it can be any colour shadowColor = 96,96,96 # the size of the shadow determines how blured the shadow will be; the higher # this value the bigger the shadow will be but also more blured; sensible values # are between one and three shadowSize = 2 # the position of the shadow relative to the cursor sprite shadowOffsetX = 2 shadowOffsetY = 0 ################################################################################ ## The following sections are descriptions for the dialog objects. Most of them ## contain 4 entries for fonts, 4 for text colours and 4 for text shadows. Fonts ## are indices ranging from 0 to 7 while the colours are in familiar RGB format ## where the individual colour components can be separated with either commas ## or semicolons. Some objects may also contain other information. ################################################################################ ################################################################################ ## This is the group box object [BOX] # background colour for the title text (set to -1 if you want it to be # transparent) backColor = 210,210,210 # index to the primary font used for this object font1 = 0 # text colour for the title text in RGB format f_col1 = 0,0,0 # shadow colour for the title text in RGB format # if this is -1 then no shadow will be drawn s_col1 = -1 # x offset of the title text from either the left or right side offX = 10 # y offset of the title text in pixels offY = 1 # sets the alignment of the title text # 0 - left align # 1 - right align # 2 - centre alignment = 0 ################################################################################ ## This section defines a button [BUTTON] # fonts for the normal, selected, disabled and focused state font1 = 0 font2 = 0 font3 = 0 font4 = 0 # text colours for all 4 states f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 128,128,128 f_col4 = 0,0,0 # shadow colours s_col1 = -1 s_col2 = -1 s_col3 = -1 s_col4 = -1 # by how much the text is displaced when the button is pressed down displacement = 1 # the type of animation used... can be one of the following: # 0 - no animation # 1 - blend # 2 - slide down # 3 - slide up # 4 - slide left # 5 - slide right # 6 - roll down # 7 - roll up # 8 - roll left # 9 - roll right # 10 - blinds down # 11 - blinds up # 12 - blinds left # 13 - blinds right # 14 - open from centre (horizontally) # 15 - open from centre (vertically) # 16 - open from centre (both ways) # 17 - roll open from centre (h) # 18 - roll open from centre (v) # 19 - roll open from centre (both) # 20 - close to centre (h) # 21 - close to centre (v) # 22 - close to centre (both) # 23 - roll close to centre (h) # 24 - roll close to centre (v) # 25 - roll close to centre (both) # 26 - roll close to centre (both, different version) animationType = 0 # the duration of the animation effect in ms animationLength = 0 ################################################################################ ## the checkbox [CHECKBOX] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 128,128,128 f_col4 = 0,0,0 s_col1 = -1 s_col2 = -1 s_col3 = -1 s_col4 = -1 ################################################################################ ## the radio button [RADIO] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 128,128,128 f_col4 = 0,0,0 s_col1 = -1 s_col2 = -1 s_col3 = -1 s_col4 = -1 ################################################################################ ## the listbox [LIST] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 128,128,128 f_col4 = 0,0,0 s_col1 = -1 s_col2 = -1 s_col3 = -1 s_col4 = -1 ################################################################################ ## the combo box [COMBOBOX] animationType = 0 animationLength = 0 ################################################################################ ## This defines the look of both normal text labels and edit boxes. Some ## values are only used by the edit-box. [TEXT] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 128,192,128 # this colour is used by the edit box for highlighted # parts of the text f_col3 = 128,128,128 f_col4 = 0,0,0 s_col1 = -1 s_col2 = -1 s_col3 = -1 s_col4 = -1 ################################################################################ ## the menu object [MENU] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 128,128,128 f_col4 = 0,0,0 s_col1 = -1 s_col2 = -1 s_col3 = -1 s_col4 = -1 # the height of one menu item height = 16 # delay in ms before a submenu opens automaticaly delay = 250 animationType = 0 animationLength= 0 ################################################################################ ## This section describes a window. [WINDOW] # font and font colours for the title text when the window has focus font1 = 0 f_col1 = 0,0,0 s_col1 = -1 # font and font colours for the title text when the window doesn't have focus font2 = 0 f_col2 = 128,128,128 s_col2 = -1 # the position of the title text (negative values place the text relative to the # opposite border textX = 12 textY = 8 # title text alignment (0 - left, 1 - right, 2 - centre) alignment = 0 # set to 1 if the window title text should have a special background bitmap textBack = 0 # These are the positions of the window icons on the gripbar. If a value is # negative then the offset is calculated relative to the opposite side of the # window. exitX = -22 exitY = 6 maxX = -40 maxY = 6 minX = -56 minY = 6 # The animation properties for a window when it is popped up. animationType = 0 animationLength= 0 ################################################################################ ## the hyper-text button [HYPER] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,128 f_col2 = 128,0,128 f_col3 = 128,128,128 f_col4 = 128,0,128 s_col1 = -1 s_col2 = -1 s_col3 = -1 s_col4 = -1 ################################################################################ ## the tab panel buttons [TAB] font1 = 0 font2 = 0 font3 = 0 font4 = 0 f_col1 = 0,0,0 f_col2 = 0,0,0 f_col3 = 128,128,128 f_col4 = 0,0,0 s_col1 = -1 s_col2 = -1 s_col3 = -1 s_col4 = -1 ################################################################################ ## the desktop wallpaper bitmap [WALLPAPER] # the wallpaper style; can be one of the following: # 0 - centered on the screen # 1 - in the top-left corner of the screen # 2 - stretched # 3 - tiled (default) # 4 - tiled with TiledBlit() style = 3 ################################################################################ ## the tooltip help bubbles [TOOLTIP] backColor = 255,255,192 borderColor = 0,0,0 animationType = 0 animationLength = 0 ################################################################################ ## The following sections define the skins fonts. Every skin can have up to ## eight different fonts [FONT0] # Path to the font. Can be relative or absolute. If the font is not found # then MASkinG will look in the "windows\fonts" directory. The format # of the font must one that is supported by either Allegro Font or the Grabber. file = # size of the font (only applies to scalable fonts) size = ################################################################################ [FONT1] file = size = ################################################################################ [FONT2] file = size = ################################################################################ [FONT3] file = size = ################################################################################ [FONT4] file = size = ################################################################################ [FONT5] file = size = ################################################################################ [FONT6] file = size = ################################################################################ [FONT7] file = size = ################################################################################ ## This section defines the default colours. These colours will be used if there ## are bitmaps missing from the skin bitmap datafile. They are also used by some ## objects. [COLORS] face = 210,210,210 # color of the panels and boxes fontface = 16,16,16 # the default font color shad1 = 255,255,255 # the light shadow for pseudo 3D effects shad2 = 80,80,80 # the dark shadow for pseudo 3D effects disable = 128,128,128 # the font colour for disabled objects select = 128,192,128 # the face colour for selected objects deselect = 224,224,224 # the face colour for nonselected and nonfocused objects focus = 128,192,128 # the face colour for focuse objects back = 180,180,180 # the dekstop colour sunken = 232,232,232 # the colour of the inside of the sunken panel (used by the listbox) ################################################################################ ## This section defines how the skin bitmaps should be tiled. Each of the ## bitmaps has two values, TCKX and TCKY which define the thickness of the ## centre part of the bitmap horizontally and vertically. When a bitmap is ## tiled only this centre part is tiled while the borders are mapped directly ## onto the target bitmap. If the thickness is set to -1, the bitmap is ## automatically divided into 3 equal parts. The default value for each ## of these parameters is -1. Note that for some bitmaps either TCKX or TCKY ## or both have no meaning as those bitmaps are never tiled anyway. [TILING] BOX_TCKX = -1 BOX_TCKY = -1 BOX_SHADOW_TCKX = -1 BOX_SHADOW_TCKY = -1 BUTTON_TCKX = -1 BUTTON_TCKY = -1 CHECKBOX_TCKX = -1 CHECKBOX_TCKY = -1 CLEAR_BACK_TCKX = -1 CLEAR_BACK_TCKY = -1 COMBO_BUTTON_TCKX = -1 COMBO_BUTTON_TCKY = -1 HSLIDER_BACK_TCKX = -1 HSLIDER_BACK_TCKY = -1 HSLIDER_GRIP_TCKX = -1 HSLIDER_GRIP_TCKY = -1 ICONEXIT_TCKX = -1 ICONEXIT_TCKY = -1 ICONMAX_TCKX = -1 ICONMAX_TCKY = -1 ICONMIN_TCKX = -1 ICONMIN_TCKY = -1 ICONRESTORE_TCKX = -1 ICONRESTORE_TCKY = -1 LIST_TCKX = -1 LIST_TCKY = -1 MENU_BACK_TCKX = -1 MENU_BACK_TCKY = -1 MENU_BUTTON_TCKX = -1 MENU_BUTTON_TCKY = -1 MENU_ITEM_TCKX = -1 MENU_ITEM_TCKY = -1 PANEL_GROOVE_TCKX = -1 PANEL_GROOVE_TCKY = -1 PANEL_RAISED_TCKX = -1 PANEL_RAISED_TCKY = -1 PANEL_RIDGE_TCKX = -1 PANEL_RIDGE_TCKY = -1 PANEL_SUNKEN_TCKX = -1 PANEL_SUNKEN_TCKY = -1 PROGRESSH_TCKX = -1 PROGRESSH_TCKY = -1 PROGRESSV_TCKX = -1 PROGRESSV_TCKY = -1 RADIO_TCKX = -1 RADIO_TCKY = -1 SCROLL_DOWN_TCKX = -1 SCROLL_DOWN_TCKY = -1 SCROLL_HBACK_TCKX = -1 SCROLL_HBACK_TCKY = -1 SCROLL_HGRIP_TCKX = -1 SCROLL_HGRIP_TCKY = -1 SCROLL_HGRIPOVERLAY_TCKX = -1 SCROLL_HGRIPOVERLAY_TCKY = -1 SCROLL_LEFT_TCKX = -1 SCROLL_LEFT_TCKY = -1 SCROLL_RIGHT_TCKX = -1 SCROLL_RIGHT_TCKY = -1 SCROLL_UP_TCKX = -1 SCROLL_UP_TCKY = -1 SCROLL_VBACK_TCKX = -1 SCROLL_VBACK_TCKY = -1 SCROLL_VGRIP_TCKX = -1 SCROLL_VGRIP_TCKY = -1 SCROLL_VGRIPOVERLAY_TCKX = -1 SCROLL_VGRIPOVERLAY_TCKY = -1 SEPARATORH_TCKX = -1 SEPARATORH_TCKY = -1 SEPARATORV_TCKX = -1 SEPARATORV_TCKY = -1 TAB_BUTTON_TCKX = -1 TAB_BUTTON_TCKY = -1 TAB_WINDOW_TCKX = -1 TAB_WINDOW_TCKY = -1 VSLIDER_BACK_TCKX = -1 VSLIDER_BACK_TCKY = -1 VSLIDER_GRIP_TCKX = -1 VSLIDER_GRIP_TCKY = -1 WINBOTTOM_TCKX = -1 WINBOTTOM_TCKY = -1 WINDOW_TCKX = -1 WINDOW_TCKY = -1 WINGRIP_TCKX = -1 WINGRIP_TCKY = -1 WINLEFT_TCKX = -1 WINLEFT_TCKY = -1 WINRIGHT_TCKX = -1 WINRIGHT_TCKY = -1 WINTEXT_TCKX = -1 WINTEXT_TCKY = -1 WINTOP_TCKX = -1 WINTOP_TCKY = -1 ################################################################################ ## This section defines mouse cursor properties such as position of the focus ## point of the cursor and animation settings (number of frames and speed). ## If a value is set to -1 the matching datafile property will be used instead. ## All defaults are -1. [CURSOR] MOUSE_ALTERNATIVE_FCSX = -1 MOUSE_ALTERNATIVE_FCSY = -1 MOUSE_ALTERNATIVE_FRMS = -1 MOUSE_ALTERNATIVE_FDUR = -1 MOUSE_CROSSHAIR_FCSX = -1 MOUSE_CROSSHAIR_FCSY = -1 MOUSE_CROSSHAIR_FRMS = -1 MOUSE_CROSSHAIR_FDUR = -1 MOUSE_HOURGLASS_FCSX = -1 MOUSE_HOURGLASS_FCSY = -1 MOUSE_HOURGLASS_FRMS = -1 MOUSE_HOURGLASS_FDUR = -1 MOUSE_MOVE_FCSX = -1 MOUSE_MOVE_FCSY = -1 MOUSE_MOVE_FRMS = -1 MOUSE_MOVE_FDUR = -1 MOUSE_NORMAL_FCSX = -1 MOUSE_NORMAL_FCSY = -1 MOUSE_NORMAL_FRMS = -1 MOUSE_NORMAL_FDUR = -1 MOUSE_SELECT_FCSX = -1 MOUSE_SELECT_FCSY = -1 MOUSE_SELECT_FRMS = -1 MOUSE_SELECT_FDUR = -1 MOUSE_SIZE_DIAGONAL1_FCSX = -1 MOUSE_SIZE_DIAGONAL1_FCSY = -1 MOUSE_SIZE_DIAGONAL1_FRMS = -1 MOUSE_SIZE_DIAGONAL1_FDUR = -1 MOUSE_SIZE_DIAGONAL2_FCSX = -1 MOUSE_SIZE_DIAGONAL2_FCSY = -1 MOUSE_SIZE_DIAGONAL2_FRMS = -1 MOUSE_SIZE_DIAGONAL2_FDUR = -1 MOUSE_SIZE_HORIZONTAL_FCSX = -1 MOUSE_SIZE_HORIZONTAL_FCSY = -1 MOUSE_SIZE_HORIZONTAL_FRMS = -1 MOUSE_SIZE_HORIZONTAL_FDUR = -1 MOUSE_SIZE_VERTICAL_FCSX = -1 MOUSE_SIZE_VERTICAL_FCSY = -1 MOUSE_SIZE_VERTICAL_FRMS = -1 MOUSE_SIZE_VERTICAL_FDUR = -1 MOUSE_TEXTSELECT_FCSX = -1 MOUSE_TEXTSELECT_FCSY = -1 MOUSE_TEXTSELECT_FRMS = -1 MOUSE_TEXTSELECT_FDUR = -1 MOUSE_UNAVAILABLE_FCSX = -1 MOUSE_UNAVAILABLE_FCSY = -1 MOUSE_UNAVAILABLE_FRMS = -1 MOUSE_UNAVAILABLE_FDUR = -1 --- NEW FILE: QNXAmiga.dat --- (This appears to be a binary file; contents omitted.) |
|
From: Paul F. <you...@us...> - 2004-07-01 22:50:21
|
Update of /cvsroot/timewarp/source/melee In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9714/source/melee Modified Files: mcbodies.h mview.h Log Message: adding quick-and-dirty ShipDocGenerator gametype Index: mview.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mview.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mview.h 24 Mar 2004 23:51:39 -0000 1.8 --- mview.h 1 Jul 2004 22:50:12 -0000 1.9 *************** *** 11,15 **** ! //View stuff: READ ONLY! // units --- 11,15 ---- ! void constrain(double x1, double *x, double x2); //View stuff: READ ONLY! // units Index: mcbodies.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mcbodies.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mcbodies.h 24 Mar 2004 23:51:37 -0000 1.9 --- mcbodies.h 1 Jul 2004 22:50:12 -0000 1.10 *************** *** 132,136 **** //anti-aliasing mode to use int aa_mode ! ); #endif // __MCBODIES_H__ --- 132,186 ---- //anti-aliasing mode to use int aa_mode ! ); ! ! void _draw_starfield_cached ( ! //surface to draw starfield on ! Frame *frame, ! //star sprite ! SpaceSprite *sprite, ! //index into star sprite ! int index, ! //number of stars ! int n, ! //center of screen for drawing purposes ! double cx, double cy, ! //scrolly amount ! double x, double y, ! //size of starfield (usually the same as wrap point, sometimes smaller) ! double w, double h, ! //wrap point ! double mx, double my, ! //size of stars ! double zoom, ! //64-bit seed for RNG ! Uint64 s64, ! //anti-aliasing mode to use ! int aa_mode ! ) ; ! ! void _draw_starfield_raw ( ! //surface to draw starfield on ! Frame *frame, ! //star sprite ! SpaceSprite *sprite, ! //index into star sprite ! int index, int num_indeces, ! //number of stars ! int n, ! //center of screen for drawing purposes ! double cx, double cy, ! //scrolly amount ! double x, double y, ! //size of starfield (usually the same as wrap point, sometimes smaller) ! double w, double h, ! //wrap point ! double mx, double my, ! //size of stars ! double zoom, ! //64-bit seed for RNG ! Uint64 s64, ! //anti-aliasing mode to use ! int aa_mode ! ) ; #endif // __MCBODIES_H__ |
|
From: Paul F. <you...@us...> - 2004-07-01 22:50:21
|
Update of /cvsroot/timewarp/source/games In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9714/source/games Added Files: ShipDocGenerator.cpp ShipDocGenerator.h Log Message: adding quick-and-dirty ShipDocGenerator gametype --- NEW FILE: ShipDocGenerator.cpp --- /** ShipDocGenerator.cpp $Id: ShipDocGenerator.cpp,v 1.1 2004/07/01 22:50:12 youbastrd Exp $ Class implementation of the "ShipDocGenerator" class. Revision history: 2004.06.28 yb started This file is part of "Star Control: TimeWarp" http://timewarp.sourceforge.net/ Copyright (C) 2001-2004 TimeWarp development team 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. */ #include "ShipDocGenerator.h" --- NEW FILE: ShipDocGenerator.h --- /** ShipDocGenerator.h $Id: ShipDocGenerator.h,v 1.1 2004/07/01 22:50:12 youbastrd Exp $ Class definition of the "ShipDocGenerator" class. This class looks at each ship type, and for each, writes out its stats, a summary, and creates a snapshot of the ship. To make the snapshot, it creates a game type, and brings the ship in, then exports a properly named and sized picture. Someday, it'll export several, and make them into an animated GIF. Revision history: 2004.06.28 yb started This file is part of "Star Control: TimeWarp" http://timewarp.sourceforge.net/ Copyright (C) 2001-2004 TimeWarp development team 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. */ #ifndef SHIP_DOC_GENERATOR_HEADER #define SHIP_DOC_GENERATOR_HEADER 1 #include <allegro.h> //allegro library header #include "../melee.h" //used by all TW source files. well, mostly. REGISTER_FILE //done immediately after #including melee.h, just because I said so #include "../melee/mgame.h" //Game stuff #include "../melee/mcbodies.h" //asteroids & planets #include "../melee/mship.h" //ships #include "../melee/mshot.h" //shots, missiles, lasers #include "../melee/mlog.h" //networking / demo recording / demo playback #include "../melee/mcontrol.h" //controllers & AIs #include "../melee/mview.h" //Views & messages #include "../melee/mshppan.h" //ship panels... #include "../melee/mitems.h" //ship panels... #include "../melee/manim.h" //ship panels... #include "../melee/mview.h" #include "../melee/mcontrol.h" #include "../melee/mfleet.h" #include "../melee/mcbodies.h" #include "../frame.h" #include <stdio.h> static Ship * ship = NULL; enum { timeBeforeScreenshots = 4000 }; enum { timeBetweenScreenshots = 10 }; enum { numberOfScreenShots = 30 }; //enum { numberOfScreenShots = 2 }; enum { screenshotWidth = 100 }; enum { screenshotHeight = 100 }; class ViewZoomRightIn : public View { public: virtual void calculate (Game *game) {STACKTRACE CameraPosition n = camera; n.z = 1000; focus ( &n, ship ); track ( n, frame_time ); return; } }; class GoStraightControl : public Control { public: GoStraightControl() : Control("GoStraightControl", channel_server) { } virtual int think() {return keyflag::thrust;} virtual const char *getTypeName() {return "GoStraightControl";} }; class RepeatingStars : public Stars { public: RepeatingStars() : Stars() { } /*virtual void animate(Frame *space) {STACKTRACE if (v && (space_view != *v)) return; double d = space_zoom; //double w = width * d; //double h = height * d; double w = screenshotWidth*4 * d; double h = screenshotHeight*4 * d; int x, y, layer; for (layer = 0; layer < num_layers; layer += 1) { d = space_zoom * pow(1.0 - field_depth / 260.0, (num_layers-layer)/(double)num_layers); for (y = 0; y * h < space->surface->h; y+=1) { for (x = 0; x * w < space->surface->w; x+=1) { if (aa_mode & 0x80000000) { _draw_starfield_cached ( space, pic[layer%num_pics], 0, num_stars / num_layers, (x+0.5)*w, (y+0.5)*h, -space_center_nowrap.x * d + space_view_size.x / 2, -space_center_nowrap.y * d + space_view_size.y / 2, w,h, w,h, d + d*fabs(50.0-(((game->game_time / 10 + layer * 70)) % 100)) / 100.0, seed + layer, aa_mode ); } else { _draw_starfield_raw ( space, pic[layer%num_pics], 0, 1, num_stars / num_layers, (x+0.5)*w, (y+0.5)*h, -space_center_nowrap.x * d + space_view_size.x / 2, -space_center_nowrap.y * d + space_view_size.y / 2, w, h, w, h, d + d*fabs(50.0-(((game->game_time / 10 + layer * 70)) % 100)) / 100.0, seed + layer, aa_mode & 0x7fffFFFF ); } } } } return; }/**/ }; /** Creates documentation for each ship type. */ class ShipDocGenerator : public Game { public: ShipDocGenerator() : Game() { state = PICK_NEXT_SHIP; currentScreenShot = 0; } virtual void init(Log *_log) { Game::init(_log); prepare(); Game::set_resolution(640,480); redraw(); change_view(new ViewZoomRightIn()); //add the starscape background add(new RepeatingStars()); autoBots = new_team(); ::remove("scrshots/output.html"); } virtual void calculate() { Game::calculate(); static myTime = 0; myTime -= frame_time; if (myTime <=0) { if (state==WAIT_FOR_ACCEL) { state = TAKE_SCREEN_SHOTS; } if (state == TAKE_SCREEN_SHOTS) { if (currentScreenShot < numberOfScreenShots) { if (ship && ship->type) { save_screenshot(ship->type->name, currentScreenShot); } } else { state = PICK_NEXT_SHIP; } myTime = timeBetweenScreenshots; currentScreenShot++; } if (state== PICK_NEXT_SHIP) { myTime = timeBeforeScreenshots; currentScreenShot = 0; state = WAIT_FOR_ACCEL; if (ship != NULL) { ship->die(); remove(ship); } static int shipCounter = 0; ShipType * shiptype = &shiptypes[shipCounter]; shipCounter ++; if (shipCounter >= num_shiptypes) { char msg[100]; sprintf(msg, "Done saving %i screenshots of each of %i ships.", numberOfScreenShots, shipCounter); this->quit(msg); } Control * control = new GoStraightControl();; add(control); ship = create_ship(shiptype->id, control, Vector2( rand()%(int)size.x, rand()%(int)size.y), rand()%(int)(PI2 * 10000)/10000, autoBots); add(ship); add_focus(ship); dumpShipStats("scrshots/output.html"); } } } virtual void save_screenshot(const char * filename, int i) {STACKTRACE char path[80]; pause(); sprintf(path, "./scrshots/%s_%02i.bmp", filename, i); //replace ' ' characters with '_' char * space = NULL; while ((space = strchr(path,' ')) != NULL) { space[0] = '_'; } BITMAP *bmp; PALETTE pal; get_palette(pal); //bmp = create_sub_bitmap(screen, 0, 0, SCREEN_W, SCREEN_H); bmp = create_sub_bitmap(screen, (SCREEN_W-screenshotWidth)/2,(SCREEN_H-screenshotHeight)/2, screenshotWidth,screenshotHeight); //save_bitmap(path, bmp, pal); save_bmp(path, bmp, pal); destroy_bitmap(bmp); unpause(); return; } virtual void dumpShipStats(const char * filename) { ShipData * data = ship->type->data; ShipType * type = ship->type; DATAFILE * datafile = data->data; ASSERT(data); ASSERT(type); ASSERT(datafile); char stats[3000] = ""; char textDesc[2000] = ""; { FILE * descFile = fopen(type->text, "r"); if (descFile != NULL) { ::fseek (descFile , 0 , SEEK_END); long lSize = ::ftell (descFile); ::rewind (descFile); ::fread(textDesc,1,lSize,descFile); ::fclose(descFile); } /* //replace double newlines with <br/> tags char temp[2000] = ""; while (char * next = strstr(textDesc,"\n\n")) { strcpy(temp,""); //if (next-textDesc > 0) // strncpy(temp, textDesc, next-textDesc); strncat(temp, textDesc, (next-textDesc)); strcat(temp,"<br/>"); strcat(temp, &next[2]); //memcpy(textDesc, temp, 2000); strcpy(textDesc,temp); }/**/ } char imageFilename[2000] = ""; sprintf(imageFilename, "%s.gif", ship->type->name); char * space = NULL; while ((space = strchr(imageFilename,' ')) != NULL) { space[0] = '_'; } //pardon the bizzre syntax, I'll clean it up later (yb) sprintf(stats, "<a name=\"%s\"><h2>%s</h2></a> \ <img src=\"%s\" style=\"float:right;\"/>\ <table>\ <tr><th>Max Crew</th><td>%i</td></tr>\ <tr><th>Max Battery</th><td>%i</td></tr>\ <tr><th>Battery Recharge</th><td>%i</td></tr>\ <tr><th>Turning</th><td>%.8lf</td></tr>\ <tr><th>Acceleration</th><td>%.8lf</td></tr>\ <tr><th>Max Speed</th><td>%.8lf</td></tr>\ </table>\ %s\ " , type->name, //a tag type->name, //h2 tag imageFilename, //img tag (int)ship->crew_max, (int)ship->batt_max, ship->recharge_amount * ship->recharge_rate, ship->turn_step * ship->turn_rate, ship->accel_rate, ship->speed_max, textDesc //after table ); FILE * file = fopen(filename, "a"); fwrite(stats, 1, strlen(stats), file); //fprintf(file, stats); fclose(file); /* double crew; double crew_max; double batt; double batt_max; double turn_rate; double turn_step; double speed_max; double accel_rate; int recharge_amount; int recharge_rate; int weapon_drain; int weapon_rate; int weapon_sample; int special_drain; int special_rate; int special_sample; int hotspot_rate; char captain_name*/ } protected: TeamCode autoBots; enum { PICK_NEXT_SHIP=0, WAIT_FOR_ACCEL, TAKE_SCREEN_SHOTS } state; int currentScreenShot; }; REGISTER_GAME(ShipDocGenerator, "ShipDocumentationGenerator") //REGISTER_VIEW ( ViewZoomRightIn, "ViewZoomRightIn" ) #endif |
|
From: Paul F. <you...@us...> - 2004-07-01 22:50:21
|
Update of /cvsroot/timewarp/source/interface In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9714/source/interface Modified Files: PlayLocalMenu.h Log Message: adding quick-and-dirty ShipDocGenerator gametype Index: PlayLocalMenu.h =================================================================== RCS file: /cvsroot/timewarp/source/interface/PlayLocalMenu.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PlayLocalMenu.h 27 Jun 2004 22:44:38 -0000 1.7 --- PlayLocalMenu.h 1 Jul 2004 22:50:12 -0000 1.8 *************** *** 26,30 **** #ifndef PLAY_LOCAL_MENU_HEADER ! #define PLAY_LOCAL_HEADER 1 #include "MASkinG.h" --- 26,30 ---- #ifndef PLAY_LOCAL_MENU_HEADER ! #define PLAY_LOCAL_MENU_HEADER 1 #include "MASkinG.h" |