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: <geo...@us...> - 2004-03-04 16:27:17
|
Update of /cvsroot/timewarp/source/melee In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10934/melee Modified Files: mview.cpp Log Message: added constraints to zoom-levels, so that they can't grow to absurd levels. Index: mview.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mview.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** mview.cpp 28 Feb 2004 01:05:50 -0000 1.18 --- mview.cpp 4 Mar 2004 16:13:36 -0000 1.19 *************** *** 24,27 **** --- 24,40 ---- int camera_hides_cloakers = 0; + + // GeomanNL : there was a complaint about too large zoom values, so adding constraint here + static const double max_zoom_value = 6000.0; + static const double min_zoom_value = 700.0; + static const double relaxed_zoom_value = 2000.0; + + void constrain(double x1, double *x, double x2) + { + if (*x < x1) *x = x1; + if (*x > x2) *x = x2; + } + + // units View *space_view; *************** *** 491,494 **** --- 504,510 ---- if (b > a) a = b; camera.z = a; + + constrain(min_zoom_value, &camera.z, max_zoom_value); + return; } *************** *** 517,522 **** if (key_pressed(key_zoom_in)) n.z /= 1 + 0.002 * frame_time; if (key_pressed(key_zoom_out)) n.z *= 1 + 0.002 * frame_time; ! if (n.z < min) n.z = min; ! if (n.z > max) n.z = max; if (key_pressed(key_alter1)) f += 0.006 * frame_time; else f -= 0.006 * frame_time; --- 533,541 ---- if (key_pressed(key_zoom_in)) n.z /= 1 + 0.002 * frame_time; if (key_pressed(key_zoom_out)) n.z *= 1 + 0.002 * frame_time; ! //if (n.z < min) n.z = min; ! //if (n.z > max) n.z = max; ! ! constrain(min_zoom_value, &n.z, max_zoom_value); ! if (key_pressed(key_alter1)) f += 0.006 * frame_time; else f -= 0.006 * frame_time; *************** *** 550,557 **** n.z *= 1.4; } ! else focus(&n, c); } else focus(&n, c); ! if (n.z < 480) n.z = 480; track(n); return; --- 569,583 ---- n.z *= 1.4; } ! else ! { ! focus(&n, c); ! n.z = relaxed_zoom_value; ! } } else focus(&n, c); ! ! constrain(min_zoom_value, &n.z, max_zoom_value); ! ! //if (n.z < 480) n.z = 480; track(n); return; *************** *** 578,585 **** focus(&n, c); // but, if the target is invisible, you usually want more zoom to plan where to go, right... ! n.z = 900; } ! if (n.z < 480) n.z = 480; --- 604,613 ---- focus(&n, c); // but, if the target is invisible, you usually want more zoom to plan where to go, right... ! //n.z = 900; ! n.z = relaxed_zoom_value; } ! constrain(min_zoom_value, &n.z, max_zoom_value); ! //if (n.z < 480) n.z = 480; |
From: <geo...@us...> - 2004-03-04 16:24:31
|
Update of /cvsroot/timewarp/source/sc2ships In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10250/sc2ships Modified Files: shporzne.cpp Log Message: stopped orz-marines from mounting killer-ships like the Androsynth Index: shporzne.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc2ships/shporzne.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** shporzne.cpp 29 Feb 2004 23:22:20 -0000 1.13 --- shporzne.cpp 4 Mar 2004 16:11:05 -0000 1.14 *************** *** 346,358 **** { invading = (Ship *) other; ! collide_flag_anyone = 0; ! play_sound(data->sampleExtra[1]); ! damage(invading, 0, 1); ! if (invading->spritePanel) { ! sprite->draw(14 + ((slot % 4) * 6), 16 + ((slot / 4) * 6), 0, invading->spritePanel->get_bitmap(0) ); ! /*draw_sprite(invading->spritePanel->get_bitmap(0), sprite->get_bitmap(0), 14 + ((slot % 4) * 6), 16 + ((slot / 4) * 6));*/ ! invading->update_panel = TRUE; }} if((ship) && (other == ship) && (returning)) { --- 346,362 ---- { invading = (Ship *) other; ! ! if (invading->damage_factor < armour) { ! collide_flag_anyone = 0; ! play_sound(data->sampleExtra[1]); ! damage(invading, 0, 1); ! if (invading->spritePanel) ! { ! sprite->draw(14 + ((slot % 4) * 6), 16 + ((slot / 4) * 6), 0, invading->spritePanel->get_bitmap(0) ); ! /*draw_sprite(invading->spritePanel->get_bitmap(0), sprite->get_bitmap(0), 14 + ((slot % 4) * 6), 16 + ((slot / 4) * 6));*/ ! invading->update_panel = TRUE; ! } }} if((ship) && (other == ship) && (returning)) { |
From: <geo...@us...> - 2004-03-04 15:55:34
|
Update of /cvsroot/timewarp/source/newships In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3300/newships Modified Files: shpwistr.cpp Log Message: fixed the vux-limpet bug Index: shpwistr.cpp =================================================================== RCS file: /cvsroot/timewarp/source/newships/shpwistr.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** shpwistr.cpp 7 Feb 2004 07:43:38 -0000 1.10 --- shpwistr.cpp 4 Mar 2004 15:42:09 -0000 1.11 *************** *** 3,6 **** --- 3,7 ---- Ok ... well, there's the monotron already, but nevertheless, this ship may also be fun. + Re: imo the monotron sucks. */ *************** *** 56,59 **** --- 57,62 ---- int fire_guns(int fire_type); + + virtual double handle_speed_loss(SpaceLocation *source, double normal); }; *************** *** 157,161 **** void WissumTripod::calculate_thrust() { ! STACKTRACE if ( thrust ) engineactive[1] = 1; --- 160,164 ---- void WissumTripod::calculate_thrust() { ! STACKTRACE; if ( thrust ) engineactive[1] = 1; *************** *** 166,170 **** void WissumTripod::calculate_turn_right() { ! STACKTRACE turn_step = 0; if ( turn_right ) --- 169,173 ---- void WissumTripod::calculate_turn_right() { ! STACKTRACE; turn_step = 0; if ( turn_right ) *************** *** 177,181 **** void WissumTripod::calculate_turn_left() { ! STACKTRACE turn_step = 0; if ( turn_left ) --- 180,184 ---- void WissumTripod::calculate_turn_left() { ! STACKTRACE; turn_step = 0; if ( turn_left ) *************** *** 190,194 **** int WissumTripod::fire_guns(int fire_type) { ! STACKTRACE int testfired; --- 193,197 ---- int WissumTripod::fire_guns(int fire_type) { ! STACKTRACE; int testfired; *************** *** 239,243 **** int WissumTripod::activate_weapon() { ! STACKTRACE return fire_guns(1); } --- 242,246 ---- int WissumTripod::activate_weapon() { ! STACKTRACE; return fire_guns(1); } *************** *** 246,250 **** int WissumTripod::activate_special() { ! STACKTRACE // this is handled implicitly in activate_weapon, this must return true --- 249,253 ---- int WissumTripod::activate_special() { ! STACKTRACE; // this is handled implicitly in activate_weapon, this must return true *************** *** 342,348 **** void WissumTripod::calculate() { ! STACKTRACE int k; --- 345,367 ---- + double WissumTripod::handle_speed_loss(SpaceLocation *source, double normal) + { + STACKTRACE; + + accel_rate = default_accel_rate; + speed_max = default_speed_max; + + Ship::handle_speed_loss(source, normal); + + default_accel_rate = accel_rate; + default_speed_max = speed_max; + + return 1; + } + + void WissumTripod::calculate() { ! STACKTRACE; int k; *************** *** 401,405 **** void WissumTripod::calculate_hotspots() { ! STACKTRACE // add hotspots to all active engines int i; --- 420,424 ---- void WissumTripod::calculate_hotspots() { ! STACKTRACE; // add hotspots to all active engines int i; *************** *** 425,429 **** void WissumTripod::animate_predict(Frame *frame, int time) { ! STACKTRACE // just do the linear prediction (is most stable) SpaceObject::animate_predict(frame, time); --- 444,448 ---- void WissumTripod::animate_predict(Frame *frame, int time) { ! STACKTRACE; // just do the linear prediction (is most stable) SpaceObject::animate_predict(frame, time); *************** *** 450,454 **** void FuelDump::calculate() { ! STACKTRACE Shot::calculate(); --- 469,473 ---- void FuelDump::calculate() { ! STACKTRACE; Shot::calculate(); |
From: <geo...@us...> - 2004-03-04 15:44:44
|
Update of /cvsroot/timewarp/source/melee In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv508/melee Modified Files: mframe.cpp mframe.h Log Message: fixed spaceline collision (lasers used to hit a random object on their path - now only the closest one) Index: mframe.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mframe.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** mframe.cpp 2 Mar 2004 12:33:51 -0000 1.26 --- mframe.cpp 4 Mar 2004 15:31:18 -0000 1.27 *************** *** 858,866 **** } ! double SpaceLine::get_length() const { return(length); } void SpaceLine::inflict_damage(SpaceObject *other) {STACKTRACE int i; --- 858,871 ---- } ! double SpaceLine::get_length() const { return(length); } + void SpaceLine::set_length(double d) + { + length = d; + } + void SpaceLine::inflict_damage(SpaceObject *other) {STACKTRACE int i; *************** *** 885,891 **** } void SpaceLine::collide(SpaceObject *o) ! {STACKTRACE double old_length = length; if((!canCollide(o)) || (!o->canCollide(this))) --- 890,913 ---- } + double SpaceLine::collide_testdistance(SpaceObject *o) + { + STACKTRACE; + //double testlength; + + if((!canCollide(o)) || (!o->canCollide(this))) + return length; + + return o->collide_ray(normal_pos(), normal_pos() + edge(), length); + + //if(length != old_length) + // inflict_damage(o); + //return; + } + void SpaceLine::collide(SpaceObject *o) ! { ! STACKTRACE; double old_length = length; + /* if((!canCollide(o)) || (!o->canCollide(this))) *************** *** 893,897 **** length = o->collide_ray(normal_pos(), normal_pos() + edge(), length); ! if(length != old_length) inflict_damage(o); return; --- 915,921 ---- length = o->collide_ray(normal_pos(), normal_pos() + edge(), length); ! */ ! length = collide_testdistance(o); ! if (length != old_length) inflict_damage(o); return; *************** *** 1332,1335 **** --- 1356,1398 ---- } + /** \brief Check all objects within range (length) of a line, and damage only the + one that has a point of impact that is closest to the line origin (ie reduces line + length most). + */ + void Physics::check_linecollision(SpaceLine *l) + { + // not very efficient, ideally you'd just check the quadrants that the line traverses, + // not all of them in a circle, but it'll do fine for short lines. + + double distance = l->get_length(); + SpaceObject *o = 0; + + Query q; + for (q.begin(l, l->normal_pos()+l->edge()/2, OBJECT_LAYERS, 96 + l->get_length()/2); q.current && l->exists(); q.next()) + { + double d; + d = l->collide_testdistance(q.currento); + // this is the distance to the point of impact + + // for long lines (eg chmmr laser), and several objects closeby, there can be >1 points of impact. + // the point that's closest by makes most sense.s + if (d < distance) + { + o = q.currento; + distance = d; + } + } + q.end(); + + // note that o==null, in case that distance==length, meaning that there are no + // colliding objects within range. + if (o) + { + l->set_length(distance); + l->inflict_damage(o); + } + + } + #include "../util/pmask.h" void Physics::collide() {_STACKTRACE("Physics::collide()") *************** *** 1376,1385 **** q.end();//*/ } ! else if (item[i]->isLine()) { SpaceLine *l = (SpaceLine*)item[i]; ! for (q.begin(l, l->normal_pos()+l->edge()/2, OBJECT_LAYERS, 96 + l->get_length()/2); q.current && l->exists(); q.next()) { ((SpaceLine*)item[i])->collide(q.currento); } q.end(); } } --- 1439,1453 ---- q.end();//*/ } ! else if (item[i]->isLine()) ! { ! check_linecollision((SpaceLine*)item[i]); ! /* SpaceLine *l = (SpaceLine*)item[i]; ! for (q.begin(l, l->normal_pos()+l->edge()/2, OBJECT_LAYERS, 96 + l->get_length()/2); q.current && l->exists(); q.next()) ! { ((SpaceLine*)item[i])->collide(q.currento); } q.end(); + */ } } Index: mframe.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mframe.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** mframe.h 2 Mar 2004 12:33:51 -0000 1.17 --- mframe.h 4 Mar 2004 15:31:18 -0000 1.18 *************** *** 137,140 **** --- 137,142 ---- virtual void object_died(SpaceObject *who, SpaceLocation *source); virtual void ship_died(Ship *who, SpaceLocation *source); + + void check_linecollision(SpaceLine *l); }; *************** *** 341,348 **** --- 343,353 ---- double edge_y() const; double get_length() const; + void set_length(double d); virtual void animate(Frame *space); virtual void collide(SpaceObject *o); virtual void inflict_damage(SpaceObject *other); + + double collide_testdistance(SpaceObject *o); }; |
From: <geo...@us...> - 2004-03-04 14:43:03
|
Update of /cvsroot/timewarp/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18122 Modified Files: scp.cpp Log Message: if you drag a zip file onto the game icon, timewarp unpacks in the game-root. You need pkzip for that, though. Index: scp.cpp =================================================================== RCS file: /cvsroot/timewarp/source/scp.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** scp.cpp 1 Mar 2004 23:21:43 -0000 1.56 --- scp.cpp 4 Mar 2004 14:29:35 -0000 1.57 *************** *** 731,734 **** --- 731,781 ---- } + + /** \brief This routine check if a zip filename is supplied to the program; if so, it + calls pkzipc to extract files to the game root. Under windows this means, you can + drag a update-zip-file onto the program icon, after which the program makes a call to + the pkunzip program to install it automatically in the correct location (namely, the + game-root). pkzipc is part of the pkzip (pkware) package, I think. + */ + static void update_check(int argc, char *argv[]) + { + #ifdef _WINDOWS + // first of all, check if someone drags a zip file on top of your icon --> you + // may want to unpack it, in the timewarp directory. + if (argc == 2) + { + char *ext; + ext = strrchr(argv[1], '.'); + + if (strcmp(ext, ".zip") == 0) + { + + // POSSIBLE: + // you could make a system call here, to a pack program (winzip, pkzip, winrar) + // which can unpack this file in the game root. + + char command[512]; + char targetdir[512]; + + strcpy(targetdir, argv[0]); + char *tmp = strrchr(targetdir, '\\'); + *tmp = 0; + + char *zipfile = argv[1]; + sprintf(command, "pkzipc -extract \"%s\" \"%s\" & pause", zipfile, targetdir); + /* + clear_to_color(screen, makecol(0,0,255)); + textout(screen, font, command, 10,10, makecol(255,255,0)); + readkey(); + */ + system(command); + + } + } + #endif + } + + + int tw_main(int argc, char *argv[]); *************** *** 748,751 **** --- 795,800 ---- #endif + update_check(argc, argv); + int i; int auto_port = -1; *************** *** 872,875 **** --- 921,926 ---- sound.load(); + + showLoadingScreen(); |
From: <geo...@us...> - 2004-03-03 22:46:19
|
Update of /cvsroot/timewarp/gamedata/gob In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8952 Added Files: player.ini Log Message: adding the gob savegame file --- NEW FILE: player.ini --- [ship] name = supbl x = 12487.369141 y = 11325.122070 a = 2.945243 crew = 16.000000 crewm = 16.000000 batt = 24.000000 battm = 24.000000 accr = 0.001994 speedmax = 0.499200 turnr = 0.005105 mass = 14.000000 rechamount = 1 rechrate = 250 specrate = 50 specdrain = 0 weaprate = 100 weapdrain = 1 damfac = 0.000000 [props] kills = 7 bucka = 1 starb = 0 vbucka = 1 vstarb = 8 [upgrades] num0 = 1 num1 = 1 num2 = 1 num3 = 1 num4 = 0 num5 = 0 num6 = 0 num7 = 0 num8 = 0 num9 = 0 num10 = 0 num11 = 0 num12 = 0 num13 = 0 num14 = 0 num15 = 0 num16 = 0 num17 = 0 num18 = 0 num19 = 0 num20 = 0 num21 = 0 num22 = 0 num23 = 0 num24 = 0 |
From: <geo...@us...> - 2004-03-03 22:45:30
|
Update of /cvsroot/timewarp/gamedata/gob In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8726/gob Log Message: Directory /cvsroot/timewarp/gamedata/gob added to the repository |
From: <geo...@us...> - 2004-03-03 21:33:09
|
Update of /cvsroot/timewarp/ships In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23778 Modified Files: shpjnkla.ini Log Message: MRT tweak Index: shpjnkla.ini =================================================================== RCS file: /cvsroot/timewarp/ships/shpjnkla.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shpjnkla.ini 5 Jan 2004 21:59:54 -0000 1.5 --- shpjnkla.ini 3 Mar 2004 21:20:19 -0000 1.6 *************** *** 12,23 **** Batt = 42 BattMax = 42 ! SpeedMax = 33 ! AccelRate = 6 ! TurnRate = 3 RechargeAmount = 1 ! RechargeRate = 4 ! WeaponDrain = 8 ! WeaponRate = 1 ! SpecialDrain = 1 SpecialRate = 40 HotspotRate = 5 --- 12,23 ---- Batt = 42 BattMax = 42 ! SpeedMax = 30 ! AccelRate = 5 ! TurnRate = 5 RechargeAmount = 1 ! RechargeRate = 6 ! WeaponDrain = 6 ! WeaponRate = 3 ! SpecialDrain = 2 SpecialRate = 40 HotspotRate = 5 *************** *** 53,54 **** --- 53,57 ---- CaptName6 = Jio-Endre CaptName7 = N'krelx + = Kjyrn + CaptName6 = Jio-Endre + CaptName7 = N'krelx |
From: <geo...@us...> - 2004-03-03 21:32:41
|
Update of /cvsroot/timewarp/source/newships In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23654/newships Modified Files: shpstrsc.cpp Log Message: jad's tweak Index: shpstrsc.cpp =================================================================== RCS file: /cvsroot/timewarp/source/newships/shpstrsc.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** shpstrsc.cpp 29 Jan 2004 21:20:30 -0000 1.10 --- shpstrsc.cpp 3 Mar 2004 21:19:50 -0000 1.11 *************** *** 9,13 **** /************************************************/ ! #include "../ship.h" REGISTER_FILE --- 9,13 ---- /************************************************/ ! #include "ship.h" REGISTER_FILE *************** *** 69,73 **** //has attached to something. void TechMissile::calculate() { ! STACKTRACE Missile::calculate(); --- 69,73 ---- //has attached to something. void TechMissile::calculate() { ! STACKTRACE; Missile::calculate(); *************** *** 158,162 **** void Hilight::calculate() { ! STACKTRACE frame_count+=1; if(frame_count>=frame_max) frame_count=frame_min; --- 158,162 ---- void Hilight::calculate() { ! STACKTRACE; frame_count+=1; if(frame_count>=frame_max) frame_count=frame_min; *************** *** 376,380 **** void StrivanarScrutinizer::calculate() { ! STACKTRACE /*My code*/ static int prev_time[16]={0}; --- 376,380 ---- void StrivanarScrutinizer::calculate() { ! STACKTRACE; /*My code*/ static int prev_time[16]={0}; *************** *** 407,413 **** int StrivanarScrutinizer::activate_weapon() { ! STACKTRACE int flag=0; - for(int Cur_Target=0; Cur_Target<MAX_TARGETS; Cur_Target++) { --- 407,412 ---- int StrivanarScrutinizer::activate_weapon() { ! STACKTRACE; int flag=0; for(int Cur_Target=0; Cur_Target<MAX_TARGETS; Cur_Target++) { *************** *** 432,435 **** --- 431,442 ---- } + // dryfire ability, added by Jad + if(flag == 0) + { + flag=1; + float xpos=10.*sin(-angle+51.42*ANGLE_RATIO); + add(new TechMissile(Vector2(xpos, get_size().y * .5), angle, weaponVelocity, weaponDamage, weaponRange, + weaponArmour, weaponTurnRate, this, data->spriteWeapon,NULL)); + } return(flag); } *************** *** 437,441 **** int StrivanarScrutinizer::activate_special() { ! STACKTRACE float min=angle-(specialFan/2); float max=angle+(specialFan/2); --- 444,448 ---- int StrivanarScrutinizer::activate_special() { ! STACKTRACE; float min=angle-(specialFan/2); float max=angle+(specialFan/2); |
From: <you...@us...> - 2004-03-03 14:04:51
|
Update of /cvsroot/timewarp/ships In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19160/ships Modified Files: shpdajem.dat Log Message: adding new artwork for Dajem Emissary (on behalf of mercutio) Index: shpdajem.dat =================================================================== RCS file: /cvsroot/timewarp/ships/shpdajem.dat,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsz7H8m4 and /tmp/cvsK2Pg3T differ |
From: <yu...@us...> - 2004-03-02 17:14:21
|
Update of /cvsroot/timewarp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6464 Modified Files: twwin.dsp Log Message: Fixed release compile problem |
Update of /cvsroot/timewarp/gamedata In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13387 Added Files: arilou.lua chmmr.lua druuge.lua dynarry.lua human.lua ilwrath.lua korah.lua korah_station.lua melnorme.lua mycon.lua orz.lua orz_station.lua pkunk.lua shofixty.lua spathi.lua supox.lua supox_station.lua sylandro.lua syreen.lua thraddash.lua umgah.lua urquan.lua utwig.lua utwig_station.lua vux.lua yehat.lua zoqfot.lua Log Message: Commander stuff to GOB --- NEW FILE: arilou.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/arilou.jpg" DialogSetMusic "gamedata/dialogs/arilou.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: chmmr.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/chmmr.jpg" DialogSetMusic "gamedata/dialogs/chmmr.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: druuge.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/druuge.jpg" DialogSetMusic "gamedata/dialogs/druuge.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: dynarry.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/dynarry.jpg" DialogSetMusic "gamedata/dialogs/dynarry.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: human.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/human.jpg" DialogSetMusic "gamedata/dialogs/human.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: ilwrath.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/ilwrath.jpg" DialogSetMusic "gamedata/dialogs/ilwrath.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: korah.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/korah.lua" DialogSetMusic "gamedata/dialogs/korah.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: korah_station.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/supox.jpg" DialogSetMusic "gamedata/dialogs/supox.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: melnorme.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/melnorme.jpg" DialogSetMusic "gamedata/dialogs/melnorme.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: mycon.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/mycon.jpg" DialogSetMusic "gamedata/dialogs/mycon.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: orz.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/orz.jpg" DialogSetMusic "gamedata/dialogs/orz.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: orz_station.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/supox.jpg" DialogSetMusic "gamedata/dialogs/supox.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: pkunk.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/pkunk.jpg" DialogSetMusic "gamedata/dialogs/pkunk.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: shofixty.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/shofixty.jpg" DialogSetMusic "gamedata/dialogs/shofixty.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: spathi.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/spathi.jpg" DialogSetMusic "gamedata/dialogs/spathi.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: supox.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/supox.jpg" DialogSetMusic "gamedata/dialogs/supox.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: supox_station.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/supox.jpg" DialogSetMusic "gamedata/dialogs/supox.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: sylandro.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/sylandro.jpg" DialogSetMusic "gamedata/dialogs/sylandro.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: syreen.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/syreen.jpg" DialogSetMusic "gamedata/dialogs/syreen.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: thraddash.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/thraddash.jpg" DialogSetMusic "gamedata/dialogs/thraddash.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: umgah.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/umgah.jpg" DialogSetMusic "gamedata/dialogs/umgah.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: urquan.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/urquan.jpg" DialogSetMusic "gamedata/dialogs/urquan.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: utwig.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/urquan.jpg" DialogSetMusic "gamedata/dialogs/urquan.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: utwig_station.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/supox.jpg" DialogSetMusic "gamedata/dialogs/supox.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: vux.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/urquan.jpg" DialogSetMusic "gamedata/dialogs/urquan.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: yehat.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/yehat.jpg" DialogSetMusic "gamedata/dialogs/yehat.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end --- NEW FILE: zoqfot.lua --- -- Default dialog screen function DIALOG () DialogStart "gamedata/dialogs/zoqfot.jpg" DialogSetMusic "gamedata/dialogs/zoqfot.mod" DialogWrite "Hi!" answer = DialogAnswer ( "Bye" ) DialogEnd() end |
From: <yu...@us...> - 2004-03-02 12:45:39
|
Update of /cvsroot/timewarp/source/ais In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12972/source/ais Modified Files: ext_ai.cpp ext_ai.h Log Message: Commander stuff to GOB Index: ext_ai.cpp =================================================================== RCS file: /cvsroot/timewarp/source/ais/ext_ai.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ext_ai.cpp 1 Mar 2004 23:21:45 -0000 1.1 --- ext_ai.cpp 2 Mar 2004 12:33:51 -0000 1.2 *************** *** 20,27 **** #include "other/gdialog.h" ! ExternalAI::ExternalAI(Ship * shp, std::string script) { ASSERT(shp!=NULL); ! ship = shp; L = lua_open(); InitConversationModule( L ); --- 20,27 ---- #include "other/gdialog.h" ! ExternalAI::ExternalAI(SpaceObject * so, std::string script) { ASSERT(shp!=NULL); ! space_object = so; L = lua_open(); InitConversationModule( L ); Index: ext_ai.h =================================================================== RCS file: /cvsroot/timewarp/source/ais/ext_ai.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ext_ai.h 1 Mar 2004 23:21:45 -0000 1.1 --- ext_ai.h 2 Mar 2004 12:33:51 -0000 1.2 *************** *** 10,14 **** } ! class Ship; class SpaceLocation; --- 10,14 ---- } ! class SpaceObject; class SpaceLocation; *************** *** 18,24 **** { lua_State * L; ! Ship * ship; public: ! ExternalAI(Ship * ship, std::string script); int Dialog(SpaceLocation* who); }; --- 18,24 ---- { lua_State * L; ! SpaceObject * space_object; public: ! ExternalAI(SpaceObject * ship, std::string script); int Dialog(SpaceLocation* who); }; |
From: <yu...@us...> - 2004-03-02 12:45:37
|
Update of /cvsroot/timewarp/source/melee In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12972/source/melee Modified Files: mframe.cpp mframe.h mship.cpp mship.h Log Message: Commander stuff to GOB Index: mframe.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mframe.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** mframe.cpp 15 Feb 2004 13:11:45 -0000 1.25 --- mframe.cpp 2 Mar 2004 12:33:51 -0000 1.26 *************** *** 17,20 **** --- 17,22 ---- #include "mcbodies.h" + #include "ais/ext_ai.h" + int total_presences; *************** *** 661,665 **** --- 663,672 ---- isblockingweapons = true; + ext_ai = NULL; } + SpaceObject::~SpaceObject() + { + destroy_external_ai(); + } void SpaceObject::animate(Frame *space) {STACKTRACE *************** *** 798,801 **** --- 805,830 ---- } + /*! \brief add external ai script to ship + \param script - script file + */ + void SpaceObject::install_external_ai(const char* script) + { + if (ext_ai != NULL) + { + delete ext_ai; + } + if (script == NULL) + return; + ext_ai = new ExternalAI(this, script ); + } + + /*! \brief destroy_external ai */ + void SpaceObject::destroy_external_ai() + { + if (ext_ai != NULL) + delete ext_ai; + ext_ai = NULL; + } + SpaceLine::SpaceLine(SpaceLocation *creator, Vector2 lpos, double langle, double llength, int lcolor) Index: mframe.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mframe.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** mframe.h 21 Feb 2004 00:29:17 -0000 1.16 --- mframe.h 2 Mar 2004 12:33:51 -0000 1.17 *************** *** 17,20 **** --- 17,21 ---- class Planet; class Presence; + class ExternalAI; enum { *************** *** 296,299 **** --- 297,301 ---- double mass; //mass of object bool isblockingweapons; // this object blocks weaponry (shots) + ExternalAI * ext_ai; // AI of the object protected: SpaceSprite *sprite; //the pictures that this object looks like *************** *** 303,306 **** --- 305,310 ---- SpaceObject(SpaceLocation *creator, Vector2 opos, double oangle, SpaceSprite *osprite); + virtual ~SpaceObject(); + virtual void death(); // called after an item is killed *************** *** 318,321 **** --- 322,328 ---- virtual void set_sprite ( SpaceSprite *sprite ); + + virtual void install_external_ai(const char* script); + virtual void destroy_external_ai(); }; Index: mship.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mship.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** mship.cpp 1 Mar 2004 23:21:49 -0000 1.27 --- mship.cpp 2 Mar 2004 12:33:51 -0000 1.28 *************** *** 30,34 **** #include "ais/ext_ai.h" - /*------------------------------* * Ship Class Registration * --- 30,33 ---- *************** *** 342,346 **** hashotspots = true; - ext_ai = NULL; } --- 341,344 ---- *************** *** 440,444 **** hashotspots = true; - ext_ai = NULL; } --- 438,441 ---- *************** *** 453,457 **** Ship::~Ship() {STACKTRACE delete spritePanel; - destroy_external_ai(); } --- 450,453 ---- *************** *** 963,989 **** } - /*! \brief add external ai script to ship - \param script - script file - */ - void Ship::install_external_ai(const char* script) - { - if (ext_ai != NULL) - { - delete ext_ai; - } - if (script == NULL) - return; - ext_ai = new ExternalAI(this, script ); - } - - /*! \brief destroy_external ai */ - void Ship::destroy_external_ai() - { - if (ext_ai != NULL) - delete ext_ai; - ext_ai = NULL; - } - - Phaser::Phaser( SpaceLocation *creator, Vector2 opos, Vector2 _rpos, --- 959,962 ---- Index: mship.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mship.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** mship.h 1 Mar 2004 23:21:50 -0000 1.19 --- mship.h 2 Mar 2004 12:33:51 -0000 1.20 *************** *** 4,8 **** #include "mframe.h" - class ExternalAI; typedef short KeyCode; --- 4,7 ---- *************** *** 119,123 **** SpaceSprite *spritePanel; - ExternalAI * ext_ai; int update_panel; --- 118,121 ---- *************** *** 168,174 **** virtual void animate(Frame *frame); virtual void animate_predict(Frame *frame, int time); - - virtual void install_external_ai(const char* script); - virtual void destroy_external_ai(); }; --- 166,169 ---- |
From: <yu...@us...> - 2004-03-02 12:45:37
|
Update of /cvsroot/timewarp/source/games In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12972/source/games Modified Files: ggob.cpp ggob.h Log Message: Commander stuff to GOB Index: ggob.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/ggob.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** ggob.cpp 1 Mar 2004 23:21:46 -0000 1.29 --- ggob.cpp 2 Mar 2004 12:33:51 -0000 1.30 *************** *** 34,42 **** #include "../sc2ships.h" ! #include "../other/gup.h" ! #include "../other/configrw.h" void GobGame::config(bool option) { --- 34,44 ---- #include "../sc2ships.h" ! #include "other/gup.h" ! #include "other/configrw.h" + #include "ais/ext_ai.h" + void GobGame::config(bool option) { *************** *** 340,350 **** num_planets = 0; i = 0; ! add_planet_and_station(meleedata.planetSprite, i, stationSprite[i], station_build_name[i], station_pic_name[i], "Supox"); i = 1; ! add_planet_and_station(meleedata.planetSprite, i, stationSprite[i], station_build_name[i], station_pic_name[i], "Orz"); i = 2; ! add_planet_and_station(meleedata.planetSprite, i, stationSprite[i], station_build_name[i], station_pic_name[i], "Kohr-Ah"); ! i = random() % 3; ! add_planet_and_station(meleedata.planetSprite, i, stationSprite[i], "utwju", station_pic_name[i], "Utwig"); for (i = 0; i < 19; i += 1) add(new GobAsteroid()); --- 342,352 ---- num_planets = 0; i = 0; ! add_planet_and_station(meleedata.planetSprite, i, stationSprite[i], station_build_name[i], station_pic_name[i], "Supox", "gamedata/supox_station.lua"); i = 1; ! add_planet_and_station(meleedata.planetSprite, i, stationSprite[i], station_build_name[i], station_pic_name[i], "Orz", "gamedata/orz_station.lua"); i = 2; ! add_planet_and_station(meleedata.planetSprite, i, stationSprite[i], station_build_name[i], station_pic_name[i], "Kohr-Ah", "gamedata/korah_station.lua"); ! i = random(3); ! add_planet_and_station(meleedata.planetSprite, i, stationSprite[i], "utwju", station_pic_name[i], "Utwig","gamedata/utwig_station.lua"); for (i = 0; i < 19; i += 1) add(new GobAsteroid()); *************** *** 467,471 **** \param sname station name (used for station identification ) */ ! void GobGame::add_planet_and_station ( SpaceSprite *planet_sprite, int planet_index, SpaceSprite *station_sprite, const char *builds, const char *background, std::string sname) { STACKTRACE; --- 469,479 ---- \param sname station name (used for station identification ) */ ! void GobGame::add_planet_and_station ( SpaceSprite *planet_sprite, ! int planet_index, ! SpaceSprite *station_sprite, ! const char *builds, ! const char *background, ! std::string sname, ! std::string commander ) { STACKTRACE; *************** *** 481,484 **** --- 489,494 ---- GobStation *gs = new GobStation(station_sprite, p, builds, background, sname ); + gs->install_external_ai(commander.c_str()); + gs->collide_flag_sameship = ALL_LAYERS; gs->collide_flag_sameteam = ALL_LAYERS; *************** *** 573,578 **** --- 583,592 ---- GobPlayer *p = this->get_player(who); if (p && (p->ship == who)) { //Player died + EventPlayerDied esd; + esd.player = p; + gobgame->GenerateEvent(&esd); p->died(source); } + int i = get_enemy_index(who); if ((i != -1) && (gobenemy[i]->ship == who)) { *************** *** 923,932 **** } ! #define STATION_DIALOG_DEPART 0 ! #define STATION_DIALOG_UPGRADE 1 ! #define STATION_DIALOG_NEWSHIP 2 ! #define STATION_DIALOG_REPAIR 3 ! #define STATION_DIALOG_QUEST 4 ! #define STATION_DIALOG_SAVE 5 static DIALOG station_dialog[] = {// (dialog proc) (x) (y) (w) (h) (fg) (bg) (key) (flags) (d1) (d2) (dp) --- 937,949 ---- } ! enum { ! STATION_DIALOG_DEPART = 0, ! STATION_DIALOG_UPGRADE, ! STATION_DIALOG_NEWSHIP, ! STATION_DIALOG_REPAIR, ! STATION_DIALOG_COMMANDER, ! STATION_DIALOG_SAVE, ! }; ! static DIALOG station_dialog[] = {// (dialog proc) (x) (y) (w) (h) (fg) (bg) (key) (flags) (d1) (d2) (dp) *************** *** 935,939 **** { my_d_button_proc, 385, 130, 150, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Buy New Ship" , NULL, NULL },//STATION_DIALOG_NEWSHIP { my_d_button_proc, 385, 170, 150, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Repair Ship" , NULL, NULL },//STATION_DIALOG_REPAIR ! { my_d_button_proc, 385, 210, 150, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Get Quest" , NULL, NULL },//STATION_DIALOG_QUEST { my_d_button_proc, 385, 250, 150, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Save Game" , NULL, NULL },//STATION_DIALOG_SAVE { d_text_proc, 185, 420, 270, 30, 255, 0, 0, 0, 0, 0, dialog_string[0], NULL, NULL }, --- 952,956 ---- { my_d_button_proc, 385, 130, 150, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Buy New Ship" , NULL, NULL },//STATION_DIALOG_NEWSHIP { my_d_button_proc, 385, 170, 150, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Repair Ship" , NULL, NULL },//STATION_DIALOG_REPAIR ! { my_d_button_proc, 385, 210, 150, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Commander" , NULL, NULL },//STATION_DIALOG_COMMANDER { my_d_button_proc, 385, 250, 150, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Save Game" , NULL, NULL },//STATION_DIALOG_SAVE { d_text_proc, 185, 420, 270, 30, 255, 0, 0, 0, 0, 0, dialog_string[0], NULL, NULL }, *************** *** 980,984 **** } break; ! case STATION_DIALOG_REPAIR: { if (s->ship->crew == s->ship->crew_max) { if (game->is_local(s->channel)) --- 997,1001 ---- } break; ! case STATION_DIALOG_REPAIR: { if (s->ship->crew == s->ship->crew_max) { if (game->is_local(s->channel)) *************** *** 991,1024 **** p = alert3("Which would you prefer", "to pay for your repairs", "", "1 &Starbuck", "1 &Buckazoid", "&Nothing!", 's', 'b', 'n'); game->log_int(s->channel, p); ! switch (p) { ! case 1: { ! if (s->starbucks) { ! s->starbucks -= 1; ! s->ship->crew = s->ship->crew_max; ! } ! else { ! if (game->is_local(s->channel)) ! alert("You don't have enough!", NULL, NULL, "&Shit", NULL, 's', 0); ! } ! } break; ! case 2: { ! if (s->buckazoids) { ! s->buckazoids -= 1; ! s->ship->crew = s->ship->crew_max; } - else { - if (game->is_local(s->channel)) - alert("You don't have enough!", NULL, NULL, "&Shit", NULL, 's', 0); } ! } ! break; ! case 3: { ! r = STATION_DIALOG_DEPART; ! } ! break; ! } ! } ! break; case STATION_DIALOG_SAVE: --- 1008,1048 ---- p = alert3("Which would you prefer", "to pay for your repairs", "", "1 &Starbuck", "1 &Buckazoid", "&Nothing!", 's', 'b', 'n'); game->log_int(s->channel, p); ! switch (p) ! { ! case 1: ! if (s->starbucks) ! { ! s->starbucks -= 1; ! s->ship->crew = s->ship->crew_max; ! } ! else ! { ! if (game->is_local(s->channel)) ! alert("You don't have enough!", NULL, NULL, "&Shit", NULL, 's', 0); ! } ! break; ! case 2: ! if (s->buckazoids) ! { ! s->buckazoids -= 1; ! s->ship->crew = s->ship->crew_max; ! } ! else ! { ! if (game->is_local(s->channel)) ! alert("You don't have enough!", NULL, NULL, "&Shit", NULL, 's', 0); ! } break; ! case 3: ! r = STATION_DIALOG_DEPART; ! break; } } ! break; ! ! case STATION_DIALOG_COMMANDER: ! if (ext_ai) ! ext_ai->Dialog(s->ship); ! break; case STATION_DIALOG_SAVE: *************** *** 1028,1038 **** } break; ! ! case STATION_DIALOG_QUEST: ! // experiment code ! EventAskForQuest e; ! e.player = s; ! gobgame->GenerateEvent(&e); ! break; } if (r == STATION_DIALOG_DEPART) break; --- 1052,1056 ---- } break; ! } if (r == STATION_DIALOG_DEPART) break; Index: ggob.h =================================================================== RCS file: /cvsroot/timewarp/source/games/ggob.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ggob.h 1 Mar 2004 23:21:47 -0000 1.15 --- ggob.h 2 Mar 2004 12:33:51 -0000 1.16 *************** *** 106,110 **** const char *builds, const char *background, ! std::string sname); void save_game(); --- 106,111 ---- const char *builds, const char *background, ! std::string sname, ! std::string commander); void save_game(); |
From: <yu...@us...> - 2004-03-02 12:45:37
|
Update of /cvsroot/timewarp/source/other In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12972/source/other Modified Files: gevent.cpp gevent.h gquest.cpp Log Message: Commander stuff to GOB Index: gevent.cpp =================================================================== RCS file: /cvsroot/timewarp/source/other/gevent.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gevent.cpp 29 Jan 2004 21:20:30 -0000 1.6 --- gevent.cpp 2 Mar 2004 12:33:51 -0000 1.7 *************** *** 55,58 **** --- 55,62 ---- } + unsigned int EventPlayerDied::GetEventType() + { + return GAME_EVENT_PLAYER_DIED; + } EventListner::EventListner() Index: gevent.h =================================================================== RCS file: /cvsroot/timewarp/source/other/gevent.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** gevent.h 5 Feb 2004 01:36:18 -0000 1.6 --- gevent.h 2 Mar 2004 12:33:51 -0000 1.7 *************** *** 28,31 **** --- 28,32 ---- GAME_EVENT_QUESTFAILED, GAME_EVENT_ASKFORQUEST, + GAME_EVENT_PLAYER_DIED }; *************** *** 91,94 **** --- 92,102 ---- }; + class EventPlayerDied: public IEvent + { + public: + GobPlayer* player; + virtual unsigned int GetEventType(); + }; + class EventHandler; Index: gquest.cpp =================================================================== RCS file: /cvsroot/timewarp/source/other/gquest.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** gquest.cpp 1 Mar 2004 23:21:46 -0000 1.16 --- gquest.cpp 2 Mar 2004 12:33:51 -0000 1.17 *************** *** 92,95 **** --- 92,97 ---- return; + ASSERT(gob_player->ship); + // dirty hack, only for experiment g_player = gob_player; *************** *** 314,317 **** --- 316,320 ---- RegisterEvent (GAME_EVENT_ASKFORQUEST, gobgame ); RegisterEvent (GAME_EVENT_SHIP_DIE, gobgame ); + RegisterEvent (GAME_EVENT_PLAYER_DIED, gobgame); } *************** *** 468,474 **** break; case GAME_EVENT_SHIP_DIE: - p = gobgame->get_player(((EventShipDie*)event)->victim); - if ( p ) //Player died - RemoveTrash( p ); break; case GAME_EVENT_CLEANQUESTTRASH: --- 471,474 ---- *************** *** 484,487 **** --- 484,492 ---- GetNextQuest( ((EventAskForQuest*)event)->player ); break; + case GAME_EVENT_PLAYER_DIED: + p = (((EventPlayerDied*)event)->player); + if ( p ) //Player died + RemoveTrash( p ); + break; default: break; |
From: <yu...@us...> - 2004-03-01 23:36:09
|
Update of /cvsroot/timewarp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7699 Modified Files: twwin.dsp Log Message: Added jpg support, Communication with target ship (GOB), removed old configure files |
From: <yu...@us...> - 2004-03-01 23:33:41
|
Update of /cvsroot/timewarp/source/other In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4788/source/other Modified Files: gdialog.cpp gquest.cpp Log Message: Added jpg support, Communication with target ship (GOB), removed old configure files Index: gdialog.cpp =================================================================== RCS file: /cvsroot/timewarp/source/other/gdialog.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gdialog.cpp 29 Feb 2004 23:22:16 -0000 1.7 --- gdialog.cpp 1 Mar 2004 23:21:46 -0000 1.8 *************** *** 116,119 **** --- 116,120 ---- aa_set_mode(AA_DITHER); clear_bitmap ( game->window->surface ); + BITMAP *temp = load_bitmap( text, NULL); Index: gquest.cpp =================================================================== RCS file: /cvsroot/timewarp/source/other/gquest.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** gquest.cpp 28 Feb 2004 21:09:56 -0000 1.15 --- gquest.cpp 1 Mar 2004 23:21:46 -0000 1.16 *************** *** 442,455 **** void QuestSource::RemoveTrash(GobPlayer* pl) { ! for (std::list<Quest*>::iterator i = questList.begin(); ! i != questList.end(); ++i) { GobPlayer * p = (*i)->GetPlayer(); if ( !((*i)->exist()) || p == pl ) { ! delete *i; questList.erase(i); i = questList.begin(); } } } --- 442,458 ---- void QuestSource::RemoveTrash(GobPlayer* pl) { ! std::list<Quest*>::iterator i = questList.begin(); ! while( i != questList.end() ) { GobPlayer * p = (*i)->GetPlayer(); if ( !((*i)->exist()) || p == pl ) { ! Quest * q = *i; questList.erase(i); + delete q; i = questList.begin(); + continue; } + i++; } } |
From: <yu...@us...> - 2004-03-01 23:33:41
|
Update of /cvsroot/timewarp/source/games In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4788/source/games Modified Files: ggob.cpp ggob.h Log Message: Added jpg support, Communication with target ship (GOB), removed old configure files Index: ggob.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/ggob.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ggob.cpp 28 Feb 2004 15:18:24 -0000 1.28 --- ggob.cpp 1 Mar 2004 23:21:46 -0000 1.29 *************** *** 165,168 **** --- 165,179 ---- //////////////////////////////////////////////////////////////////////// + /*! \brief save game */ + /* + void GobGame::save_game2() + { + // this is very hard task and unfortunatly it does not support by program architecture + + } + */ + + + /*! \brief Player who kill asteroid get his bukazoid. \param source ?????? *************** *** 174,178 **** STACKTRACE; ! if (!exists()) return 0; int i = Asteroid::handle_damage(source, normal, direct); if (!exists()) { --- 185,189 ---- STACKTRACE; ! if (!exists()) return 0; int i = Asteroid::handle_damage(source, normal, direct); if (!exists()) { *************** *** 187,193 **** STACKTRACE; ! ! Animation *a = new Animation(this, pos, ! explosion, 0, explosion->frames(), time_ratio, get_depth()); a->match_velocity(this); game->add(a); --- 198,203 ---- STACKTRACE; ! Animation *a = new Animation(this, pos, ! explosion, 0, explosion->frames(), time_ratio, get_depth()); a->match_velocity(this); game->add(a); *************** *** 201,205 **** STACKTRACE; ! Game::preinit(); gobplayers = 0; --- 211,215 ---- STACKTRACE; ! Game::preinit(); gobplayers = 0; *************** *** 226,230 **** STACKTRACE; ! int i = gobplayers; gobplayers += 1; gobplayer = (GobPlayer**) realloc(gobplayer, sizeof(GobPlayer*) * gobplayers); --- 236,240 ---- STACKTRACE; ! int i = gobplayers; gobplayers += 1; gobplayer = (GobPlayer**) realloc(gobplayer, sizeof(GobPlayer*) * gobplayers); *************** *** 234,237 **** --- 244,248 ---- return; } + /*! \brief Handle player death At this point divinefavor upgrade can save player from such fate *************** *** 278,292 **** STACKTRACE; ! int i; ! /* switch(_log->type) { ! // case Log::log_net1server: ! // case Log::log_net1client: { ! // error("unsupported game/log type"); ! // } ! // break; ! default: { ! } ! break; ! }*/ Game::init(_log); --- 289,293 ---- STACKTRACE; ! int i; Game::init(_log); *************** *** 299,304 **** enemy_team = new_team(); - // set_resolution(videosystem.width, videosystem.height); - DATAFILE *tmpdata; --- 300,303 ---- *************** *** 426,430 **** add_new_enemy(); this->change_view("Hero"); - //view = get_view ( "Hero", NULL ); view_locked = true; view->window->locate( --- 425,428 ---- *************** *** 440,443 **** --- 438,442 ---- return; } + /*! \brief Free game resources */ GobGame::~GobGame() { *************** *** 614,618 **** ! static char *enemy_types[] = { "thrto", "zfpst", "shosc", "dragr", "ktesa", "kahbo", "ilwsp", --- 613,617 ---- ! static const char *enemy_types[] = { "thrto", "zfpst", "shosc", "dragr", "ktesa", "kahbo", "ilwsp", *************** *** 624,627 **** --- 623,646 ---- const int num_enemy_types = sizeof(enemy_types)/sizeof(enemy_types[0]); + std::map <std::string, const char *> dialogMap; + dialogMap["thrto"] = "gamedata/thraddash.lua"; + dialogMap["zfpst"] = "gamedata/zoqfot.lua"; + dialogMap["shosc"] = "gamedata/shofixty.lua"; + dialogMap["dragr"] = NULL; + dialogMap["ktesa"] = NULL; + dialogMap["kahbo"] = NULL; + dialogMap["ilwsp"] = "gamedata/ilwrath.lua"; + dialogMap["syrpe"] = "gamedata/syreen.lua"; + dialogMap["kzedr"] = "gamedata/urquan.lua"; + dialogMap["mmrxf"] = NULL; + dialogMap["lk_sa"] = NULL; + dialogMap["druma"] = "gamedata/druuge.lua"; + dialogMap["earcr"] = "gamedata/human.lua"; + dialogMap["yehte"] = "gamedata/yehat.lua"; + dialogMap["herex"] = NULL; + dialogMap["virli"] = NULL; + dialogMap["chmav"] = "gamedata/chmmr.lua"; + dialogMap["plopl"] = NULL; + dialogMap["narlu"] = NULL; if (gobenemies == max_enemies) return; *************** *** 637,650 **** int e = 99999; while (e >= num_enemy_types) { - /* - base time low high - - 1 .5 -0.1 3.7 - 10 5 2.62 7.47 - 50 25 5.89 14.24 - 100 50 8.1 17.3 - 200 100 11.01 26.49 - - */ e = base; e = random() % (e + 2); --- 656,659 ---- *************** *** 654,658 **** if (e > sqrt( 3.0*base) + 2) e = random() % (e + 1); - //if (e > num_enemy_types * 2) e = e % num_enemy_types; e = e; } --- 663,666 ---- *************** *** 676,683 **** ship = create_ship(channel_server, enemy_types[e], "WussieBot", *pos, random(PI2), enemy_team); ! if (!strcmp(enemy_types[e], "shosc")) ((ShofixtiScout*)ship)->specialDamage /= 4; ! if (!strcmp(enemy_types[e], "zfpst")) ((ZoqFotPikStinger*)ship)->specialDamage /= 2; ! if (!strcmp(enemy_types[e], "syrpe")) ((SyreenPenetrator*)ship)->specialDamage /= 2; ! if (!strcmp(enemy_types[e], "dragr")) ship->special_drain *= 2; if (!strcmp(enemy_types[e], "chmav")) { ((ChmmrAvatar*)ship)->weaponDamage += 1; --- 684,705 ---- ship = create_ship(channel_server, enemy_types[e], "WussieBot", *pos, random(PI2), enemy_team); ! ship->install_external_ai(dialogMap[std::string(enemy_types[e])]); ! ! if (!strcmp(enemy_types[e], "shosc")) ! { ! ((ShofixtiScout*)ship)->specialDamage /= 4; ! } ! if (!strcmp(enemy_types[e], "zfpst")) ! { ! ((ZoqFotPikStinger*)ship)->specialDamage /= 2; ! } ! if (!strcmp(enemy_types[e], "syrpe")) ! { ! ((SyreenPenetrator*)ship)->specialDamage /= 2; ! } ! if (!strcmp(enemy_types[e], "dragr")) ! { ! ship->special_drain *= 2; ! } if (!strcmp(enemy_types[e], "chmav")) { ((ChmmrAvatar*)ship)->weaponDamage += 1; *************** *** 728,732 **** /*! \brief Free player resources */ GobPlayer::~GobPlayer() { - free (pair_list); } --- 750,753 ---- *************** *** 744,749 **** value_starbucks = 0; value_buckazoids = 0; - num_pairs = 0; - pair_list = NULL; ship = NULL; panel = NULL; --- 765,768 ---- *************** *** 762,811 **** } - /*! \brief Part of map<const char *, int> implementation, to be removed */ - GobPlayer::pair *GobPlayer::_get_pair(const char *id) { - STACKTRACE; - - if (!pair_list) return NULL; - int i; - for (i = 0; i < num_pairs; i += 1) { - if (!strcmp(pair_list[i].id, id)) - return &pair_list[i]; - } - return NULL; - } - - /*! \brief Part of map<const char *, int> implementation, to be removed */ - void GobPlayer::_add_pair(const char *id, int value) { - STACKTRACE; - - if (_get_pair(id)) { - error("GobPlayer::_add_pair - \"%s\" already exists", id); - return; - } - pair_list = (pair*)realloc(pair_list, sizeof(pair) * (num_pairs+1)); - pair_list[num_pairs].id = strdup(id); - pair_list[num_pairs].value = value; - num_pairs += 1; - return; - } - - /*! \brief Part of map<const char *, int> implementation, to be removed */ - int GobPlayer::read_pair(const char *id) { - STACKTRACE; - - pair *p = _get_pair(id); - if (p) return p->value; - return -1; - } - - /*! \brief Part of map<const char *, int> implementation, to be removed */ - void GobPlayer::write_pair(const char *id, int value) { - STACKTRACE; - - pair *p = _get_pair(id); - if (p) p->value = value; - else _add_pair(id, value); - return; - } /*! \brief Conform purch, take charge for purch upgrade --- 781,784 ---- *************** *** 1080,1092 **** gobgame->pause(); - char buffy[256]; - int a; - sprintf(buffy, "First visited station %s at time", build_type); - a = p->read_pair(buffy); - if (a == -1) p->write_pair(buffy, game->game_time); - sprintf(buffy, "Visited station %s N times", build_type); - a = p->read_pair(buffy); - if (a == -1) a = 0; - p->write_pair(buffy, a+1); EventEnterStation e; --- 1053,1056 ---- *************** *** 1102,1107 **** } - - int num_upgrade_indexes; int upgrade_index[999]; --- 1066,1069 ---- *************** *** 1336,1355 **** REGISTER_GAME(GobGame, "GOB") - - - /* intended upgrades: - - faster marines == faster Orz Marines, cost 4s - upgrade battle armor == tougher Orz Marines, cost 4s/4b - improve range == long range Orz cannons, cost 3s - regeneration == crew regeneration for Orz, cost 10s/25b, only purchasable once - sharper shurikens == +1 damage for Kohr-Ah blades, cost 5s - faster shurikens == higher velocity for Kohr-Ah blades, cost 4s - larger corona == longer range for Kohr-Ah FRIED, cost 15s, only purchasable once - hotter corona == double damage for Kohr-Ah FRIED, cost 10s, only purchasable once - divine favor == pkunk respawn, only available from one base, cost 48s/0b, only purchasable once, kept when ship is sold - sentinel system == Chmmr ZapSats, only available from one base, cost 30s/30b - - long range scanners == can zoom farther out, gives radar, only available from one base, cost 8s/20b - - */ --- 1298,1299 ---- Index: ggob.h =================================================================== RCS file: /cvsroot/timewarp/source/games/ggob.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ggob.h 28 Feb 2004 01:05:49 -0000 1.14 --- ggob.h 1 Mar 2004 23:21:47 -0000 1.15 *************** *** 3,6 **** --- 3,8 ---- #include <list> + #include <string> + #include <map> #include "../melee.h" *************** *** 27,40 **** Control *control; ShipPanel *panel; ! struct pair { ! char *id; ! int value; ! }; ! pair *pair_list; ! int num_pairs; ! void _add_pair(const char *id, int value); ! pair *_get_pair(const char *id); ! void write_pair(const char *id, int value); ! int read_pair(const char *id); int total; //total upgrades purchased, used in calculating price of future upgrades int starbucks; --- 29,35 ---- Control *control; ShipPanel *panel; ! ! std::map<std::string, int> pair; ! int total; //total upgrades purchased, used in calculating price of future upgrades int starbucks; |
Update of /cvsroot/timewarp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4788 Modified Files: allegro.cfg client.ini makefile scp.ini Removed Files: config.guess config.status config.sub configure configure.in ft2build.h Log Message: Added jpg support, Communication with target ship (GOB), removed old configure files Index: client.ini =================================================================== RCS file: /cvsroot/timewarp/client.ini,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** client.ini 14 Feb 2004 13:18:37 -0000 1.28 --- client.ini 1 Mar 2004 23:21:44 -0000 1.29 *************** *** 16,20 **** ;valid = values are 8 (ugly), 15, 16, 24 (slow), and 32 ! FullScreen = 0 ; = 0 = windowed, 1 = fullscreen --- 16,20 ---- ;valid = values are 8 (ugly), 15, 16, 24 (slow), and 32 ! FullScreen = 2 ; = 0 = windowed, 1 = fullscreen *************** *** 27,32 **** SoundOn = 2 MusicOn = 2 ! SoundVolume = 66 ! MusicVolume = 64 Music = melee.dat#MELEEMUS_MOD ;melee.dat = #PLANETMUSIC_MOD , #MELEEMUS_MOD --- 27,32 ---- SoundOn = 2 MusicOn = 2 ! SoundVolume = 174 ! MusicVolume = 176 Music = melee.dat#MELEEMUS_MOD ;melee.dat = #PLANETMUSIC_MOD , #MELEEMUS_MOD *************** *** 34,44 **** [Planet] ! PlanetDimension = 2 PlanetUsespec = 1 [View] ! View = Enemy ;determines = where the camera goes ! InterpolateFrames = 0 ;0 = low quality, 1 = high quality Mip_min = 0 --- 34,44 ---- [Planet] ! PlanetDimension = 3 PlanetUsespec = 1 [View] ! View = Hero ;determines = where the camera goes ! InterpolateFrames = 1 ;0 = low quality, 1 = high quality Mip_min = 0 *************** *** 61,65 **** [Rendering] ! AA_Mode = 32803 --- 61,65 ---- [Rendering] ! AA_Mode = 35 Index: makefile =================================================================== RCS file: /cvsroot/timewarp/makefile,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** makefile 29 Feb 2004 23:22:17 -0000 1.11 --- makefile 1 Mar 2004 23:21:44 -0000 1.12 *************** *** 24,28 **** source/sc3ships source/twgui source/util source/gamex \ source/gamex/edit source/gamex/general source/gamex/stuff \ ! source/gamex/dialogs FILELIST= ${shell find source -type f "(" -name "*.c" -o -name "*.cpp" ")"} --- 24,28 ---- source/sc3ships source/twgui source/util source/gamex \ source/gamex/edit source/gamex/general source/gamex/stuff \ ! source/gamex/dialogs source/jpgalleg FILELIST= ${shell find source -type f "(" -name "*.c" -o -name "*.cpp" ")"} Index: scp.ini =================================================================== RCS file: /cvsroot/timewarp/scp.ini,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** scp.ini 23 Feb 2004 05:50:32 -0000 1.37 --- scp.ini 1 Mar 2004 23:21:44 -0000 1.38 *************** *** 22,25 **** --- 22,26 ---- Extra5 = 0 Extra6 = 0 + Communicate = 3 --- config.guess DELETED --- --- config.status DELETED --- --- config.sub DELETED --- --- configure DELETED --- --- configure.in DELETED --- --- ft2build.h DELETED --- |
From: <yu...@us...> - 2004-03-01 23:33:41
|
Update of /cvsroot/timewarp/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4788/source Modified Files: ais.h scp.cpp Log Message: Added jpg support, Communication with target ship (GOB), removed old configure files Index: ais.h =================================================================== RCS file: /cvsroot/timewarp/source/ais.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ais.h 6 Feb 2004 20:23:14 -0000 1.7 --- ais.h 1 Mar 2004 23:21:43 -0000 1.8 *************** *** 24,28 **** int prev; int closest; ! int extra1, extra2, extra3, extra4, extra5; int suicide; public: --- 24,28 ---- int prev; int closest; ! int extra1, extra2, communicate, extra4, extra5; int suicide; public: Index: scp.cpp =================================================================== RCS file: /cvsroot/timewarp/source/scp.cpp,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** scp.cpp 29 Feb 2004 23:22:18 -0000 1.55 --- scp.cpp 1 Mar 2004 23:21:43 -0000 1.56 *************** *** 26,29 **** --- 26,31 ---- #include <allegro.h> + #include "jpgalleg/jpgalleg.h" + #ifdef ALLEGRO_MSVC #pragma warning (disable:4786) *************** *** 864,867 **** --- 866,871 ---- videosystem.set_resolution(screen_width, screen_height, screen_bpp, fullscreen); + register_bitmap_file_type("jpg", load_jpg, NULL); + enable_input(inputs); sound.init(); |
From: <yu...@us...> - 2004-03-01 23:33:40
|
Update of /cvsroot/timewarp/source/ais In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4788/source/ais Modified Files: c_input.cpp Added Files: ext_ai.cpp ext_ai.h Log Message: Added jpg support, Communication with target ship (GOB), removed old configure files --- NEW FILE: ext_ai.cpp --- #include <allegro.h> #include <string.h> #include <stdio.h> #include "melee.h" REGISTER_FILE #include "id.h" #include "frame.h" #include "melee/mcbodies.h" #include "melee/mgame.h" #include "melee/mcontrol.h" #include "melee/mship.h" #include "melee/mshot.h" #include "melee/manim.h" #include "melee/mview.h" #include "ext_ai.h" #include "other/gdialog.h" ExternalAI::ExternalAI(Ship * shp, std::string script) { ASSERT(shp!=NULL); ship = shp; L = lua_open(); InitConversationModule( L ); if ( lua_dofile(L, script.c_str()) != 0) { tw_error("Error in External AI lua script"); }; } /*! \brief summoned when somebody want to communicate with this ship \who is this "somebody" */ int ExternalAI::Dialog(SpaceLocation* who) { int top = lua_gettop(L); lua_pushstring(L, "DIALOG"); lua_gettable(L, LUA_GLOBALSINDEX); if ( !lua_isfunction(L, -1) ) { return 0; }; lua_call(L, 0, 0); lua_settop(L, top); return 0; } --- NEW FILE: ext_ai.h --- #ifndef __EXT_AI_H__ #define __EXT_AI_H__ #include <string> extern "C" { #include <lua.h> #include <lualib.h> #include <lauxlib.h> } class Ship; class SpaceLocation; /*! \brief responsible for ship external script AI. Including Dialog Support. */ class ExternalAI { lua_State * L; Ship * ship; public: ExternalAI(Ship * ship, std::string script); int Dialog(SpaceLocation* who); }; #endif Index: c_input.cpp =================================================================== RCS file: /cvsroot/timewarp/source/ais/c_input.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** c_input.cpp 6 Feb 2004 20:23:15 -0000 1.11 --- c_input.cpp 1 Mar 2004 23:21:45 -0000 1.12 *************** *** 111,130 **** void ControlHuman::load (const char *inifile, const char *inisection) { set_config_file (inifile); ! thrust = get_config_int(inisection, "Thrust", 0); ! back = get_config_int(inisection, "Backwards", 0); ! left = get_config_int(inisection, "Left", 0); ! right = get_config_int(inisection, "Right", 0); ! fire = get_config_int(inisection, "Fire", 0); ! altfire = get_config_int(inisection, "AltFire", 0); ! special = get_config_int(inisection, "Special", 0); ! next = get_config_int(inisection, "Next_Target", 0); ! prev = get_config_int(inisection, "Prev_Target", 0); ! closest = get_config_int(inisection, "Closest_Target", 0); ! extra1 = get_config_int(inisection, "Extra1", 0); ! extra2 = get_config_int(inisection, "Extra2", 0); ! extra3 = get_config_int(inisection, "Extra3", 0); ! extra4 = get_config_int(inisection, "Extra4", 0); ! extra5 = get_config_int(inisection, "Extra5", 0); ! suicide = get_config_int(inisection, "Extra6", 0); return; } --- 111,130 ---- void ControlHuman::load (const char *inifile, const char *inisection) { set_config_file (inifile); ! thrust = get_config_int(inisection, "Thrust", 0); ! back = get_config_int(inisection, "Backwards", 0); ! left = get_config_int(inisection, "Left", 0); ! right = get_config_int(inisection, "Right", 0); ! fire = get_config_int(inisection, "Fire", 0); ! altfire = get_config_int(inisection, "AltFire", 0); ! special = get_config_int(inisection, "Special", 0); ! next = get_config_int(inisection, "Next_Target", 0); ! prev = get_config_int(inisection, "Prev_Target", 0); ! closest = get_config_int(inisection, "Closest_Target", 0); ! extra1 = get_config_int(inisection, "Extra1", 0); ! extra2 = get_config_int(inisection, "Extra2", 0); ! communicate = get_config_int(inisection, "Communicate", 0); ! extra4 = get_config_int(inisection, "Extra4", 0); ! extra5 = get_config_int(inisection, "Extra5", 0); ! suicide = get_config_int(inisection, "Extra6", 0); return; } *************** *** 147,151 **** set_config_int(inisection, "Extra1", extra1); set_config_int(inisection, "Extra2", extra2); ! set_config_int(inisection, "Extra3", extra3); set_config_int(inisection, "Extra4", extra4); set_config_int(inisection, "Extra5", extra5); --- 147,151 ---- set_config_int(inisection, "Extra1", extra1); set_config_int(inisection, "Extra2", extra2); ! set_config_int(inisection, "Communicate", communicate); set_config_int(inisection, "Extra4", extra4); set_config_int(inisection, "Extra5", extra5); *************** *** 175,179 **** if (key_pressed(extra2)) r |= keyflag::extra2; ! if (key_pressed(extra3)) r |= keyflag::extra3; if (key_pressed(extra4)) r |= keyflag::extra4; if (key_pressed(extra5)) r |= keyflag::extra5; --- 175,179 ---- if (key_pressed(extra2)) r |= keyflag::extra2; ! if (key_pressed(communicate)) r |= keyflag::communicate; if (key_pressed(extra4)) r |= keyflag::extra4; if (key_pressed(extra5)) r |= keyflag::extra5; *************** *** 266,271 **** key_to_description ( extra2, s ); s = dialog_string[index]; index += 1; ! s += sprintf ( s, "Extra3: "); ! key_to_description ( extra3, s ); s = dialog_string[index]; index += 1; s += sprintf ( s, "Extra4: "); --- 266,271 ---- key_to_description ( extra2, s ); s = dialog_string[index]; index += 1; ! s += sprintf ( s, "Communicate: "); ! key_to_description ( communicate, s ); s = dialog_string[index]; index += 1; s += sprintf ( s, "Extra4: "); *************** *** 300,319 **** if (t == KEY_ESC) i = KEY_DIALOG_CANCEL; switch (i) { ! case 1: left = t; break; ! case 2: right = t; break; ! case 3: thrust = t; break; ! case 4: back = t; break; ! case 5: fire = t; break; ! case 6: special = t; break; ! case 7: altfire = t; break; ! case 8: next = t; break; ! case 9: prev = t; break; ! case 10: closest = t; break; ! case 11: extra1 = t; break; ! case 12: extra2 = t; break; ! case 13: extra3 = t; break; ! case 14: extra4 = t; break; ! case 15: extra5 = t; break; ! case 16: suicide = t; break; case KEY_DIALOG_OK: save("scp.ini", getDescription()); return; case KEY_DIALOG_CANCEL: load("scp.ini", getDescription()); return; --- 300,319 ---- if (t == KEY_ESC) i = KEY_DIALOG_CANCEL; switch (i) { ! case 1: left = t; break; ! case 2: right = t; break; ! case 3: thrust = t; break; ! case 4: back = t; break; ! case 5: fire = t; break; ! case 6: special = t; break; ! case 7: altfire = t; break; ! case 8: next = t; break; ! case 9: prev = t; break; ! case 10: closest = t; break; ! case 11: extra1 = t; break; ! case 12: extra2 = t; break; ! case 13: communicate = t; break; ! case 14: extra4 = t; break; ! case 15: extra5 = t; break; ! case 16: suicide = t; break; case KEY_DIALOG_OK: save("scp.ini", getDescription()); return; case KEY_DIALOG_CANCEL: load("scp.ini", getDescription()); return; |
From: <yu...@us...> - 2004-03-01 23:33:12
|
Update of /cvsroot/timewarp/source/melee In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4788/source/melee Modified Files: mlog.cpp mship.cpp mship.h Log Message: Added jpg support, Communication with target ship (GOB), removed old configure files Index: mlog.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mlog.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mlog.cpp 29 Feb 2004 18:46:40 -0000 1.10 --- mlog.cpp 1 Mar 2004 23:21:49 -0000 1.11 *************** *** 317,321 **** ! static enum share_types {TYPE_CHAR, TYPE_SHORT, TYPE_INT}; static const int max_share = 512; static int Nshare = 0; --- 317,321 ---- ! enum share_types {TYPE_CHAR, TYPE_SHORT, TYPE_INT}; static const int max_share = 512; static int Nshare = 0; Index: mship.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mship.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** mship.cpp 6 Feb 2004 08:50:45 -0000 1.26 --- mship.cpp 1 Mar 2004 23:21:49 -0000 1.27 *************** *** 28,31 **** --- 28,33 ---- #include "mview.h" + #include "ais/ext_ai.h" + /*------------------------------* *************** *** 340,343 **** --- 342,346 ---- hashotspots = true; + ext_ai = NULL; } *************** *** 437,440 **** --- 440,444 ---- hashotspots = true; + ext_ai = NULL; } *************** *** 449,452 **** --- 453,457 ---- Ship::~Ship() {STACKTRACE delete spritePanel; + destroy_external_ai(); } *************** *** 561,564 **** --- 566,570 ---- this->target_prev = 1&&(nextkeys & keyflag::prev); this->target_closest = 1&&(nextkeys & keyflag::closest); + if (nextkeys & keyflag::suicide) { crew = 0; *************** *** 669,672 **** --- 675,687 ---- target = control->target; + // communication code + if ( (nextkeys & keyflag::communicate) && (target->exists ()) && (target->isShip())) + { + Ship * s = (Ship*)target; + if( s->ext_ai != NULL ) + s->ext_ai->Dialog(this); + } + + calculate_turn_left(); calculate_turn_right(); *************** *** 948,951 **** --- 963,988 ---- } + /*! \brief add external ai script to ship + \param script - script file + */ + void Ship::install_external_ai(const char* script) + { + if (ext_ai != NULL) + { + delete ext_ai; + } + if (script == NULL) + return; + ext_ai = new ExternalAI(this, script ); + } + + /*! \brief destroy_external ai */ + void Ship::destroy_external_ai() + { + if (ext_ai != NULL) + delete ext_ai; + ext_ai = NULL; + } + Phaser::Phaser( Index: mship.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mship.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** mship.h 24 Feb 2004 23:22:52 -0000 1.18 --- mship.h 1 Mar 2004 23:21:50 -0000 1.19 *************** *** 4,28 **** #include "mframe.h" ! typedef short KeyCode; struct keyflag { enum { ! left = (1<<0), ! right = (1<<1), ! thrust = (1<<2), ! back = (1<<3), ! fire = (1<<4), ! special = (1<<5), ! altfire = (1<<6), ! next = (1<<7), ! prev = (1<<8), ! closest = (1<<9), ! extra1 = (1<<10), ! extra2 = (1<<11), ! extra3 = (1<<12), ! extra4 = (1<<13), ! extra5 = (1<<14), ! suicide = (1<<15), }; }; --- 4,28 ---- #include "mframe.h" ! class ExternalAI; typedef short KeyCode; struct keyflag { enum { ! left = (1<<0), ! right = (1<<1), ! thrust = (1<<2), ! back = (1<<3), ! fire = (1<<4), ! special = (1<<5), ! altfire = (1<<6), ! next = (1<<7), ! prev = (1<<8), ! closest = (1<<9), ! extra1 = (1<<10), ! extra2 = (1<<11), ! communicate = (1<<12), ! extra4 = (1<<13), ! extra5 = (1<<14), ! suicide = (1<<15), }; }; *************** *** 119,122 **** --- 119,124 ---- SpaceSprite *spritePanel; + ExternalAI * ext_ai; + int update_panel; *************** *** 133,136 **** --- 135,139 ---- char target_prev; char target_closest; + char communicate; char target_pressed; *************** *** 140,144 **** Ship(SpaceLocation *creator, Vector2 opos, double shipAngle, ! SpaceSprite *osprite) ; Ship(Vector2 opos, double shipAngle, ShipData *shipData, unsigned int code); --- 143,147 ---- Ship(SpaceLocation *creator, Vector2 opos, double shipAngle, ! SpaceSprite *osprite) ; Ship(Vector2 opos, double shipAngle, ShipData *shipData, unsigned int code); *************** *** 165,168 **** --- 168,174 ---- virtual void animate(Frame *frame); virtual void animate_predict(Frame *frame, int time); + + virtual void install_external_ai(const char* script); + virtual void destroy_external_ai(); }; |
From: <yu...@us...> - 2004-03-01 23:33:12
|
Update of /cvsroot/timewarp/source/newships In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4788/source/newships Modified Files: shptaule.cpp Log Message: Added jpg support, Communication with target ship (GOB), removed old configure files Index: shptaule.cpp =================================================================== RCS file: /cvsroot/timewarp/source/newships/shptaule.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** shptaule.cpp 29 Feb 2004 23:22:19 -0000 1.13 --- shptaule.cpp 1 Mar 2004 23:21:50 -0000 1.14 *************** *** 462,466 **** c -= iround(((Ship*)other)->getCrew()); ! RGB col = ((Ship*)other)->crewPanelColor(); int i; --- 462,466 ---- c -= iround(((Ship*)other)->getCrew()); ! ///RGB col = ((Ship*)other)->crewPanelColor(); int i; |
From: <yu...@us...> - 2004-03-01 23:33:12
|
Update of /cvsroot/timewarp/interfaces/gflmelee In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4788/interfaces/gflmelee Modified Files: info.txt Log Message: Added jpg support, Communication with target ship (GOB), removed old configure files Index: info.txt =================================================================== RCS file: /cvsroot/timewarp/interfaces/gflmelee/info.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** info.txt 15 Feb 2004 13:19:48 -0000 1.3 --- info.txt 1 Mar 2004 23:21:49 -0000 1.4 *************** *** 30,33 **** [FleetInit] ! PlayerAlliance = 21 ! EnemyAlliance = 22 --- 30,33 ---- [FleetInit] ! PlayerAlliance = 0 ! EnemyAlliance = 1 |