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: <you...@us...> - 2004-01-10 20:26:37
|
Update of /cvsroot/timewarp/source/games In directory sc8-pr-cvs1:/tmp/cvs-serv2054/source/games Added Files: gluagame.cpp Log Message: adding a test Lua game type... probably not the best approach for the long run, but it's an experiment --- NEW FILE: gluagame.cpp --- /* This file contains sample games 1, 2, & 3, otherwise known as Arena, Double Arena, and Eternal Arena. These demonstrate some basics of how to create a Game type in Star Control: TimeWarp */ /* TimeWarp Sample Game 1: Arena This demonstrates how to create a new Game type For this game, we'll just have a bunch of ships fighting the human player. */ //first, we #include the files we need. library headers go first, then melee.h, then any other pieces of TW we need to refer to #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/mlog.h" //networking / demo recording / demo playback #include "../melee/mcontrol.h" //controllers & AIs #include "../melee/mview.h" //Views & text messages #include "../melee/mshppan.h" //ship panels... #include "../melee/mitems.h" //indicators... #include "../melee/mfleet.h" //fleets... extern "C" { #include <lua.h> #include <lualib.h> #include <lauxlib.h> } class LuaGame : public Game { //declaring our game type virtual void init(Log *_log) ; //happens when our game is first started lua_State *L; virtual void LuaGame::quit(const char *message); }; void LuaGame::init(Log *_log) { //you need to call Game::init very early on, to set stuff up... rarely do you want to do anything before that Game::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(); L = lua_open(); luaopen_base(L);//TODO minimize the libraries used here luaopen_table(L); luaopen_io(L); luaopen_string(L); luaopen_math(L); luaopen_debug(L); char str[100] = ""; sprintf(str, "loading file returned %i\n", lua_dofile(L, "./source/games/luatest/bridge.lua")); message.out(str, 3500, 15); //add the starscape background add(new Stars()); // declare an integer we can use for whatever we might need an integer for int i; for (i = 0; i < 3; i += 1) { //this causes the next stuff to happen 3 times add(new Asteroid()); //this adds an asteroid to the game } //so there will be 3 asteroids (asteroids automatically create new asteroids when they die...) //first, we create the teams. This battle has just 2 sides; the human player, and the AI enemies TeamCode human, enemies; human = new_team(); 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 Ship *s = create_ship("plopl", c, Vector2(size.x/2,size.y/2), 0, human); //the 1st parameter is a 5-letter ship code. e.g. plopl = Ploxis Plunderer, andgu = Androsynth Guardian, chmav = Chmmr Avatar, estgu = Estion Gunner, tauhu = Tau Hunter, thrto = Thraddash Torch //the 2nd parameter is the controller for the ship. //the 3th parameter is the positition where it appears. //the 4th parameter is the angle that the ship starts out facing (in radians), 0 in this case, meaning that it points to the right //Note that angles in radians range from 0 to 2 * PI (6.283...), unlike angles in degrees which range from 0 to 360 //You can convert degrees to radians by multiplying by ANGLE_RATIO //the 5th parameter is the team it's on... this parameter is optional... if we leave it out, then it's on it's own team of 1, and everyone is its enemy //I should talk more about the 3rd parametere there, the position //The idea of the position is simple: an X coordinate and a Y coordinate //The X & Y coordinates indicate a point in space. //The ship is placed with its center at that point. //However, even though it's 2 coordinates, it's only one parameter //That's because create_ship takes a 2-dimensional vector (the type for which is called Vector2 in TimeWarp) //the vector contains the X & Y coordinates. //There are many other functions in TimeWarp that take vectors. //When you want to pass one of those functions a constant like x=13.5,y=7.9, you give them Vector2(13.5, 7.9) //When you recieve a Vector2 and want to know what the x or y component of it are , you append .x or .y to the end of it to get those components //In the above example I said "Vector2(size.x/2,size.y/2)" //but it would have been equivalent to just say "size/2" //this causes the ship to warp into the game. note that we call add() on the phaser, not the ship, because the phaser will add the ship once it finishes warping in add(s->get_ship_phaser()); //if we wanted the ship to just appear without warping in, then we would say "add(s);" instead //this causes the human ship to be a focus for the camera add_focus(s); //now, we create some enemies to fight /* Ship *e; e = create_ship(channel_none, "kzedr", "WussieBot", Vector2(size.x/4,size.y/4), random(PI2), enemies); //This is a different syntax for create_ship //It creates a ship and an AI for it at the same time. //AIs created in this way are automatically destroyed when their ship dies //Notice how it takes the parameters normally taken by both a create_control and a create_ship //Anyway, this creates a Kzer-Za Dreadnought, and WussieBot AI to control it //This ship starts facing a random direction from 0 to 2 * PI radians, because of the "random(PI2)" //PI2 is shorthand for 2 * PI in timewarp. In timewarp, random(x) will produce a random number from 0 to x //Notice that it's on channel channel_none. This mean that the AI is considered part of physics and uses no bandwidth in network games //When AIs use channel_none they are not effected by network lag. //You can also use a channel_server or channel_client, to locate the AI on the server or client computer. //If you do so the AI will experience lag and use network bandwidth just like a human player add(e->get_ship_phaser()); e = create_ship(channel_none, "kohma", "WussieBot", Vector2(size.x*3/4,size.y/4), random(PI2), enemies); //here we add a Kohr-Ah Marauder add(e->get_ship_phaser()); e = create_ship(channel_none, "druma", "WussieBot", Vector2(size.x*3/4,size.y*3/4), random(PI2), enemies); //here we add a Druuge Mauler add(e->get_ship_phaser()); e = create_ship(channel_none, "yehte", "WussieBot", Vector2(size.x/4,size.y*3/4), random(PI2), enemies); //here we add a Yehat Terminator add(e->get_ship_phaser()); */ //BTW, this is a vicious combination of enemies. //Yehat for direct assault, Druuge for long range support, //and the Urquans to make life miserable //message.out("Welcome to Sample Game 1: Arena!", 3500, 15); //display a welcoming message to the player //the message is displayed for 3500 milliseconds (3.5 seconds) //in color 15 of the standard TW palette, which is white } void LuaGame::quit(const char *message) { Game::quit(message); lua_close(L); } REGISTER_GAME(LuaGame, "LuaTest") //registering our game type, so that it will appear in the menus |
From: <you...@us...> - 2004-01-10 20:26:37
|
Update of /cvsroot/timewarp/source/games/luatest In directory sc8-pr-cvs1:/tmp/cvs-serv2054/source/games/luatest Added Files: bridge.lua Class.lua SampleUniverse.lua StarClasses.lua Log Message: adding a test Lua game type... probably not the best approach for the long run, but it's an experiment --- NEW FILE: bridge.lua --- -- -- this is a bridge between the Lua and C++ worlds. Very experimental-like! -- require "StarClasses" require "SampleUniverse" local player1 = Player:new() local abc = "abc" print ("ASDFASDF") --- NEW FILE: Class.lua --- ------------------------------------------------------------------------------- -- Class.lua -- adds basic Object-Oriented functionality -- -- Revision History: -- 2003.11.28 youbastrd Started this, based on sample code from the Lua wiki -- (thanks to the wiki authors!) ------------------------------------------------------------------------------- --Creates a new class. Optionally, this makes the returned class a subclass of -- some existing class which was created previously with call to this function. -- The created class will have the following functions: -- new(), class(), superClass(), isa() --Example: -- Mammal = new Class(nil) -- Dog = new Class(Mammal) -- Cat = new Class(Mammal) -- Fido = Dog:new() -- print( Fido.isa(Mammal)) -- prints true -- print( Fido.isa(Dog)) -- prints true -- print( Fido.isa(Cat)) -- prints false -- --@param baseClass the base class to use. Classes with no super-classes should call -- Class(nil) -- function Class( baseClass ) -- local new_class = baseClass or {}; -- local class_mt = { __index = new_class }; -- -- function new_class:new(options) -- local newinst = new_class; -- if ((options) and (type(options)=="table")) then -- for k,v in pairs(options) do -- newinst[k] = v -- end -- end -- -- setmetatable( newinst, class_mt ); -- return newinst; -- end; -- -- if( nil ~= baseClass ) then -- setmetatable( new_class, { __index = baseClass } ); -- end -- -- -- Implementation of additional OO properties starts here -- -- -- -- Return the class object of the instance -- function new_class:class() -- return new_class; -- end; -- -- -- Return the super class object of the instance -- function new_class:superClass() -- return baseClass; -- end; -- -- -- Return true if the caller is an instance of theClass -- function new_class:isa( theClass ) -- local b_isa = false; -- -- local cur_class = new_class; -- -- while( ( nil ~= cur_class ) and ( false == b_isa ) ) do -- if( cur_class == theClass ) then -- b_isa = true; -- else -- cur_class = cur_class:superClass(); -- end; -- end; -- -- return b_isa; -- end; -- -- return new_class; -- end -- A new createSubclass() function -- function Class( baseClass ) local new_class = {}; local class_mt = { __index = new_class }; function new_class:new(objects) local newinst = {}; if (objects and type(objects)=="table") then newinst = objects end setmetatable( newinst, class_mt ); return newinst; end; if( nil ~= baseClass ) then setmetatable( new_class, { __index = baseClass } ); end -- Implementation of additional OO properties starts here -- -- Return the class object of the instance function new_class:class() return new_class; end; -- Return the super class object of the instance function new_class:superClass() return baseClass; end; -- Return true if the caller is an instance of theClass function new_class:isa( theClass ) local b_isa = false; local cur_class = new_class; while( ( nil ~= cur_class ) and ( false == b_isa ) ) do if( cur_class == theClass ) then b_isa = true; else cur_class = cur_class:superClass(); end; end; return b_isa; end; return new_class; end --- NEW FILE: SampleUniverse.lua --- ---------------------------------------------------- --a sample universe ---------------------------------------------------- require ("StarClasses") if (sampleUniverse == nil) then sampleUniverse = Universe:new { sol = Star:new{ name="Sol", x=50, y=30 }, earth = Planet:new{ name="Earth", x=55, y=35, minerals=50 }, luna = Planet:new{ name="Luna", x=57, y=32 }, ACentari = Star:new{ name="Alpha Centari", x=200,y=10 }, } end --- NEW FILE: StarClasses.lua --- ------------------------------------------------------------------------------- --StarClasses.lua Defined a bunch of classes which describe the universe ------------------------------------------------------------------------------- require("Class") SpaceType = { TrueSpace="TrueSpace", HyperSpace="HyperSpace", QuasiSpace="QuasiSpace", HeavySpace="HeavySpace" } SpaceTypeMessage = { TrueSpace="Everything looks normal.", HyperSpace="Everything looks red and strange.", QuasiSpace="Everything is green", HeavySpace="You can't see anything. You are likely to be *eaten* by an Orz." } ------------------------------------------------------------------------------- -- SpaceObject Class ------------------------------------------------------------------------------- SpaceObject = Class(nil) SpaceObject.x = 0 SpaceObject.y = 0 SpaceObject.name = "" function SpaceObject:playerCollide() print("Player Collided with this space object") print("x==",self.x) end ------------------------------------------------------------------------------- -- Star Class ------------------------------------------------------------------------------- Star = Class(SpaceObject) Star.pictureFilename = "" function Star:playerCollide(player) print("\""..player.name.."\" collided with \""..self.name.."\"") player.spaceType = SpaceType.TrueSpace end ------------------------------------------------------------------------------- -- Planet Class ------------------------------------------------------------------------------- Planet = Class(SpaceObject) function Planet:playerCollide() print("Player Collided with this Planet") end Techtonics = { lowest=0, medium=64, extreme=128, highest=128, default=8 } --Planet.techtonics Planet.techtonics = Techtonics.default Minerals = { lowest=0, medium=64, extreme=128, highest=128, default = 8 } --Planet.minerals Planet.minerals = Minerals.default MineralType = { radioactive="Radioactive", metal="Metal", acid="Acid", preciousMetal="Precious Metals" } MineralType.default = MineralType.metal --Planet.mineralType Planet.mineralType = MineralType.default WeatherType = { lowest=0, medium=64, extreme=128, highest=128, default = 8 } Planet.weather = WeatherType.default ------------------------------------------------------------------------------- -- Player Class ------------------------------------------------------------------------------- Player = Class(nil) Player.name = "Player Name" Player.spaceType = SpaceType.HyperSpace Player.HyperSpaceX = 100 Player.HyperSpaceY = 100 Player.TrueSpaceX = 0 Player.TrueSpaceY = 0 Player.QuasiSpaceX = 0 Player.QuasiSpaceY = 0 Player.HeavySpaceX = 0 Player.HeavySpaceY = 0 Player.spaceType = SpaceType.HyperSpace function Player:getPosition() return "("..self[self.spaceType.."X"].. ",".. self[self.spaceType.."Y"] .. ") in " .. SpaceType[self.spaceType] end --function Player:setPosition(x, y, _SpaceType) -- self.["spaceType"..X] .. "," .. self.["spaceType"..Y] .. ") in " -- .. SpaceType[spaceType]) --end ------------------------------------------------------------------------------- -- Universe Class ------------------------------------------------------------------------------- Universe = Class(nil) -- Universe.truespaceObjectList = { } -- Universe.hyperspaceObjectList = { } -- Universe.quasispaceObjectList = { } -- Universe.heavyspaceObjectList = { } -- -- function Universe:addStar(star) -- assert(star, "Universe:addStar(): Can't add nil star") -- hyperspaceObjectList[star.id] = star -- end function Universe:showLocalObjects( spaceType ) assert(spaceType==SpaceType.TrueSpace or spaceType==SpaceType.HyperSpace or spaceType==SpaceType.QuasiSpace or spaceType==SpaceType.HeavySpace, "showLocalObjects(): unknown spaceType - ", spaceType) if (spaceType==SpaceType.TrueSpace) then print( "ID Name (x,y) ") for k,v in pairs(self) do if (v:isa(Planet)) then print(string.format("%8s %18s (%3s,%3s)", k, v.name, v.x, v.y )) elseif (v:isa(Star)) then print(string.format("%8s %18s (%3s,%3s)", k, v.name, v.x, v.y )) end end end if (spaceType==SpaceType.HyperSpace) then print( "ID Name (x,y) ") for k,v in pairs(self) do if (v:isa(Star)) then print(string.format("%8s %18s (%3s,%3s)", k, v.name, v.x, v.y )) end end end if (spaceType==SpaceType.QuasiSpace) then print("TODO") end if (spaceType==SpaceType.HeavySpace) then print("TODO") end end function Universe:showUniverse() print( "ID Name (x,y) Minerals(quantity) Minerals(type) Weather Techtonics") for k,v in pairs(self) do print(string.format("%8s %8s (%3s,%3s)", tostring(k), tostring(v.name), v.x, v.y )) -- print(string.format("%8s %8s (%3s,%3s) %18s %14s %7s %10s", -- tostring(k), tostring(v.name), v.x, v.y, v.minerals, v.mineralType, v.weather, v.techtonics )) end end function Universe:handleCollisions( player ) assert(player.spaceType==SpaceType.TrueSpace or player.spaceType==SpaceType.HyperSpace or player.spaceType==SpaceType.QuasiSpace or player.spaceType==SpaceType.HeavySpace, "showLocalObjects(): unknown spaceType") if (player.spaceType==SpaceType.TrueSpace) then for k,v in pairs(self) do if (v:isa(Planet) and v.x==player.HyperSpaceX and v.y==player.HyperSpaceY) then v:playerCollide(player) elseif (v:isa(Star) and v.x==player.HyperSpaceX and v.y==player.HyperSpaceY) then v:playerCollide(player) end end end if (player.spaceType==SpaceType.HyperSpace) then for k,v in pairs(self) do if (v:isa(Star) and v.x==player.HyperSpaceX and v.y==player.HyperSpaceY) then v:playerCollide(player) end end end if (player.spaceType==SpaceType.QuasiSpace) then print("TODO") end if (player.spaceType==SpaceType.HeavySpace) then print("TODO") end end |
From: <you...@us...> - 2004-01-10 20:24:10
|
Update of /cvsroot/timewarp/source/games/luatest In directory sc8-pr-cvs1:/tmp/cvs-serv1620/luatest Log Message: Directory /cvsroot/timewarp/source/games/luatest added to the repository |
From: <geo...@us...> - 2004-01-10 14:33:19
|
Update of /cvsroot/timewarp In directory sc8-pr-cvs1:/tmp/cvs-serv23340 Modified Files: twwin.dsp Log Message: no message |
From: <geo...@us...> - 2004-01-10 14:32:22
|
Update of /cvsroot/timewarp/source In directory sc8-pr-cvs1:/tmp/cvs-serv23149 Modified Files: scp.cpp Log Message: fixing autoplay bug Index: scp.cpp =================================================================== RCS file: /cvsroot/timewarp/source/scp.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** scp.cpp 4 Jan 2004 23:55:46 -0000 1.31 --- scp.cpp 10 Jan 2004 14:32:19 -0000 1.32 *************** *** 611,616 **** enable(); - meleedata.init(); - /* disable(); --- 611,614 ---- *************** *** 655,659 **** } while((mainRet != MAIN_DIALOG_EXIT) && (mainRet != -1)); - meleedata.deinit(); } --- 653,656 ---- *************** *** 804,807 **** --- 801,805 ---- init_fleet(); init_time(); + meleedata.init(); if (auto_play) {// FIX ME *************** *** 822,825 **** --- 820,824 ---- } + meleedata.deinit(); sound.disable(); disable_input(); |
From: <geo...@us...> - 2004-01-10 14:11:56
|
Update of /cvsroot/timewarp/source/gamex In directory sc8-pr-cvs1:/tmp/cvs-serv19375 Modified Files: gamedata.cpp gamedata.h gamehyper.cpp gamehyper.h gameplanetscan.cpp gameplanetview.cpp gamesolarview.cpp gamesolarview.h gamestarmap.cpp gamestarmap.h projectx.cpp Added Files: gamedata_map.cpp gamedata_map.h Log Message: starmap editor update --- NEW FILE: gamedata_map.cpp --- #include <allegro.h> #include <stdio.h> #include <string.h> #include "../melee.h" REGISTER_FILE #include "../frame.h" #include "../melee/mview.h" #include "gamedata.h" #include "gamedata_map.h" #include "gamegeneral.h" /* void MapStar::init_info() { info = new InfoStar(); info->read(); } */ void MapPlanet::newsub(FILE *f) { fscanf(f, "%i\n\n", &Nsub); if (Nsub < 0 || Nsub > 20) {tw_error("error: invalid system");} sub = (MapSpacebody**) new MapPlanet* [Nsub]; int i; for ( i = 0; i < Nsub; ++i ) { sub[i] = new MapPlanet(); sub[i]->init(f); sub[i]->level = level + 1; } } void MapStar::newsub(FILE *f) { fscanf(f, "%i\n\n", &Nsub); if (Nsub < 0 || Nsub > 20) {tw_error("error: invalid system");} sub = (MapSpacebody**) new MapPlanet* [Nsub]; int i; for ( i = 0; i < Nsub; ++i ) { sub[i] = new MapPlanet(); sub[i]->init(f); sub[i]->level = level + 1; } } void MapEverything::newsub(FILE *f) { fscanf(f, "%i\n\n", &Nsub); if (Nsub < 0 || Nsub > 20) {tw_error("error: invalid system");} sub = (MapSpacebody**) new MapStar* [Nsub]; int i; for ( i = 0; i < Nsub; ++i ) { sub[i] = new MapStar(); sub[i]->init(f); sub[i]->level = level + 1; } } void MapPlanet::init_type(char *s) { typelist = planettypelist; type = typelist->get_index(s); } void MapStar::init_type(char *s) { typelist = startypelist; type = typelist->get_index(s); } void MapEverything::init_type(char *s) { typelist = 0; type = -1; } // the set of every region / quadrant in existence ... void MapEverything::init(char *filename) { level = 0; startypelist = new IndexTypeList("gamex/stars/star_*.ini"); planettypelist = new IndexTypeList("gamex/solarview/planet_*.ini"); surfacetypelist = new IndexTypeList("gamex/planetscan/surface_*.ini"); starsurfacetypelist = new IndexTypeList("gamex/stars/surface_*.ini"); FILE *f = fopen(filename, "rt"); if (!f) { tw_error("failed to initialize map info");} newsub(f); fclose(f); } void MapEverything::discard() { delete startypelist; delete planettypelist; delete surfacetypelist; delete starsurfacetypelist; } void MapEverything::save(char *filename) { FILE *f = fopen(filename, "wt"); if (!f) {tw_error("failed to save map info");} fprintf(f, "%i\n\n", Nsub); int i; for ( i = 0; i < Nsub; ++i ) { sub[i]->save(f); } fclose(f); } // generate a unique (random) id for a map item int MapEverything::gen_id() { int id; for (;;) { id = random(); int i; for ( i = 0; i < Nsub; ++i ) { if (sub[i]->check_id(id)) break; } if (i == Nsub) // id not found break; } return id; } void MapSpacebody::init(FILE *f) { if (!f) { // default settings .. Nsub = 0; sub = 0; strcpy(name, "noname"); type = 0; position = 0; o = 0; return; } char txt[512], chartype[512]; txt[0] = 0; while (!hascontent(txt)) fgets(txt, 512, f); // reads a line, skipping empty lines strncpy(name, txt, 64); if (name[strlen(name)-1] == '\n') name[strlen(name)-1] = 0; fscanf(f, "%s", chartype); // this includes a newline character, which must be skipped: if (chartype[strlen(chartype)-1] == '\n') chartype[strlen(chartype)-1] = 0; init_type(chartype); fscanf(f, "%lf %lf %X", &position.x, &position.y, &id); newsub(f); scalepos = 1; } void MapSpacebody::save(FILE *f) { char base[128]; int i; if (!f) return; for ( i = 0; i < level; ++i ) base[i] = '\t'; base[i] = 0; fprintf(f, "%s %s\n", base, name); if (level == 0) fprintf(f, "%s empty_type\n", base); if (level == 1) fprintf(f, "%s %s\n", base, startypelist->type[this->type].type_string); if (level == 2) fprintf(f, "%s %s\n", base, planettypelist->type[this->type].type_string); if (level == 3) fprintf(f, "%s %s\n", base, planettypelist->type[this->type].type_string); fprintf(f, "%s %lf %lf %X\n", base, position.x, position.y, id); fprintf(f, "%s %i\n\n", base, Nsub); for ( i = 0; i < Nsub; ++i ) sub[i]->save(f); } int MapSpacebody::add() { int i; MapSpacebody **oldsub; oldsub = sub; sub = new MapSpacebody* [Nsub + 1]; for ( i = 0; i < Nsub; ++i ) sub[i] = oldsub[i]; delete oldsub; sub[Nsub] = new MapSpacebody(); sub[Nsub]->init(0); ++Nsub; return Nsub-1; } int MapSpacebody::rem(int k) { if (k < 0 || k >= Nsub || Nsub == 0) return 0; int i; for ( i = k; i < Nsub-1; ++i ) sub[i] = sub[i+1]; --Nsub; return Nsub-1; } bool MapSpacebody::check_id(int id2) { if (id == id2) return true; // check if one of the sub-items have identical id int i; for ( i = 0; i < Nsub; ++i ) { if (sub[i]->check_id(id2)) return true; } // neither this nor any subitem has this id. return false; } --- NEW FILE: gamedata_map.h --- #ifndef __GAMEX_DATA_MAP__ #define __GAMEX_DATA_MAP__ #include "../melee/mframe.h" #include <stdio.h> #include "gamedata.h" class MapSpacebody; // the branches class MapSpacebody { public: //SpacebodyInfo *info; //char type[32]; int type; // the char version should be in a table - why ... because indexed stuff is easier to work with!! IndexTypeList *typelist; Vector2 position; // 0,0 = center char name[64]; SpaceObject *o; double scalepos; int id; int Nsub; MapSpacebody **sub; // at most 3 moons. virtual void init(FILE *f); virtual void save(FILE *f); virtual int add(); virtual int rem(int k); bool check_id(int id2); virtual void newsub(FILE *f) {}; virtual void init_type(char *s) {}; int level; }; class MapPlanet : public MapSpacebody { public: virtual void newsub(FILE *f); virtual void init_type(char *s); }; class MapStar : public MapSpacebody { public: virtual void newsub(FILE *f); virtual void init_type(char *s); }; // the root class MapEverything : public MapSpacebody { public: //int Nregions; //MapSpacebody **region; void init(char *filename); void save(char *filename); void discard(); // virtual void init(FILE *f, int level); // virtual void save(FILE *f, int level); int gen_id(); virtual void newsub(FILE *f); virtual void init_type(char *s); }; extern MapEverything mapeverything; #endif Index: gamedata.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamedata.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gamedata.cpp 5 Jan 2004 22:41:12 -0000 1.7 --- gamedata.cpp 10 Jan 2004 14:11:53 -0000 1.8 *************** *** 11,14 **** --- 11,15 ---- #include "gamedata.h" + #include "gamedata_map.h" #include "gamegeneral.h" *************** *** 17,20 **** --- 18,22 ---- IndexTypeList *planettypelist; IndexTypeList *surfacetypelist; + IndexTypeList *starsurfacetypelist; PlayerInfo playerinfo; *************** *** 125,195 **** - void MapEverything::init(char *filename) - { - startypelist = new IndexTypeList("gamex/types/star_*.ini"); - planettypelist = new IndexTypeList("gamex/types/planet_*.ini"); - surfacetypelist = new IndexTypeList("gamex/planetscan/surface_*.ini"); - - FILE *f = fopen(filename, "rt"); - if (!f) { tw_error("failed to initialize map info");} - - fscanf(f, "%i", &Nregions); - - region = new MapSpacebody* [Nregions]; - - int i; - for ( i = 0; i < Nregions; ++i ) - { - region[i] = new MapSpacebody(); - region[i]->init(f, 0); - } - - fclose(f); - - } - - - - void MapEverything::save(char *filename) - { - - FILE *f = fopen(filename, "wt"); - if (!f) {tw_error("failed to save map info");} - - fprintf(f, "%i\n\n", Nregions); - - int i; - for ( i = 0; i < Nregions; ++i ) - { - region[i]->save(f, 0); - } - - fclose(f); - } - - - // generate a unique (random) id for a map item - int MapEverything::gen_id() - { - int id; - - for (;;) - { - id = random(); - - int i; - for ( i = 0; i < Nregions; ++i ) - { - if (region[i]->check_id(id)) - break; - } - - if (i == Nregions) // id not found - break; - } - - return id; - } - const bool hascontent(char *t) --- 127,130 ---- *************** *** 209,366 **** } - void MapSpacebody::init(FILE *f, int level) - { - if (!f) - { - // default settings .. - Nsub = 0; - sub = 0; - strcpy(name, "noname"); - type = 0; - position = 0; - o = 0; - - return; - } - - char txt[512], chartype[512]; - txt[0] = 0; - while (!hascontent(txt)) - fgets(txt, 512, f); // reads a line, skipping empty lines - - strncpy(name, txt, 64); - if (name[strlen(name)-1] == '\n') - name[strlen(name)-1] = 0; - - fscanf(f, "%s", chartype); - // this includes a newline character, which must be skipped: - if (chartype[strlen(chartype)-1] == '\n') - chartype[strlen(chartype)-1] = 0; - - // it's a region, star, planet, or moon. - - if (level == 0) - type = -1; - - if (level == 1) - type = startypelist->get_index(chartype); - - if (level == 2) - type = planettypelist->get_index(chartype); - - if (level == 3) - type = planettypelist->get_index(chartype); - - fscanf(f, "%lf %lf %X", &position.x, &position.y, &id); - fscanf(f, "%i\n\n", &Nsub); - - if (Nsub < 0 || Nsub > 20) {tw_error("error: invalid system");} - - sub = new MapSpacebody* [Nsub]; - - int i; - for ( i = 0; i < Nsub; ++i ) - { - sub[i] = new MapSpacebody(); - sub[i]->init(f, level+1); - } - - scalepos = 1; - } - - void MapSpacebody::save(FILE *f, int level) - { - char base[128]; - int i; - if (!f) - return; - for ( i = 0; i < level; ++i ) - base[i] = '\t'; - base[i] = 0; - fprintf(f, "%s %s\n", base, name); - if (level == 0) - fprintf(f, "%s empty_type\n", base); - if (level == 1) - fprintf(f, "%s %s\n", base, startypelist->type[this->type].type_string); - - if (level == 2) - fprintf(f, "%s %s\n", base, planettypelist->type[this->type].type_string); - - if (level == 3) - fprintf(f, "%s %s\n", base, planettypelist->type[this->type].type_string); - - - fprintf(f, "%s %lf %lf %X\n", base, position.x, position.y, id); - fprintf(f, "%s %i\n\n", base, Nsub); - - for ( i = 0; i < Nsub; ++i ) - sub[i]->save(f, level+1); - - } - - - int MapSpacebody::add(int level) - { - - int i; - MapSpacebody **oldsub; - - oldsub = sub; - sub = new MapSpacebody* [Nsub + 1]; - - for ( i = 0; i < Nsub; ++i ) - sub[i] = oldsub[i]; - - delete oldsub; - - sub[Nsub] = new MapSpacebody(); - sub[Nsub]->init(0, level); // the level does not matter. - - - ++Nsub; - - return Nsub-1; - } - - - - int MapSpacebody::rem(int k) - { - - if (k < 0 || k >= Nsub || Nsub == 0) - return 0; - - int i; - for ( i = k; i < Nsub-1; ++i ) - sub[i] = sub[i+1]; - --Nsub; - - return Nsub-1; - } - - - bool MapSpacebody::check_id(int id2) - { - if (id == id2) - return true; - - // check if one of the sub-items have identical id - int i; - for ( i = 0; i < Nsub; ++i ) - { - if (sub[i]->check_id(id2)) - return true; - } - - // neither this nor any subitem has this id. - return false; - } --- 144,154 ---- *************** *** 370,373 **** --- 158,168 ---- char **templist; + strcpy(basename, scanname); + char *tmp = strrchr(basename, '*'); // remove the *.ini from the scanname. + if (tmp) + tmp[0] = 0; + else + { tw_error("invalid scanname"); } + createfilelist(&templist, &N, scanname, 1); *************** *** 381,384 **** --- 176,180 ---- delete templist; + } *************** *** 474,478 **** MapSpacebody *starmap = 0, *solarmap = 0, *planetmap = 0; ! starmap = mapeverything.region[0]; if (istar >= 0) --- 270,274 ---- MapSpacebody *starmap = 0, *solarmap = 0, *planetmap = 0; ! starmap = mapeverything.sub[0]; if (istar >= 0) Index: gamedata.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamedata.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gamedata.h 5 Jan 2004 22:41:12 -0000 1.7 --- gamedata.h 10 Jan 2004 14:11:53 -0000 1.8 *************** *** 6,12 **** #include <stdio.h> ! class RaceInfo; --- 6,13 ---- #include <stdio.h> + //#include "gamedata_map.h" ! const bool hascontent(char *t); class RaceInfo; *************** *** 217,273 **** - class MapSpacebody; - - class SpacebodyInfo - { - public: - virtual void init(MapSpacebody *planet) {}; - virtual void write(MapSpacebody *planet) {}; - }; - - - - // the branches - class MapSpacebody - { - public: - SpacebodyInfo *info; - - //char type[32]; - int type; // the char version should be in a table - why ... because indexed stuff is easier to work with!! - Vector2 position; // 0,0 = center - char name[64]; - SpaceObject *o; - double scalepos; - - int id; - int Nsub; - MapSpacebody **sub; // at most 3 moons. - - virtual void init(FILE *f, int level); - virtual void save(FILE *f, int level); - virtual int add(int level); - virtual int rem(int k); - - bool check_id(int id2); - }; - - - - // the root - class MapEverything - { - public: - int Nregions; - MapSpacebody **region; - - void init(char *filename); - void save(char *filename); - - int gen_id(); - }; - - extern MapEverything mapeverything; - --- 218,221 ---- *************** *** 287,290 **** --- 235,240 ---- struct IndexTypeList { + char basename[512]; + int N, max; IndexType *type; *************** *** 301,304 **** --- 251,255 ---- //extern IndexTypeList *moontypelist; // moons or small planets are not distinguishable extern IndexTypeList *surfacetypelist; + extern IndexTypeList *starsurfacetypelist; #endif Index: gamehyper.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamehyper.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gamehyper.cpp 4 Jan 2004 22:06:59 -0000 1.5 --- gamehyper.cpp 10 Jan 2004 14:11:53 -0000 1.6 *************** *** 77,81 **** R = distance(follow); ! double s = mapeverything.region[0]->scalepos; if (R > s * r_visual * 1.1) state = 0; --- 77,81 ---- R = distance(follow); ! double s = mapeverything.sub[0]->scalepos; if (R > s * r_visual * 1.1) state = 0; *************** *** 105,109 **** { Vector2 P; ! P = mapeverything.region[0]->sub[b->istar]->position; --- 105,109 ---- { Vector2 P; ! P = mapeverything.sub[0]->sub[b->istar]->position; *************** *** 378,382 **** if (playinf->istar >= 0) { ! MapSpacebody *starmap = mapeverything.region[0]; pos = starmap->sub[playinf->istar]->position; } --- 378,382 ---- if (playinf->istar >= 0) { ! MapSpacebody *starmap = mapeverything.sub[0]; pos = starmap->sub[playinf->istar]->position; } *************** *** 491,495 **** // create star objects ! starmap = mapeverything.region[0]; // use the starmap of the 1st region --- 491,495 ---- // create star objects ! starmap = mapeverything.sub[0]; // use the starmap of the 1st region Index: gamehyper.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamehyper.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gamehyper.h 4 Jan 2004 22:06:59 -0000 1.5 --- gamehyper.h 10 Jan 2004 14:11:53 -0000 1.6 *************** *** 3,6 **** --- 3,7 ---- #include "gameproject.h" + #include "gamedata_map.h" #include "gamedata.h" #include "gamegeneral.h" Index: gameplanetscan.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gameplanetscan.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gameplanetscan.cpp 5 Jan 2004 22:41:12 -0000 1.4 --- gameplanetscan.cpp 10 Jan 2004 14:11:53 -0000 1.5 *************** *** 497,501 **** */ ! class SurfaceInfo : public SpacebodyInfo { --- 497,501 ---- */ ! /* class SurfaceInfo : public SpacebodyInfo { *************** *** 543,547 **** void SurfaceInfo::write(MapSpacebody *planet) { ! /* CHANGED: this is edited/written only in solarview/planetview mode !! char tmp[16]; sprintf(tmp, "%X", planet->id); --- 543,547 ---- void SurfaceInfo::write(MapSpacebody *planet) { ! CHANGED: this is edited/written only in solarview/planetview mode !! char tmp[16]; sprintf(tmp, "%X", planet->id); *************** *** 569,573 **** set_config_int("stats", "weather", weatherclass); set_config_int("stats", "tectonics", tectonicsclass); ! */ } --- 569,573 ---- set_config_int("stats", "weather", weatherclass); set_config_int("stats", "tectonics", tectonicsclass); ! } *************** *** 678,682 **** } ! --- 678,682 ---- } ! */ *************** *** 717,721 **** int istar, iplanet, imoon; MapSpacebody *starmap, *solarmap, *planetmap, *moonmap; ! starmap = mapeverything.region[0]; // use the starmap of the 1st region istar = playerinfo.istar; --- 717,721 ---- int istar, iplanet, imoon; MapSpacebody *starmap, *solarmap, *planetmap, *moonmap; ! starmap = mapeverything.sub[0]; // use the starmap of the 1st region istar = playerinfo.istar; Index: gameplanetview.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gameplanetview.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** gameplanetview.cpp 5 Jan 2004 22:41:12 -0000 1.10 --- gameplanetview.cpp 10 Jan 2004 14:11:53 -0000 1.11 *************** *** 74,78 **** // create star objects ?! int istar, iplanet; ! starmap = mapeverything.region[0]; // use the starmap of the 1st region --- 74,78 ---- // create star objects ?! int istar, iplanet; ! starmap = mapeverything.sub[0]; // use the starmap of the 1st region *************** *** 230,237 **** mapeditor->set_game(this, ptr); ! mapeditor->init_interface(T, usefont, planettypespr, surfacebmp); ! mapeditor->set_mapinfo( planetmap, 3, 1.0); mapeditor->mapcenter = centerpos; --- 230,239 ---- mapeditor->set_game(this, ptr); ! //mapeditor->init_interface(T, usefont, planettypespr, surfacebmp); ! mapeditor->init_interface(T, usefont, planettypespr, planettypelist->N, ! surfacebmp, surfacetypelist->N); ! mapeditor->set_mapinfo( planetmap, 1.0); mapeditor->mapcenter = centerpos; *************** *** 262,266 **** // set the player position exactly equal to the planet for appearing in solar orbit MapSpacebody *solarmap; ! solarmap = mapeverything.region[0]->sub[playerinfo.istar]; playerinfo.pos = solarmap->sub[playerinfo.iplanet]->position * solarmap->scalepos; playerinfo.vel = 0; --- 264,268 ---- // set the player position exactly equal to the planet for appearing in solar orbit MapSpacebody *solarmap; ! solarmap = mapeverything.sub[0]->sub[playerinfo.istar]; playerinfo.pos = solarmap->sub[playerinfo.iplanet]->position * solarmap->scalepos; playerinfo.vel = 0; Index: gamesolarview.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamesolarview.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gamesolarview.cpp 5 Jan 2004 22:41:12 -0000 1.7 --- gamesolarview.cpp 10 Jan 2004 14:11:53 -0000 1.8 *************** *** 37,41 **** { char tmp[512]; ! sprintf(tmp, "gamex/solarview/planet_%s_01.bmp", planettypelist->type[i].type_string); (*planettypespr)[i] = create_sprite( tmp, SpaceSprite::MASKED ); } --- 37,43 ---- { char tmp[512]; ! sprintf(tmp, "%s%s_01.bmp", ! "gamex/solarview/planet_", ! planettypelist->type[i].type_string); (*planettypespr)[i] = create_sprite( tmp, SpaceSprite::MASKED ); } *************** *** 50,54 **** { char tmp[512]; ! sprintf(tmp, "gamex/planetscan/surface_%s_01.bmp", surfacetypelist->type[i].type_string); load_bitmap32(&(*surfacebmp)[i], tmp); scale_bitmap32(&(*surfacebmp)[i], 0.2); --- 52,58 ---- { char tmp[512]; ! sprintf(tmp, "%s%s_01.bmp", ! surfacetypelist->basename, ! surfacetypelist->type[i].type_string); load_bitmap32(&(*surfacebmp)[i], tmp); scale_bitmap32(&(*surfacebmp)[i], 0.2); *************** *** 143,149 **** void MapEditor2::init_interface(TWindow *T, ! FONT *usefont, SpaceSprite **planettypespr, ! BITMAP **surfacebmp) { Tedit = new IconTV("gamex/interface/planetview/edit", 1400, 900, game_screen); --- 147,169 ---- + + void MapEditor2::define_stats() + { + ved->values[0]->set(vtype_float, "atmospheric pressure", 0.0, 100.0); + ved->values[1]->set(vtype_float, "radius (es)", 0.1, 100.0); + ved->values[2]->set(vtype_float, "density (kg/m3)", 0.5, 6.0); + ved->values[3]->set(vtype_float, "day (es))", 0.0, 100.0); + ved->values[4]->set(vtype_float, "tilt (degr)", 0.0, 90.0); + ved->values[5]->set(vtype_float, "albedo", 0.0, 1.0); + ved->values[6]->set(vtype_float, "greenhouse", 0.0, 1.0); + ved->values[7]->set(vtype_int, "weather", 0, 9); + ved->values[8]->set(vtype_int, "tectonics", 0, 9); + } + + + void MapEditor2::init_interface(TWindow *T, ! FONT *usefont, SpaceSprite **planettypespr, int N1, ! BITMAP **surfacebmp, int N2) { Tedit = new IconTV("gamex/interface/planetview/edit", 1400, 900, game_screen); *************** *** 151,158 **** bnew = new Button(Tedit, "new_"); breplace = new Button(Tedit, "replace_"); ! Tedit->tv->set(planettypespr, planettypelist->N); tvsurf = new TVarea(Tedit, "plot2_"); ! tvsurf->set(surfacebmp, surfacetypelist->N); ved = new ValueEdit(Tedit, "values_", usefont, 64); --- 171,178 ---- bnew = new Button(Tedit, "new_"); breplace = new Button(Tedit, "replace_"); ! Tedit->tv->set(planettypespr, N1); tvsurf = new TVarea(Tedit, "plot2_"); ! tvsurf->set(surfacebmp, N2); ved = new ValueEdit(Tedit, "values_", usefont, 64); *************** *** 161,173 **** ved->edit->text_color = makecol(200,200,200); ! ved->values[0]->set(vtype_float, "atmospheric pressure", 0.0, 100.0); ! ved->values[1]->set(vtype_float, "radius (es)", 0.1, 100.0); ! ved->values[2]->set(vtype_float, "density (kg/m3)", 0.5, 6.0); ! ved->values[3]->set(vtype_float, "day (es))", 0.0, 100.0); ! ved->values[4]->set(vtype_float, "tilt (degr)", 0.0, 90.0); ! ved->values[5]->set(vtype_float, "albedo", 0.0, 1.0); ! ved->values[6]->set(vtype_float, "greenhouse", 0.0, 1.0); ! ved->values[7]->set(vtype_int, "weather", 0, 9); ! ved->values[8]->set(vtype_int, "tectonics", 0, 9); T->add(Tedit); --- 181,185 ---- ved->edit->text_color = makecol(200,200,200); ! define_stats(); T->add(Tedit); *************** *** 237,241 **** colorizeobj((SolarBody*) selection); ! save_surface(); } --- 249,253 ---- colorizeobj((SolarBody*) selection); ! save_stats(); } *************** *** 246,250 **** MapEditor::newselection(); ! init_surface(); isurfacetype = tvsurf->isel; --- 258,262 ---- MapEditor::newselection(); ! init_stats(); isurfacetype = tvsurf->isel; *************** *** 305,309 **** // write stuff to a .ini file ... ! save_surface(); } --- 317,321 ---- // write stuff to a .ini file ... ! save_stats(); } *************** *** 312,328 **** ! ! void MapEditor2::save_surface() { - if (!selection) - return; - - int id; - id = objmap->sub[ selection->starnum ]->id; - - char tmp[512]; - sprintf(tmp, "gamex/gamedata/surface/%08X.ini", id); - set_config_file(tmp); - set_config_float(0, "atmo", ved->values[0]->value); set_config_float(0, "radius", ved->values[1]->value); --- 324,329 ---- ! void MapEditor2::set_config() { set_config_float(0, "atmo", ved->values[0]->value); set_config_float(0, "radius", ved->values[1]->value); *************** *** 339,351 **** t = surfacetypelist->type[tvsurf->isel].type_string; set_config_string(0, "surface", t); - - - flush_config_file(); } ! ! ! void MapEditor2::init_surface() { if (!selection) --- 340,347 ---- t = surfacetypelist->type[tvsurf->isel].type_string; set_config_string(0, "surface", t); } ! void MapEditor2::save_stats() { if (!selection) *************** *** 359,362 **** --- 355,366 ---- set_config_file(tmp); + set_config(); + + flush_config_file(); + } + + + void MapEditor2::get_config() + { ved->values[0]->value = get_config_float(0, "atmo", 0); ved->values[1]->value = get_config_float(0, "radius", 0); *************** *** 372,378 **** --- 376,398 ---- // and the surface type ? + char tmp[512]; strcpy(tmp, get_config_string(0, "surface", "default")); tvsurf->set_sel ( surfacetypelist->get_index(tmp, 0) ); + } + + void MapEditor2::init_stats() + { + if (!selection) + return; + + int id; + id = objmap->sub[ selection->starnum ]->id; + + char tmp[512]; + sprintf(tmp, "gamex/gamedata/surface/%08X.ini", id); + set_config_file(tmp); + + get_config(); } *************** *** 462,466 **** // create star objects ?! ! starmap = mapeverything.region[0]; // use the starmap of the 1st region // playerinfo.istar = 0; --- 482,486 ---- // create star objects ?! ! starmap = mapeverything.sub[0]; // use the starmap of the 1st region // playerinfo.istar = 0; *************** *** 616,622 **** mapeditor->set_game(this, ptr); ! mapeditor->init_interface(T, usefont, planettypespr, surfacebmp); ! mapeditor->set_mapinfo( solarmap, 2, 1.0); mapeditor->mapcenter = sunpos; --- 636,643 ---- mapeditor->set_game(this, ptr); ! mapeditor->init_interface(T, usefont, planettypespr, planettypelist->N, ! surfacebmp, surfacetypelist->N); ! mapeditor->set_mapinfo( solarmap, 1.0); mapeditor->mapcenter = sunpos; *************** *** 721,725 **** // set the player position exactly equal to the star for appearing in solar orbit MapSpacebody *starmap; ! starmap = mapeverything.region[0]; playerinfo.pos = starmap->sub[playerinfo.istar]->position * starmap->scalepos; playerinfo.vel = 0; --- 742,746 ---- // set the player position exactly equal to the star for appearing in solar orbit MapSpacebody *starmap; ! starmap = mapeverything.sub[0]; playerinfo.pos = starmap->sub[playerinfo.istar]->position * starmap->scalepos; playerinfo.vel = 0; Index: gamesolarview.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamesolarview.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gamesolarview.h 5 Jan 2004 22:41:12 -0000 1.5 --- gamesolarview.h 10 Jan 2004 14:11:53 -0000 1.6 *************** *** 42,48 **** virtual void colorizeobj(SolarBody *s); ! void init_interface(TWindow *T, FONT *usefont, SpaceSprite **planettypespr, BITMAP **surfacebmp); ! void save_surface(); ! void init_surface(); void check_radius(); }; --- 42,54 ---- virtual void colorizeobj(SolarBody *s); ! virtual void define_stats(); ! void init_interface(TWindow *T, FONT *usefont, SpaceSprite **planettypespr, ! int N1, BITMAP **surfacebmp, int N2); ! ! virtual void save_stats(); ! virtual void set_config(); ! virtual void init_stats(); ! virtual void get_config(); ! void check_radius(); }; Index: gamestarmap.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamestarmap.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** gamestarmap.cpp 5 Jan 2004 22:41:12 -0000 1.8 --- gamestarmap.cpp 10 Jan 2004 14:11:53 -0000 1.9 *************** *** 15,18 **** --- 15,19 ---- #include "../util/history.h" + #include "gamedata.h" #include "gamestarmap.h" *************** *** 97,100 **** --- 98,136 ---- + + void GameStarmap::load_startypes(SpaceSprite ***planettypespr) + { + // load star sprites + startypespr = new SpaceSprite* [startypelist->N]; + int i; + for ( i = 0; i < startypelist->N; ++i ) + { + char tmp[512]; + sprintf(tmp, "%s%s_01.bmp", + startypelist->basename, + startypelist->type[i].type_string); + startypespr[i] = create_sprite( tmp, SpaceSprite::MASKED ); + } + } + + + void GameStarmap::load_surfacetypes(BITMAP ***surfacebmp) + { + // load surface bitmaps + (*surfacebmp) = new BITMAP* [starsurfacetypelist->N]; + int i; + for ( i = 0; i < starsurfacetypelist->N; ++i ) + { + char tmp[512]; + sprintf(tmp, "%s%s_01.bmp", + starsurfacetypelist->basename, + starsurfacetypelist->type[i].type_string); + load_bitmap32(&(*surfacebmp)[i], tmp); + scale_bitmap32(&(*surfacebmp)[i], 0.2); + } + } + + + void GameStarmap::init() { *************** *** 111,116 **** prepare(); - // mapwrap = false; - //wininfo.init( Vector2(400,400), 800.0, tempframe ); wininfo.zoomlimit(size.x); wininfo.center(Vector2(0,0)); --- 147,150 ---- *************** *** 118,121 **** --- 152,156 ---- + /* // load star sprites startypespr = new SpaceSprite* [startypelist->N]; *************** *** 127,136 **** startypespr[i] = create_sprite( tmp, SpaceSprite::MASKED ); } ! // create star objects ?! ! starmap = mapeverything.region[0]; // use the starmap of the 1st region starmap->scalepos = scalepos; ! starspr = new SpaceSprite* [starmap->Nsub]; for ( i = 0; i < starmap->Nsub; ++i ) --- 162,177 ---- startypespr[i] = create_sprite( tmp, SpaceSprite::MASKED ); } + */ ! // load planet sprites ! load_startypes(&startypespr); ! load_surfacetypes(&surfacebmp); ! ! // create star objects ! starmap = mapeverything.sub[0]; // use the starmap of the 1st region starmap->scalepos = scalepos; ! int i; ! char tmp[512]; for ( i = 0; i < starmap->Nsub; ++i ) *************** *** 140,149 **** k = starmap->sub[i]->type; ! starspr[i] = new SpaceSprite(startypespr[k]->get_bitmap(0)); ! double T = 6000.0; ! colorize(starspr[i], spec_r(T), spec_g(T), spec_b(T)); ! brighten(starspr[i]); ! star = new MapObj(0, starmap->sub[i]->position * scalepos, 0.0, starspr[i]); star->starnum = i; --- 181,196 ---- k = starmap->sub[i]->type; ! starspr = new SpaceSprite(startypespr[k]->get_bitmap(0)); ! double T; ! ! sprintf(tmp, "gamex/gamedata/surface/%08X.ini", starmap->sub[i]->id); ! set_config_file(tmp); ! T = get_config_float(0, "temperature", 5000.0); ! ! colorize(starspr, spec_r(T), spec_g(T), spec_b(T)); ! brighten(starspr); ! ! star = new MapObj(0, starmap->sub[i]->position * scalepos, 0.0, starspr); star->starnum = i; *************** *** 166,213 **** keyper = new Periodics(0.1); - // selectionstar = 0; - // lastselectionstar = 0; - // maphaschanged = false; // check if the map changed; if so, it's to be written back to disk - // define another (sub)menu ! Tedit = new IconTV("gamex/interface/starmap/edit", 400, 200, game_screen); ! Tedit->exclusive = false; ! bnew = new Button(Tedit, "new_"); ! breplace = new Button(Tedit, "replace_"); ! Tedit->tv->set(startypespr, startypelist->N); ! - T->add(Tedit); - T->tree_doneinit(); ! Tedit->show(); ! Tedit->focus(); ! Tedit->layer = 1; // shown first ! T->layer = 2; // always shown later ! mapeditor = new MapEditor(); mapeditor->set_game(this, ptr); ! mapeditor->set_interface( Tedit, breplace, bnew ); ! mapeditor->set_mapinfo( starmap, 1, scalepos); ! ! ! /* ! // create a colony somewhere ?? For testing purpose only ... ! RaceInfo *race; ! RaceColony *colony; ! race = new RaceInfo("testrace", makecol(100,20,20)); ! add(race); - colony = new RaceColony(race); - colony->locate(0, 0, -1); - colony->patrol.range = 1000; - add(colony); - */ } --- 213,243 ---- keyper = new Periodics(0.1); // define another (sub)menu ! // Tedit = new IconTV("gamex/interface/starmap/edit", 400, 200, game_screen); ! // Tedit->exclusive = false; ! // bnew = new Button(Tedit, "new_"); ! // breplace = new Button(Tedit, "replace_"); ! // Tedit->tv->set(startypespr, startypelist->N); ! FONT *usefont = videosystem.get_font(3); ! mapeditor = new MapEditor1(); mapeditor->set_game(this, ptr); ! // mapeditor->init_interface(T, usefont, startypespr, surfacebmp); ! mapeditor->init_interface(T, usefont, startypespr, startypelist->N, ! surfacebmp, starsurfacetypelist->N); ! mapeditor->set_mapinfo( starmap, scalepos); ! T->tree_doneinit(); ! mapeditor->Tedit->show(); ! mapeditor->Tedit->focus(); ! T->layer = 2; // always shown later } *************** *** 265,269 **** if (ptr->pos.x == 0 || ptr->pos.y == 0 || !maparea->hasmouse()) hideallegromouse = false; ! else if (Tedit->grabbedmouse) hideallegromouse = false; else --- 295,299 ---- if (ptr->pos.x == 0 || ptr->pos.y == 0 || !maparea->hasmouse()) hideallegromouse = false; ! else if (mapeditor->Tedit->grabbedmouse) hideallegromouse = false; else *************** *** 326,332 **** delete startypespr; ! for ( i = 0; i < starmap->Nsub; ++i ) ! delete starspr[i]; ! delete starspr; if (mapeditor->maphaschanged) --- 356,362 ---- delete startypespr; ! for ( i = 0; i < starsurfacetypelist->N; ++i ) ! del_bitmap(&surfacebmp[i]); ! delete surfacebmp; if (mapeditor->maphaschanged) *************** *** 341,344 **** --- 371,466 ---- + + + + + + + void MapEditor1::define_stats() + { + ved->values[0]->set(vtype_float, "temperature", 2000.0, 100000.0); + ved->values[1]->set(vtype_float, "radius (s)", 0.01, 1000.0); + } + + + + void MapEditor1::set_config() + { + set_config_float(0, "temperature", ved->values[0]->value); + set_config_float(0, "radius", ved->values[1]->value); + + // and the surface type string ? + char *t; + t = starsurfacetypelist->type[tvsurf->isel].type_string; + set_config_string(0, "surface", t); + } + + + void MapEditor1::get_config() + { + + ved->values[0]->value = get_config_float(0, "temperature", 0); + ved->values[1]->value = get_config_float(0, "radius", 0); + + ved->edit_update(); + + // and the surface type ? + char tmp[512]; + strcpy(tmp, get_config_string(0, "surface", "default")); + tvsurf->set_sel ( surfacetypelist->get_index(tmp, 0) ); + + } + + + + + MapObj *MapEditor1::create_mapobj(Vector2 pos) + { + + MapObj *s; + + s = new MapObj(0, pos, 0.0, Tedit->tv->makespr()); + s->starnum = Tedit->tv->isel; + + return s; + } + + + + void MapEditor1::move() + { + MapEditor::move(); + + SolarBody *s; + s = (SolarBody*) selection; + + s->stayhere = s->pos; // in this case, movement is allowed ... + + } + + + + + void MapEditor1::colorizeobj(SolarBody *s) + { + SpaceSprite *spr = s->get_sprite(); + + double temperature = ved->values[0]->value; + + double rat, gat, bat; // extra atmospheric weight. + rat = 0.7; // you don't have that on a starship, + gat = 0.6; // but well, this makes it more understandable + bat = 0.4; // for us earthdwellers ... otherwise the sun would look slightly blueish ... + // the blue reduction is somewhat exaggerated + + double rc, gc, bc; + rc = spec_r(temperature) * rat; + gc = spec_g(temperature) * gat; + bc = spec_b(temperature) * bat; + + balance(&rc, &gc, &bc); + colorize(spr, rc, gc, bc); + brighten(spr); + } Index: gamestarmap.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamestarmap.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gamestarmap.h 4 Jan 2004 22:07:00 -0000 1.6 --- gamestarmap.h 10 Jan 2004 14:11:53 -0000 1.7 *************** *** 8,11 **** --- 8,13 ---- #include "gamegeneral.h" + #include "gamesolarview.h" + #include "../twgui/twbuttontypes.h" #include "../twgui/twpopup.h" *************** *** 20,23 **** --- 22,40 ---- + class MapEditor1 : public MapEditor2 + { + public: + virtual MapObj *create_mapobj(Vector2 pos); + virtual void move(); + + virtual void colorizeobj(SolarBody *s); + + virtual void define_stats(); + + virtual void set_config(); + virtual void get_config(); + }; + + *************** *** 27,36 **** public: ! IconTV *Tedit; // contents of Tedit ! Button *bnew, *breplace; //int istarselect; ! MapEditor *mapeditor; double scalepos; --- 44,53 ---- public: ! // IconTV *Tedit; // contents of Tedit ! // Button *bnew, *breplace; //int istarselect; ! MapEditor1 *mapeditor; double scalepos; *************** *** 61,69 **** virtual void animate(Frame *frame); ! SpaceSprite **startypespr, **starspr, *playerspr; ! //bool maphaschanged; ! // void update_bplot(); ! //void mapeditor_stuff(); }; --- 78,87 ---- virtual void animate(Frame *frame); ! SpaceSprite **startypespr, *starspr, *playerspr; ! BITMAP **surfacebmp; ! ! void load_startypes(SpaceSprite ***planettypespr); ! void load_surfacetypes(BITMAP ***surfacebmp); }; Index: projectx.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/projectx.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** projectx.cpp 5 Jan 2004 22:41:12 -0000 1.10 --- projectx.cpp 10 Jan 2004 14:11:53 -0000 1.11 *************** *** 81,87 **** ! // add( new GameStarmap() ); // add( new GameSolarview() ); ! add( new GamePlanetview() ); // add( new GamePlanetscan() ); // add( new GameMelee() ); --- 81,87 ---- ! add( new GameStarmap() ); // add( new GameSolarview() ); ! // add( new GamePlanetview() ); // add( new GamePlanetscan() ); // add( new GameMelee() ); *************** *** 100,102 **** --- 100,104 ---- // save edited races info (only saves changes) racelist.writeracelist(); + + mapeverything.discard(); } |
From: <geo...@us...> - 2004-01-10 14:11:56
|
Update of /cvsroot/timewarp/source/gamex/stuff In directory sc8-pr-cvs1:/tmp/cvs-serv19375/stuff Modified Files: space_body.cpp space_body.h Log Message: starmap editor update Index: space_body.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/stuff/space_body.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** space_body.cpp 5 Jan 2004 22:41:12 -0000 1.5 --- space_body.cpp 10 Jan 2004 14:11:53 -0000 1.6 *************** *** 268,273 **** breplace = 0; - maplevel = 0; - scalepos = 0; --- 268,271 ---- *************** *** 299,306 **** } ! void MapEditor::set_mapinfo( MapSpacebody *aobjmap, int amaplevel, double ascalepos) { objmap = aobjmap; - maplevel = amaplevel; scalepos = ascalepos; } --- 297,303 ---- } ! void MapEditor::set_mapinfo( MapSpacebody *aobjmap, double ascalepos) { objmap = aobjmap; scalepos = ascalepos; } *************** *** 333,337 **** // also ... add it to the map ?? with default settings .. ! selection->starnum = objmap->add(maplevel); // level 1 = stars int k; --- 330,334 ---- // also ... add it to the map ?? with default settings .. ! selection->starnum = objmap->add(); // level 1 = stars int k; Index: space_body.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/stuff/space_body.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** space_body.h 5 Jan 2004 22:41:12 -0000 1.4 --- space_body.h 10 Jan 2004 14:11:53 -0000 1.5 *************** *** 2,5 **** --- 2,6 ---- #define __GAMEX_SPACE_BODY__ + #include "../gamedata_map.h" // ellips of planet orbit *************** *** 82,86 **** MapSpacebody *objmap; - int maplevel; IconTV *Tedit; --- 83,86 ---- *************** *** 106,110 **** void set_game(GameBare *agame, MousePtr *aptr); void set_interface( IconTV *aTedit, Button *abreplace, Button *abnew ); ! void set_mapinfo( MapSpacebody *aobjmap, int amaplevel, double ascalepos); virtual MapObj *create_mapobj(Vector2 pos); --- 106,110 ---- void set_game(GameBare *agame, MousePtr *aptr); void set_interface( IconTV *aTedit, Button *abreplace, Button *abnew ); ! void set_mapinfo( MapSpacebody *aobjmap, double ascalepos); virtual MapObj *create_mapobj(Vector2 pos); |
Update of /cvsroot/timewarp/gamex/stars In directory sc8-pr-cvs1:/tmp/cvs-serv19182/stars Added Files: star_big.ini star_dwarf.ini star_giant.ini star_medium.ini star_small.ini surface_default.ini surface_default_01.bmp Log Message: starmap editor update --- NEW FILE: star_big.ini --- descr = Big tempmin = 2500 tempmax = 15000 rmin = 5 rmax = 50 --- NEW FILE: star_dwarf.ini --- descr = Big tempmin = 2000 tempmax = 50000 rmin = 0.001 rmax = 0.01 --- NEW FILE: star_giant.ini --- descr = Giant tempmin = 2500 tempmax = 8000 rmin = 50 rmax = 1000 --- NEW FILE: star_medium.ini --- descr = Big tempmin = 4000 tempmax = 50000 rmin = 0.5 rmax = 5 --- NEW FILE: star_small.ini --- descr = Big tempmin = 2000 tempmax = 4000 rmin = 0.1 rmax = 0.5 --- NEW FILE: surface_default.ini --- --- NEW FILE: surface_default_01.bmp --- (This appears to be a binary file; contents omitted.) |
From: <geo...@us...> - 2004-01-10 14:10:34
|
Update of /cvsroot/timewarp/gamex/solarview In directory sc8-pr-cvs1:/tmp/cvs-serv19182/solarview Added Files: planet_big.ini planet_dwarf.ini planet_giant.ini planet_medium.ini planet_small.ini Log Message: starmap editor update --- NEW FILE: planet_big.ini --- descr = Big tempmin = 2500 tempmax = 15000 rmin = 5 rmax = 50 --- NEW FILE: planet_dwarf.ini --- descr = Big tempmin = 2000 tempmax = 50000 rmin = 0.001 rmax = 0.01 --- NEW FILE: planet_giant.ini --- descr = Giant tempmin = 2500 tempmax = 8000 rmin = 50 rmax = 1000 --- NEW FILE: planet_medium.ini --- descr = Big tempmin = 4000 tempmax = 50000 rmin = 0.5 rmax = 5 --- NEW FILE: planet_small.ini --- descr = Big tempmin = 2000 tempmax = 4000 rmin = 0.1 rmax = 0.5 |
From: <geo...@us...> - 2004-01-10 14:10:34
|
Update of /cvsroot/timewarp/gamex/player In directory sc8-pr-cvs1:/tmp/cvs-serv19182/player Modified Files: playerinfo.ini Log Message: starmap editor update Index: playerinfo.ini =================================================================== RCS file: /cvsroot/timewarp/gamex/player/playerinfo.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** playerinfo.ini 4 Jan 2004 23:52:13 -0000 1.3 --- playerinfo.ini 10 Jan 2004 14:10:31 -0000 1.4 *************** *** 1,8 **** RU = 1200.000000 ! Angle = 30.709066 PlanetCode = -1 Moon = -1 Planet = -1 ! Star = -1 ! PosY = 5.500211 ! PosX = 8.819304 --- 1,8 ---- RU = 1200.000000 ! Angle = 21.834066 PlanetCode = -1 Moon = -1 Planet = -1 ! Star = 0 ! PosY = 542.372864 ! PosX = 1966.101685 |
Update of /cvsroot/timewarp/gamex/gamedata/surface In directory sc8-pr-cvs1:/tmp/cvs-serv19182/gamedata/surface Modified Files: 00000003.ini 00000004.ini 00000005.ini 00000006.ini Added Files: 00000002.ini 00000007.ini 37B74224.ini 515DD970.ini 6747AA28.ini Log Message: starmap editor update --- NEW FILE: 00000002.ini --- surface = default radius = 1.186036 temperature = 8308.507813 --- NEW FILE: 00000007.ini --- surface = default radius = 4.033243 temperature = 5114.515137 --- NEW FILE: 37B74224.ini --- surface = small_purp tectonics = 0 weather = 0 greenhouse = 0.000000 albedo = 0.000000 tilt = 0.000000 day = 0.000000 density = 0.000000 radius = 0.000000 atmo = 0.000000 --- NEW FILE: 515DD970.ini --- surface = icy tectonics = 0 weather = 0 greenhouse = 0.000000 albedo = 0.000000 tilt = 0.000000 day = 0.000000 density = 0.000000 radius = 0.000000 atmo = 0.000000 --- NEW FILE: 6747AA28.ini --- surface = europe tectonics = 0 weather = 0 greenhouse = 0.000000 albedo = 0.000000 tilt = 0.000000 day = 0.000000 density = 0.000000 radius = 0.000000 atmo = 0.000000 Index: 00000003.ini =================================================================== RCS file: /cvsroot/timewarp/gamex/gamedata/surface/00000003.ini,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 00000003.ini 4 Jan 2004 22:36:42 -0000 1.1.1.1 --- 00000003.ini 10 Jan 2004 14:10:31 -0000 1.2 *************** *** 1,3 **** ! surface = classM tectonics = 0 weather = 0 --- 1,3 ---- ! surface = medium_red tectonics = 0 weather = 0 *************** *** 8,10 **** density = 0.000000 radius = 0.000000 ! atmo = 0.000000 --- 8,10 ---- density = 0.000000 radius = 0.000000 ! atmo = 0.004408 Index: 00000004.ini =================================================================== RCS file: /cvsroot/timewarp/gamex/gamedata/surface/00000004.ini,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 00000004.ini 4 Jan 2004 22:36:42 -0000 1.1.1.1 --- 00000004.ini 10 Jan 2004 14:10:31 -0000 1.2 *************** *** 8,10 **** density = 0.000000 radius = 0.000000 ! atmo = 0.000000 --- 8,10 ---- density = 0.000000 radius = 0.000000 ! atmo = 16.468678 Index: 00000005.ini =================================================================== RCS file: /cvsroot/timewarp/gamex/gamedata/surface/00000005.ini,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 00000005.ini 4 Jan 2004 22:36:42 -0000 1.1.1.1 --- 00000005.ini 10 Jan 2004 14:10:31 -0000 1.2 *************** *** 8,10 **** density = 0.000000 radius = 0.108590 ! atmo = 0.000000 --- 8,10 ---- density = 0.000000 radius = 0.108590 ! atmo = 0.696504 Index: 00000006.ini =================================================================== RCS file: /cvsroot/timewarp/gamex/gamedata/surface/00000006.ini,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 00000006.ini 4 Jan 2004 22:36:42 -0000 1.1.1.1 --- 00000006.ini 10 Jan 2004 14:10:31 -0000 1.2 *************** *** 1,3 **** ! surface = flames tectonics = 0 weather = 0 --- 1,3 ---- ! surface = giant_blue tectonics = 0 weather = 0 |
From: <geo...@us...> - 2004-01-10 14:10:34
|
Update of /cvsroot/timewarp/gamex In directory sc8-pr-cvs1:/tmp/cvs-serv19182 Modified Files: mapinfo.txt Log Message: starmap editor update Index: mapinfo.txt =================================================================== RCS file: /cvsroot/timewarp/gamex/mapinfo.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mapinfo.txt 4 Jan 2004 23:52:11 -0000 1.3 --- mapinfo.txt 10 Jan 2004 14:10:31 -0000 1.4 *************** *** 1,5 **** 1 ! Some region empty_type 0.000000 0.000000 1 --- 1,5 ---- 1 ! Some region empty_type 0.000000 0.000000 1 *************** *** 12,22 **** noname ! medium ! 1940.026076 516.297262 3 ! 0 noname small ! 2033.898305 485.006519 4 0 --- 12,37 ---- noname ! big ! 1966.101695 542.372881 3 ! 3 ! ! noname ! medium ! 1473.272490 664.928292 37B74224 ! 0 ! ! noname ! medium ! 717.079531 406.779661 6747AA28 ! 0 ! ! noname ! medium ! 1501.955671 417.209909 515DD970 ! 0 noname small ! 2091.264668 458.930900 4 0 *************** *** 28,32 **** noname big ! 2498.044329 730.117340 6 0 --- 43,47 ---- noname big ! 2445.893090 735.332464 6 0 |
From: <yu...@us...> - 2004-01-09 22:04:05
|
Update of /cvsroot/timewarp In directory sc8-pr-cvs1:/tmp/cvs-serv31535 Modified Files: makefile Log Message: Updated makefile for Linux, Wrapped windows dependant code |
From: <yu...@us...> - 2004-01-09 22:04:05
|
Update of /cvsroot/timewarp/source/twgui In directory sc8-pr-cvs1:/tmp/cvs-serv31535/source/twgui Modified Files: gametest2.cpp twgui.cpp Log Message: Updated makefile for Linux, Wrapped windows dependant code Index: gametest2.cpp =================================================================== RCS file: /cvsroot/timewarp/source/twgui/gametest2.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gametest2.cpp 4 Jan 2004 22:07:00 -0000 1.2 --- gametest2.cpp 9 Jan 2004 22:04:02 -0000 1.3 *************** *** 2,6 **** #include <allegro.h> ! #include <winalleg.h> //#include <windows.h> --- 2,6 ---- #include <allegro.h> ! //#include <winalleg.h> //#include <windows.h> *************** *** 109,113 **** --- 109,118 ---- // create the cache/ directory (if needed ?) + #ifdef LINUX + mkdir("cache", 0755); + #else mkdir("cache"); + #endif + Index: twgui.cpp =================================================================== RCS file: /cvsroot/timewarp/source/twgui/twgui.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** twgui.cpp 4 Jan 2004 22:07:00 -0000 1.14 --- twgui.cpp 9 Jan 2004 22:04:02 -0000 1.15 *************** *** 1,5 **** --- 1,7 ---- #include <allegro.h> + #ifndef LINUX #include <winalleg.h> + #endif #include <stdio.h> #include <string.h> *************** *** 688,692 **** --- 690,696 ---- // Insert text from the clipboard (?) + #ifdef LINUX + #else if (keyhandler.keyhit[KEY_V] && keyhandler.keynew[KEY_LCONTROL]) { *************** *** 714,717 **** --- 718,722 ---- CloseClipboard(); } + #endif // check the special keys ? |
From: <geo...@us...> - 2004-01-08 22:23:49
|
Update of /cvsroot/timewarp In directory sc8-pr-cvs1:/tmp/cvs-serv24528 Modified Files: twwin.dsp Log Message: adding resurrected ships |
From: <geo...@us...> - 2004-01-08 22:22:49
|
Update of /cvsroot/timewarp/source/newships In directory sc8-pr-cvs1:/tmp/cvs-serv24353/newships Added Files: shpaktgu.cpp shpbahbu.cpp shpbogce.cpp shpdeees.cpp shpjurcu.cpp shpplala.cpp shptaufi.cpp shptausl.cpp shptauto.cpp shpterbi.cpp shpvuvji.cpp Log Message: adding resurrected ships --- NEW FILE: shpaktgu.cpp --- #include "../ship.h" #include "../melee/mshot.h" REGISTER_FILE #include <string.h> class AktunComSat : public SpaceObject { int frame; Ship *ship; double lRange; int lDamage; int lFrames; int lRechargeRate; int lRecharge; int lColor; int armour; public: AktunComSat(double oangle, double orange, int odamage, int oframes, int orechargerate, int ocolor, int oarmour, Ship *oship, SpaceSprite *osprite); virtual void calculate(); virtual int handle_damage(SpaceLocation* source, double normal, double direct); //virtual void handle_damage(SpaceLocation *source); virtual int canCollide(SpaceLocation *other); virtual void death(); }; class AktunGunner : public Ship { int weaponColor; double weaponRange1, weaponRange2, weaponDrain2; int weaponDamage; double specialRange; double specialVelocity; int specialDamage; int specialArmour; double extraRange; int extraDamage; int extraFrames; int extraRechargeRate; int extraColor; int extraArmour; int extraDrain; public: AktunGunner(Vector2 opos, double shipAngle, ShipData *shipData, int shipCollideFlag); int num_ComSats; int max_ComSats; AktunComSat **ComSat; virtual int activate_weapon(); virtual int activate_special(); }; class AktunLaser : public Laser { Ship *owner; public: AktunLaser(SpaceLocation *creator, double langle, int lweaponColor, double lrange, int ldamage, int lfcount, SpaceLocation *opos, Vector2 relpos, Ship *lowner); virtual void inflict_damage(SpaceObject *other); }; AktunGunner::AktunGunner(Vector2 opos, double shipAngle, ShipData *shipData, int shipCollideFlag) : Ship(opos, shipAngle, shipData, shipCollideFlag) { weaponColor = get_config_int("Weapon", "Color", 0); weaponRange1 = scale_range(get_config_float("Weapon", "Range1", 0)); weaponDamage = get_config_int("Weapon", "Damage", 0); weaponDrain2 = get_config_float("Weapon", "WeaponDrain2", 0); weaponRange2 = scale_range(get_config_float("Weapon", "Range2", 0)); specialRange = scale_range(get_config_float("Special", "Range", 0)); specialVelocity = scale_velocity(get_config_float("Special", "Velocity", 0)); specialDamage = get_config_int("Special", "Damage", 0); specialArmour = get_config_int("Special", "Armour", 0); extraRange = scale_range(get_config_float("Extra", "Range", 0)); extraFrames = get_config_int("Extra", "Frames", 0); extraDamage = get_config_int("Extra", "Damage", 0); extraDrain = get_config_int("Extra", "Drain", 0); extraRechargeRate = get_config_int("Extra", "RechargeRate", 0); extraColor = get_config_int("Extra", "Color", 0); extraArmour = get_config_int("Extra", "Armour", 0); max_ComSats = get_config_int( "Extra", "Number", 0); num_ComSats = 0; ComSat = new AktunComSat*[max_ComSats]; for (int i = 0; i < max_ComSats; i += 1) { ComSat[i] = NULL; } } int AktunGunner::activate_weapon() { if(fire_special) return(FALSE); // the simplest weapon game->add(new AktunLaser(this, angle, weaponColor, weaponRange1, weaponDamage, weapon_rate, this, Vector2(-10, 8), this)); // the more expensive weapon: test if there's enough energy left after the first // drain, then subtract the extra drain (the default drain is subracted earlier). if (batt >= weapon_drain + weaponDrain2) { game->add(new AktunLaser(this, angle, weaponColor, weaponRange2, weaponDamage, weapon_rate, this, Vector2(10, 8), this)); batt -= weaponDrain2; } return(TRUE); } int AktunGunner::activate_special() { // if ((fire_weapon) && (batt >= extraDrain)) // { if (num_ComSats == max_ComSats) { num_ComSats -= 1; ComSat[0]->state = 0; memcpy(&ComSat[0], &ComSat[1], sizeof(AktunComSat*) * num_ComSats); ComSat[num_ComSats] = NULL; } AktunComSat *tmp = new AktunComSat(0.0, extraRange, extraDamage, extraFrames, extraRechargeRate, extraColor, extraArmour, this, data->spriteExtra); ComSat[num_ComSats] = tmp; num_ComSats += 1; // batt -= extraDrain; game->add( tmp ); // return(FALSE); // } /* game->add(new Missile(this, Vector2(0.0, size.y / 2.0), angle, specialVelocity, specialDamage, specialRange, specialArmour, this, data->spriteSpecial) ); */ return(TRUE); } AktunLaser::AktunLaser(SpaceLocation *creator, double langle, int lweaponColor, double lrange, int ldamage, int lfcount, SpaceLocation *opos, Vector2 relpos, Ship *lowner) : Laser(creator, langle, pallete_color[lweaponColor], lrange, ldamage, lfcount, opos, relpos, true), owner(lowner) { } void AktunLaser::inflict_damage(SpaceObject *other) { sound.stop(owner->data->sampleWeapon[0]); Laser::inflict_damage(other); sound.stop((SAMPLE *)(melee[1].dat)); sound.play(owner->data->sampleWeapon[1]); } AktunComSat::AktunComSat(double oangle, double orange, int odamage, int oframes, int orechargerate, int ocolor, int oarmour, Ship *oship, SpaceSprite *osprite) : SpaceObject(oship, 0, 0, osprite), ship(oship), lRange(orange), lDamage(odamage), lFrames(oframes), lRechargeRate(orechargerate), lRecharge(0), lColor(ocolor), armour(oarmour) { layer = LAYER_SPECIAL; collide_flag_anyone = ALL_LAYERS - bit(LAYER_CBODIES); angle = oangle; pos = ship->normal_pos(); if(!(ship && ship->exists())) state = 0; } void AktunComSat::calculate() { if(!(ship && ship->exists())) { state = 0; return; } SpaceObject::calculate(); sprite_index++; if(sprite_index == 40) sprite_index = 0; if(lRecharge > 0) { lRecharge -= frame_time; return; } vel *= 1 - .0005 * frame_time; if (magnitude_sqr(vel) < 0.05 * 0.05) { vel = 0; } Query q; for (q.begin(this, OBJECT_LAYERS &~ bit(LAYER_CBODIES), lRange); q.currento; q.next()) { if (!q.currento->isInvisible() && !q.currento->sameTeam(this)) { SpaceLocation *l; l = new PointLaser(this, pallete_color[lColor], 1, lFrames, this, q.currento, 0); game->add(l); if (l->exists()) { sound.play(ship->data->sampleExtra[0]); lRecharge += lRechargeRate; break; } else l->state = 0; } } return; } int AktunComSat::canCollide(SpaceLocation *other) { return SpaceObject::canCollide(other); } int AktunComSat::handle_damage(SpaceLocation* source, double normal, double direct) { double tot; tot = normal+direct; if ( tot > 0 ) { armour -= tot; if(armour <= 0) { armour = 0; state = 0; game->add(new Animation(this, pos, meleedata.kaboomSprite, 0, KABOOM_FRAMES, 50, LAYER_EXPLOSIONS)); sound.stop(data->sampleExtra[0]); sound.play(data->sampleExtra[0]); } } return 1; } void AktunComSat::death() { for (int i = 0; i < ((AktunGunner*)ship)->num_ComSats; i++ ) { if (((AktunGunner*)ship)->ComSat[i] == this) { ((AktunGunner*)ship)->ComSat[i] = NULL; ((AktunGunner*)ship)->num_ComSats -= 1; memmove(&((AktunGunner*)ship)->ComSat[i], &((AktunGunner*)ship)->ComSat[i+1], (((AktunGunner*)ship)->num_ComSats-i) * sizeof(AktunComSat*)); return; } } } REGISTER_SHIP(AktunGunner) --- NEW FILE: shpbahbu.cpp --- #include "../ship.h" #include "../frame.h" REGISTER_FILE class BahaoidBabyBuzzsaw; //#define MAX_NUM_MINES 2 class BahaoidBuzzsaw : public Ship { double weaponRange; double weaponSpeed; int weaponDamage; int weaponColor; double specialRange; int specialArmour, specialNumber; int can_turn; public: BahaoidBuzzsaw(Vector2 opos, double shipAngle, ShipData *shipData, int shipCollideFlag); int nummines; protected: virtual void calculate(); virtual void calculate_turn_left(); virtual void calculate_turn_right(); virtual int activate_weapon(); virtual int activate_special(); }; class BahaoidBabyBuzzsaw : public AnimatedShot { double MineRange; double weaponRange; double weaponSpeed; int weaponDamage; int weaponColor; int weaponRate, weapon_time; int fully_dropped; double turn_step; public: BahaoidBabyBuzzsaw(Vector2 opos, double ov, double oangle, int odamage, int oarmour, Ship *oship, SpaceSprite *osprite, int ofcount, int ofsize, double miner, double rangey, double speedy, int damagey, int colory, int ratey); virtual void calculate(); virtual int handle_damage(SpaceLocation* source, double normal, double direct); virtual void inflict_damage(SpaceObject *other); }; BahaoidBuzzsaw::BahaoidBuzzsaw(Vector2 opos, double shipAngle, ShipData *shipData, int shipCollideFlag) : Ship(opos, shipAngle, shipData, shipCollideFlag) { weaponRange = scale_range(get_config_float("Weapon", "Range", 0)); weaponSpeed = get_config_float("Weapon", "Speed", 1) * ANGLE_RATIO; weaponDamage = get_config_int("Weapon", "Damage", 0); weaponColor = get_config_int("Weapon", "Color", 2); can_turn = TRUE; specialRange = scale_range(get_config_float("Special", "Range", 0)); specialArmour = get_config_int("Special", "Armour", 0); nummines = 0; specialNumber = get_config_int("Special", "Number", 0); } void BahaoidBuzzsaw::calculate_turn_left() { if(can_turn) { Ship::calculate_turn_left(); } } void BahaoidBuzzsaw::calculate_turn_right() { if(can_turn) { Ship::calculate_turn_right(); } } int BahaoidBuzzsaw::activate_weapon() { double xone = 0.8660254038; double yone = 0.5; int w, h; w = size.x; h = size.y; double da; da = 60.0 * ANGLE_RATIO; game->add(new Laser(this, angle + da, pallete_color[weaponColor], weaponRange, weaponDamage, weapon_rate, this, Vector2(0.0, (h / 2.0)))); game->add(new Laser(this, angle + 2*da, pallete_color[weaponColor], weaponRange, weaponDamage, weapon_rate, this, Vector2((w / 2.0)*xone, (h / 2.0)*yone))); game->add(new Laser(this, angle + 3*da, pallete_color[weaponColor], weaponRange, weaponDamage, weapon_rate, this, Vector2((w / 2.0)*xone, -(h / 2.0)*yone))); game->add(new Laser(this, angle + 4*da, pallete_color[weaponColor], weaponRange, weaponDamage, weapon_rate, this, Vector2(0.0, -(h / 2.0)))); game->add(new Laser(this, angle + 5*da, pallete_color[weaponColor], weaponRange, weaponDamage, weapon_rate, this, Vector2(-(w / 2.0)*xone, -(h / 2.0)*yone))); game->add(new Laser(this, angle + 6*da, pallete_color[weaponColor], weaponRange, weaponDamage, weapon_rate, this, Vector2(-(w / 2.0)*xone, (h / 2.0)*yone))); return(TRUE); } int BahaoidBuzzsaw::activate_special() { if(nummines>=specialNumber) return(FALSE); game->add(new BahaoidBabyBuzzsaw(0, 0, angle, 0, specialArmour, this, data->spriteSpecial, 1, 30, specialRange, weaponRange, weaponSpeed, weaponDamage, weaponColor, weapon_rate)); nummines++; return TRUE; } void BahaoidBuzzsaw::calculate() { if(fire_weapon) { can_turn = FALSE; turn_step += weaponSpeed * frame_time; } else { can_turn = TRUE; } Ship::calculate(); } BahaoidBabyBuzzsaw::BahaoidBabyBuzzsaw(Vector2 opos, double ov, double oangle, int odamage, int oarmour, Ship *oship, SpaceSprite *osprite, int ofcount, int ofsize, double miner, double rangey, double speedy, int damagey, int colory, int ratey): AnimatedShot(oship, opos, oangle, ov, odamage, -1.0, oarmour, oship, osprite, ofcount, ofsize) { weaponRange = rangey; weaponSpeed = speedy; weaponDamage = damagey; weaponColor = colory; weaponRate = ratey; weapon_time = 0; MineRange = miner; turn_step = 0.0; fully_dropped = FALSE; } int BahaoidBabyBuzzsaw::handle_damage(SpaceLocation* source, double normal, double direct) { armour -= normal + direct; if(armour <= 0) { state = 0; } return 0; } void BahaoidBabyBuzzsaw::inflict_damage(SpaceObject *other) { if((ship) && (other == ship)) { state = 0; // sound.play(ship->data->sampleExtra[1], 255, 128, 1000); BahaoidBuzzsaw *temp = (BahaoidBuzzsaw*)ship; temp->nummines--; ship->handle_damage(this, damage_factor); } } void BahaoidBabyBuzzsaw::calculate() { SpaceObject *o, *t = NULL; double oldrange = 999999; Query b; if(!fully_dropped) { int bahooodle = collide_flag_sameship; collide_flag_sameship = bit(SPACE_LAYERS) - 1; fully_dropped = TRUE; for (b.begin(this, bit(LAYER_SHIPS),scale_range(1.0)); b.current; b.next()) { collide_flag_sameship = bahooodle; fully_dropped = FALSE; } } AnimatedShot::calculate(); Query a; for (a.begin(this, bit(LAYER_SHIPS) + bit(LAYER_SHOTS) + bit(LAYER_CBODIES) + bit(LAYER_SPECIAL), MineRange); a.current; a.next()) { o = a.currento; if (!o->sameTeam(this) && !o->isInvisible() && (distance(o) < oldrange) && (o->ally_flag != -1) || (o->getID() == ID_ASTEROID)) { t = o; oldrange = distance(o); } } if (t) weapon_time += frame_time; if (t && weapon_time > weaponRate) { weapon_time -= weaponRate; double xone = 0.8660254038; double yone = 0.5; int w, h; w = size.x; h = size.y; double da; da = 60.0 * ANGLE_RATIO; game->add(new Laser(this, angle + da, pallete_color[weaponColor], weaponRange, weaponDamage, weaponRate, this, Vector2(0.0, (h / 2.0)))); game->add(new Laser(this, angle + 2*da, pallete_color[weaponColor], weaponRange, weaponDamage, weaponRate, this, Vector2((w / 2.0)*xone, (h / 2.0)*yone))); game->add(new Laser(this, angle + 3*da, pallete_color[weaponColor], weaponRange, weaponDamage, weaponRate, this, Vector2((w / 2.0)*xone, -(h / 2.0)*yone))); game->add(new Laser(this, angle + 4*da, pallete_color[weaponColor], weaponRange, weaponDamage, weaponRate, this, Vector2(0.0, -(h / 2.0)))); game->add(new Laser(this, angle + 5*da, pallete_color[weaponColor], weaponRange, weaponDamage, weaponRate, this, Vector2(-(w / 2.0)*xone, -(h / 2.0)*yone))); game->add(new Laser(this, angle + 6*da, pallete_color[weaponColor], weaponRange, weaponDamage, weaponRate, this, Vector2(-(w / 2.0)*xone, (h / 2.0)*yone))); //turn_step += weaponSpeed * frame_time; angle += weaponSpeed * frame_time; while (angle > PI) angle -= PI2; } /* while(fabs(turn_step) > 5.625 * ANGLE_RATIO) { if(turn_step < 0.0) { angle -= 5.625 * ANGLE_RATIO; turn_step += 5.625 * ANGLE_RATIO; } else if(turn_step > 0.0) { angle += 5.625 * ANGLE_RATIO; turn_step -= 5.625 * ANGLE_RATIO; } if(angle < 0.0) { angle += PI2; } if(angle >= PI2) { angle -= PI2; } } */ //sprite_index = (int)(angle / 5.625) + 16; //sprite_index &= 63; sprite_index = get_index(angle); return; } REGISTER_SHIP(BahaoidBuzzsaw) --- NEW FILE: shpbogce.cpp --- #include "../ship.h" REGISTER_FILE #define BOGEI_CENTURION_ID SPACE_SHIP+0x00FE #define max_links 20 class BoggCenturion : public Ship { double weaponRange, weaponSpread; int weaponDamage; int specialDamage, specialArmour; int specialLifetime, specialFuel; double specialAccel, specialMaxspeed, specialBlastMaxspeed; int specialHotspotRate, specialHotspotFrameSize; double specialHotspotThrust, specialHotspotSlowdown; int special_slot; double specialBlastAccel; int gun_phase, old_gun_phase; double gun_position, gun_speed; int startup_time, startup_delay, slowdown_time, delay_count; bool slowing_down, gun_full_speed; int flame_frame, flame_count, flame_duration; int exhaust_frame, exhaust_rate, exhaust_framesize, exhaust_count; int exhaust_fry_chance; double exhaust_slowdown, exhaust_thrust; bool draw_hotspots, exhaust_on; double share_range; int links_num; double residual_damage; BoggCenturion *link[max_links+1]; public: BoggCenturion (Vector2 opos, double shipAngle, ShipData *shipData, unsigned int code); virtual int activate_weapon(); virtual void calculate_fire_special(); virtual void calculate(); virtual void animate(Frame *space); virtual void calculate_hotspots(); virtual int handle_damage(SpaceLocation *source, double normal, double direct); //virtual void handle_damage(SpaceLocation *source); }; class BoggCenturionMissile : public Missile { int lifetime, fuel; double accel, maxspeed, blast_accel, blast_maxspeed; int hotspot_rate, hotspot_frame_size, hotspot_frame; double hotspot_thrust, hotspot_slowdown; SpaceSprite *hotspot_sprite; public: BoggCenturionMissile (SpaceLocation *creator, Vector2 opos, double oangle, int odamage, int oarmour, int olifetime, int ofuel, double oaccel, double omaxspeed, double oblast_accel, double oblast_maxspeed, int ohotspot_rate, int ohotspot_frame_size, double ohotspot_thrust, double ohotspot_slowdown, SpaceSprite *osprite, SpaceSprite *hsprite, SAMPLE *s, SpaceSprite *esprite); virtual void calculate(); virtual void inflict_damage(SpaceObject *other); }; class BoggCenturionExhaust : public Animation { double slowdown; public: BoggCenturionExhaust (SpaceLocation *creator, double oangle, double dx, double dy, SpaceSprite *osprite, int first_frame, int num_frames, int frame_size, double depth, double v, double oslowdown, int ochance, SAMPLE *os); virtual void calculate(); }; class BoggCenturionExhaustShot : public Shot { SpaceLocation *amt; SAMPLE *s; public: BoggCenturionExhaustShot (SpaceLocation *creator, SpaceSprite *osprite, SAMPLE *os); virtual void calculate(); virtual void inflict_damage(SpaceObject *other); virtual void animate(Frame *space); }; class BoggCenturionShot : public Laser { SpaceSprite *ex_sprite; SAMPLE *ex_sample; public: BoggCenturionShot (SpaceLocation *creator, Vector2 opos, double oangle, int odamage, double orange, SpaceSprite *esprite, SAMPLE *esample); virtual void animate(Frame *space); virtual void inflict_damage(SpaceObject *other); virtual void calculate(); }; BoggCenturion::BoggCenturion (Vector2 opos, double shipAngle, ShipData *shipData, unsigned int code) : Ship(opos, shipAngle, shipData, code) { id = BOGEI_CENTURION_ID; exhaust_on = (get_config_int("Engines", "ExhaustOn", 0) != 0); exhaust_rate = get_config_int("Engines", "ExhaustRate", 0); exhaust_frame = 0; exhaust_slowdown = get_config_float("Engines", "ExhaustSlowdown", 0) / 1000.0; exhaust_framesize = get_config_int("Engines", "ExhaustFrameSize", 0); exhaust_thrust = scale_velocity(get_config_float("Engines", "ExhaustThrust", 0)); draw_hotspots = (get_config_int("Engines", "DrawHotspots", 0) != 0); exhaust_fry_chance = get_config_int("Engines", "ExhaustFryChance", 0); share_range = scale_range(get_config_float("Herd", "Range", 0)); links_num = 0; weaponRange = scale_range(get_config_float("Primary", "Range", 0)); weaponDamage = get_config_int("Primary", "Damage", 0); weaponSpread = get_config_float("Primary", "Spread", 0) * ANGLE_RATIO; flame_duration = get_config_int("Primary", "FlameDuration", 0); startup_time = int(get_config_float("Primary", "StartupTime", 0) * 1000); slowdown_time = int(get_config_float("Primary", "SlowdownTime", 0) * 1000); startup_delay = int(get_config_float("Primary", "StartupDelay", 0) * 1000); specialDamage = get_config_int("Secondary", "Damage", 0); specialArmour = get_config_int("Secondary", "Armour", 0); specialLifetime = int(get_config_float("Secondary", "Lifetime", 0) * 1000); specialFuel = int(get_config_float("Secondary", "Fuel", 0) * 1000); specialAccel = scale_acceleration(get_config_float("Secondary", "Accel", 0),0); specialBlastAccel = scale_velocity(get_config_float("Secondary", "BlastAccel", 0)); specialBlastMaxspeed = scale_velocity(get_config_float("Secondary", "BlastMaxspeed", 0)); specialMaxspeed = scale_velocity(get_config_float("Secondary", "Maxspeed", 0)); specialHotspotRate = get_config_int("Secondary", "HotspotRate", 0); specialHotspotFrameSize = get_config_int("Secondary", "HotspotFrameSize", 0); specialHotspotThrust = scale_velocity(get_config_float("Secondary", "HotspotThrust", 0)); specialHotspotSlowdown = get_config_float("Secondary", "HotspotSlowdown", 0) / 1000.0; special_slot = 2; gun_phase = 0; old_gun_phase = 0; gun_position = 0; gun_speed = 0; slowing_down = false; gun_full_speed = false; flame_count = -1; delay_count = 0; residual_damage = 0; } int BoggCenturion::activate_weapon() { if ((gun_phase >= old_gun_phase) || (!gun_full_speed) || (delay_count < startup_delay)) return false; double r = 1 - random(2.0); // r *= r; // double l = sqrt(1 - r*r) * (1 - (random()%101)/50.0); // l *= l * sin(weaponSpread*ANGLE_RATIO) * weaponRange; double l = sqrt(random(1.0)); game->add(new BoggCenturionShot(this, Vector2(+8 + 8*r, 21), angle + r*weaponSpread, weaponDamage, weaponRange * l, data->spriteWeapon, data->sampleWeapon[1])); flame_frame = random(4); flame_count = flame_duration; return true; } void BoggCenturion::calculate_fire_special() { special_low = FALSE; if(fire_special) { if(batt < special_drain) { special_low = TRUE; return; } } else return; if(special_recharge > 0) return; double dx, dy; dx = (19 + 6.3 * special_slot); dy = 2 * special_slot; game->add(new BoggCenturionMissile(this, Vector2(dx, dy), angle, specialDamage, specialArmour, specialLifetime, specialFuel, specialAccel, specialMaxspeed, specialBlastAccel, specialBlastMaxspeed, specialHotspotRate, specialHotspotFrameSize, specialHotspotThrust, specialHotspotSlowdown, data->spriteSpecial, data->spriteExtra, data->sampleSpecial[0], data->spriteSpecialExplosion)); game->add(new BoggCenturionMissile(this, Vector2(-dx, dy), angle, specialDamage, specialArmour, specialLifetime, specialFuel, specialAccel, specialMaxspeed, specialBlastAccel, specialBlastMaxspeed, specialHotspotRate, specialHotspotFrameSize, specialHotspotThrust, specialHotspotSlowdown, data->spriteSpecial, data->spriteExtra, data->sampleSpecial[0], data->spriteSpecialExplosion)); special_slot--; if (special_slot < 0) special_slot = 2; batt -= special_drain; special_recharge += special_rate; } void BoggCenturion::calculate() { Ship::calculate(); if ((fire_weapon) && !( (batt < weapon_drain) || slowing_down) ) { if (startup_time > 0) gun_speed += frame_time / (double)startup_time; else gun_speed = 1.0; } else { slowing_down = true; gun_full_speed = false; delay_count = 0; if (slowdown_time > 0) gun_speed -= frame_time / (double)slowdown_time; else gun_speed = 0; } if (gun_speed >= 1.0) { gun_full_speed = true; gun_speed = 1.0; if (delay_count < startup_delay) delay_count += frame_time; } else if ((gun_speed <= 0) && (slowing_down)) { gun_speed = 0; slowing_down = false; } gun_position += frame_time*gun_speed/weapon_rate; while (gun_position >= 1) gun_position -= 1; old_gun_phase = gun_phase; gun_phase = (int)floor(gun_position * 8); flame_count -= frame_time; Query q; links_num = 0; BoggCenturion* bro; for (q.begin(this, bit(LAYER_SHIPS), share_range); q.currento; q.next()) if (q.currento->getID() == BOGEI_CENTURION_ID) { bro = (BoggCenturion*)q.currento; if (bro->exists()) links_num += 1; if (links_num == 2) break; } } void BoggCenturion::animate(Frame* space) { BITMAP *bmp; bmp = sprite->get_bitmap(64, 0); clear_to_color( bmp, makecol(255,0,255)); double tx, ty; int ix, iy; // prepare for the gun tx = sin((sprite_index+5) * 2 * PI / 64.0); ty = cos((sprite_index+5) * 2 * PI / 64.0); int ix1 = 42 + int(19*tx) - 12; int iy1 = 42 - int(19*ty) - 12; blit(data->spriteSpecial->get_bitmap(64), bmp, 0, 0, ix1, iy1, 20, 20); // flame if (flame_count >= 0) { tx = sin((sprite_index+3) * 2 * PI / 64.0); ty = cos((sprite_index+3) * 2 * PI / 64.0); ix = 42 + int(35*tx) - 10; iy = 42 - int(35*ty) - 10; data->spriteExtraExplosion->draw(ix, iy, 40 + sprite_index + 64*flame_frame, bmp); } // ship itself sprite->draw(0, 0, sprite_index, bmp); // gun data->spriteWeaponExplosion->draw(ix1, iy1, sprite_index+64*gun_phase, bmp); /// shield link indicator tx = sin(sprite_index * 2 * PI / 64.0); ty = cos(sprite_index * 2 * PI / 64.0); ix = 42 + int(-9*tx) - 10; iy = 42 - int(-9*ty) - 10; if (links_num) data->spriteExtraExplosion->draw(ix, iy, 296+sprite_index+64*(links_num-1), bmp); // final //sprite->animate(pos, 64, space); animate_bmp(bmp, pos, space); } void BoggCenturion::calculate_hotspots() { if (draw_hotspots) Ship::calculate_hotspots(); if (exhaust_frame > 0) exhaust_frame -= frame_time; else if (thrust) { exhaust_frame += exhaust_rate; if (exhaust_count < 7) exhaust_count += 1; game->add(new BoggCenturionExhaust(this, angle, -8.5, -36, data->spriteExtraExplosion, 10*(random(4)) + 10 - exhaust_count, exhaust_count, exhaust_framesize, LAYER_HOTSPOTS, exhaust_thrust, exhaust_slowdown, exhaust_fry_chance, data->sampleExtra[0])); game->add(new BoggCenturionExhaust(this, angle, +9.5, -36, data->spriteExtraExplosion, 10*(random(4)) + 10 - exhaust_count, exhaust_count, exhaust_framesize, LAYER_HOTSPOTS, exhaust_thrust, exhaust_slowdown, exhaust_fry_chance, data->sampleExtra[0])); } if (!thrust) exhaust_count = 0; } int BoggCenturion::handle_damage(SpaceLocation *source, double normal, double direct) //void BoggCenturion::handle_damage(SpaceLocation *source) { if (source == this) { return Ship::handle_damage(source, normal, direct); } double tot = normal + direct; Query q; int ln = 0; BoggCenturion* bro; for (q.begin(this, bit(LAYER_SHIPS), share_range); q.currento; q.next()) if (q.currento->getID() == BOGEI_CENTURION_ID) { bro = (BoggCenturion*)q.currento; if (bro->exists()) { ln += 1; link[ln] = bro; } if (links_num == max_links) break; } if (ln) { double d = tot; if (ln < 2) d *= 0.75; else d *= 0.5; tot = (int)floor(d); d -= tot; residual_damage += d; int dx = (int)floor(residual_damage); tot += dx; residual_damage -= dx; } Ship::handle_damage(source, tot); return 0; } BoggCenturionMissile::BoggCenturionMissile (SpaceLocation *creator, Vector2 opos, double oangle, int odamage, int oarmour, int olifetime, int ofuel, double oaccel, double omaxspeed, double oblast_accel, double oblast_maxspeed, int ohotspot_rate, int ohotspot_frame_size, double ohotspot_thrust, double ohotspot_slowdown, SpaceSprite *osprite, SpaceSprite *hsprite, SAMPLE *s, SpaceSprite *esprite) : Missile (creator, opos, oangle, 0, odamage, -1, oarmour, creator, osprite, 1.0), lifetime(olifetime), fuel(ofuel), accel(oaccel), maxspeed(omaxspeed), hotspot_rate(ohotspot_rate), hotspot_frame_size(ohotspot_frame_size), hotspot_thrust(ohotspot_thrust), hotspot_slowdown(ohotspot_slowdown), hotspot_sprite(hsprite) { blast_accel = oblast_accel; blast_maxspeed = oblast_maxspeed; hotspot_frame = 0; play_sound(s, 128); explosionSprite = esprite; explosionFrameCount = 10; explosionFrameSize = 50; explosionSample = data->sampleSpecial[1]; } void BoggCenturionMissile::calculate() { SpaceObject::calculate(); if (lifetime > 0) lifetime -= frame_time; else state = 0; if (fuel > 0) { fuel -= frame_time; accelerate(this, angle, accel*frame_time, maxspeed); if (hotspot_frame > 0) hotspot_frame -= frame_time; else { hotspot_frame += hotspot_rate; game->add(new BoggCenturionExhaust(this, angle, 0, -8.5, hotspot_sprite, 0, 20, hotspot_frame_size, LAYER_HOTSPOTS, hotspot_thrust, hotspot_slowdown, 0, NULL)); } } //sprite_index = (int(angle / 5.625 + 16)) & 63; sprite_index = get_index(angle); }; void BoggCenturionMissile::inflict_damage(SpaceObject *other) { if ((!other->isPlanet()) && (other->mass)) other->accelerate(this, normalize(trajectory_angle(other), 360), blast_accel/other->mass, blast_maxspeed); Missile::inflict_damage(other); } BoggCenturionExhaust::BoggCenturionExhaust (SpaceLocation *creator, double oangle, double dx, double dy, SpaceSprite *osprite, int first_frame, int num_frames, int frame_size, double depth, double v, double oslowdown, int ochance, SAMPLE *os) : Animation (creator, creator->normal_pos(), osprite, first_frame, num_frames, frame_size, depth) { if (random(100) < ochance) game->add(new BoggCenturionExhaustShot(this, osprite, os)); //double alpha = oangle * ANGLE_RATIO; //double tx = cos(alpha); //double ty = sin(alpha); //x += dy * tx - dx*ty; //y += dy * ty + dx*tx; pos += rotate(Vector2(dy,dx), oangle); //vx = creator->get_vx() - vel * tx; //vy = creator->get_vy() - vel * ty; vel = creator->get_vel() - v * unit_vector(oangle); slowdown = oslowdown; } void BoggCenturionExhaust::calculate() { Animation::calculate(); double gamma = exp( - slowdown * frame_time); vel *= gamma; //vy *= gamma; } BoggCenturionExhaustShot::BoggCenturionExhaustShot (SpaceLocation *creator, SpaceSprite *osprite, SAMPLE *os) : Shot(creator, 0, 0, 0, 1, 1e40, 1, creator, osprite, 1.0) { amt = creator; s = os; sprite_index = 5; } void BoggCenturionExhaustShot::calculate() { Shot::calculate(); if (!amt->exists()) state = 0; //x = amt->normal_x(); //y = amt->normal_y(); pos = amt->normal_pos(); //vx = amt->get_vx(); //vy = amt->get_vy(); vel = amt->get_vel(); } void BoggCenturionExhaustShot::animate(Frame *space) { } void BoggCenturionExhaustShot::inflict_damage(SpaceObject *other) { //other->damage += 1; other->handle_damage(this, 1); if (s) play_sound(s, 160); state = 0; } BoggCenturionShot::BoggCenturionShot (SpaceLocation *creator, Vector2 opos, double oangle, int odamage, double orange, SpaceSprite *esprite, SAMPLE *esample) : Laser(creator, oangle, 0, orange, odamage, 300, creator, opos, true) { ex_sprite = esprite; ex_sample = esample; } void BoggCenturionShot::animate(Frame *space) { // for testing show the lasers //color = makecol(255,255,255); Laser::animate(space); } void BoggCenturionShot::inflict_damage(SpaceObject *other) { //x += edge_x(); y += edge_y(); pos += edge(); // play_sound(ex_sample, 240); game->add(new Animation(this, pos, ex_sprite, 0, 10, 50, LAYER_EXPLOSIONS)); //other->damage += damage_factor; other->handle_damage(this, damage_factor); state = 0; } void BoggCenturionShot::calculate() { if (frame > 0) { state = 0; return; } Laser::calculate(); } REGISTER_SHIP(BoggCenturion) --- NEW FILE: shpdeees.cpp --- #include "../ship.h" REGISTER_FILE #include "../melee/mcbodies.h" #include "../other/objanim.h" #define DEEP_SPACE_ANIM_RATE 90 #define DEEP_SPACE_WARRIOR_TRAIL_RATE 25 int makecol(RGB col) { return makecol(col.r, col.g, col.b); } /* * created by: cy...@sc... and for...@fr... */ class DeepSpaceEssence : public Ship { // the ship double weaponVelocity; double weaponRange; double weaponTurnRate; int weaponArmour; double weaponDrainRate; int weaponMinCrew; // min crew on board to be able to use weapon double specialRange; int specialMinCrew; // min crew on board to be able to use special int specialEffectCount; int extraFadeRate; double extraDrainRate; int sprite_step; int sprite_phase; SpaceLocation* dying; // mainly a boolean value but also holds pointer to our killer public: double residualDamage; DeepSpaceEssence( Vector2 opos, double shipAngle, ShipData *shipData, unsigned int code ); virtual int activate_weapon(); // releases a DeepSpaceWarrior virtual int activate_special(); // kills a member of the crew and damages all in range int handle_damage(SpaceLocation* source, double normal, double direct = 0); // virtual void handle_damage( SpaceLocation* other ); virtual void destroyed( SpaceLocation* source ); virtual void inflict_damage( SpaceObject* other ); // drains crew virtual void calculate(); // animates graphics virtual void calculate_hotspots(); // leaves trail instead virtual int crewPanelColor(){ return pallete_color[8]; } //grey }; class DeepSpaceWarrior : public HomingMissile { // warriors that do damage on contact and pass through matter int trail_step; double drain_rate; public: DeepSpaceWarrior( DeepSpaceEssence* creator, Vector2 opos, double oangle, double ov, double orange, int oarmour, double otrate, SpaceLocation* lpos, double odrain_rate, SpaceSprite *osprite, SpaceObject* target ); void inflict_damage(SpaceObject *other); virtual void calculate(); }; DeepSpaceEssence::DeepSpaceEssence( Vector2 opos, double shipAngle, ShipData *shipData, unsigned int code ): Ship( opos, shipAngle, shipData, code ) { weaponVelocity = scale_velocity(get_config_float("Weapon", "Velocity", 0)); weaponRange = scale_range(get_config_float("Weapon", "Range", 0)); weaponTurnRate = scale_turning(get_config_float("Weapon", "TurnRate", 0)); weaponArmour = get_config_int("Weapon", "Armour", 0); weaponDrainRate = get_config_float("Weapon", "DrainRate", 0); weaponMinCrew = get_config_int("Weapon", "MinCrew", 0); specialRange = scale_range( get_config_float( "Special", "Range", 0 )); specialMinCrew = get_config_int("Special", "MinCrew", 0); specialEffectCount = get_config_int("Special", "EffectCount", 0); extraFadeRate = scale_frames( get_config_int( "Extra", "FadeRate", 0 )); extraDrainRate = get_config_float( "Extra", "DrainRate", 0 ); residualDamage = 0; set_depth( LAYER_EXPLOSIONS ); sprite_step = 0; sprite_phase = 0; dying = NULL; } void DeepSpaceEssence::calculate() { STACKTRACE; if( dying ){ if( sprite_step < 0 ){ sprite_step += extraFadeRate; sprite_phase++; if( sprite_phase == 10 ){ sprite_phase = 9; state = 0; game->ship_died( this, dying ); } sprite_index &= 63; sprite_index += sprite_phase * 64; }else{ sprite_step -= frame_time; } return; } Ship::calculate(); if( sprite_step < 0 ){ sprite_step += (int)(DEEP_SPACE_ANIM_RATE * (1.0 + 0.3 * (double)abs( 3 - sprite_phase%7 ))); sprite_phase++; if( sprite_phase == 14 ) sprite_phase = 0; }else{ sprite_step -= frame_time; } sprite_index &= 63; if( sprite_phase < 7 ) sprite_index += sprite_phase * 64; else sprite_index += (14 - sprite_phase) * 64; } //ObjectAnimation::ObjectAnimation( SpaceLocation *creator, Vector2 opos, // Vector2 ovel, double oangle, SpaceSprite *osprite, int first_frame, // int num_frames, int frame_size, double depth ): void DeepSpaceEssence::calculate_hotspots() { STACKTRACE; if((thrust) && (hotspot_frame <= 0)) { game->add( new ObjectAnimation( this, pos, 0, angle, data->spriteSpecial, 0, 10, time_ratio / 2, LAYER_HOTSPOTS )); hotspot_frame += hotspot_rate; } if (hotspot_frame > 0) hotspot_frame -= frame_time; } int DeepSpaceEssence::activate_weapon() { STACKTRACE; if( crew < weaponMinCrew ) return FALSE; crew--; game->add( new DeepSpaceWarrior( this, Vector2(0.0, -size.y * 0.8), (120.0 + (double)(random() % 120))*PI/180 + angle, weaponVelocity, weaponRange, weaponArmour, weaponTurnRate, this, weaponDrainRate, data->spriteWeapon, target )); return TRUE; } int DeepSpaceEssence::activate_special() { STACKTRACE; if( crew <= specialMinCrew ) return FALSE; handle_damage(this, 1, 0); Query q; for( q.begin( this, OBJECT_LAYERS, specialRange ); q.currento; q.next() ) { if( q.currento->isShip() && q.currento != this ){ Ship* s = (Ship*)q.currento; if( s->crewPanelColor().g >= 225)//palette_color[2] ){ { s->handle_damage(this, 1, 0); } } } // effect for( int i=0; i < specialEffectCount; i++ ){ double rnd = random(1.0);//0.01 * (double)(rand() % 100); double e_range = specialRange * (1.0 - rnd*rnd); double e_angle = random(PI2);//(double)(rand() % 360); double e_speed = speed_max / 3; game->add( new ObjectAnimation( this, pos + e_range*unit_vector(e_angle), /// x + e_range * cos( e_angle * ANGLE_RATIO ), // y + e_range * sin( e_angle * ANGLE_RATIO ), -e_speed * unit_vector(e_angle), // - e_speed * cos( e_angle * ANGLE_RATIO ), // - e_speed * sin( e_angle * ANGLE_RATIO ), e_angle, data->spriteExtra, 0, 4, time_ratio * 2, LAYER_HOTSPOTS )); } play_sound2( data->sampleSpecial[0] ); return TRUE; } void DeepSpaceEssence::inflict_damage( SpaceObject* other ) { STACKTRACE; Ship::inflict_damage( other ); if( other->isShip() ){ Ship* s = (Ship*)other; if( s->crewPanelColor().g >= 225 ) { double d = 0; int drainDamage = (int)(extraDrainRate * frame_time); residualDamage += extraDrainRate * (double)frame_time - drainDamage; drainDamage += (int)residualDamage; residualDamage -= (int)residualDamage; if( s->getCrew() - drainDamage < 0 ) drainDamage = s->getCrew(); d = drainDamage; drainDamage = s->getCrew(); s->handle_damage( this, d ); // so, s loses crew ... drainDamage -= s->getCrew(); //repair += drainDamage; handle_damage( this, -drainDamage ); if( drainDamage ) play_sound2( data->sampleExtra[0] ); } }else if( !other->isblockingweapons) //>isShot() ) { // mostly against DOGI int drainDamage = (int)(extraDrainRate * frame_time); residualDamage += extraDrainRate * (double)frame_time - drainDamage; drainDamage += (int)residualDamage; residualDamage -= (int)residualDamage; //other->damage += drainDamage; other->handle_damage( this, drainDamage ); } } int DeepSpaceEssence::handle_damage(SpaceLocation* source, double normal, double direct) { STACKTRACE; double tot = normal + direct; crew -= normal; if(crew > crew_max) crew = crew_max; if( state <= 0 ) crew = 0; // planet kills with state=0 if mass==0 if(crew <= 0) { crew = 0; state = 0; destroyed( source ); } // above could be done in Ship::handle_damage() if( dying && crew > 0 ){ dying = NULL; sprite = data->spriteShip; sprite_phase = 0; sprite_index &= 64; } return 0; } void DeepSpaceEssence::destroyed( SpaceLocation* source ) { STACKTRACE; if( !dying ){ sprite_phase = 0; sprite = data->spriteSpecial; } state = 1; dying = source; } DeepSpaceWarrior::DeepSpaceWarrior( DeepSpaceEssence* creator, Vector2 opos, double oangle, double ov, double orange, int oarmour, double otrate, SpaceLocation* lpos, double odrain_rate, SpaceSprite *osprite, SpaceObject* target ): HomingMissile( creator, opos, oangle, ov, 0, orange, oarmour, otrate, lpos, osprite, target ), drain_rate( odrain_rate ), trail_step( DEEP_SPACE_WARRIOR_TRAIL_RATE ) { collide_flag_sameship = bit(LAYER_SHIPS); } void DeepSpaceWarrior::inflict_damage(SpaceObject *other) { STACKTRACE; if( !ship || !ship->exists() ) return; if( other == ship ){ state = 0; //ship->repair++; ship->handle_damage( this, -1 ); return; } if( other->isShip() ){ Ship* victim = (Ship*)other; DeepSpaceEssence* mother = (DeepSpaceEssence*)ship; int drainDamage = (int)(drain_rate * frame_time); mother->residualDamage += drain_rate * (double)frame_time - drainDamage; drainDamage += (int)mother->residualDamage; mother->residualDamage -= (int)mother->residualDamage; //victim->damage += drainDamage; victim->handle_damage( this, drainDamage ); play_sound( data->sampleWeapon[1 + random() % 4] ); Query q; int c = 0; if (range > d) { for( q.begin( this, bit(LAYER_SHIPS), range - d ); q.currento; q.next() ){ if( !q.currento->isShip() ) continue; if( q.currento->target != ship ) continue; c++; } } if( !c ) return; c = random() % c; for( q.begin( this, bit(LAYER_SHIPS), range - d ); q.currento; q.next() ){ if( !q.currento->isShip() ) continue; if( q.currento->target != ship ) continue; if( !c ) break; c--; } target = q.currento; q.end(); } } void DeepSpaceWarrior::calculate() { STACKTRACE; if( !exists() ) return; if( d < range ){ if( !target ) target = ship; }else{ target = ship; } HomingMissile::calculate(); if( !ship ) state = 0; else state = 1; if( trail_step <= 0 ){ game->add( new ObjectAnimation( this, pos, 0, angle, sprite, 1, 4, time_ratio, LAYER_HOTSPOTS )); trail_step += DEEP_SPACE_WARRIOR_TRAIL_RATE; }else trail_step -= frame_time; } REGISTER_SHIP(DeepSpaceEssence) --- NEW FILE: shpjurcu.cpp --- #include "../ship.h" REGISTER_FILE class JurgathaCutter: public Ship { int batt_counter; double weaponRange; double weaponSpeed; int weaponDamage; int weaponColor; int specialDamage; int specialFrames; public: JurgathaCutter(Vector2 opos, double shipAngle, ShipData *shipData, unsigned int code); protected: virtual void calculate(); virtual int activate_weapon(); virtual int activate_special(); }; class JurgathaPortal : public Animation { public: JurgathaPortal(SpaceLocation *creator, Vector2 opos, int damage, SpaceSprite *osprite, int ofct, int ofsz); virtual void calculate(); }; JurgathaCutter::JurgathaCutter(Vector2 opos, double shipAngle, ShipData *shipData, unsigned int code) : Ship(opos, shipAngle, shipData, code) { batt_counter = 0; weaponRange = scale_range(get_config_float("Weapon", "Range", 0)); weaponSpeed = get_config_float("Weapon", "Speed", 1); weaponDamage = get_config_int("Weapon", "Damage", 0); weaponColor = get_config_int("Weapon", "Color", 2); specialDamage = get_config_int("Special", "Damage", 0); specialFrames = scale_frames(get_config_int("Special", "Frames", 0)); } void JurgathaCutter::calculate() { if(thrust) { if(batt_counter==3) { batt_counter = 0; batt>batt_max?batt=batt_max:batt++; } else batt_counter++; } else if(!thrust) { if (batt_counter>=2) { batt_counter = 0; batt<0?batt=0:batt--; } else batt_counter++; } Ship::calculate(); } int JurgathaCutter::activate_weapon() { int random_number = rand()%10; game->add(new Laser(this, angle, pallete_color[weaponColor], weaponRange, weaponDamage, weapon_rate, this, Vector2(-(double)(random_number), 2.0), true)); random_number = rand()%10; game->add(new Laser(this, angle, pallete_color[weaponColor], weaponRange, weaponDamage, weapon_rate, this, Vector2((double)(random_number), 2.0), true)); return(TRUE); } int JurgathaCutter::activate_special() { game->add(new JurgathaPortal(this, pos, specialDamage, data->spriteSpecial, data->spriteSpecial->frames(), specialFrames)); return(TRUE); } JurgathaPortal::JurgathaPortal(SpaceLocation *creator, Vector2 opos, int damage, SpaceSprite *osprite, int ofct, int ofsz) : Animation(creator, opos, osprite, 0, ofct, ofsz, LAYER_HOTSPOTS){} void JurgathaPortal::calculate() { Animation::calculate(); Query a; for (a.begin(this, bit(LAYER_SHIPS) + bit(LAYER_SHOTS) + bit(LAYER_SPECIAL), sprite->width()/2); a.current; a.next()) { if (!a.currento->sameTeam(this) && !(a.currento->isAsteroid() || a.currento->isPlanet() ) ) { //a.currento->directDamage++; a.currento->handle_damage(this, 0, 1); } } } REGISTER_SHIP(JurgathaCutter) --- NEW FILE: shpplala.cpp --- /* todo: (in order) modify ship panel. Prevent main program from modifying ship panel (batt/crew) Implement 'Bio' and 'Data' on panel. Hot Spots/interialess selectable from INI differiate a between a 'planet mode' and 'space mode' Different configs = different point values. Add add-ons. (shields etc.) Implement special: idea: collect resources, bio data with the lander. when full, unleash them. if both full then its some else.*/ /* Bugs: Main program panel draws over ship panel when battery empty (shouldn't be possible). Shot speed incorrect when start/stopping (relativity) Graphics display problems on rotation of ship/shot /* Disclaimer: I can't code. At all. I'm basically taking stuff from other ships and using it here. This means, theres probably a lot of usless garbage in here. And a lot of other people get credit. Some ships I've borrowed and modified code from: Jyglar Starfarer, Nissk Harraser, Bubulos Exectioner (which was based off the Xchagger), Arilou Skiff and Imperial Katana. Thats all that comes to mind. -rump*/ #include "../ship.h" REGISTER_FILE #include "../frame.h" class PlanetLander : public Ship { double weaponRange; double weaponVelocity; int weaponDamage; int weaponArmour; int shipConfig; int interialessOn; int hotspotsOn; double shipVelocity; // void show_panel( int r ); public: PlanetLander (Vector2 opos, double angle, ShipData *data, unsigned int code); protected: virtual void calculate(); virtual int activate_weapon(); virtual int activate_special(); virtual int handle_damage(SpaceLocation *source, double normal, double direct); virtual int accelerate(SpaceLocation *source, double angle, double velocity, double max_speed); virtual int accelerate_gravwhip(SpaceLocation *source, double angle, double velocity, double max_speed); virtual void calculate_hotspots(); // enable/disable hotspots }; PlanetLander::PlanetLander(Vector2 opos, double angle, ShipData *data, unsigned int code) /*Vector2 opos, double shipAngle, ShipData *shipData, unsigned int code)*/ : Ship(opos, angle, data, code) { weaponRange = scale_range(get_config_int("Weapon", "Range", 0)); weaponVelocity = scale_velocity(get_config_int("Weapon", "Velocity", 0)); weaponDamage = get_config_int("Weapon", "Damage", 0); weaponArmour = get_config_int("Weapon", "Armour", 0); shipConfig = get_config_int("Configuration", "ActiveConfig",0); //interialessOn = get_config_int( } void PlanetLander::calculate() { Ship::calculate(); if (!thrust) vel = 0; //Poor man's interialess-drive } int PlanetLander::activate_weapon() { add(new Missile(this, Vector2(0, (size.y*.25)),angle, weaponVelocity, weaponDamage, weaponRange, weaponArmour,this, data->spriteWeapon, 1)); return(TRUE); } int PlanetLander::activate_special() { //for future use. return(FALSE); } //This function will be used when updating the ship panel. int PlanetLander::handle_damage(SpaceLocation *source, double normal, double direct) { return Ship::handle_damage(source, normal, direct); } //This eliminates the hotspots. There's probably a better way to do it... but I don't know how! void PlanetLander::calculate_hotspots(){ // if( thrust && hotspot_frame <= 0 ){ /* game->add( new Animation( this, normal_pos() - unit_vector(angle) * size.y / 4, data->spriteExtra, 0, 12, time_ratio, LAYER_HOTSPOTS)); hotspot_frame += hotspot_rate; } if( hotspot_frame > 0 ) hotspot_frame -= frame_time;*/ } //These two funcitons negate gravity whips int PlanetLander::accelerate(SpaceLocation *source, double angle, double velocity, double max_speed) { if (source == this) return Ship::accelerate(source, angle, velocity, max_speed); return false; } int PlanetLander::accelerate_gravwhip(SpaceLocation *source, double angle, double velocity, double max_speed) { if (source == this) return Ship::accelerate(source, angle, velocity, max_speed); return false; } REGISTER_SHIP(PlanetLander) --- NEW FILE: shptaufi.cpp --- #include "../ship.h" REGISTER_FILE class TauFiend : public Ship { double weaponRange; double weaponVelocity; int weaponDamage; int weaponArmour; double weaponRelativity; double specialRange; double specialVelocity; int specialSap; int specialDuration; int charge_time; int charge_count; int cooling_time, cooling_count; double specialRelativity; double residual_drain; int engine_stage; int engine_frame_count; int engine_frame; public: TauFiend(Vector2 opos, double shipAngle, ShipData *shipData, unsigned int code); virtual int activate_weapon(); virtual void calculate_fire_special(); virtual int handle_damage(SpaceLocation* source, int normal, int direct); virtual void animate(Frame *space); virtual void calculate_thrust(); virtual void calculate_hotspots(); }; class TauFiendShot : public Shot { public: TauFiendShot (Vector2 opos, double oangle, double ov, double orange, int odamage, int oarmour, SpaceLocation *creator, SpaceSprite *osprite, double relativity); virtual void calculate(); }; class TauFiendPWave : public Missile { int emp_fs, delay; public: TauFiendPWave (Vector2 opos, double oangle, double ov, double orange, TauFiend *creator, SpaceSprite *osprite, double relativity, int fs, int odelay); virtual void inflict_damage(SpaceObject *other); virtual int handle_damage(SpaceLocation *source, int normal, int direct); virtual int canCollide(SpaceLocation *other); }; class TauFiendPEffect : public Animation { Ship* target; int fs; public: TauFiendPEffect(SpaceLocation *creator, Ship *target, SpaceSprite *osprite, int ofs, int oduration); virtual void calculate(); virtual void animate(Frame *space); }; TauFiend::TauFiend (Vector2 opos, double shipAngle, ShipData *shipData, unsigned int code) : Ship(opos, shipAngle, shipData, code) { weaponRange = scale_range(get_config_float("Weapon", "Range", 0)); weaponVelocity = scale_velocity(get_config_float("Weapon", "Velocity", 0)); weaponDamage = get_config_int("Weapon", "Damage", 0); weaponArmour = get_config_int("Weapon", "Armour", 0); weaponRelativity = get_config_float("Weapon", "Relativity", 0.0); specialRange = scale_range(get_config_float("Special", "Range", 0)); specialVelocity = scale_velocity(get_config_float("Special", "Velocity", 0)); charge_time = int(get_config_float("Special", "ChargeTime", 1) * 1000); cooling_time = int(get_config_float("Special", "CoolingTime", 1) * 1000); specialRelativity = get_config_float("Special", "Relativity", 0.0); specialSap = get_config_int("Special", "Sap", 0); specialDuration = get_config_int("Special", "Duration", 0); engine_stage = 0; engine_frame_count = 0; charge_count = -1; cooling_count = 0; residual_drain = 0; } int TauFiend::activate_weapon() { add(new TauFiendShot(Vector2(+14, 16), angle, weaponVelocity, weaponRange, weaponDamage, weaponArmour, this, data->spriteWeapon, weaponRelativity)); add(new TauFiendShot(Vector2(-14, 16), angle, weaponVelocity, weaponRange, weaponDamage, weaponArmour, this, data->spriteWeapon, weaponRelativity)); return true; } void TauFiend::calculate_fire_special() { if (cooling_count > 0) cooling_count -= frame_time; if ((!fire_special) || (batt == 0)) { if (charge_count >= 0) charge_count -= frame_time; } else if ((fire_special) && (cooling_count <= 0)) { if (charge_count < charge_time) { charge_count += frame_time; residual_drain += frame_time * (double)special_drain / charge_time; } else { cooling_count = cooling_time; charge_count = -1; play_sound(data->sampleSpecial[0]); add(new TauFiendPWave(Vector2(0, 30), angle, specialVelocity, specialRange, this, data->spriteSpecialExplosion, specialRelativity, specialSap, specialDuration)); } } int a = (int)floor(residual_drain); batt -= a; if (batt < 0) batt = 0; residual_drain -= a; if (residual_drain < 0) residual_drain = 0; } int TauFiend::handle_damage(SpaceLocation *source, int normal, int direct) { double alpha; if (source->isLine()) { Vector2 dpos = min_delta(source->normal_pos() + ((SpaceLine*)source)->edge(), map_size); //double dx = min_delta(source->normal_x() + ((SpaceLine*)source)->edge_x(), normal_x(), X_MAX); //double dy = min_delta(source->normal_y() + ((SpaceLine*)source)->edge_y(), normal_y(), Y_MAX); //alpha = fabs(normalize(atan3(dy, dx) * 180 / PI - angle, 360)); alpha = fabs(normalize(dpos.atan() - angle, PI2)); } else alpha = normalize(trajectory_angle(source) - angle, 360); if (alpha > 180) alpha -= 360; alpha = (90 - fabs(alpha)) / 90; alpha *= alpha; alpha *= alpha; alpha = normal * (alpha + (1-alpha)*(random()%101)/100.0); int d = normal; normal = (int)floor(alpha); if (alpha - normal >= 0.5) normal ++; d -= normal; if (d > 0) play_sound(data->sampleExtra[random() % 8]); return Ship::handle_damage(source, normal, direct); } void TauFiend::animate(Frame* space) { if (engine_stage > 0) data->spriteExtraExplosion->animate( //normal_x() - (cos(angle * ANGLE_RATIO) * w / 2.8), //normal_y() - (sin(angle * ANGLE_RATIO) * h / 2.8), normal_pos() - unit_vector(angle) * size / 2.8, engine_frame, space); int si = (int)floor((charge_count * 10.0) / charge_time); if (si >= 0) { if (si>9) si = 9; data->spriteExtra->animate( //normal_x() + (cos(angle * ANGLE_RATIO) * w / 2.8), //normal_y() + (sin(angle * ANGLE_RATIO) * h / 2.8), normal_pos() + unit_vector(angle) * size / 2.8, si, space); } Ship::animate(space); } void TauFiend::calculate_thrust() { if (engine_frame_count > 0) engine_frame_count -= frame_time; while (engine_frame_count <= 0) { engine_frame_count += 66; if (thrust) { if (engine_stage < 7) engine_stage++; } else if (engine_stage > 0) engine_stage--; if (engine_stage < 7) engine_frame = 10-engine_stage; else { if (engine_frame > 3) engine_frame = 3; else { engine_frame --; if (engine_frame <0 ) engine_frame = 3; } } } if (engine_stage > 0) accelerate(this, angle, accel_rate * frame_time * engine_stage/7.0, speed_max); } void TauFiend::calculate_hotspots() { if ((engine_stage > 0) && (hotspot_frame <= 0)) { int f1 = int((HOTSPOT_FRAMES-1)*(7.0 - engine_stage)/6); add(new Animation(this, //normal_x() - (cos(angle * ANGLE_RATIO) * w / 2.8), //normal_y() - (sin(angle * ANGLE_RATIO) * h / 2.8), normal_pos() - unit_vector(angle) * size / 2.8, meleedata.hotspotSprite, f1, HOTSPOT_FRAMES -f1, time_ratio, LAYER_HOTSPOTS)); hotspot_frame += hotspot_rate; } if (hotspot_frame > 0) hotspot_frame -= frame_time; } TauFiendShot::TauFiendShot (Vector2 opos, double oangle, double ov, double orange, int odamage, int oarmour, SpaceLocation *creator, SpaceSprite *osprite, double relativity) : Shot (creator, opos, oangle, ov, odamage, orange, oarmour, creator, osprite, relativity) { explosionSprite = data->spriteSpecial; explosionFrameCount = 6; explosionFrameSize = 50; } void TauFiendShot::calculate() { Shot::calculate(); if (state == 0) return; sprite_index = int(20 * d / range); } TauFiendPWave::TauFiendPWave (Vector2 opos, double oangle, double ov, double orange, TauFiend *creator, SpaceSprite *osprite, double relativity, int fs, int odelay) : Missile(creator, opos, oangle, ov, 0, orange, 999, creator, osprite, relativity) { collide_flag_anyone = bit(LAYER_SHIPS); explosionSprite = data->spriteWeaponExplosion; explosionSample = data->sampleSpecial[1]; emp_fs = fs; delay = odelay; } void TauFiendPWave::inflict_damage(SpaceObject *other) { play_sound(explosionSample); add(new TauFiendPEffect(this, (Ship*)other, explosionSprite, emp_fs, delay)); state = 0; } int TauFiendPWave::handle_damage(SpaceLocation *other, int normal, int direct) { return normal + direct; } int TauFiendPWave::canCollide(SpaceLocation *other) { return (other->isShip() && !other->sameShip(this)); } TauFiendPEffect::TauFiendPEffect(SpaceLocation *creator, Ship *tgt, SpaceSprite *osprite, int ofs, int oduration) : Animation(creator, 0, osprite, 0, oduration, 50, LAYER_EXPLOSIONS) { target = tgt; fs = ofs; target->handle_fuel_sap(this, fs); } void TauFiendPEffect::calculate() { if (!(target && target->exists())) target = 0; if (target) { ... [truncated message content] |
Update of /cvsroot/timewarp/ships In directory sc8-pr-cvs1:/tmp/cvs-serv23538 Added Files: shpaktgu.dat shpaktgu.ini shpbahbu.dat shpbahbu.ini shpbogce.dat shpbogce.ini shpdeees.dat shpdeees.ini shpjurcu.dat shpjurcu.ini shpplala.dat shpplala.ini shptaufi.dat shptaufi.ini shptausl.dat shptausl.ini shptauto.dat shptauto.ini shpterbi.dat shpterbi.ini shpterbi.txt shpvuvji.dat shpvuvji.ini Log Message: adding resurrected ships --- NEW FILE: shpaktgu.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: shpaktgu.ini --- [Info] TWCost = 30 Origin = TWB Name = Aktun Gunner Name1 = Aktun Name2 = Gunner Code = AktunGunner Origin = SH Coders = Slag-786B [Ship] Crew = 42 CrewMax = 42 Batt = 42 BattMax = 42 SpeedMax = 35 AccelRate = 7 TurnRate = 3 RechargeAmount = 1 RechargeRate = 1 WeaponDrain = 1 WeaponRate = 0 SpecialDrain = 21 ;6 SpecialRate = 6 HotspotRate = 5 Mass = 22 Cost = 30 [Weapon] Color = 14 Range1 = 2 Range2 = 10 Frames = 0 Damage = 1 WeaponDrain2 = 3 ;[Special] ;Range = 20 ;Velocity = 80 ;Damage = 6 ;Armour = 6 [Extra] Range = 7 Frames = 100 Damage = 1 ;Drain = 21 Number = 5 RechargeRate = 400 Color = 9 Armour = 10 --- NEW FILE: shpbahbu.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: shpbahbu.ini --- [Info] Origin = TWB TWCost = 20 Name = Bahoid Buzzsaw Name1 = Bahoid Name2 = Buzzsaw Coders = Reddish Code = BahaoidBuzzsaw [Ship] Crew = 24 CrewMax = 24 Batt = 20 BattMax = 20 SpeedMax = 25 AccelRate = 6 TurnRate = 4 RechargeAmount = 1 RechargeRate = 4 WeaponDrain = 0 WeaponRate = 0 SpecialDrain = 4 SpecialRate = 10 HotspotRate = 2 Mass = 12 [Weapon] Range = 2 Damage = 1 Speed = .8 Color = 10 [Special] Range = 20 Velocity = 10 Damage = 6 Armour = 10 Timer = 13000 Radius = 8 Seek = 5.5 VelSeek = 120 Number = 2 [AI3_Default] Tactic = Direct Weapon = Field Weapon_Range = 3.5 Special = Proximity Special2 = Mine Special3 = Back Special4 = Homing --- NEW FILE: shpbogce.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: shpbogce.ini --- [Info] Origin = TWB TWCost = 26 Name1 = Bogg Name2 = Centurion Coders = Tau Code = BoggCenturion [Ship] Crew = 22 CrewMax = 22 Batt = 22 BattMax = 22 SpeedMax = 36 AccelRate = 7 TurnRate = 2 RechargeAmount = 1 RechargeRate = 5 WeaponDrain = 1 WeaponRate = 1.5 SpecialDrain = 7 SpecialRate = 2.5 HotspotRate = 3 Mass = 16 [Primary] Heat = 0.06 Range = 17 Damage = 2 Spread = 5 BlastAccel = 35 BlastMaxspeed = 18 StartupTime = 0.2 StartupDelay = 0.05 SlowdownTime = 1.1 FlameDuration = 50 [Secondary] Heat = 0.08 Damage = 3 BlastAccel = 90 BlastMaxSpeed = 23 Armour = 1 Lifetime = 2 Fuel = 1.5 Accel = 7 Maxspeed = 130 HotspotRate = 25 HotspotFrameSize = 50 HotspotThrust = 130 HotspotSlowdown = 2 [Herd] Range = 40 [Engines] ExhaustOn = 1 ExhaustRate = 25 ExhaustFrameSize = 25 ExhaustThrust = 25 ExhaustSlowdown = 2 ExhaustFryChance = 40 DrawHotspots = 0 --- NEW FILE: shpdeees.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: shpdeees.ini --- [Info] TWCost = 22 Origin = TWB Name1 = Deep Space Name2 = Essence Origin = TW Coders = CyHawk Gfx = CyHawk Sfx = Forevian Ditty = Forevian Code = DeepSpaceEssence [Ship] Crew = 34 CrewMax = 34 Batt = 4 BattMax = 4 SpeedMax = 29 AccelRate = 4 TurnRate = 7 RechargeAmount = 4 RechargeRate = 33 WeaponDrain = 4 WeaponRate = 33 SpecialDrain = 1 SpecialRate = 4 HotspotRate = 4 Mass = 0 [Weapon] Velocity = 43 TurnRate = 1 Armour = 2 DrainRate = 0.0025 MinCrew = 2 Range = 180 [Special] Range = 17 MinCrew = 1 EffectCount = 24 [Extra] FadeRate = 1 DrainRate = 0.006 [AI3_Default] Tactic = Direct Weapon = Field Weapon2 = No_range Special = Proximity Special_Range = 17 --- NEW FILE: shpjurcu.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: shpjurcu.ini --- [Info] Origin = TWB TWCost = 14 Name1 = Jurgatha Name2 = Cutter Coders = Reddish Code = JurgathaCutter [Ship] Crew = 16 CrewMax = 16 Batt = 0 BattMax = 20 SpeedMax = 50 AccelRate = 11 TurnRate = 9 RechargeAmount = 0 RechargeRate = 255 WeaponDrain = 1 WeaponRate = 1 SpecialDrain = 15 SpecialRate = 0 HotspotRate = 0 Mass = 10 [Weapon] Range = 2 Speed = 2 Color = 2 Damage = 1 [Special] Damage = 5 Frames = 1 [AI3_Default] Special = Always_When_Full Special2 = Mine Special3 = Back --- NEW FILE: shpplala.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: shpplala.ini --- [Info] TWCost = 21 Name1 = Planet Name2 = Lander Origin = SC2 Coders = rump, adpated from Tamaraw's and other's code Code = PlanetLander [Ship] Crew = 12 CrewMax = 12 Batt = 6 BattMax = 6 SpeedMax = 20 AccelRate = 20 TurnRate = 0.425 RechargeAmount = 1 RechargeRate = 4 WeaponDrain = 1 WeaponRate = 7 SpecialDrain = 6 SpecialRate = 1 HotspotRate = 0 Mass = 1 Cost = 23 [Weapon] Range = 2 ;2 looks accurate to me. Velocity = 15 ;15 looks accurate to me. Damage = 2 Armour = 3 [Special] [Configuration] ActiveConfig = 0; preset configs [Config00]; Bare bones, 'Planet Mode' InteriaOn = 0; Interia off HotSpotOn = 0; Hot Spots off BatteryOn = 0; Unlimited Battery [Config01]; Fully loaded, 'Planet Mode' ;Upgrades: Unsupported ;LightningShields = 0 ;FireShields = 0; ;DoubleSpeed = 0; ;InertialDampeners = 0; That was what the 'bio'shields were called, wasn't it? ;ROFIncrease = 0; Double the rate of fire ;PointValue = ;[Config02]; Bare bones, 'Shuttle Mode' InteriaOn = 1 HotSpotOn = 1 BatteryOn = 1 ;[Config03]; Fully loaded, 'Shuttle Mode' [AI3_Default] Special = Front Special2 = Narrow Special3 = Max_Battery Weapon = Precedence SpecialFreq = 1 --- NEW FILE: shptaufi.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: shptaufi.ini --- [Info] Origin = TWB TWCost = 26 Name1 = Tau Name2 = Fiend Coder = Tau Code = TauFiend [Ship] Crew = 20 CrewMax = 20 Batt = 20 BattMax = 20 SpeedMax = 38 AccelRate = 8 TurnRate = 1.5 RechargeAmount = 1 RechargeRate = 1 WeaponDrain = 4 WeaponRate = 1 SpecialDrain = 10 SpecialRate = 0 HotspotRate = 2 Mass = 15 [Weapon] Range = 11 Velocity = 90 Damage = 2 Armour = 2 Relativity = 1.0 [Special] Range = 30 Velocity = 100 ChargeTime = 0.3 CoolingTime = 0.4 Relativity = 1.0 Sap = 1 Duration = 30 --- NEW FILE: shptausl.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: shptausl.ini --- [Info] Origin = TWB TWCost = 20 Name1 = Tau Name2 = Slider Coders = Tau Code = TauSlider [Ship] Crew = 22 CrewMax = 22 Batt = 22 BattMax = 22 SpeedMax = 42 AccelRate = 9 TurnRate = 1 RechargeAmount = 1 RechargeRate = 2 WeaponDrain = 3 WeaponRate = 1 SpecialDrain = 3 SpecialRate = 4 HotspotRate = 3 Mass = 16 [Weapon] Range = 15 Velocity = 110 Length = 10 [Special] Range0 = 0 Range1 = 10 Range2 = 0.4 Velocity0 = 0 Velocity1 = 60 Velocity2 = 1.2 MinCount = 3 MaxCount = 20 SubRange = 2 SubVelocity = 2 --- NEW FILE: shptauto.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: shptauto.ini --- [Info] Origin = TWB TWCost = 22 Name1 = Tau Name2 = Torrent Coders = Tau Ditty = Lestat Code = TauTor [Ship] Crew = 20 CrewMax = 20 Batt = 20 BattMax = 20 SpeedMax = 50 AccelRate = 5 TurnRate = 3 RechargeAmount = 1 RechargeRate = 3 WeaponDrain = 10 WeaponRate = 20 SpecialDrain = 1 SpecialRate = 1 HotspotRate = 1 Mass = 21 [Weapon] Range = 50 Velocity = 130 Damage = 6 Armour = 999 [Special] Range = 14 Velocity = 80 Damage = 2 Armour = 1 [Extra] StartDrain = 6 EngineDrain = 1 AccelBoost = 6 SpeedBoost = 1.5 TransitionTime = 1400 [AI3_Default] Tactic = Direct Weapon = Reserve_Battery BattRecharge = 1 Special = Proximity Special_Range = 10 --- NEW FILE: shpterbi.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: shpterbi.ini --- [Info] Origin = TWB TWCost = 20 Name1 = Teron Name2 = Builder Coders = CyHawk Idea = UAF Code = TeronBuilder [Ship] Crew = 20 CrewMax = 20 Batt = 20 BattMax = 20 SpeedMax = 20 AccelRate = 7 TurnRate = 2 RechargeAmount = 0 RechargeRate = 10 WeaponDrain = 0 WeaponRate = 5 SpecialDrain = 0 SpecialRate = 10 HotspotRate = 4 Mass = 32 [Extra] Range = 10 AsteroidValue = 20 [Drone] Cost = 10 AsteroidValue = 20 CrewMax = 10 BattMax = 10 SpeedMax = 25 AccelRate = 7 TurnRate = 2 RechargeAmount = 1 RechargeRate = 8 WeaponDrain = 1 WeaponRate = 0 SpecialDrain = 1 SpecialRate = 0 HotspotRate = 1 Mass = 4 WeaponRange = 1 [Fighter] Cost = 20 CrewMax = 4 BattMax = 3 SpeedMax = 40 AccelRate = 10 TurnRate = 3 RechargeAmount = 1 RechargeRate = 10 WeaponDrain = 1 WeaponRate = 0 SpecialDrain = 10 SpecialRate = 0 HotspotRate = 0 Mass = 1 WeaponRange = 10 WeaponVelocity = 80 WeaponDamage = 1 WeaponArmour = 1 [Turret] Cost = 20 CrewMax = 8 BattMax = 3 TurnRate = 5 RechargeAmount = 1 RechargeRate = 20 WeaponDrain = 1 WeaponRate = 1 SpecialDrain = 0 SpecialRate = 10 Mass = 40 WeaponRange = 20 WeaponVelocity = 120 ;80 WeaponDamage = 3 WeaponArmour = 3 [TurretAttached] TurnRate = 5 RechargeAmount = 1 RechargeRate = 20 WeaponDrain = 1 WeaponRate = 1 SpecialDrain = 0 SpecialRate = 10 WeaponRange = 40 WeaponVelocity = 120 ;80 WeaponDamage = 5 WeaponArmour = 5 [AI3_Default] --- NEW FILE: shpterbi.txt --- Teron Builder. Commands: note that you're helpless if you got no drones left... drone selection: fire + thrust = toggle select all drones (short range) fire + right = select next drone (inf range?) fire + left = select prev drone (inf range?) drone orders: special + left = scroll to prev command special + right = scroll to next command activation special + fire = activate command for the selected drone(s) --- NEW FILE: shpvuvji.dat --- (This appears to be a binary file; contents omitted.) --- NEW FILE: shpvuvji.ini --- [Info] Origin = TWB TWCost = 22 Name1 = Vuv Name2 = Jinx Coders = Tau Ditty = Lestat Code = VuvJinx [Ship] Crew = 20 CrewMax = 20 Batt = 20 BattMax = 20 SpeedMax = 50 AccelRate = 5 TurnRate = 3 RechargeAmount = 1 RechargeRate = 3 WeaponDrain = 10 WeaponRate = 20 SpecialDrain = 1 SpecialRate = 1 HotspotRate = 1 Mass = 21 [Weapon] Range = 3 Velocity = 90 Number = 8 Spread = 1 [AI3_Default] Tactic = Direct Weapon = Reserve_Battery BattRecharge = 1 Special = Proximity Special_Range = 10 |
From: <or...@us...> - 2004-01-07 02:58:45
|
Update of /cvsroot/timewarp/source/util In directory sc8-pr-cvs1:/tmp/cvs-serv10930/source/util Modified Files: base.cpp base.h Log Message: added #ifdefed out tw_strdup() Index: base.cpp =================================================================== RCS file: /cvsroot/timewarp/source/util/base.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** base.cpp 21 Nov 2003 10:24:29 -0000 1.4 --- base.cpp 7 Jan 2004 02:58:42 -0000 1.5 *************** *** 1,4 **** --- 1,5 ---- #include <stdlib.h> + #include <string.h> #include "base.h" #include "errors.h" *************** *** 11,14 **** --- 12,22 ---- __call_before_main::__call_before_main ( void (*func)() ) { func(); + } + + char *tw_strdup ( const char *str ) { + int l = strlen(str); + char *r = (char*) malloc(l+1); + strcpy(r, str); + return r; } Index: base.h =================================================================== RCS file: /cvsroot/timewarp/source/util/base.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** base.h 21 Nov 2003 10:24:29 -0000 1.4 --- base.h 7 Jan 2004 02:58:42 -0000 1.5 *************** *** 11,14 **** --- 11,17 ---- #endif + //char *tw_strdup(const char *str); + //#define strdup tw_strdup + //#define TW_MALLOC_CHECK #ifdef TW_MALLOC_CHECK |
Update of /cvsroot/timewarp/source/gamex In directory sc8-pr-cvs1:/tmp/cvs-serv828/gamex Modified Files: projectx.cpp gamestarmap.cpp gamesolarview.h gamesolarview.cpp gameplanetview.h gameplanetview.cpp gameplanetscan.cpp gamedata.h gamedata.cpp Log Message: updated planet-view editor Index: projectx.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/projectx.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** projectx.cpp 4 Jan 2004 22:07:00 -0000 1.9 --- projectx.cpp 5 Jan 2004 22:41:12 -0000 1.10 *************** *** 82,87 **** // add( new GameStarmap() ); ! add( new GameSolarview() ); ! // add( new GamePlanetview() ); // add( new GamePlanetscan() ); // add( new GameMelee() ); --- 82,87 ---- // add( new GameStarmap() ); ! // add( new GameSolarview() ); ! add( new GamePlanetview() ); // add( new GamePlanetscan() ); // add( new GameMelee() ); Index: gamestarmap.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamestarmap.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gamestarmap.cpp 4 Jan 2004 22:07:00 -0000 1.7 --- gamestarmap.cpp 5 Jan 2004 22:41:12 -0000 1.8 *************** *** 177,181 **** bnew = new Button(Tedit, "new_"); breplace = new Button(Tedit, "replace_"); ! Tedit->tv->set(starspr, startypelist->N); --- 177,181 ---- bnew = new Button(Tedit, "new_"); breplace = new Button(Tedit, "replace_"); ! Tedit->tv->set(startypespr, startypelist->N); Index: gamesolarview.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamesolarview.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gamesolarview.h 4 Jan 2004 22:07:00 -0000 1.4 --- gamesolarview.h 5 Jan 2004 22:41:12 -0000 1.5 *************** *** 21,29 **** --- 21,34 ---- extern void ellipsparams(Vector2 relpos, double ellb, double &R, Vector2 &Poffs, int &col); + extern void load_planettypes(SpaceSprite ***planettypespr); + extern void load_surfacetypes(BITMAP ***surfacebmp); class MapEditor2 : public MapEditor { public: + //MapSpacebody *editmap; same as objmap int isurfacetype; // surfacetype of the selected object + ValueEdit *ved; + TVarea *tvsurf; Vector2 mapcenter; *************** *** 36,39 **** --- 41,49 ---- virtual void colorizeobj(SolarBody *s); + + void init_interface(TWindow *T, FONT *usefont, SpaceSprite **planettypespr, BITMAP **surfacebmp); + void save_surface(); + void init_surface(); + void check_radius(); }; *************** *** 47,54 **** //IconTV ! TVarea *tv2; ! IconTV *Tedit; // contents of Tedit ! Button *bnew, *breplace; //int istarselect; --- 57,64 ---- //IconTV ! // TVarea *tv2; ! // IconTV *Tedit; // contents of Tedit ! // Button *bnew, *breplace; //int istarselect; *************** *** 90,96 **** virtual void init_menu(); - void save_surface(); - void init_surface(); - void check_radius(); }; --- 100,103 ---- Index: gamesolarview.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamesolarview.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gamesolarview.cpp 4 Jan 2004 22:07:00 -0000 1.6 --- gamesolarview.cpp 5 Jan 2004 22:41:12 -0000 1.7 *************** *** 29,32 **** --- 29,59 ---- + void load_planettypes(SpaceSprite ***planettypespr) + { + // load planet sprites + (*planettypespr) = new SpaceSprite* [planettypelist->N]; + int i; + for ( i = 0; i < planettypelist->N; ++i ) + { + char tmp[512]; + sprintf(tmp, "gamex/solarview/planet_%s_01.bmp", planettypelist->type[i].type_string); + (*planettypespr)[i] = create_sprite( tmp, SpaceSprite::MASKED ); + } + } + + void load_surfacetypes(BITMAP ***surfacebmp) + { + // load surface bitmaps + (*surfacebmp) = new BITMAP* [surfacetypelist->N]; + int i; + for ( i = 0; i < surfacetypelist->N; ++i ) + { + char tmp[512]; + sprintf(tmp, "gamex/planetscan/surface_%s_01.bmp", surfacetypelist->type[i].type_string); + load_bitmap32(&(*surfacebmp)[i], tmp); + scale_bitmap32(&(*surfacebmp)[i], 0.2); + } + } + // scan the normal files: *************** *** 116,119 **** --- 143,181 ---- + void MapEditor2::init_interface(TWindow *T, + FONT *usefont, SpaceSprite **planettypespr, + BITMAP **surfacebmp) + { + Tedit = new IconTV("gamex/interface/planetview/edit", 1400, 900, game_screen); + Tedit->exclusive = false; + bnew = new Button(Tedit, "new_"); + breplace = new Button(Tedit, "replace_"); + Tedit->tv->set(planettypespr, planettypelist->N); + + tvsurf = new TVarea(Tedit, "plot2_"); + tvsurf->set(surfacebmp, surfacetypelist->N); + + ved = new ValueEdit(Tedit, "values_", usefont, 64); + + ved->info->text_color = makecol(200,200,200); + ved->edit->text_color = makecol(200,200,200); + + ved->values[0]->set(vtype_float, "atmospheric pressure", 0.0, 100.0); + ved->values[1]->set(vtype_float, "radius (es)", 0.1, 100.0); + ved->values[2]->set(vtype_float, "density (kg/m3)", 0.5, 6.0); + ved->values[3]->set(vtype_float, "day (es))", 0.0, 100.0); + ved->values[4]->set(vtype_float, "tilt (degr)", 0.0, 90.0); + ved->values[5]->set(vtype_float, "albedo", 0.0, 1.0); + ved->values[6]->set(vtype_float, "greenhouse", 0.0, 1.0); + ved->values[7]->set(vtype_int, "weather", 0, 9); + ved->values[8]->set(vtype_int, "tectonics", 0, 9); + + T->add(Tedit); + + Tedit->show(); + Tedit->focus(); + + Tedit->layer = 1; + } *************** *** 162,166 **** s->ellipscenter = mapcenter + Poffs; ! s->drawshadow(); } --- 224,229 ---- s->ellipscenter = mapcenter + Poffs; ! // s->drawshadow(); ! colorizeobj(s); // well ... to mimic changing shadows wrt the sun } *************** *** 170,178 **** MapEditor::replace(); ! isurfacetype = gsolar->tv2->isel; colorizeobj((SolarBody*) selection); ! gsolar->save_surface(); } --- 233,241 ---- MapEditor::replace(); ! isurfacetype = tvsurf->isel; colorizeobj((SolarBody*) selection); ! save_surface(); } *************** *** 183,194 **** MapEditor::newselection(); ! gsolar->init_surface(); ! isurfacetype = gsolar->tv2->isel; // also ... the planet picture is ... int k; k = selection->starnum; ! Tedit->tv->set_sel( gsolar->solarmap->sub[k]->type ); } --- 246,257 ---- MapEditor::newselection(); ! init_surface(); ! isurfacetype = tvsurf->isel; // also ... the planet picture is ... int k; k = selection->starnum; ! Tedit->tv->set_sel( objmap->sub[k]->type ); } *************** *** 229,238 **** // you need a new random number (plus check it doesn't exist yet) ! int id; ! for (;;) ! { ! id = random(); ! // check all things in the list ... but you've to start at the root ?! ! } --- 292,296 ---- // you need a new random number (plus check it doesn't exist yet) ! objmap->sub[selection->starnum]->id = mapeverything.gen_id(); *************** *** 240,244 **** // the sprite based on this thingy !! ! isurfacetype = gsolar->tv2->isel; colorizeobj((SolarBody*) selection); --- 298,302 ---- // the sprite based on this thingy !! ! isurfacetype = tvsurf->isel; colorizeobj((SolarBody*) selection); *************** *** 247,251 **** // write stuff to a .ini file ... ! gsolar->save_surface(); } --- 305,345 ---- // write stuff to a .ini file ... ! save_surface(); ! } ! ! ! ! ! ! ! void MapEditor2::save_surface() ! { ! if (!selection) ! return; ! ! int id; ! id = objmap->sub[ selection->starnum ]->id; ! ! char tmp[512]; ! sprintf(tmp, "gamex/gamedata/surface/%08X.ini", id); ! set_config_file(tmp); ! ! set_config_float(0, "atmo", ved->values[0]->value); ! set_config_float(0, "radius", ved->values[1]->value); ! set_config_float(0, "density", ved->values[2]->value); ! set_config_float(0, "day", ved->values[3]->value); ! set_config_float(0, "tilt", ved->values[4]->value); ! set_config_float(0, "albedo", ved->values[5]->value); ! set_config_float(0, "greenhouse", ved->values[6]->value); ! set_config_int(0, "weather", (int) ved->values[7]->value); ! set_config_int(0, "tectonics", (int) ved->values[8]->value); ! ! // and the surface type string ? ! char *t; ! t = surfacetypelist->type[tvsurf->isel].type_string; ! set_config_string(0, "surface", t); ! ! ! flush_config_file(); } *************** *** 253,256 **** --- 347,433 ---- + void MapEditor2::init_surface() + { + if (!selection) + return; + + int id; + id = objmap->sub[ selection->starnum ]->id; + + char tmp[512]; + sprintf(tmp, "gamex/gamedata/surface/%08X.ini", id); + set_config_file(tmp); + + ved->values[0]->value = get_config_float(0, "atmo", 0); + ved->values[1]->value = get_config_float(0, "radius", 0); + ved->values[2]->value = get_config_float(0, "density", 0); + ved->values[3]->value = get_config_float(0, "day", 0); + ved->values[4]->value = get_config_float(0, "tilt", 0); + ved->values[5]->value = get_config_float(0, "albedo", 0); + ved->values[6]->value = get_config_float(0, "greenhouse", 0); + ved->values[7]->value = get_config_int(0, "weather", 0); + ved->values[8]->value = get_config_int(0, "tectonics", 0); + + ved->edit_update(); + + // and the surface type ? + strcpy(tmp, get_config_string(0, "surface", "default")); + tvsurf->set_sel ( surfacetypelist->get_index(tmp, 0) ); + + } + + + void MapEditor2::check_radius() + { + if (!selection) + return; + + char *t; + t = planettypelist->type[ objmap->sub[ selection->starnum ]->type ].type_string; + + // check if the planet's radius was changed; if so, check validity + double Rmin, Rmax; + + if (strcmp(t, "dwarf") == 0) + { + Rmin = 0.01; + Rmax = 0.1; + } + if (strcmp(t, "small") == 0) + { + Rmin = 0.1; + Rmax = 0.5; + } + if (strcmp(t, "medium") == 0) + { + Rmin = 0.5; + Rmax = 2.0; + } + if (strcmp(t, "big") == 0) + { + Rmin = 2.0; + Rmax = 10.0; + } + if (strcmp(t, "giant") == 0) + { + Rmin = 10.0; + Rmax = 20.0; + } + + double R; + R = get_config_float(0, "radius", 0); + + if (R < Rmin || R > Rmax) + { + R = random(Rmin, Rmax); + } + + ved->values[1]->value = R; + } + + + + + void GameSolarview::init_menu() { *************** *** 324,327 **** --- 501,507 ---- // load planet sprites + load_planettypes(&planettypespr); + load_surfacetypes(&surfacebmp); + /* planettypespr = new SpaceSprite* [planettypelist->N]; int i; *************** *** 342,349 **** --- 522,531 ---- scale_bitmap32(&surfacebmp[i], 0.2); } + */ // load the planet data + int i; for ( i = 0; i < solarmap->Nsub; ++i ) { *************** *** 370,373 **** --- 552,557 ---- double rc, gc, bc, r_ref, g_ref, b_ref; avcolor(surfacebmp[k], &r_ref, &g_ref, &b_ref); + + // WOOPS - should CHANGE!! double temperature = 5500.0; *************** *** 427,469 **** strcpy(oldstarname, solarmap->name); - - Tedit = new IconTV("gamex/interface/planetview/edit", 1400, 900, game_screen); - Tedit->exclusive = false; - bnew = new Button(Tedit, "new_"); - breplace = new Button(Tedit, "replace_"); - Tedit->tv->set(planettypespr, planettypelist->N); - - tv2 = new TVarea(Tedit, "plot2_"); - tv2->set(surfacebmp, surfacetypelist->N); - ve = new ValueEdit(Tedit, "values_", usefont, 64); ! ve->info->text_color = makecol(200,200,200); ! ve->edit->text_color = makecol(200,200,200); ! ve->values[0]->set(vtype_float, "atmospheric pressure", 0.0, 100.0); ! ve->values[1]->set(vtype_float, "radius (es)", 0.1, 100.0); ! ve->values[2]->set(vtype_float, "density (kg/m3)", 0.5, 6.0); ! ve->values[3]->set(vtype_float, "day (es))", 0.0, 100.0); ! ve->values[4]->set(vtype_float, "tilt (degr)", 0.0, 90.0); ! ve->values[5]->set(vtype_float, "albedo", 0.0, 1.0); ! ve->values[6]->set(vtype_float, "greenhouse", 0.0, 1.0); ! ve->values[7]->set(vtype_int, "weather", 0, 9); ! ve->values[8]->set(vtype_int, "tectonics", 0, 9); ! T->add(Tedit); ! T->tree_doneinit(); ! Tedit->show(); ! Tedit->focus(); - mapeditor = new MapEditor2(); - mapeditor->set_game(this, ptr); - mapeditor->set_interface( Tedit, breplace, bnew ); - mapeditor->set_mapinfo( solarmap, 2, 1.0); ! mapeditor->mapcenter = sunpos; // initialize the colony placer/editor --- 611,632 ---- strcpy(oldstarname, solarmap->name); ! mapeditor = new MapEditor2(); ! mapeditor->set_game(this, ptr); ! mapeditor->init_interface(T, usefont, planettypespr, surfacebmp); ! mapeditor->set_mapinfo( solarmap, 2, 1.0); ! mapeditor->mapcenter = sunpos; + //mapeditor->editmap = solarmap; ! T->tree_doneinit(); + mapeditor->Tedit->show(); + mapeditor->Tedit->focus(); // initialize the colony placer/editor *************** *** 527,531 **** ! Tedit->layer = 1; // shown first cedit->layer = 1; // shown first rpopup->layer = 1; --- 690,694 ---- ! // Tedit->layer = 1; // shown first cedit->layer = 1; // shown first rpopup->layer = 1; *************** *** 803,931 **** - - - - void GameSolarview::save_surface() - { - if (!mapeditor->selection) - return; - - int id; - id = solarmap->sub[ mapeditor->selection->starnum ]->id; - - char tmp[512]; - sprintf(tmp, "gamex/gamedata/surface/%08X.ini", id); - set_config_file(tmp); - - /* - ve->values[0]->set(vtype_float, "atmospheric pressure", 0.0, 100.0); - ve->values[1]->set(vtype_float, "radius (es)", 0.1, 100.0); - ve->values[2]->set(vtype_float, "density (kg/m3)", 1.0, 6.0); - ve->values[3]->set(vtype_float, "day (es))", 0.0, 100.0); - ve->values[4]->set(vtype_float, "tilt (degr)", 0.0, 90.0); - ve->values[5]->set(vtype_float, "albedo", 0.0, 1.0); - ve->values[6]->set(vtype_float, "greenhouse", 0.0, 1.0); - ve->values[7]->set(vtype_int, "weather", 0, 9); - ve->values[8]->set(vtype_int, "tectonics", 0, 9); - */ - set_config_float(0, "atmo", ve->values[0]->value); - set_config_float(0, "radius", ve->values[1]->value); - set_config_float(0, "density", ve->values[2]->value); - set_config_float(0, "day", ve->values[3]->value); - set_config_float(0, "tilt", ve->values[4]->value); - set_config_float(0, "albedo", ve->values[5]->value); - set_config_float(0, "greenhouse", ve->values[6]->value); - set_config_int(0, "weather", (int) ve->values[7]->value); - set_config_int(0, "tectonics", (int) ve->values[8]->value); - - // and the surface type string ? - char *t; - t = surfacetypelist->type[gsolar->tv2->isel].type_string; - set_config_string(0, "surface", t); - - - flush_config_file(); - } - - - - - void GameSolarview::init_surface() - { - if (!mapeditor->selection) - return; - - int id; - id = solarmap->sub[ mapeditor->selection->starnum ]->id; - - char tmp[512]; - sprintf(tmp, "gamex/gamedata/surface/%08X.ini", id); - set_config_file(tmp); - - ve->values[0]->value = get_config_float(0, "atmo", 0); - ve->values[1]->value = get_config_float(0, "radius", 0); - ve->values[2]->value = get_config_float(0, "density", 0); - ve->values[3]->value = get_config_float(0, "day", 0); - ve->values[4]->value = get_config_float(0, "tilt", 0); - ve->values[5]->value = get_config_float(0, "albedo", 0); - ve->values[6]->value = get_config_float(0, "greenhouse", 0); - ve->values[7]->value = get_config_int(0, "weather", 0); - ve->values[8]->value = get_config_int(0, "tectonics", 0); - - ve->edit_update(); - - // and the surface type ? - strcpy(tmp, get_config_string(0, "surface", "default")); - gsolar->tv2->set_sel ( surfacetypelist->get_index(tmp, 0) ); - - } - - - void GameSolarview::check_radius() - { - if (!mapeditor->selection) - return; - - char *t; - t = planettypelist->type[ solarmap->sub[ mapeditor->selection->starnum ]->type ].type_string; - - // check if the planet's radius was changed; if so, check validity - double Rmin, Rmax; - - if (strcmp(t, "dwarf") == 0) - { - Rmin = 0.01; - Rmax = 0.1; - } - if (strcmp(t, "small") == 0) - { - Rmin = 0.1; - Rmax = 0.5; - } - if (strcmp(t, "medium") == 0) - { - Rmin = 0.5; - Rmax = 2.0; - } - if (strcmp(t, "big") == 0) - { - Rmin = 2.0; - Rmax = 10.0; - } - if (strcmp(t, "giant") == 0) - { - Rmin = 10.0; - Rmax = 20.0; - } - - double R; - R = get_config_float(0, "radius", 0); - - if (R < Rmin || R > Rmax) - { - R = random(Rmin, Rmax); - } - - ve->values[1]->value = R; - } --- 966,968 ---- Index: gameplanetview.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gameplanetview.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gameplanetview.h 4 Jan 2004 22:07:00 -0000 1.6 --- gameplanetview.h 5 Jan 2004 22:41:12 -0000 1.7 *************** *** 13,30 **** const int ID_FLEETICON = 0x08235497; ! class FleetIcon : public SpaceObject { public: ! XFleet fleet; ! FleetIcon(Vector2 opos, SpaceSprite *osprite, char *oidname); }; class GamePlanetview : public GameBare { ! IconTV *Tedit; // contents of Tedit ! Button *bnew, *breplace; TextEditBox *starname; char oldstarname[128]; --- 13,66 ---- const int ID_FLEETICON = 0x08235497; ! ! ! class Surface3D { public: ! BITMAP *image32bit, *dummy; ! int mapW, mapH; ! ! int image_size, visual_size; ! int PlanetUsespec; ! double theta, fi, rad; ! ! struct base_map_type {double lat, lon, diff, spec;} *base_map; ! ! unsigned int *base_map_linear; // mapping of coordinates ! unsigned int *base_shade_linear, *base_spec_linear; // shades ? ! unsigned char *color_map_linear, *spec_map_linear; ! ! unsigned int *base_map_and_shade_resorted; ! // linear means in this case, a linear array ! ! int jmin[1000], jmax[1000]; ! ! ! Surface3D(); ! ~Surface3D(); ! ! void reset(int planet_diameter, BITMAP *color_map, ! BITMAP *spec_map, bool invcolor, ! double sun_r, double sun_g, double sun_b); ! ! void plot(); ! void plot(BITMAP *trg); ! void clear(); }; + class MapEditor3 : public MapEditor2 + { + public: + virtual void colorizeobj(SolarBody *s); + }; + class GamePlanetview : public GameBare { ! public: ! // IconTV *Tedit; // contents of Tedit ! // Button *bnew, *breplace; TextEditBox *starname; char oldstarname[128]; *************** *** 32,41 **** MapSpacebody *starmap, *solarmap, *planetmap; ! MapEditor2 *mapeditor; MousePtr *ptr; ! //WindowInfo wininfo; virtual ~GamePlanetview(); --- 68,78 ---- MapSpacebody *starmap, *solarmap, *planetmap; ! MapEditor3 *mapeditor; MousePtr *ptr; ! SpaceSprite **planettypespr; ! BITMAP **surfacebmp; virtual ~GamePlanetview(); *************** *** 49,53 **** ThePlaya *player; ! FleetIcon *fleeticon; TeamCode team_player, team_aliens; --- 86,90 ---- ThePlaya *player; ! // FleetIcon *fleeticon; TeamCode team_player, team_aliens; *************** *** 64,68 **** virtual void checknewgame(); ! SpaceSprite **planetspr, *playerspr, *fleetspr; virtual void init_menu(); --- 101,105 ---- virtual void checknewgame(); ! SpaceSprite *planetspr, *playerspr; virtual void init_menu(); Index: gameplanetview.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gameplanetview.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** gameplanetview.cpp 4 Jan 2004 22:07:00 -0000 1.9 --- gameplanetview.cpp 5 Jan 2004 22:41:12 -0000 1.10 *************** *** 30,36 **** --- 30,39 ---- #include "../twgui/twpopup.h" + #include "general/sprites.h" + static const int ID_MAP_PLANET = 0x0b8f934ae; + GamePlanetview *gplanet; *************** *** 49,52 **** --- 52,56 ---- void GamePlanetview::init() { + gplanet = this; GameBare::init(); *************** *** 109,123 **** SpaceObject *solarbody; - // load the planet data ! // load planet/moon sprites ! planetspr = new SpaceSprite* [planettypelist->N]; ! int i; ! for ( i = 0; i < planettypelist->N; ++i ) ! { ! char tmp[512]; ! sprintf(tmp, "gamex/solarview/planet_%s_01.bmp", planettypelist->type[i].type_string); ! planetspr[i] = create_sprite( tmp, SpaceSprite::MASKED ); ! } Vector2 Poffs; --- 113,120 ---- SpaceObject *solarbody; ! load_planettypes(&planettypespr); ! load_surfacetypes(&surfacebmp); ! Vector2 Poffs; *************** *** 132,138 **** int k; k = planetmap->type; ! solarbody = new SolarBody(0, centerpos, 0.0, planetspr[k], sunpos, iplanet, sunpos+Poffs, R, b, makecol(115,0,0)); planetmap->o = solarbody; add(solarbody); --- 129,152 ---- int k; k = planetmap->type; ! planetspr = new SpaceSprite(planettypespr[k]->get_bitmap(0)); ! solarbody = new SolarBody(0, centerpos, 0.0, planetspr, sunpos, iplanet, sunpos+Poffs, R, b, makecol(115,0,0)); + Surface3D *s3d; + s3d = new Surface3D(); + + char tmp[512]; + sprintf(tmp, "gamex/gamedata/surface/%08X.ini", planetmap->id); + set_config_file(tmp); + strcpy(tmp, get_config_string(0, "surface", "default")); + k = surfacetypelist->get_index(tmp, 0); + + int d; + //r = planettypespr[k]->get_bitmap(0)->w; + d = solarbody->get_sprite()->get_bitmap(0)->w; + + s3d->reset(d, gplanet->surfacebmp[k], 0, true, 1.0, 1.0, 1.0); + s3d->plot(solarbody->get_sprite()->get_bitmap(0)); + planetmap->o = solarbody; add(solarbody); *************** *** 140,145 **** solarbody->id = ID_MAP_PLANET; // so that it's not editable by the mapeditor - // load the star data for ( i = 0; i < planetmap->Nsub; ++i ) { --- 154,159 ---- solarbody->id = ID_MAP_PLANET; // so that it's not editable by the mapeditor // load the star data + int i; for ( i = 0; i < planetmap->Nsub; ++i ) { *************** *** 154,160 **** R, Poffs, col); int k; k = planetmap->sub[i]->type; ! solarbody = new SolarBody(0, P, 0.0, planetspr[k], centerpos+relplanetpos, i, centerpos+Poffs, R, b, col); --- 168,195 ---- R, Poffs, col); + int k; k = planetmap->sub[i]->type; ! ! int r; ! r = planettypespr[k]->get_bitmap(0)->w; ! ! // what is the planet surface ... ! sprintf(tmp, "gamex/gamedata/surface/%08X.ini", planetmap->sub[i]->id); ! set_config_file(tmp); ! ! strcpy(tmp, get_config_string(0, "surface", "default")); ! k = surfacetypelist->get_index(tmp, 0); ! ! ! s3d->reset(r, surfacebmp[k], 0, true, 1.0, 1.0, 1.0); ! ! s3d->plot(); ! planetspr = new SpaceSprite(s3d->dummy); ! ! // apply the planet-surface to this planet/moon ! // but, how ?? ! ! solarbody = new SolarBody(0, P, 0.0, planetspr, centerpos+relplanetpos, i, centerpos+Poffs, R, b, col); *************** *** 169,193 **** // the player //SpaceSprite *playerspr; ! playerspr = create_sprite( "gamex/planetview/player_01.bmp", SpaceSprite::MASKED, 64 ); player = new ThePlaya(playerspr, &playerinfo); add(player); - // switch_team(player->ally_flag, team_player); locate_onedge_aligned_to_center(player, 0.5*size, 0.45*size); - // test - // player->pos = Vector2(0,0); - // player->angle = 0.25 * PI; - - - // an enemy fleet - fleetspr = create_sprite( "gamex/planetview/fleet_01.bmp", SpaceSprite::MASKED, 64 ); - fleeticon = new FleetIcon(Vector2(400,300), fleetspr, "orzne"); - add(fleeticon); - // switch_team(fleeticon->ally_flag, team_aliens); - - StarBackgr *sb; sb = new StarBackgr(); --- 204,215 ---- // the player //SpaceSprite *playerspr; ! playerspr = create_sprite( "gamex/solarview/player_01.bmp", SpaceSprite::MASKED, 64 ); player = new ThePlaya(playerspr, &playerinfo); add(player); locate_onedge_aligned_to_center(player, 0.5*size, 0.45*size); StarBackgr *sb; sb = new StarBackgr(); *************** *** 203,226 **** add(ptr); - Tedit = new IconTV("gamex/interface/starmap/edit", 400, 200, game_screen); - Tedit->exclusive = false; - bnew = new Button(Tedit, "new_"); - breplace = new Button(Tedit, "replace_"); - Tedit->tv->set(planetspr, planettypelist->N); - - T->add(Tedit); - T->tree_doneinit(); - - Tedit->show(); - Tedit->focus(); - Tedit->layer = 1; // shown first T->layer = 2; // always shown later ! mapeditor = new MapEditor2(); mapeditor->set_game(this, ptr); ! mapeditor->set_interface( Tedit, breplace, bnew ); mapeditor->set_mapinfo( planetmap, 3, 1.0); mapeditor->mapcenter = centerpos; } --- 225,246 ---- add(ptr); T->layer = 2; // always shown later ! mapeditor = new MapEditor3(); mapeditor->set_game(this, ptr); ! ! mapeditor->init_interface(T, usefont, planettypespr, surfacebmp); ! ! mapeditor->set_mapinfo( planetmap, 3, 1.0); mapeditor->mapcenter = centerpos; + + T->tree_doneinit(); + + mapeditor->Tedit->show(); + mapeditor->Tedit->focus(); + + delete s3d; } *************** *** 228,238 **** void GamePlanetview::quit() { - delete planetspr; delete playerspr; - delete fleetspr; int i; for ( i = 0; i < planettypelist->N; ++i ) ! delete planetspr[i]; if (!hardexit) // game is not quitted completely --- 248,260 ---- void GamePlanetview::quit() { delete playerspr; int i; for ( i = 0; i < planettypelist->N; ++i ) ! delete planettypespr[i]; ! ! for ( i = 0; i < surfacetypelist->N; ++i ) ! del_bitmap(&surfacebmp[i]); ! delete surfacebmp; if (!hardexit) // game is not quitted completely *************** *** 333,336 **** --- 355,359 ---- { + /* // only activate planet view mode, if you've hit a planet. if (player->collisionwith->id == ID_FLEETICON) *************** *** 356,360 **** } ! } else if (player->collisionwith->id == MAPOBJ_ID || player->collisionwith->id == ID_MAP_PLANET) { --- 379,385 ---- } ! } else ! */ ! if (player->collisionwith->id == MAPOBJ_ID || player->collisionwith->id == ID_MAP_PLANET) { *************** *** 429,433 **** ! FleetIcon::FleetIcon(Vector2 opos, SpaceSprite *osprite, char *oidname) : --- 454,458 ---- ! /* FleetIcon::FleetIcon(Vector2 opos, SpaceSprite *osprite, char *oidname) : *************** *** 444,448 **** fleet.add("orzne", 2); } ! --- 469,473 ---- fleet.add("orzne", 2); } ! */ *************** *** 451,453 **** --- 476,1050 ---- { } + + + + // copied and adapted from 3d planet. + + Surface3D::Surface3D() + { + image32bit = 0; + dummy = 0; + + base_map_linear = 0; + base_shade_linear = 0; + base_spec_linear = 0; + color_map_linear = 0; + spec_map_linear = 0; + base_map_and_shade_resorted = 0; + } + + + void Surface3D::clear() + { + if (base_map_linear) + base_map_linear = 0; + if (base_shade_linear) + base_shade_linear = 0; + if (base_spec_linear) + base_spec_linear = 0; + if (color_map_linear) + color_map_linear = 0; + if (spec_map_linear) + spec_map_linear = 0; + if (base_map_and_shade_resorted) + base_map_and_shade_resorted = 0; + + del_bitmap(&dummy); + del_bitmap(&image32bit); + } + + Surface3D::~Surface3D() + { + clear(); + } + + + void Surface3D::reset(int planet_diameter, BITMAP *color_map, + BITMAP *spec_map, bool invcolor, + double sun_r, double sun_g, double sun_b) + { + STACKTRACE; + + clear(); + + if (spec_map) + PlanetUsespec = 1; + else + PlanetUsespec = 0; + + double spin, tilt, sun_horizangle, sun_vertangle; + spin = 0; + tilt = 0; + sun_horizangle = 0; + sun_vertangle = 0; + + double min_light = 0.5; + double max_light = 1.1; + + + + mapW = color_map->w; + mapH = color_map->h; + + + image_size = planet_diameter; + visual_size = image_size / 2 - 1; + + dummy = create_bitmap_ex(32, image_size, image_size); + clear_to_color(dummy, makecol32(255,0,255)); + + image32bit = create_bitmap_ex(32, image_size, image_size); + clear_to_color(image32bit, makecol32(255,0,255)); + + // there are 4 chars containing the colors + // for a map of size W, H + // and I keep an extra copy of the map (for the rotation extrapolates on there). + color_map_linear = new unsigned char [4*mapW*mapH * 2]; + spec_map_linear = new unsigned char [4*mapW*mapH * 2]; + + + int ccc; + int i,j; + + for (i = 0; i < mapW; i++) + { + for (j = 0; j < mapH; j++) + { + ccc=getpixel(color_map, i, j); + + int spec; + if (spec_map) + spec = getpixel(spec_map, i, j); + else + spec = makecol(200,200,200); + + unsigned char r, g, b; + unsigned char sr, sg, sb; + + // AT THIS MOMENT, it's a good moment to find out in which way the + // videocard interprets the colors ... as rgb, or as bgr ??!! + + // map coordinate + int k = (2*mapW*mapH) - (j+1)*(2*mapW) + i; + if (!invcolor) + { + r = getr32(ccc); + g = getg32(ccc); + b = getb32(ccc); + } else { + b = getr32(ccc); + g = getg32(ccc); + r = getb32(ccc); + } + + // filter the colors by the reference sun + r = (unsigned char)(sun_r * r); + g = (unsigned char)(sun_g * g); + b = (unsigned char)(sun_b * b); + + *((int*) &color_map_linear[4*k]) = makecol32(r,g,b); + + // repeat this for the spec map + + sr = (unsigned char)(sun_r * getr32(spec)); + sg = (unsigned char)(sun_g * getg32(spec)); + sb = (unsigned char)(sun_b * getb32(spec)); + + *((int*) &spec_map_linear[4*k]) = makecol32(sr,sg,sb); + + + // keep an extra copy in memory. + k += mapW; + *((int*) &color_map_linear[4*k]) = makecol32(r,g,b); + + *((int*) &spec_map_linear[4*k]) = makecol32(sr,sg,sb); + + } + } + + theta = tilt * ANGLE_RATIO; + fi = 0;// should always be 0 !!//125* ANGLE_RATIO; + rad = 0; + + double L, D, d; + double focus; + + double th=theta; + + base_map = (base_map_type*)malloc(sizeof(base_map_type)*image_size*image_size); + + base_map_linear = new unsigned int [image_size*image_size]; + base_shade_linear = new unsigned int [image_size*image_size]; + base_spec_linear = new unsigned int [image_size*image_size]; + + base_map_and_shade_resorted = new unsigned int [2*image_size*image_size]; + + double fi_s = sun_horizangle*ANGLE_RATIO; + double th_s = sun_vertangle * ANGLE_RATIO; //sun position + + + double ts[3][3]; + double tm[3][3]; + + + tm[0][0] = cos(th)*cos(fi); + tm[0][1] = sin(th); + tm[0][2] = -cos(th)*sin(fi); + tm[1][0] = -sin(th)*cos(fi); + tm[1][1] = cos(th); + tm[1][2] = sin(th)*sin(fi); + tm[2][0] = sin(fi); + tm[2][1] = 0; + tm[2][2] = cos(fi); + + ts[0][0] = cos(fi_s)*cos(th_s); + ts[0][1] = -sin(fi_s); + ts[0][2] = cos(fi_s)*sin(th_s); + ts[1][0] = sin(fi_s)*cos(th_s); + ts[1][1] = cos(fi_s); + ts[1][2] = sin(fi_s)*sin(th_s); + ts[2][0] = -sin(th_s); + ts[2][1] = 0; + ts[2][2] = cos(th_s); + + + // x, y is in the drawing area; + // z points outside the screen. + + Vector3D observer(0,0,1); + Vector3D sunshine(cos(fi_s)*cos(th_s), sin(fi_s)*cos(th_s), -sin(th_s)); + sunshine.normalize(); + + L = 10; + D = L*L - 1; + d = sqrt(D); + + double xx,yy,zz, rr, ff, tg2; + // double xf, yf, zf;//final; + double xs,ys,zs;//sun + double lon, lat; + + focus = (visual_size) * d;//tan(view_angle/2); + + + for (i=-image_size/2; i<image_size/2; i++) + { + + int k = i + image_size/2; + if (k >= image_size) continue; + jmin[k] = 100000; + jmax[k] = 0; + + for (j=-image_size/2; j<image_size/2; j++) + { + if ((i*i+j*j) < visual_size*visual_size) + { + //-int k = i + image_size/2; + int m = j + image_size/2; + if (m >= image_size) continue; + + if (m < jmin[k]) + jmin[k] = m; + + if (m > jmax[k]) + jmax[k] = m; + + + + ff = (i*i+j*j); + tg2 = ff / (focus*focus); + + zz = sqrt(L*L - D*(1+tg2)) / (1 + tg2); + rr = sqrt(1 - zz*zz); + + if (ff > 0) { + xx = rr * i / sqrt(ff); + yy = rr * j / sqrt(ff); } + else { + xx = 0; yy = 0; } + + // xx = i/double(visual_size); + // yy = j/double(visual_size); + // zz = sqrt(1 - xx*xx - yy*yy); + + xs = xx; ys = yy; zs = zz; + // = position of the visible sphere point in 3D space ? + + Vector3D surfacenormal(xs, ys, zs); + surfacenormal.normalize(); + // the point that is facing you ;) + + // now, calculate the light intensity. + // two parts: how much light does a part of the earth receive, + // and how much does it radiate out: + + double I, J; + I = -1 * sunshine.dot(surfacenormal); // incoming sunshine is in opposite direction from outgoing surface normal + // I *= surfacenormal.dot(observer); // this is directional shading... shouldn't be here. + if (I < 0) + I = 0; + I = min_light + I*(max_light-min_light); + + + // and, what about specular, i.e., reflections of light towards + // the observer? + Vector3D reflection(0,0,0); // the reflected sun-light direction + reflection = -1*(sunshine.cross(surfacenormal)).cross(surfacenormal) - sunshine.dot(surfacenormal) * surfacenormal; + J = reflection.dot(observer); + if (J < 0) + J = 0; + J *= J; // to make it more pronounced :) + J *= J; + J *= J; + J *= J; + J *= 0.8; + + + xx = tm[0][0] * xs + tm[0][1] * ys + tm[0][2] * zs; + yy = tm[1][0] * xs + tm[1][1] * ys + tm[1][2] * zs; + zz = tm[2][0] * xs + tm[2][2] * zs; + + // sun is to the right ? + // observer is perp. to the screen ? + + + if (fabsl(zz) > 1e-10) { + if (zz > 0) lon = atan(xx/zz); + else lon = PI+atan(xx/zz); } + else + if (xx > 0) lon = PI/2; + else lon = -PI/2; + + if (yy*yy < 1-1e-10) + lat = atan(yy/sqrt(1-yy*yy)); + else { + if (yy > 0) lat = PI/2; + else lat = -PI/2; } + + + + double mx = mapW * lon / (2*PI); + while (mx >= mapW) mx -= mapW; + while (mx < 0) mx += mapW; + double my = mapH * (1 - lat/(PI/2)) / 2.0; + while (my >= mapH) my -= mapH; + while (my < 0) my += mapH; + + base_map[(i+image_size/2)*image_size+j+image_size/2].lat = my; + base_map[(i+image_size/2)*image_size+j+image_size/2].lon = mx; + + + + base_map[(i+image_size/2)*image_size+j+image_size/2].diff = I;//l1; + base_map[(i+image_size/2)*image_size+j+image_size/2].spec = J;//ll; + } + else { + base_map[(i+image_size/2)*image_size+j+image_size/2].lat = 0; + base_map[(i+image_size/2)*image_size+j+image_size/2].lon = 0; + base_map[(i+image_size/2)*image_size+j+image_size/2].diff = 0; + base_map[(i+image_size/2)*image_size+j+image_size/2].spec = 0; + } + + int k = (i+image_size/2) * image_size + j + image_size/2; + if (k >= image_size*image_size) + k = image_size*image_size - 1; + + int mx2, my2; + mx2 = (int)base_map[k].lon; + if (mx2 >= mapW) mx2 -= mapW; + my2 = (int)base_map[k].lat; + if (my2 >= mapH) my2 -= mapH; + + base_map_linear[k] = mx2 + my2 * 2*mapW; // twice cause there's an extra copy + // of the map colors + + + // so that the shading doesn't become excessive. + + unsigned char shading; + int shading_toomuch; + shading_toomuch = int(base_map[k].diff * 255); + if (shading_toomuch > 255) + shading = 255; + else + shading = shading_toomuch; + // 255 means, brightness is almost unaffected. + + base_shade_linear[k] = shading; + + + base_spec_linear[k] = int(base_map[k].spec * 255); + + } + } + + + // re-sort some arrays: + unsigned int *resort = base_map_and_shade_resorted; + for ( j = 0; j < image_size; ++j ) + { + for ( i = 0; i < image_size; ++i ) + { + int k = i*image_size + j; + *resort = base_map_linear[k]; + ++resort; + + unsigned char s1 = base_shade_linear[k]; + unsigned char s2 = base_spec_linear[k]; + *resort = s1 | s2 << 8; + ++resort; + + } + } + + delete base_map; + base_map = 0; + + } + + void Surface3D::plot() + { + plot(dummy); + } + + void Surface3D::plot(BITMAP *trg) + { + STACKTRACE; + + + int i,j; + + double dl = mapW*rad/360.0; + while (dl >= mapW) dl -= mapW; + + unsigned int* imageptr = (unsigned int*) image32bit->dat; + + unsigned int *base_sorted = base_map_and_shade_resorted; + + //unsigned int d_shift = unsigned int(dl); + unsigned int d_shift = (unsigned int)dl; //changed 7/1/2003 Culture20 + + unsigned char *color_map_linear2 = &color_map_linear[d_shift << 2]; // a shift by dl int's + unsigned char *spec_map_linear2 = &spec_map_linear[d_shift << 2]; // a shift by dl int's + + for (i=0; i<image_size; i++) + { + // NOTE: this loop can be altered such that it won't iterate over "empty" space + // by adding boundaries jmin[i] and jmax[i] + //for (j=0; j<image_size; j++) + + if (jmin[i] >= jmax[i]) + { + imageptr += image_size; + base_sorted += 2 * image_size; + continue; + } + + + imageptr += jmin[i]; // cause it must start at position jmin + + //int m = i + jmin[i]*image_size; + base_sorted += 2*jmin[i]; + + + for (j = jmin[i]; j <= jmax[i]; j++) + { + + + unsigned char *col; + unsigned char *speccol; + unsigned short int specshade; + + unsigned short int shade; + unsigned int result, e; + + if (!PlanetUsespec) + { + col = &color_map_linear2[(*base_sorted) << 2]; + + ++base_sorted; + + shade = *((unsigned char*) base_sorted); + + result = 0; + + // red + e = (*col) * shade; + e &= 0x0FF00; + result |= e; + result <<= 8; + + // green + ++col; + e = (*col) * shade; + e &= 0x0FF00; + result |= e; + + + // blue + ++col; + e = (*col) * shade; + e >>= 8; + result |= e; + + *imageptr = result; + + ++imageptr; + + + // Note that, since shade<256 and color<256, the result of the multiplication + // will always fit within a short-int + // And, shifting that resulting value to the right by one byte, automatically + // generates a value <256. + + ++base_sorted; + + } else { + + col = &color_map_linear2[(*base_sorted) << 2]; + speccol = &spec_map_linear2[(*base_sorted) << 2]; + + ++base_sorted; + + shade = *((unsigned char*) base_sorted); + specshade = *((unsigned char*) base_sorted + 1); + + result = 0; + + // red + e = (*col) * shade; + e += (*speccol) * specshade; + if (e & 0x010000) + e = 0x0FF00; // truncation. + e &= 0x0FF00; + result |= e; + result <<= 8; + + // green + ++col; + ++speccol; + e = (*col) * shade; + e += (*speccol) * specshade; + if (e & 0x010000) + e = 0x0FF00; // truncation. + e &= 0x0FF00; + result |= e; + + // blue + ++col; + ++speccol; + e = (*col) * shade; + e += (*speccol) * specshade; + if (e & 0x010000) + e = 0x0FF00; // truncation. + e &= 0x0FF00; + e >>= 8; + result |= e; + + *imageptr = result; + + ++imageptr; + ++base_sorted; + } + + + } + + int memjump = image_size - jmax[i] - 1; + imageptr += memjump; + + base_sorted += 2*memjump; + } + + // blit can convert color depths (I think?) + blit(image32bit, trg, 0, 0, 0, 0, image_size, image_size); + + } + + + + + void MapEditor3::colorizeobj(SolarBody *s) + { + //? + int k; + k = objmap->sub[s->starnum]->type; + + BITMAP *bmp; + bmp = s->get_sprite()->get_bitmap(0); + + int d; + //r = planettypespr[k]->get_bitmap(0)->w; + d = bmp->w; + + Surface3D s3d; + + s3d.reset(d, gplanet->surfacebmp[isurfacetype], 0, true, 1.0, 1.0, 1.0); + + s3d.plot(bmp); + //planetspr = new SpaceSprite(s3d->dummy); + + brighten(bmp); + } + Index: gameplanetscan.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gameplanetscan.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gameplanetscan.cpp 4 Jan 2004 22:07:00 -0000 1.3 --- gameplanetscan.cpp 5 Jan 2004 22:41:12 -0000 1.4 *************** *** 543,546 **** --- 543,547 ---- void SurfaceInfo::write(MapSpacebody *planet) { + /* CHANGED: this is edited/written only in solarview/planetview mode !! char tmp[16]; sprintf(tmp, "%X", planet->id); *************** *** 568,571 **** --- 569,573 ---- set_config_int("stats", "weather", weatherclass); set_config_int("stats", "tectonics", tectonicsclass); + */ } Index: gamedata.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamedata.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gamedata.h 4 Jan 2004 22:06:59 -0000 1.6 --- gamedata.h 5 Jan 2004 22:41:12 -0000 1.7 *************** *** 249,252 **** --- 249,254 ---- virtual int add(int level); virtual int rem(int k); + + bool check_id(int id2); }; *************** *** 262,265 **** --- 264,269 ---- void init(char *filename); void save(char *filename); + + int gen_id(); }; Index: gamedata.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamedata.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gamedata.cpp 4 Jan 2004 22:06:59 -0000 1.6 --- gamedata.cpp 5 Jan 2004 22:41:12 -0000 1.7 *************** *** 169,172 **** --- 169,196 ---- + // generate a unique (random) id for a map item + int MapEverything::gen_id() + { + int id; + + for (;;) + { + id = random(); + + int i; + for ( i = 0; i < Nregions; ++i ) + { + if (region[i]->check_id(id)) + break; + } + + if (i == Nregions) // id not found + break; + } + + return id; + } + + const bool hascontent(char *t) { *************** *** 320,323 **** --- 344,365 ---- return Nsub-1; + } + + + bool MapSpacebody::check_id(int id2) + { + if (id == id2) + return true; + + // check if one of the sub-items have identical id + int i; + for ( i = 0; i < Nsub; ++i ) + { + if (sub[i]->check_id(id2)) + return true; + } + + // neither this nor any subitem has this id. + return false; } |
From: <geo...@us...> - 2004-01-05 22:41:15
|
Update of /cvsroot/timewarp/source/gamex/stuff In directory sc8-pr-cvs1:/tmp/cvs-serv828/gamex/stuff Modified Files: space_body.h space_body.cpp Log Message: updated planet-view editor Index: space_body.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/stuff/space_body.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** space_body.h 4 Jan 2004 22:07:00 -0000 1.3 --- space_body.h 5 Jan 2004 22:41:12 -0000 1.4 *************** *** 76,80 **** class MapEditor { ! protected: GameBare *g; --- 76,80 ---- class MapEditor { ! public: GameBare *g; *************** *** 84,88 **** int maplevel; - IconTV *Tedit; Button *breplace, *bnew; --- 84,87 ---- *************** *** 92,96 **** bool moveselection; - public: MapObj *selection; --- 91,94 ---- Index: space_body.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/stuff/space_body.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** space_body.cpp 4 Jan 2004 22:07:00 -0000 1.4 --- space_body.cpp 5 Jan 2004 22:41:12 -0000 1.5 *************** *** 291,297 **** void MapEditor::set_interface( IconTV *aTedit, Button *abreplace, Button *abnew ) { ! Tedit = aTedit; ! breplace = abreplace; ! bnew = abnew; } --- 291,300 ---- void MapEditor::set_interface( IconTV *aTedit, Button *abreplace, Button *abnew ) { ! if (aTedit) ! Tedit = aTedit; ! if (abreplace) ! breplace = abreplace; ! if (abnew) ! bnew = abnew; } |
From: <geo...@us...> - 2004-01-05 22:41:15
|
Update of /cvsroot/timewarp/source/gamex/general In directory sc8-pr-cvs1:/tmp/cvs-serv828/gamex/general Modified Files: sprites.h sprites.cpp Log Message: updated planet-view editor Index: sprites.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/general/sprites.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sprites.h 4 Jan 2004 22:07:00 -0000 1.3 --- sprites.h 5 Jan 2004 22:41:12 -0000 1.4 *************** *** 2,7 **** --- 2,9 ---- #define __GAMEX_SPRITES__ + void colorize(BITMAP *bmp, double mr, double mg, double mb); void colorize(SpaceSprite *spr, double mr, double mg, double mb); + void brighten(BITMAP *bmp); void brighten(SpaceSprite *spr); Index: sprites.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/general/sprites.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sprites.cpp 4 Jan 2004 22:07:00 -0000 1.3 --- sprites.cpp 5 Jan 2004 22:41:12 -0000 1.4 *************** *** 105,114 **** void colorize(SpaceSprite *spr, double mr, double mg, double mb) { ! BITMAP *bmp; - bmp = spr->get_bitmap(0); - int ix, iy; --- 105,117 ---- + void colorize(SpaceSprite *spr, double mr, double mg, double mb) { ! colorize(spr->get_bitmap(0), mr, mg, mb); ! } ! ! void colorize(BITMAP *bmp, double mr, double mg, double mb) ! { int ix, iy; *************** *** 146,153 **** void brighten(SpaceSprite *spr) { ! BITMAP *bmp; - bmp = spr->get_bitmap(0); - int ix, iy; --- 149,158 ---- void brighten(SpaceSprite *spr) { ! brighten(spr->get_bitmap(0)); ! } ! ! void brighten(BITMAP *bmp) ! { int ix, iy; *************** *** 175,179 **** scale = double(255) / double(max); ! colorize(spr, scale, scale, scale); } --- 180,184 ---- scale = double(255) / double(max); ! colorize(bmp, scale, scale, scale); } |
Update of /cvsroot/timewarp/ships In directory sc8-pr-cvs1:/tmp/cvs-serv22552 Modified Files: shpzeksh.ini shpyusra.ini shpyurpa.ini shpxxxma.ini shpxilcr.ini shpxaaar.ini shpwolsw.ini shpwistr.ini shpwassu.ini shpvirli.ini shpvioge.ini shpvezba.ini shpvelcr.ini shpuxjba.ini shpuosli.ini shpulzin.ini shptulra.ini shptougr.ini shptelno.ini shptautu.ini shptaust.ini shptaume.ini shptaumc.ini shptaule.ini shptauhu.ini shptaugl.ini shptauem.ini shptauda.ini shptaubo.ini shptauar.ini shpstrsc.ini shpsefna.ini shpsclfr.ini shprogsq.ini shpradfi.ini shpquawr.ini shpquasi.ini shpqlore.ini shpphepa.ini shppanav.ini shpostdi.ini shpoliha.ini shpnisha.ini shpneodr.ini shpneccr.ini shpnarlu.ini shpmontr.ini shpmoisp.ini shpmekpi.ini shplyrwa.ini shpleimu.ini shpktesa.ini shpkolfl.ini shpkoapa.ini shpkoaja.ini shpklidr.ini shpkatpo.ini shpkatas.ini shpkahbo.ini shpkabwe.ini shpjygst.ini shpjnkla.ini shpimpka.ini shpilwsp.ini shpiceco.ini shphydcr.ini shphubde.ini shphotsp.ini shpglads.ini shpglacr.ini shpgerhe.ini shpgarty.ini shpgahmo.ini shpfresc.ini shpforsh.ini shpfopsl.ini shpfiear.ini shpestgu.ini shpearc2.ini shpdyzha.ini shpducla.ini shpdragr.ini shpdjila.ini shpdajem.ini shpcrapl.ini shpconho.ini shpconca.ini shpclofl.ini shpchoex.ini shpbubex.ini shpbipka.ini shpbatde.ini shpayrbs.ini shpartem.ini shparkpi.ini shparitr.ini shpalhdr.ini shpalckr.ini Log Message: updated MRT ship classification Index: shpzeksh.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpzeksh.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpzeksh.ini 8 Jun 2003 17:55:32 -0000 1.3 --- shpzeksh.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Zekfahan Name2 = Shocker ! Origin = TW Coders = Richardyzo Code = ZekfahanShocker --- 3,7 ---- Name1 = Zekfahan Name2 = Shocker ! Origin = TWa Coders = Richardyzo Code = ZekfahanShocker Index: shpyusra.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpyusra.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shpyusra.ini 2 Nov 2003 12:11:53 -0000 1.5 --- shpyusra.ini 5 Jan 2004 21:59:54 -0000 1.6 *************** *** 3,7 **** Name1 = Yush Name2 = Ranger ! Origin = TW Coders = CyHawk Gfx = CyHawk --- 3,7 ---- Name1 = Yush Name2 = Ranger ! Origin = TWa Coders = CyHawk Gfx = CyHawk Index: shpyurpa.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpyurpa.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shpyurpa.ini 29 Dec 2003 13:48:31 -0000 1.5 --- shpyurpa.ini 5 Jan 2004 21:59:54 -0000 1.6 *************** *** 5,9 **** Name1 = Yuryul Name2 = Patriot ! Origin = TW Coders = Varith Gfx = Mercutio --- 5,9 ---- Name1 = Yuryul Name2 = Patriot ! Origin = TWb Coders = Varith Gfx = Mercutio Index: shpxxxma.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpxxxma.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpxxxma.ini 30 Aug 2003 09:42:17 -0000 1.4 --- shpxxxma.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Space Monster Name2 = Mangler ! Origin = TW Coders = Tamaraw Code = XXXMangler --- 3,7 ---- Name1 = Space Monster Name2 = Mangler ! Origin = TWa Coders = Tamaraw Code = XXXMangler Index: shpxilcr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpxilcr.ini,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** shpxilcr.ini 23 Nov 2003 09:58:22 -0000 1.7 --- shpxilcr.ini 5 Jan 2004 21:59:54 -0000 1.8 *************** *** 3,7 **** Name1 = Xillz Name2 = Crescent ! Origin = TW Gfx = GeomanNL Sfx = none --- 3,7 ---- Name1 = Xillz Name2 = Crescent ! Origin = TWb Gfx = GeomanNL Sfx = none Index: shpxaaar.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpxaaar.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpxaaar.ini 30 Dec 2003 09:17:05 -0000 1.3 --- shpxaaar.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Xaaxees Name2 = Arrowhead ! Origin = TW Coders = GeomanNL Code = Xaaar --- 3,7 ---- Name1 = Xaaxees Name2 = Arrowhead ! Origin = TWb Coders = GeomanNL Code = Xaaar Index: shpwolsw.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpwolsw.ini,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** shpwolsw.ini 9 Nov 2003 23:48:38 -0000 1.1 --- shpwolsw.ini 5 Jan 2004 21:59:54 -0000 1.2 *************** *** 3,7 **** Name1 = Woldanish Name2 = Minesweeper ! Origin = TW Gfx = GeomanNL Sfx = none --- 3,7 ---- Name1 = Woldanish Name2 = Minesweeper ! Origin = TWb Gfx = GeomanNL Sfx = none Index: shpwistr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpwistr.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpwistr.ini 23 Nov 2003 09:58:22 -0000 1.4 --- shpwistr.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Wissum Name2 = Tripod ! Origin = TW Gfx = GeomanNL Sfx = none --- 3,7 ---- Name1 = Wissum Name2 = Tripod ! Origin = TWa Gfx = GeomanNL Sfx = none Index: shpwassu.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpwassu.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpwassu.ini 23 Nov 2003 09:58:22 -0000 1.4 --- shpwassu.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Wasx Name2 = Superposition ! Origin = TW Coders = Tamaraw Original = Idea = Jumping Peppers --- 3,7 ---- Name1 = Wasx Name2 = Superposition ! Origin = TWa Coders = Tamaraw Original = Idea = Jumping Peppers Index: shpvirli.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpvirli.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpvirli.ini 8 Jun 2003 17:55:30 -0000 1.3 --- shpvirli.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Virtao Name2 = Limb ! Origin = TW Coders = orz Code = VirtaoLimb --- 3,7 ---- Name1 = Virtao Name2 = Limb ! Origin = TWb Coders = orz Code = VirtaoLimb Index: shpvioge.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpvioge.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** shpvioge.ini 26 Oct 2003 10:43:17 -0000 1.2 --- shpvioge.ini 5 Jan 2004 21:59:54 -0000 1.3 *************** *** 3,7 **** Name1 = Viogen Name2 = Genesis ! Origin = TW Coders = GeomanNL Code = Viogen --- 3,7 ---- Name1 = Viogen Name2 = Genesis ! Origin = TWb Coders = GeomanNL Code = Viogen Index: shpvezba.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpvezba.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpvezba.ini 23 Nov 2003 09:58:22 -0000 1.4 --- shpvezba.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 5,9 **** Name1 = Vezlagari Name2 = Battle Barge ! Origin = TW Coders = Varith Code = VezlagariBarge --- 5,9 ---- Name1 = Vezlagari Name2 = Battle Barge ! Origin = TWb Coders = Varith Code = VezlagariBarge Index: shpvelcr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpvelcr.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpvelcr.ini 8 Jun 2003 17:55:29 -0000 1.3 --- shpvelcr.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 5,9 **** Name1 = Velron Name2 = Cruiser ! Origin = TW Coders = Varith GFX = Tau --- 5,9 ---- Name1 = Velron Name2 = Cruiser ! Origin = TWb Coders = Varith GFX = Tau Index: shpuxjba.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpuxjba.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpuxjba.ini 23 Nov 2003 09:58:22 -0000 1.3 --- shpuxjba.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Uxjoz Name2 = Battleplatform ! Origin = TW Coders = GeomanNL Gfx = GeomanNL --- 3,7 ---- Name1 = Uxjoz Name2 = Battleplatform ! Origin = TWb Coders = GeomanNL Gfx = GeomanNL Index: shpuosli.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpuosli.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shpuosli.ini 26 Oct 2003 10:43:17 -0000 1.5 --- shpuosli.ini 5 Jan 2004 21:59:54 -0000 1.6 *************** *** 3,7 **** Name1 = Uoi Name2 = Slicer ! Origin = TW Gfx = GeomanNL Sfx = none --- 3,7 ---- Name1 = Uoi Name2 = Slicer ! Origin = TWb Gfx = GeomanNL Sfx = none Index: shpulzin.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpulzin.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpulzin.ini 8 Jun 2003 17:55:28 -0000 1.3 --- shpulzin.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 5,9 **** Name1 = Ulzrak Name2 = Interceptor ! Origin = TW Coders = Varith Code = UlzrakInterceptor --- 5,9 ---- Name1 = Ulzrak Name2 = Interceptor ! Origin = TWa Coders = Varith Code = UlzrakInterceptor Index: shptulra.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptulra.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shptulra.ini 15 Oct 2003 16:04:18 -0000 1.4 --- shptulra.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Tulkon Name2 = Ram ! Origin = TW Coders = CyHawk Gfx = CyHawk --- 3,7 ---- Name1 = Tulkon Name2 = Ram ! Origin = TWb Coders = CyHawk Gfx = CyHawk Index: shptougr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptougr.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shptougr.ini 26 Oct 2003 10:43:17 -0000 1.3 --- shptougr.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = To'Ul Name2 = Rockblaster ! Origin = TW Coders = GeomanNL Gfx = GeomanNL --- 3,7 ---- Name1 = To'Ul Name2 = Rockblaster ! Origin = TWb Coders = GeomanNL Gfx = GeomanNL Index: shptelno.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptelno.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** shptelno.ini 26 Oct 2003 10:43:17 -0000 1.2 --- shptelno.ini 5 Jan 2004 21:59:54 -0000 1.3 *************** *** 3,7 **** Name1 = Telluri Name2 = Nova ! Origin = TW Coders = GeomanNL Code = TelluriNova --- 3,7 ---- Name1 = Telluri Name2 = Nova ! Origin = TWb Coders = GeomanNL Code = TelluriNova Index: shptautu.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptautu.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shptautu.ini 8 Jun 2003 17:55:26 -0000 1.3 --- shptautu.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Tau Name2 = Turbo ! Origin = TW Coders = Tau Code = TauTurbo --- 3,7 ---- Name1 = Tau Name2 = Turbo ! Origin = TWb Coders = Tau Code = TauTurbo Index: shptaust.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptaust.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shptaust.ini 8 Jun 2003 17:55:26 -0000 1.3 --- shptaust.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Tau Name2 = Storm ! Origin = TW Coders = Tau Code = TauStorm --- 3,7 ---- Name1 = Tau Name2 = Storm ! Origin = TWa Coders = Tau Code = TauStorm Index: shptaume.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptaume.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shptaume.ini 8 Jun 2003 17:55:25 -0000 1.3 --- shptaume.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Tau Name2 = Mercury ! Origin = TW Coders = Tau Code = TauMercury --- 3,7 ---- Name1 = Tau Name2 = Mercury ! Origin = TWb Coders = Tau Code = TauMercury Index: shptaumc.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptaumc.ini,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** shptaumc.ini 15 Oct 2003 16:04:17 -0000 1.1 --- shptaumc.ini 5 Jan 2004 21:59:54 -0000 1.2 *************** *** 3,7 **** Name1 = Tau Name2 = Missile_Cruiser ! Origin = TW Coders = Tau Code = TauMC --- 3,7 ---- Name1 = Tau Name2 = Missile_Cruiser ! Origin = TWa Coders = Tau Code = TauMC Index: shptaule.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptaule.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shptaule.ini 8 Jun 2003 17:55:24 -0000 1.3 --- shptaule.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Tau Name2 = Leviathan ! Origin = TW Coders = Tau Code = TauLeviathan --- 3,7 ---- Name1 = Tau Name2 = Leviathan ! Origin = TWa Coders = Tau Code = TauLeviathan Index: shptauhu.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptauhu.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shptauhu.ini 8 Jun 2003 17:55:23 -0000 1.3 --- shptauhu.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Tau Name2 = Hunter ! Origin = TW Coders = Tau Code = TauHunter --- 3,7 ---- Name1 = Tau Name2 = Hunter ! Origin = TWa Coders = Tau Code = TauHunter Index: shptaugl.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptaugl.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shptaugl.ini 8 Jun 2003 17:55:23 -0000 1.3 --- shptaugl.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Tau Name2 = Gladius ! Origin = TW Coders = Tau Code = TauGladius --- 3,7 ---- Name1 = Tau Name2 = Gladius ! Origin = TWa Coders = Tau Code = TauGladius Index: shptauem.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptauem.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shptauem.ini 8 Jun 2003 17:55:22 -0000 1.3 --- shptauem.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Tau Name2 = EMP ! Origin = TW Coders = Tau Code = TauEMP --- 3,7 ---- Name1 = Tau Name2 = EMP ! Origin = TWa Coders = Tau Code = TauEMP Index: shptauda.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptauda.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shptauda.ini 8 Jun 2003 17:55:21 -0000 1.3 --- shptauda.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Tau Name2 = Dagger ! Origin = TW Coders = Tau Code = TauDagger --- 3,7 ---- Name1 = Tau Name2 = Dagger ! Origin = TWa Coders = Tau Code = TauDagger Index: shptaubo.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptaubo.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shptaubo.ini 8 Jun 2003 17:55:21 -0000 1.3 --- shptaubo.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Tau Name2 = Bomber ! Origin = TW Coders = Tau Code = TauBomber --- 3,7 ---- Name1 = Tau Name2 = Bomber ! Origin = TWb Coders = Tau Code = TauBomber Index: shptauar.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shptauar.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shptauar.ini 22 Nov 2003 18:15:13 -0000 1.5 --- shptauar.ini 5 Jan 2004 21:59:54 -0000 1.6 *************** *** 3,7 **** Name1 = Tau Name2 = Archon ! Origin = TW Coders = Tau (and Jad) Code = TauArchon --- 3,7 ---- Name1 = Tau Name2 = Archon ! Origin = TWa Coders = Tau (and Jad) Code = TauArchon Index: shpstrsc.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpstrsc.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpstrsc.ini 23 Nov 2003 09:58:22 -0000 1.4 --- shpstrsc.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Strivanar Name2 = Scrutinizer ! Origin = TW Coders = Corona688 Code = StrivanarScrutinizer --- 3,7 ---- Name1 = Strivanar Name2 = Scrutinizer ! Origin = TWa Coders = Corona688 Code = StrivanarScrutinizer Index: shpsefna.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpsefna.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpsefna.ini 8 Jun 2003 17:55:18 -0000 1.3 --- shpsefna.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 1,4 **** [Info] ! Origin = TW SC1Cost = 10 SC2Cost = 10 --- 1,4 ---- [Info] ! Origin = TWa SC1Cost = 10 SC2Cost = 10 Index: shpsclfr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpsclfr.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpsclfr.ini 8 Jun 2003 17:55:17 -0000 1.3 --- shpsclfr.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 5,9 **** Name1 = Sclore Name2 = Frigate ! Origin = TW Coders = Varith Code = ScloreFrigate --- 5,9 ---- Name1 = Sclore Name2 = Frigate ! Origin = TWb Coders = Varith Code = ScloreFrigate Index: shprogsq.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shprogsq.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shprogsq.ini 26 Oct 2003 10:43:17 -0000 1.5 --- shprogsq.ini 5 Jan 2004 21:59:54 -0000 1.6 *************** *** 1,4 **** [Info] ! Origin = TW TWCost = 11 Name1 = Rogue --- 1,4 ---- [Info] ! Origin = TWa TWCost = 11 Name1 = Rogue Index: shpradfi.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpradfi.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpradfi.ini 17 Oct 2003 13:49:02 -0000 1.3 --- shpradfi.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Radean Name2 = Firestorm ! Origin = TW Gfx = GeomanNL Sfx = none --- 3,7 ---- Name1 = Radean Name2 = Firestorm ! Origin = TWb Gfx = GeomanNL Sfx = none Index: shpquawr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpquawr.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpquawr.ini 8 Jun 2003 17:55:16 -0000 1.3 --- shpquawr.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Quar-Kath Name2 = Wraith ! Origin = TW Coders = Tamaraw Ditty = Forevian --- 3,7 ---- Name1 = Quar-Kath Name2 = Wraith ! Origin = TWa Coders = Tamaraw Ditty = Forevian Index: shpquasi.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpquasi.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpquasi.ini 26 Oct 2003 10:43:17 -0000 1.3 --- shpquasi.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Quai-Unionists Name2 = Silentrunner ! Origin = TW Coders = GeomanNL Graphics = GeomanNL --- 3,7 ---- Name1 = Quai-Unionists Name2 = Silentrunner ! Origin = TWa Coders = GeomanNL Graphics = GeomanNL Index: shpqlore.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpqlore.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpqlore.ini 8 Jun 2003 17:55:16 -0000 1.3 --- shpqlore.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Qlon Name2 = Redeemer ! Origin = TW Coders = LORD111 Code = QlonRedeemer --- 3,7 ---- Name1 = Qlon Name2 = Redeemer ! Origin = TWb Coders = LORD111 Code = QlonRedeemer Index: shpphepa.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpphepa.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpphepa.ini 8 Jun 2003 17:55:15 -0000 1.3 --- shpphepa.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 5,9 **** Name1 = Phedar Name2 = Patrol Ship ! Origin = TW Coders = Varith, GeomanNL, +see Syreen Code = PhedarPatrolShip --- 5,9 ---- Name1 = Phedar Name2 = Patrol Ship ! Origin = TWb Coders = Varith, GeomanNL, +see Syreen Code = PhedarPatrolShip Index: shppanav.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shppanav.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** shppanav.ini 18 Oct 2003 16:34:18 -0000 1.2 --- shppanav.ini 5 Jan 2004 21:59:54 -0000 1.3 *************** *** 3,7 **** Name1 = PanCoh Name2 = Avian ! Origin = TW Coders = GeomanNL Graphics = GeomanNL --- 3,7 ---- Name1 = PanCoh Name2 = Avian ! Origin = TWb Coders = GeomanNL Graphics = GeomanNL *************** *** 36,38 **** --- 36,43 ---- Damage = 1 Armour = 1 + + + [Names] + NumNames = 1 + CaptName1 = c'Gegner Index: shpostdi.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpostdi.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shpostdi.ini 23 Nov 2003 09:58:22 -0000 1.5 --- shpostdi.ini 5 Jan 2004 21:59:54 -0000 1.6 *************** *** 3,7 **** Name1 = Ostok Name2 = Displacer ! Origin = TW Coders = Standard Time Code = OstokDisplacer --- 3,7 ---- Name1 = Ostok Name2 = Displacer ! Origin = TWa Coders = Standard Time Code = OstokDisplacer *************** *** 41,45 **** [Names] ! NumNames = 10 CaptName1 = Orkli CaptName2 = Storvli --- 41,45 ---- [Names] ! NumNames = 13 CaptName1 = Orkli CaptName2 = Storvli *************** *** 52,53 **** --- 52,56 ---- CaptName9 = Tifriltik CaptName10 = Quilftri + CaptName11 = Nreltik + CaptName12 = Fribblerik + CaptName13 = Quipli Index: shpoliha.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpoliha.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpoliha.ini 23 Nov 2003 09:58:22 -0000 1.3 --- shpoliha.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Olidandee Name2 = Habitat ! Origin = TW Coders = GeomanNL Code = Olidandee --- 3,7 ---- Name1 = Olidandee Name2 = Habitat ! Origin = TWb Coders = GeomanNL Code = Olidandee Index: shpnisha.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpnisha.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpnisha.ini 8 Jun 2003 17:55:13 -0000 1.3 --- shpnisha.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 4,8 **** Name1 = Nissk Name2 = Harasser ! Origin = TW OriginalIdea = Baltar Coders = Varith --- 4,8 ---- Name1 = Nissk Name2 = Harasser ! Origin = TWa OriginalIdea = Baltar Coders = Varith Index: shpneodr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpneodr.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpneodr.ini 17 Oct 2003 13:49:02 -0000 1.3 --- shpneodr.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 4,8 **** Name1 = Neo Name2 = Drain ! Origin = TW Coders = GeomanNL Gfx = GeomanNL --- 4,8 ---- Name1 = Neo Name2 = Drain ! Origin = TWa Coders = GeomanNL Gfx = GeomanNL Index: shpneccr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpneccr.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpneccr.ini 29 Aug 2003 23:23:34 -0000 1.4 --- shpneccr.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 5,9 **** Name1 = Nechanzi Name2 = Purifier ! Origin = TW Coders = Varith Code = NechanziCruiser --- 5,9 ---- Name1 = Nechanzi Name2 = Purifier ! Origin = TWb Coders = Varith Code = NechanziCruiser Index: shpnarlu.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpnarlu.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shpnarlu.ini 15 Aug 2003 08:20:23 -0000 1.5 --- shpnarlu.ini 5 Jan 2004 21:59:54 -0000 1.6 *************** *** 3,7 **** Name1 = Narool Name2 = Lurker ! Origin = TW Coders = orz Launchpad Code = NaroolLurker --- 3,7 ---- Name1 = Narool Name2 = Lurker ! Origin = TWb Coders = orz Launchpad Code = NaroolLurker Index: shpmontr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpmontr.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpmontr.ini 8 Jun 2003 17:55:11 -0000 1.3 --- shpmontr.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Mono Name2 = Tron ! Origin = TW Coders = CyHawk Gfx = CyHawk --- 3,7 ---- Name1 = Mono Name2 = Tron ! Origin = TWa Coders = CyHawk Gfx = CyHawk Index: shpmoisp.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpmoisp.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** shpmoisp.ini 15 Oct 2003 16:04:17 -0000 1.2 --- shpmoisp.ini 5 Jan 2004 21:59:54 -0000 1.3 *************** *** 3,7 **** Name1 = Moian Name2 = Speeder ! Origin = TW Gfx = GeomanNL Sfx = none --- 3,7 ---- Name1 = Moian Name2 = Speeder ! Origin = TWb Gfx = GeomanNL Sfx = none Index: shpmekpi.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpmekpi.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpmekpi.ini 23 Nov 2003 09:58:22 -0000 1.4 --- shpmekpi.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Meknik Name2 = Pincer ! Origin = TW Gfx = GeomanNL Sfx = none --- 3,7 ---- Name1 = Meknik Name2 = Pincer ! Origin = TWb Gfx = GeomanNL Sfx = none Index: shplyrwa.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shplyrwa.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shplyrwa.ini 8 Jun 2003 17:55:10 -0000 1.3 --- shplyrwa.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 5,9 **** Name1 = Lyrmristu Name2 = War Monger ! Origin = TW Coders = Varith Code = LyrmristuWarDestroyer --- 5,9 ---- Name1 = Lyrmristu Name2 = War Monger ! Origin = TWb Coders = Varith Code = LyrmristuWarDestroyer Index: shpleimu.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpleimu.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpleimu.ini 4 Jan 2004 13:08:45 -0000 1.4 --- shpleimu.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Lei Name2 = Mule ! Origin = TW Gfx = GeomanNL Sfx = none --- 3,7 ---- Name1 = Lei Name2 = Mule ! Origin = TWb Gfx = GeomanNL Sfx = none Index: shpktesa.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpktesa.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpktesa.ini 8 Jun 2003 17:55:10 -0000 1.3 --- shpktesa.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Kterbi Name2 = Saber ! Origin = TW Coders = Launchpad Code = KterbiSaber --- 3,7 ---- Name1 = Kterbi Name2 = Saber ! Origin = TWb Coders = Launchpad Code = KterbiSaber Index: shpkolfl.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpkolfl.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpkolfl.ini 8 Jun 2003 17:55:09 -0000 1.3 --- shpkolfl.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 1,4 **** [Info] ! Origin = TW SC1Cost = 16 SC2Cost = 16 --- 1,4 ---- [Info] ! Origin = TWb SC1Cost = 16 SC2Cost = 16 Index: shpkoapa.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpkoapa.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpkoapa.ini 29 Aug 2003 23:23:34 -0000 1.4 --- shpkoapa.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 5,9 **** Name1 = Koanua Name2 = Patrol Ship ! Origin = TW Coders = Varith Code = KoanuaPatrolShip --- 5,9 ---- Name1 = Koanua Name2 = Patrol Ship ! Origin = TWb Coders = Varith Code = KoanuaPatrolShip Index: shpkoaja.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpkoaja.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** shpkoaja.ini 23 Nov 2003 09:58:22 -0000 1.2 --- shpkoaja.ini 5 Jan 2004 21:59:54 -0000 1.3 *************** *** 5,9 **** Name1 = Koanua Name2 = Javelin ! Origin = TW Coders = Varith Code = KoanuaJavelin --- 5,9 ---- Name1 = Koanua Name2 = Javelin ! Origin = TWb Coders = Varith Code = KoanuaJavelin Index: shpklidr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpklidr.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpklidr.ini 8 Jun 2003 17:55:09 -0000 1.3 --- shpklidr.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 6,10 **** Name1 = Klisru Name2 = Dragon ! Origin = TW Coders = Varith Code = KlisruDragon --- 6,10 ---- Name1 = Klisru Name2 = Dragon ! Origin = TWb Coders = Varith Code = KlisruDragon Index: shpkatpo.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpkatpo.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpkatpo.ini 29 Aug 2003 23:23:34 -0000 1.4 --- shpkatpo.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Kat Name2 = Poly ! Origin = TW Coders = CyHawk Gfx = CyHawk --- 3,7 ---- Name1 = Kat Name2 = Poly ! Origin = TWb Coders = CyHawk Gfx = CyHawk Index: shpkatas.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpkatas.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpkatas.ini 8 Jun 2003 17:55:07 -0000 1.3 --- shpkatas.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Kat Name2 = Assim ! Origin = TW Coders = CyHawk Gfx = CyHawk --- 3,7 ---- Name1 = Kat Name2 = Assim ! Origin = TWb Coders = CyHawk Gfx = CyHawk Index: shpkahbo.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpkahbo.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpkahbo.ini 8 Jun 2003 17:55:07 -0000 1.3 --- shpkahbo.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 1,7 **** [Info] ! TWCost = 26 Name1 = Kahr Name2 = Boomerang ! Origin = TW Coders = Launchpad Code = KahrBoomerang --- 1,7 ---- [Info] ! TWCost = 19 Name1 = Kahr Name2 = Boomerang ! Origin = TWa Coders = Launchpad Code = KahrBoomerang Index: shpkabwe.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpkabwe.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpkabwe.ini 8 Jun 2003 17:55:07 -0000 1.3 --- shpkabwe.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Kabo Name2 = Weakener ! Origin = TW Gfx = GeomanNL Sfx = none --- 3,7 ---- Name1 = Kabo Name2 = Weakener ! Origin = TWb Gfx = GeomanNL Sfx = none Index: shpjygst.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpjygst.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpjygst.ini 23 Nov 2003 09:58:22 -0000 1.4 --- shpjygst.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Jyglar Name2 = Starfarer ! Origin = TW Coders = CyHawk Gfx = CyHawk --- 3,7 ---- Name1 = Jyglar Name2 = Starfarer ! Origin = TWa Coders = CyHawk Gfx = CyHawk Index: shpjnkla.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpjnkla.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpjnkla.ini 23 Nov 2003 09:58:22 -0000 1.4 --- shpjnkla.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Jnkdwo Name2 = Lazel ! Origin = TW Coders = Tau Code = JnkdwoLazel --- 3,7 ---- Name1 = Jnkdwo Name2 = Lazel ! Origin = TWa Coders = Tau Code = JnkdwoLazel Index: shpimpka.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpimpka.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpimpka.ini 8 Jun 2003 17:55:05 -0000 1.3 --- shpimpka.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 1,9 **** [Info] - SC2Cost = - - SC3Cost = - TWCost = 21 Name1 = Imperial Name2 = Katana ! Origin = TW Coders = CyHawk Gfx = CyHawk --- 1,7 ---- [Info] TWCost = 21 Name1 = Imperial Name2 = Katana ! Origin = TWa Coders = CyHawk Gfx = CyHawk Index: shpilwsp.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpilwsp.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpilwsp.ini 8 Jun 2003 17:55:04 -0000 1.3 --- shpilwsp.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Ilwrath Name2 = Spider ! Origin = TW Coders = DOS, CyHawk Sfx = Forevian --- 3,7 ---- Name1 = Ilwrath Name2 = Spider ! Origin = TWa Coders = DOS, CyHawk Sfx = Forevian Index: shpiceco.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpiceco.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpiceco.ini 8 Jun 2003 17:55:03 -0000 1.3 --- shpiceco.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Iceci Name2 = Confusion ! Origin = TW Gfx = GeomanNL Sfx = none --- 3,7 ---- Name1 = Iceci Name2 = Confusion ! Origin = TWb Gfx = GeomanNL Sfx = none Index: shphydcr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shphydcr.ini,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shphydcr.ini 23 Nov 2003 09:58:22 -0000 1.6 --- shphydcr.ini 5 Jan 2004 21:59:54 -0000 1.7 *************** *** 5,9 **** Name1 = Hydrovar Name2 = Cruiser ! Origin = TW Coders = Varith GFX = Tau --- 5,9 ---- Name1 = Hydrovar Name2 = Cruiser ! Origin = TWa Coders = Varith GFX = Tau Index: shphubde.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shphubde.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shphubde.ini 26 Oct 2003 10:43:16 -0000 1.3 --- shphubde.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Hellenian Uberrace Name2 = Devastator ! Origin = TW Coders = GeomanNL Code = Hellenian --- 3,7 ---- Name1 = Hellenian Uberrace Name2 = Devastator ! Origin = TWa Coders = GeomanNL Code = Hellenian Index: shphotsp.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shphotsp.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shphotsp.ini 23 Dec 2003 14:10:19 -0000 1.4 --- shphotsp.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 1,4 **** [Info] ! Origin = TW SC1Cost = 10 SC2Cost = 10 --- 1,4 ---- [Info] ! Origin = TWa SC1Cost = 10 SC2Cost = 10 Index: shpglads.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpglads.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpglads.ini 8 Jun 2003 17:55:02 -0000 1.3 --- shpglads.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Glathriel Name2 = Destroyer ! Origin = TW Coders = Alstar orz Launchpad Code = GlathrielDestroyer --- 3,7 ---- Name1 = Glathriel Name2 = Destroyer ! Origin = TWa Coders = Alstar orz Launchpad Code = GlathrielDestroyer Index: shpglacr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpglacr.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpglacr.ini 18 Oct 2003 16:34:18 -0000 1.4 --- shpglacr.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 5,9 **** Name1 = Gla'vria Name2 = Cruiser ! Origin = TW Coders = Varith Code = GlavriaCruiser --- 5,9 ---- Name1 = Gla'vria Name2 = Cruiser ! Origin = TWb Coders = Varith Code = GlavriaCruiser Index: shpgerhe.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpgerhe.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shpgerhe.ini 17 Oct 2003 10:41:07 -0000 1.5 --- shpgerhe.ini 5 Jan 2004 21:59:54 -0000 1.6 *************** *** 3,7 **** Name1 = Gerl Name2 = Hero ! Origin = TW Gfx = GeomanNL Sfx = none --- 3,7 ---- Name1 = Gerl Name2 = Hero ! Origin = TWb Gfx = GeomanNL Sfx = none Index: shpgarty.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpgarty.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpgarty.ini 23 Nov 2003 09:58:22 -0000 1.4 --- shpgarty.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Ga'rath Name2 = Tyrant ! Origin = TW Original = Idea = Kwon Coders = Tamaraw --- 3,7 ---- Name1 = Ga'rath Name2 = Tyrant ! Origin = TWb Original = Idea = Kwon Coders = Tamaraw Index: shpgahmo.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpgahmo.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** shpgahmo.ini 29 Dec 2003 13:22:47 -0000 1.2 --- shpgahmo.ini 5 Jan 2004 21:59:54 -0000 1.3 *************** *** 5,9 **** Name1 = Gahmur Name2 = Monitor ! Origin = TW Coders = Varith Code = GahmurMonitor --- 5,9 ---- Name1 = Gahmur Name2 = Monitor ! Origin = TWb Coders = Varith Code = GahmurMonitor Index: shpfresc.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpfresc.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shpfresc.ini 23 Dec 2003 14:10:19 -0000 1.5 --- shpfresc.ini 5 Jan 2004 21:59:54 -0000 1.6 *************** *** 3,7 **** Name1 = Frein Name2 = Schizm ! Origin = TW Coders = GeomanNL Graphics = GeomanNL --- 3,7 ---- Name1 = Frein Name2 = Schizm ! Origin = TWb Coders = GeomanNL Graphics = GeomanNL Index: shpforsh.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpforsh.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpforsh.ini 23 Dec 2003 14:10:19 -0000 1.4 --- shpforsh.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Forevian-Zekfahan Name2 = Shocker ! Origin = TW Code = ForevianShocker --- 3,7 ---- Name1 = Forevian-Zekfahan Name2 = Shocker ! Origin = TWb Code = ForevianShocker Index: shpfopsl.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpfopsl.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** shpfopsl.ini 26 Aug 2003 21:32:10 -0000 1.2 --- shpfopsl.ini 5 Jan 2004 21:59:54 -0000 1.3 *************** *** 3,7 **** Name1 = FopVob Name2 = Sling ! Origin = TW Coders = GeomanNL Code = FopVob --- 3,7 ---- Name1 = FopVob Name2 = Sling ! Origin = TWb Coders = GeomanNL Code = FopVob Index: shpfiear.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpfiear.ini,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** shpfiear.ini 23 Nov 2003 09:58:22 -0000 1.7 --- shpfiear.ini 5 Jan 2004 21:59:54 -0000 1.8 *************** *** 3,7 **** Name1 = Fieras Name2 = Arbiter ! Origin = TW Coders = orz Code = FierasArbiter --- 3,7 ---- Name1 = Fieras Name2 = Arbiter ! Origin = TWa Coders = orz Code = FierasArbiter Index: shpestgu.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpestgu.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpestgu.ini 23 Dec 2003 14:10:19 -0000 1.4 --- shpestgu.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Estion Name2 = Gunner ! Origin = TW Coders = orz, CyHawk GFX = Forevian --- 3,7 ---- Name1 = Estion Name2 = Gunner ! Origin = TWa Coders = orz, CyHawk GFX = Forevian Index: shpearc2.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpearc2.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpearc2.ini 8 Jun 2003 17:54:58 -0000 1.3 --- shpearc2.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Earthling Name2 = Crusader ! Origin = TW Coders = Tau Code = EarthlingCruiser2 --- 3,7 ---- Name1 = Earthling Name2 = Crusader ! Origin = TWa Coders = Tau Code = EarthlingCruiser2 Index: shpdyzha.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpdyzha.ini,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** shpdyzha.ini 23 Dec 2003 14:10:19 -0000 1.7 --- shpdyzha.ini 5 Jan 2004 21:59:54 -0000 1.8 *************** *** 3,7 **** Name1 = Dyzun Name2 = Harbringer ! Origin = TW Coders = Varith Code = DyzunHarbringer --- 3,7 ---- Name1 = Dyzun Name2 = Harbringer ! Origin = TWb Coders = Varith Code = DyzunHarbringer Index: shpducla.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpducla.ini,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shpducla.ini 23 Dec 2003 14:10:19 -0000 1.6 --- shpducla.ini 5 Jan 2004 21:59:54 -0000 1.7 *************** *** 3,7 **** Name1 = Ducly Name2 = Lanternjaws ! Origin = TW Gfx = GeomanNL Sfx = none --- 3,7 ---- Name1 = Ducly Name2 = Lanternjaws ! Origin = TWb Gfx = GeomanNL Sfx = none Index: shpdragr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpdragr.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpdragr.ini 23 Nov 2003 09:58:22 -0000 1.4 --- shpdragr.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Drax Name2 = Griffon ! Origin = TW Coders = Launchpad Code = DraxGryphon --- 3,7 ---- Name1 = Drax Name2 = Griffon ! Origin = TWa Coders = Launchpad Code = DraxGryphon Index: shpdjila.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpdjila.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpdjila.ini 17 Oct 2003 12:26:20 -0000 1.3 --- shpdjila.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Djinni Name2 = Lancer ! Origin = TW Idea = *Dancing Below* Graphics = *Dancing Below* --- 3,7 ---- Name1 = Djinni Name2 = Lancer ! Origin = TWa Idea = *Dancing Below* Graphics = *Dancing Below* Index: shpdajem.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpdajem.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpdajem.ini 23 Dec 2003 14:10:19 -0000 1.4 --- shpdajem.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 5,9 **** Name1 = Dajielka Name2 = Emissary ! Origin = TW Coders = Varith Code = DajielkaCruiser --- 5,9 ---- Name1 = Dajielka Name2 = Emissary ! Origin = TWa Coders = Varith Code = DajielkaCruiser Index: shpcrapl.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpcrapl.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpcrapl.ini 26 Oct 2003 10:43:16 -0000 1.4 --- shpcrapl.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Crash Name2 = Planetoid ! Origin = TW Coders = GeomanNL Code = Crash --- 3,7 ---- Name1 = Crash Name2 = Planetoid ! Origin = TWb Coders = GeomanNL Code = Crash Index: shpconho.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpconho.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpconho.ini 23 Dec 2003 14:10:19 -0000 1.4 --- shpconho.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 4,8 **** Name1 = Confederation Name2 = Hornet ! Origin = TW Coders = Slag-786B Code = ConfederationHornet --- 4,8 ---- Name1 = Confederation Name2 = Hornet ! Origin = TWb Coders = Slag-786B Code = ConfederationHornet Index: shpconca.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpconca.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpconca.ini 29 Aug 2003 23:23:34 -0000 1.4 --- shpconca.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Confed Name2 = Cargotran ! Origin = TW Coders = Corona688 Code = ConfedCargotran --- 3,7 ---- Name1 = Confed Name2 = Cargotran ! Origin = TWa Coders = Corona688 Code = ConfedCargotran Index: shpclofl.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpclofl.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** shpclofl.ini 23 Nov 2003 09:58:22 -0000 1.2 --- shpclofl.ini 5 Jan 2004 21:59:54 -0000 1.3 *************** *** 1,4 **** [Info] ! Origin = TW SC1Cost = 15 SC2Cost = 15 --- 1,4 ---- [Info] ! Origin = TWa SC1Cost = 15 SC2Cost = 15 Index: shpchoex.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpchoex.ini,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shpchoex.ini 23 Dec 2003 14:10:19 -0000 1.6 --- shpchoex.ini 5 Jan 2004 21:59:54 -0000 1.7 *************** *** 3,7 **** Name1 = Chorali Name2 = Extractor ! Origin = TW Coder = Culture20 Code = ChoraliExtractor --- 3,7 ---- Name1 = Chorali Name2 = Extractor ! Origin = TWa Coder = Culture20 Code = ChoraliExtractor *************** *** 59,63 **** [Names] ! NumNames = 6 CaptName1 = Chadisastu CaptName2 = Kiluyn --- 59,63 ---- [Names] ! NumNames = 7 CaptName1 = Chadisastu CaptName2 = Kiluyn *************** *** 65,67 **** CaptName4 = Zingxex CaptName5 = Keyrt ! CaptName6 = Ulurt \ No newline at end of file --- 65,68 ---- CaptName4 = Zingxex CaptName5 = Keyrt ! CaptName6 = Ulurt ! CaptName7 = Treakzk Index: shpbubex.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpbubex.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpbubex.ini 23 Dec 2003 14:10:19 -0000 1.4 --- shpbubex.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 3,7 **** Name1 = Bubalos Name2 = Executioner ! Origin = TW Coders = Tamaraw Gfx = Tau --- 3,7 ---- Name1 = Bubalos Name2 = Executioner ! Origin = TWa Coders = Tamaraw Gfx = Tau Index: shpbipka.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpbipka.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpbipka.ini 8 Jun 2003 17:54:55 -0000 1.3 --- shpbipka.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Bipole Name2 = Katamaran ! Origin = TW Coders = CyHawk Gfx = CyHawk --- 3,7 ---- Name1 = Bipole Name2 = Katamaran ! Origin = TWa Coders = CyHawk Gfx = CyHawk Index: shpbatde.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpbatde.ini,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** shpbatde.ini 23 Dec 2003 14:10:19 -0000 1.8 --- shpbatde.ini 5 Jan 2004 21:59:54 -0000 1.9 *************** *** 1,4 **** [Info] ! Origin = TW SC1Cost = 12 SC2Cost = 12 --- 1,4 ---- [Info] ! Origin = TWa SC1Cost = 12 SC2Cost = 12 Index: shpayrbs.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpayrbs.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shpayrbs.ini 30 Dec 2003 09:17:05 -0000 1.4 --- shpayrbs.ini 5 Jan 2004 21:59:54 -0000 1.5 *************** *** 1,4 **** [Info] ! Origin = TW SC1Cost = 10 SC2Cost = 10 --- 1,4 ---- [Info] ! Origin = TWb SC1Cost = 10 SC2Cost = 10 Index: shpartem.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpartem.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shpartem.ini 8 Jun 2003 17:54:55 -0000 1.3 --- shpartem.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 5,9 **** Name1 = Arch Name2 = Tempest ! Origin = TW Coders = Archmage Gfx = kame --- 5,9 ---- Name1 = Arch Name2 = Tempest ! Origin = TWa Coders = Archmage Gfx = kame Index: shparkpi.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shparkpi.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shparkpi.ini 8 Jun 2003 17:54:55 -0000 1.3 --- shparkpi.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 6,10 **** Name2 = Pincer ;Please = change the name sometime! ! Origin = TW OriginalIdea = SpydirShellX IdeaMutation = Varith --- 6,10 ---- Name2 = Pincer ;Please = change the name sometime! ! Origin = TWb OriginalIdea = SpydirShellX IdeaMutation = Varith Index: shparitr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shparitr.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** shparitr.ini 8 Jun 2003 17:54:55 -0000 1.3 --- shparitr.ini 5 Jan 2004 21:59:54 -0000 1.4 *************** *** 3,7 **** Name1 = Arilou Name2 = Trapper ! Origin = TW Coders = MAZ Code = ArilouTrapper --- 3,7 ---- Name1 = Arilou Name2 = Trapper ! Origin = TWb Coders = MAZ Code = ArilouTrapper Index: shpalhdr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpalhdr.ini,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** shpalhdr.ini 29 Dec 2003 13:22:47 -0000 1.9 --- shpalhdr.ini 5 Jan 2004 21:59:54 -0000 1.10 *************** *** 5,9 **** Name1 = Alhordian Name2 = Corona ! Origin = TW Coders = Varith Code = AlhordianDreadnought --- 5,9 ---- Name1 = Alhordian Name2 = Corona ! Origin = TWa Coders = Varith Code = AlhordianDreadnought Index: shpalckr.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpalckr.ini,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shpalckr.ini 23 Dec 2003 14:10:19 -0000 1.6 --- shpalckr.ini 5 Jan 2004 21:59:54 -0000 1.7 *************** *** 3,7 **** Name1 = Alchero Name2 = Kronos ! Origin = TW Coders = CyHawk Gfx = CyHawk --- 3,7 ---- Name1 = Alchero Name2 = Kronos ! Origin = TWa Coders = CyHawk Gfx = CyHawk |
Update of /cvsroot/timewarp/gamex/interface/planetview In directory sc8-pr-cvs1:/tmp/cvs-serv13677/interface/planetview Added Files: backgr.bmp exit_default.bmp map_backgr.bmp starname_backgr.bmp zoomin_default.bmp zoomout_default.bmp Log Message: no message |
From: <geo...@us...> - 2004-01-05 00:00:31
|
Update of /cvsroot/timewarp/gamex/stars In directory sc8-pr-cvs1:/tmp/cvs-serv13677/stars Added Files: player_01.bmp Log Message: no message |
From: <geo...@us...> - 2004-01-05 00:00:31
|
Update of /cvsroot/timewarp/gamex/triggers In directory sc8-pr-cvs1:/tmp/cvs-serv13677/triggers Added Files: test.triggers Log Message: no message |