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...> - 2003-12-14 22:19:59
|
Update of /cvsroot/timewarp/source/gamex/edit In directory sc8-pr-cvs1:/tmp/cvs-serv3999/gamex/edit Modified Files: edit_dialogue.cpp edit_dialogue.h Log Message: fg interface update/ starmap editor update Index: edit_dialogue.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/edit/edit_dialogue.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** edit_dialogue.cpp 12 Dec 2003 15:53:18 -0000 1.3 --- edit_dialogue.cpp 14 Dec 2003 22:19:56 -0000 1.4 *************** *** 141,144 **** --- 141,152 ---- Dialo dialo; + + void GameDialogue::init_menu() + { + T = new TWindow("gamex/interface/dialogeditor", 0, 0, game_screen); + maparea = 0; + } + + void GameDialogue::init() { *************** *** 214,218 **** - R = new TWindow("gamex/interface/dialogeditor", 10, 10, view->frame->surface); --- 222,225 ---- *************** *** 223,246 **** //strcpy(Qtext, "a\n b\n c\n d\n e\n f\n g\n h\n i"); ! T = new TextEditBox(R, "text/", usefont, dialo->T, 256); ! T->set_textcolor(tcol); ! B = new TextList(R, "branches/", usefont); ! refresh = new Button(R, "refresh_", 0); ! Bplus = new Button(R, "addbranch_", 0); // Bmin = new Button(R, "Bmin", 0); ! bprev = new Button(R, "prevbranch_", 0); // bnext = new Button(R, "next", 0); ! dialostatus = new SwitchButton(R, "state_", 0); // add a text-button for the race pic, and a popup for the race list selection ?! ! raceselect = new TextButton(R, "race_", usefont); raceselect->set_text(dialo->racepic, makecol(255,255,0)); raceselect->passive = false; --- 230,253 ---- //strcpy(Qtext, "a\n b\n c\n d\n e\n f\n g\n h\n i"); ! Tedit = new TextEditBox(T, "text/", usefont, dialo->T, 256); ! Tedit->set_textcolor(tcol); ! Tlist = new TextList(T, "branches/", usefont); ! refresh = new Button(T, "refresh_", 0); ! Bplus = new Button(T, "addbranch_", 0); // Bmin = new Button(R, "Bmin", 0); ! bprev = new Button(T, "prevbranch_", 0); // bnext = new Button(R, "next", 0); ! dialostatus = new SwitchButton(T, "state_", 0); // add a text-button for the race pic, and a popup for the race list selection ?! ! raceselect = new TextButton(T, "race_", usefont); raceselect->set_text(dialo->racepic, makecol(255,255,0)); raceselect->passive = false; *************** *** 250,263 **** popupraceselect->tbl->set_optionlist(racepiclist, Nracepiclist, makecol(255,255,128)); popupraceselect->hide(); // winman = new WindowManager; // winman->add(R); ! R->add(popupraceselect); ! R->tree_doneinit(); initeditor(dialo); } --- 257,273 ---- popupraceselect->tbl->set_optionlist(racepiclist, Nracepiclist, makecol(255,255,128)); popupraceselect->hide(); + //popupraceselect->setscreen(T->drawarea); // winman = new WindowManager; // winman->add(R); ! T->add(popupraceselect); ! T->tree_doneinit(); initeditor(dialo); + // no need for tic-info. + ti = false; } *************** *** 310,319 **** Blist[0][0] = 0; ! B->set_optionlist(Blist, dialo->Nbranches, makecol(255,255,255)); dialostatus->state = dialo->state; ! T->text_reset(dialo->T); raceselect->set_text(dialo->racepic, makecol(255,255,0)); --- 320,329 ---- Blist[0][0] = 0; ! Tlist->set_optionlist(Blist, dialo->Nbranches, makecol(255,255,255)); dialostatus->state = dialo->state; ! Tedit->text_reset(dialo->T); raceselect->set_text(dialo->racepic, makecol(255,255,0)); *************** *** 329,334 **** ! FULL_REDRAW = true; ! R->tree_calculate(); --- 339,344 ---- ! //FULL_REDRAW = true; ! //R->tree_calculate(); *************** *** 396,400 **** //if (bnext->flag.left_mouse_press) ! if (B->flag.left_mouse_press) { // load the data from the child branch. --- 406,410 ---- //if (bnext->flag.left_mouse_press) ! if (Tlist->flag.left_mouse_press) { // load the data from the child branch. *************** *** 402,406 **** { int i; ! i = B->gety();//scroll.yselect; if (i >= 0 && i < dialo->Nbranches) // shouldn't be necessary ?! { --- 412,416 ---- { int i; ! i = Tlist->gety();//scroll.yselect; if (i >= 0 && i < dialo->Nbranches) // shouldn't be necessary ?! { *************** *** 449,456 **** //show_mouse(frame->surface); ! R->tree_setscreen(view->frame->surface); ! R->tree_animate(); ! show_mouse(view->frame->surface); ! scare_mouse(); } --- 459,466 ---- //show_mouse(frame->surface); ! //T->tree_setscreen(view->frame->surface); ! //T->tree_animate(); ! //show_mouse(view->frame->surface); ! //scare_mouse(); } Index: edit_dialogue.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/edit/edit_dialogue.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** edit_dialogue.h 12 Dec 2003 15:53:18 -0000 1.2 --- edit_dialogue.h 14 Dec 2003 22:19:56 -0000 1.3 *************** *** 70,73 **** --- 70,74 ---- virtual void quit(); //virtual bool handle_key(int k); + virtual void init_menu(); virtual void calculate(); *************** *** 81,89 **** ! // WindowManager *winman; ! TWindow *R; ! ! TextEditBox *T; ! TextList *B; Button *refresh, *Bplus, *bprev; --- 82,87 ---- ! TextEditBox *Tedit; ! TextList *Tlist; Button *refresh, *Bplus, *bprev; |
From: <geo...@us...> - 2003-12-14 14:37:47
|
Update of /cvsroot/timewarp/gamex/interface/starmap In directory sc8-pr-cvs1:/tmp/cvs-serv3543/starmap Added Files: backgr.bmp info.txt map_backgr.bmp zoomin_default.bmp zoomout_default.bmp Log Message: update for fg interface --- NEW FILE: backgr.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: info.txt --- gamex/interface/starmap/map_backgr_y = 21 gamex/interface/starmap/map_backgr_x = 15 gamex/interface/melee/map_backgr_y = 21 gamex/interface/melee/map_backgr_x = 15 gamex/interface/planetview/starname_backgr_y = 4 gamex/interface/planetview/starname_backgr_x = 233 gamex/interface/planetview/map_backgr_y = 33 gamex/interface/planetview/map_backgr_x = 15 res = 800 --- NEW FILE: map_backgr.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: zoomin_default.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: zoomout_default.bmp --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/timewarp/gamex/interface/planetview/edit In directory sc8-pr-cvs1:/tmp/cvs-serv3543/planetview/edit Added Files: backgr.bmp cancel_default.bmp dec_default.bmp inc_default.bmp info.txt plot_default.bmp select_default.bmp Log Message: update for fg interface --- NEW FILE: backgr.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: cancel_default.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: dec_default.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: inc_default.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: info.txt --- gamex/interface/planetview/edit/plot_default_y = 100 gamex/interface/planetview/edit/plot_default_x = 100 gamex/interface/planetview/edit/cancel_default_y = 17 gamex/interface/planetview/edit/cancel_default_x = 100 gamex/interface/planetview/edit/select_default_y = 318 gamex/interface/planetview/edit/select_default_x = 100 gamex/interface/planetview/edit/inc_default_y = 101 gamex/interface/planetview/edit/inc_default_x = 317 gamex/interface/planetview/edit/dec_default_y = 95 gamex/interface/planetview/edit/dec_default_x = 25 res = 1024 --- NEW FILE: plot_default.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: select_default.bmp --- (This appears to be a binary file; contents omitted.) |
From: <geo...@us...> - 2003-12-14 14:37:47
|
Update of /cvsroot/timewarp/gamex/interface/planetview In directory sc8-pr-cvs1:/tmp/cvs-serv3543/planetview Added Files: map_backgr.bmp Log Message: update for fg interface --- NEW FILE: map_backgr.bmp --- (This appears to be a binary file; contents omitted.) |
From: <geo...@us...> - 2003-12-14 14:37:47
|
Update of /cvsroot/timewarp/gamex/interface/melee In directory sc8-pr-cvs1:/tmp/cvs-serv3543/melee Added Files: backgr.bmp info.txt map_backgr.bmp zoomin_default.bmp zoomout_default.bmp Log Message: update for fg interface --- NEW FILE: backgr.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: info.txt --- gamex/interface/melee/map_backgr_y = 21 gamex/interface/melee/map_backgr_x = 15 gamex/interface/planetview/starname_backgr_y = 4 gamex/interface/planetview/starname_backgr_x = 233 gamex/interface/planetview/map_backgr_y = 33 gamex/interface/planetview/map_backgr_x = 15 res = 800 --- NEW FILE: map_backgr.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: zoomin_default.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: zoomout_default.bmp --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/timewarp/gamex/interface/hyperspace In directory sc8-pr-cvs1:/tmp/cvs-serv3543/hyperspace Added Files: backgr.bmp exit_default.bmp info.txt map_backgr.bmp radar_backgr.bmp starname_backgr.bmp zoomin_default.bmp zoomout_default.bmp Log Message: update for fg interface --- NEW FILE: backgr.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: exit_default.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: info.txt --- gamex/interface/hyperspace/radar_backgr_y = 434 gamex/interface/hyperspace/radar_backgr_x = 630 gamex/interface/hyperspace/map_backgr_y = 33 gamex/interface/hyperspace/map_backgr_x = 15 gamex/interface/planetview/starname_backgr_y = 4 gamex/interface/planetview/starname_backgr_x = 233 gamex/interface/planetview/map_backgr_y = 33 gamex/interface/planetview/map_backgr_x = 15 res = 800 --- NEW FILE: map_backgr.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: radar_backgr.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: starname_backgr.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: zoomin_default.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: zoomout_default.bmp --- (This appears to be a binary file; contents omitted.) |
From: <geo...@us...> - 2003-12-14 14:31:09
|
Update of /cvsroot/timewarp/gamex/interface/planetview/edit In directory sc8-pr-cvs1:/tmp/cvs-serv3265/edit Log Message: Directory /cvsroot/timewarp/gamex/interface/planetview/edit added to the repository |
From: <geo...@us...> - 2003-12-14 14:30:56
|
Update of /cvsroot/timewarp/gamex/interface/starmap In directory sc8-pr-cvs1:/tmp/cvs-serv3212/starmap Log Message: Directory /cvsroot/timewarp/gamex/interface/starmap added to the repository |
From: <geo...@us...> - 2003-12-14 14:30:44
|
Update of /cvsroot/timewarp/gamex/interface/melee In directory sc8-pr-cvs1:/tmp/cvs-serv3178/melee Log Message: Directory /cvsroot/timewarp/gamex/interface/melee added to the repository |
From: <geo...@us...> - 2003-12-14 14:30:29
|
Update of /cvsroot/timewarp/gamex/interface/hyperspace In directory sc8-pr-cvs1:/tmp/cvs-serv3133/hyperspace Log Message: Directory /cvsroot/timewarp/gamex/interface/hyperspace added to the repository |
From: <geo...@us...> - 2003-12-14 14:24:53
|
Update of /cvsroot/timewarp/gamex/interface/planetview In directory sc8-pr-cvs1:/tmp/cvs-serv1875/planetview Modified Files: info.txt Log Message: fg interface update Index: info.txt =================================================================== RCS file: /cvsroot/timewarp/gamex/interface/planetview/info.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** info.txt 12 Dec 2003 16:17:22 -0000 1.1 --- info.txt 14 Dec 2003 14:24:50 -0000 1.2 *************** *** 1 **** --- 1,5 ---- + gamex/interface/planetview/starname_backgr_y = 4 + gamex/interface/planetview/starname_backgr_x = 233 + gamex/interface/planetview/map_backgr_y = 33 + gamex/interface/planetview/map_backgr_x = 15 res = 800 |
From: <geo...@us...> - 2003-12-14 14:24:53
|
Update of /cvsroot/timewarp/gamex/interface In directory sc8-pr-cvs1:/tmp/cvs-serv1875 Removed Files: dialogeditor_old01.rar Log Message: fg interface update --- dialogeditor_old01.rar DELETED --- |
From: <geo...@us...> - 2003-12-14 14:21:02
|
Update of /cvsroot/timewarp/source/gamex In directory sc8-pr-cvs1:/tmp/cvs-serv1263/gamex Modified Files: gamehyper.cpp gamehyper.h gamemelee.cpp gamemelee.h gameplanetview.cpp gameplanetview.h gameproject.cpp gameproject.h gamesolarview.cpp gamesolarview.h gamestarmap.cpp gamestarmap.h projectx.cpp Log Message: fg interface update Index: gamehyper.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamehyper.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gamehyper.cpp 18 Nov 2003 17:18:48 -0000 1.1.1.1 --- gamehyper.cpp 14 Dec 2003 14:20:58 -0000 1.2 *************** *** 297,300 **** --- 297,315 ---- + void GameHyperspace::init_menu() + { + // place the menu into video-memory, cause we're using this as basis for + // drawing; the game draws onto part of the menu. + T = new TWindow("gamex/interface/hyperspace", 0, 0, game_screen, true); + + maparea = new AreaTablet(T, "map_"); + + + bradar = new AreaTablet(T, "radar_"); + } + + + + void GameHyperspace::init() { *************** *** 305,314 **** // mapwrap = false; ! // view->window->locate( ! // 0, 0, ! // 0, 0, ! // 0, 1.0, //0.75 ! // 0, 0.8 ! // ); escapetime = 0; --- 320,324 ---- // mapwrap = false; ! escapetime = 0; *************** *** 331,340 **** ! view->frame->set_background ( 82, 0, 0 ); prepare(); ! wininfo.init( Vector2(800,800), 800.0, view->frame ); // but ... do you see the edge of the map, or not ?? // you can make the map a bit bigger to prevent that ... --- 341,350 ---- ! tempframe->set_background ( 82, 0, 0 ); prepare(); ! // wininfo.init( Vector2(800,800), 800.0, tempframe ); // but ... do you see the edge of the map, or not ?? // you can make the map a bit bigger to prevent that ... *************** *** 347,351 **** int bpp; bpp = 32;//bitmap_color_depth(f->surface); ! submap = create_bitmap_ex(bpp, 100, 100); // also, init certain sprites ? --- 357,361 ---- int bpp; bpp = 32;//bitmap_color_depth(f->surface); ! // submap = create_bitmap_ex(bpp, 100, 100); // also, init certain sprites ? *************** *** 500,504 **** } ! destroy_bitmap(submap); GameBare::quit(); --- 510,514 ---- } ! // destroy_bitmap(submap); GameBare::quit(); *************** *** 627,669 **** return; - double t = get_time2(); - - ::space_zoom = wininfo.zoomlevel; - ::space_center = wininfo.mapcenter; - - ! ! ! /* (it's fine - only the tw rendered part is a bit sluggish). ! // show the render time ... ! int dur = 1; ! ! double tt = pow(tic_history->get_average(0, 1000/frame_time), 1/HIST_POWER); ! double rt = pow(render_history->get_average(0, 1000/frame_time), 1/HIST_POWER); ! char *tmp; ! ! if (tt*8 < frame_time) ! tmp = "good"; ! else if (tt*2 < frame_time) ! tmp = "ok"; ! else if (tt < frame_time) ! tmp = "bad"; ! else ! tmp = "BAD!"; ! message.print(dur, 12, "tic time: %.3fms (that's %s)", tt, tmp); ! ! if (rt < 2) ! tmp = "good"; ! else if (rt < 20) ! tmp = "ok"; ! else if (rt < 50) ! tmp = "bad"; ! else ! tmp = "BAD!"; ! message.print(dur, 12, "render time: %.3fms (that's %s)", rt, tmp); ! message.print(dur, 12, "debug: %d", debug_value); ! message.print(dur, 12, "shipdatas loaded: %d", shipdatas_loaded); ! */ GameBare::animate(frame); --- 637,642 ---- return; ! plot_submap(bradar->backgr); GameBare::animate(frame); *************** *** 671,681 **** - t = get_time2() - t;// - paused_time; - render_history->add_element(pow(t, HIST_POWER)); - - - - plot_submap(frame); - } --- 644,647 ---- *************** *** 683,694 **** ! void GameHyperspace::plot_submap(Frame *f) { int i; ! BITMAP *t; ! t = f->surface; ! rectfill(t, 0, t->h*0.8, t->w, t->h, 0); // drawing - check all the stars ... --- 649,660 ---- ! void GameHyperspace::plot_submap(BITMAP *submap) { int i; ! // BITMAP *t; ! // t = f->surface; ! // rectfill(t, 0, t->h*0.8, t->w, t->h, 0); // drawing - check all the stars ... *************** *** 775,780 **** // plot the radar submap onto the (temp) screen surface. ! P = bitmap_size(t) - bitmap_size(submap); ! blit(submap, f->surface, 0, 0, P.x, P.y, submap->w, submap->h); } --- 741,746 ---- // plot the radar submap onto the (temp) screen surface. ! // P = bitmap_size(t) - bitmap_size(submap); ! // blit(submap, surface, 0, 0, P.x, P.y, submap->w, submap->h); } Index: gamehyper.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamehyper.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gamehyper.h 18 Nov 2003 17:18:48 -0000 1.1.1.1 --- gamehyper.h 14 Dec 2003 14:20:58 -0000 1.2 *************** *** 36,44 **** public: MousePtr *ptr; // MapEverything *map; - WindowInfo wininfo; MapSpacebody *starmap; ! int Nlayers; SpaceSprite *spr[16]; //*sprA, *sprB, *sprC; --- 36,45 ---- public: + AreaTablet *bradar; + MousePtr *ptr; // MapEverything *map; MapSpacebody *starmap; ! int Nlayers; SpaceSprite *spr[16]; //*sprA, *sprB, *sprC; *************** *** 79,87 **** *radarplayerspr; ! BITMAP *submap; ! void plot_submap(Frame *f); virtual void calc_kinetic(SpaceLocation *s); virtual void handle_edge(SpaceLocation *s); }; --- 80,90 ---- *radarplayerspr; ! //BITMAP *submap; ! void plot_submap(BITMAP *submap); virtual void calc_kinetic(SpaceLocation *s); virtual void handle_edge(SpaceLocation *s); + + virtual void init_menu(); }; Index: gamemelee.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamemelee.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gamemelee.cpp 21 Nov 2003 08:29:01 -0000 1.2 --- gamemelee.cpp 14 Dec 2003 14:20:58 -0000 1.3 *************** *** 100,103 **** --- 100,116 ---- + + void GameMelee::init_menu() + { + // place the menu into video-memory, cause we're using this as basis for + // drawing; the game draws onto part of the menu. + T = new TWindow("gamex/interface/melee", 0, 0, game_screen, true); + + maparea = new AreaTablet(T, "map_"); + } + + + + void GameMelee::init() { *************** *** 107,117 **** double H = 2000; size = Vector2(H, H); - - view->window->locate( - 0, 0, - 0, 0, - 0, 0.75, - 0, 1.0 - ); prepare(); --- 120,123 ---- *************** *** 126,136 **** } - //space_center_nowrap = 0; - cg.reset(); // resets all global/cached values to 0. ! ! // mapwrap = true; ! ! wininfo.init( Vector2(200,200), 800.0, view->frame ); wininfo.zoomlimit(size.x); wininfo.scaletowidth(size.x); // zoom out to this width. --- 132,137 ---- } ! // wininfo.init( Vector2(200,200), 800.0, tempframe ); wininfo.zoomlimit(size.x); wininfo.scaletowidth(size.x); // zoom out to this width. *************** *** 166,177 **** player = s; - - - cg.space_center = wininfo.mapcenter; - cg.space_zoom = wininfo.zoomlevel; - cg.space_view_size = Vector2(view->window->w, view->window->h); - cg.space_center_nowrap = cg.space_center; - - cg.setglobals(); } --- 167,170 ---- *************** *** 199,220 **** - - void CacheGlobals::setglobals() - { - ::space_center = this->space_center; - ::space_view_size = this->space_view_size; - ::space_zoom = this->space_zoom; - ::space_center_nowrap = this->space_center_nowrap; - } - - void CacheGlobals::reset() - { - this->space_center = 0; - this->space_view_size = 0; - this->space_zoom = 0; - this->space_center_nowrap = 0; - } - - void GameMelee::calculate() { --- 192,195 ---- *************** *** 225,235 **** wininfo.center(player->pos); - cg.space_center = player->pos; - cg.space_center_nowrap += player->vel * frame_time; - cg.space_zoom = wininfo.zoomlevel; - cg.space_view_size = Vector2(view->window->w, view->window->h); - - cg.setglobals(); - GameBare::calculate(); --- 200,203 ---- *************** *** 286,291 **** if (next) return; - - cg.setglobals(); //message.print(1500, 15, "%i %i", int(cg.space_center.x), int(cg.space_center_nowrap.x)); --- 254,257 ---- Index: gamemelee.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamemelee.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gamemelee.h 18 Nov 2003 17:18:49 -0000 1.1.1.1 --- gamemelee.h 14 Dec 2003 14:20:58 -0000 1.2 *************** *** 10,29 **** - - struct CacheGlobals - { - Vector2 space_center, space_view_size, space_center_nowrap; - double space_zoom; - - void setglobals(); - void reset(); - }; - - class GameMelee : public GameBare { public: - WindowInfo wininfo; - CacheGlobals cg; Ship *player; --- 10,16 ---- *************** *** 35,38 **** --- 22,27 ---- virtual void quit(); //virtual bool handle_key(int k); + + virtual void init_menu(); virtual void calculate(); Index: gameplanetview.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gameplanetview.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gameplanetview.cpp 13 Dec 2003 14:32:55 -0000 1.3 --- gameplanetview.cpp 14 Dec 2003 14:20:58 -0000 1.4 *************** *** 27,70 **** #include "../twgui/twgui.h" - Frame2::Frame2(int max_items) - : - Frame(max_items) - { - } - - Frame2::~Frame2() - { - } - - - void Frame2::setsurface(Surface *newsurface) - { - surface = newsurface; - } - - void Frame2::erase() - { - Frame::erase(); - } ! void Frame2::draw() { ! Frame::draw(); ! } ! void Frame2::prepare() ! { ! return; // do nothing, the real "prepare" comes from the setsurface. } - - - - void GamePlanetview::init() { --- 27,46 ---- #include "../twgui/twgui.h" + #include "../twgui/twpopup.h" ! void GamePlanetview::init_menu() { ! // place the menu into video-memory, cause we're using this as basis for ! // drawing; the game draws onto part of the menu. ! T = new TWindow("gamex/interface/planetview", 0, 0, game_screen, true); ! maparea = new AreaTablet(T, "map_"); } void GamePlanetview::init() { *************** *** 72,135 **** GameBare::init(); - view->window->locate( - 0, 0, - 0, 0, - 0.0, 1.0, - 0.0, 1.0 - ); - - // first, allocate the (old) screen from memory ... this should match - // exactly the "global" screen ... - newscreen = create_video_bitmap(screen->w, screen->h); - if (!newscreen) - { - tw_error("Oh my !"); - } - show_video_bitmap(newscreen); - clear_to_color(newscreen, 0); - - // ok ... so we've safely allocated the drawable area I guess ... - // this is needed, cause - // this global one gets deleted for some reason, perhaps a view callback? - // and any "new" video_bitmap is *first* allocated from this global area !! So you - // can't use this global area normally while you're using other video-bitmaps. - - // place the menu into video-memory, cause we're using this as basis for - // drawing; the game draws onto part of the menu. - T = new TWindow("gamex/interface/planetview", 0, 0, newscreen, true); - - AreaTablet *maparea; - maparea = new AreaTablet(T, "map_"); - - FONT *usefont; - usefont = videosystem.get_font(3); - - tmpbmp = maparea->backgr;//create_sub_bitmap(T->backgr, 30, 30, 700, 400); - // use this for game-drawing to part of the menu - tempframe = new Frame2(1024); - tempframe->setsurface(tmpbmp); - // needed to fool the frame routine about the mother window (otherwise it'll create - // new bitmaps with the mother window size??!!) - tempframe->window->w = tempframe->surface->w; - tempframe->window->h = tempframe->surface->h; - tempframe->window->x = 0; - tempframe->window->y = 0; - // tempframe->window->surface = tempframe->surface; - - - double ratio = tmpbmp->h / double(tmpbmp->w); double H = 2000; ! size = Vector2(H, H*ratio); prepare(); ! // mapwrap = false; ! wininfo.init( Vector2(200,200), 800.0, tempframe);//view->frame ); wininfo.zoomlimit(size.x); wininfo.scaletowidth(size.x); // zoom out to this width. // create star objects ?! int istar, iplanet; --- 48,67 ---- GameBare::init(); double H = 2000; ! size = Vector2(H, H*tempframe->ratio); prepare(); ! ! //wininfo.init( Vector2(200,200), 800.0, tempframe);//view->frame ); wininfo.zoomlimit(size.x); wininfo.scaletowidth(size.x); // zoom out to this width. + FONT *usefont; + usefont = videosystem.get_font(3); + // create star objects ?! int istar, iplanet; *************** *** 284,293 **** add(sb); T->tree_doneinit(); ! // performance check ! tic_history = new Histograph(128); ! render_history = new Histograph(128); } --- 216,239 ---- add(sb); + + + // define another (sub)menu + + Tedit = new Popup("gamex/interface/planetview/edit", 400, 200, game_screen); + + bdec = new Button(Tedit, "dec_"); + binc = new Button(Tedit, "inc_"); + bselect = new Button(Tedit, "select_"); + bcancel = new Button(Tedit, "cancel_"); + bplot = new Button(Tedit, "plot_"); + + + T->add(Tedit); T->tree_doneinit(); + Tedit->hide(); ! unscare_mouse(); ! show_mouse(game_screen); } *************** *** 311,320 **** playerinfo.sync(player); - if (tmpbmp) - destroy_bitmap(tmpbmp); - - if (newscreen) - delete (newscreen); - GameBare::quit(); } --- 257,260 ---- *************** *** 337,342 **** double t = get_time2(); - T->tree_calculate(); - GameBare::calculate(); --- 277,280 ---- *************** *** 421,428 **** void GamePlanetview::animate() { - double t = get_time2(); //idle(20); ::space_zoom = wininfo.zoomlevel; ::space_center = wininfo.mapcenter; --- 359,366 ---- void GamePlanetview::animate() { //idle(20); + /* ::space_zoom = wininfo.zoomlevel; ::space_center = wininfo.mapcenter; *************** *** 444,456 **** ! // the menu draws to the game frame ! //T->tree_setscreen(frame->surface); ! ! T->tree_setscreen(newscreen); T->tree_animate(); ! t = get_time2() - t;// - paused_time; ! render_history->add_element(pow(t, 4.0)); } --- 382,394 ---- ! //T->tree_setscreen(game_screen); T->tree_animate(); + */ + GameBare::animate(); ! ! ! //show_mouse(game_screen); } *************** *** 464,469 **** GameBare::animate(frame); - // (and the game frame then draws to video memory?) - show_ticinfo(frame, tic_history, render_history, 4.0); } --- 402,405 ---- Index: gameplanetview.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gameplanetview.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gameplanetview.h 13 Dec 2003 14:32:55 -0000 1.3 --- gameplanetview.h 14 Dec 2003 14:20:58 -0000 1.4 *************** *** 8,11 **** --- 8,12 ---- #include "../twgui/twwindow.h" + #include "../twgui/twbuttontypes.h" *************** *** 21,43 **** - class Frame2 : public Frame { - public: - Frame2(int max_items); - virtual ~Frame2(); - - virtual void erase(); - virtual void draw(); - virtual void prepare(); - void setsurface(Surface *newsurface); - }; - - class GamePlanetview : public GameBare { ! TWindow *T; ! Frame2 *tempframe; // this sets the drawing surface to a subarea of T ... ! BITMAP *tmpbmp, *newscreen; ! WindowInfo wininfo; virtual ~GamePlanetview(); --- 22,33 ---- class GamePlanetview : public GameBare { ! TWindow *Tedit; ! // contents of Tedit ! Button *bdec, *binc, *bselect, *bcancel, *bplot; ! ! //WindowInfo wininfo; virtual ~GamePlanetview(); *************** *** 68,74 **** SpaceSprite *planetspr, *playerspr, *fleetspr, *moonspr[32]; ! // performance check ! Histograph *tic_history; ! Histograph *render_history; }; --- 58,63 ---- SpaceSprite *planetspr, *playerspr, *fleetspr, *moonspr[32]; ! virtual void init_menu(); ! }; Index: gameproject.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gameproject.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gameproject.cpp 13 Dec 2003 14:33:11 -0000 1.2 --- gameproject.cpp 14 Dec 2003 14:20:58 -0000 1.3 *************** *** 14,17 **** --- 14,19 ---- + BITMAP *game_screen; + GameBare::GameBare() *************** *** 93,96 **** --- 95,107 ---- + + void GameBare::init_menu() + { + T = 0; + maparea = 0; + } + + + void GameBare::init() { *************** *** 145,148 **** --- 156,178 ---- hardexit = 0; // is set to 1 if the player exits the game. + + + tempframe = new Frame2(1024); + + init_menu(); + + if (!T || !maparea) + { + tw_error("Game menu is not defined !!"); + } + + // use this for game-drawing to part of the menu + tempframe->setsurface(maparea->backgr); + + wininfo.init( Vector2(800,800), 800.0, tempframe ); + + // performance check + tic_history = new Histograph(128); + render_history = new Histograph(128); } *************** *** 187,191 **** --- 217,232 ---- void GameBare::animate(Frame *frame) { + Physics::animate(frame); + + if (T && !prev) + { + T->tree_animate(); + } + + // (and the game frame then draws to video memory?) + show_ticinfo(frame, tic_history, render_history, 4.0); + + } *************** *** 194,197 **** --- 235,243 ---- void GameBare::animate() { + if (next) + return; + + /* + int predtime = 0; *************** *** 216,219 **** --- 262,286 ---- unscare_mouse(); return; + */ + + double t = get_time2(); + + ::space_zoom = wininfo.zoomlevel; + ::space_center = wininfo.mapcenter; + ::space_view_size = wininfo.framesize; + + tempframe->full_redraw = true; + FULL_REDRAW = true; + tempframe->erase(); + tempframe->prepare(); + + animate(tempframe); + + T->tree_animate(); + + show_mouse(game_screen); + + t = get_time2() - t;// - paused_time; + render_history->add_element(pow(t, 4.0)); } *************** *** 315,318 **** --- 382,399 ---- text_mode(-1); + + // first, allocate the (old) screen from memory ... this should match + // exactly the "global" screen ... + game_screen = create_video_bitmap(screen->w, screen->h); + if (!game_screen) + { + tw_error("Failed to initialize game_screen!"); + } + show_video_bitmap(game_screen); + clear_to_color(game_screen, 0); + // ok ... so we've safely allocated the drawable area; this is needed, cause + // any "new" video_bitmap is *first* allocated from the global screen area + // cause the global screen area isn't allocated as a bitmap yet!! So you + // can't use this global area normally while you're using other video-bitmaps. } *************** *** 320,323 **** --- 401,407 ---- void GameProject::quit() { + if (game_screen) + destroy_bitmap(game_screen); + show_video_bitmap(screen); // result of an empty project: nothing to do, also on exiting it } *************** *** 511,514 **** --- 595,602 ---- Physics::calculate(); + if (T && !next) + T->tree_calculate(); + + // check if the player is close to a star; if so, enter the associated solar system. if (escapetime > 0) *************** *** 569,570 **** --- 657,711 ---- message.flush(); } + + + + + + + + + + + + Frame2::Frame2(int max_items) + : + Frame(max_items) + { + } + + Frame2::~Frame2() + { + } + + + void Frame2::setsurface(Surface *newsurface) + { + surface = newsurface; + + // needed to fool the frame routine about the mother window (otherwise it'll create + // new bitmaps with the mother window size??!!) + window->w = surface->w; + window->h = surface->h; + window->x = 0; + window->y = 0; + + ratio = double(surface->h) / double(surface->w); + } + + void Frame2::erase() + { + Frame::erase(); + } + + void Frame2::draw() + { + Frame::draw(); + } + + void Frame2::prepare() + { + return; // do nothing, the real "prepare" comes from the setsurface. + } + + + Index: gameproject.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gameproject.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gameproject.h 13 Dec 2003 14:33:11 -0000 1.2 --- gameproject.h 14 Dec 2003 14:20:58 -0000 1.3 *************** *** 7,10 **** --- 7,16 ---- #include "../util/history.h" + #include "../twgui/twwindow.h" + #include "../twgui/twbuttontypes.h" + + #include "gamegeneral.h" + + extern BITMAP *game_screen; *************** *** 19,22 **** --- 25,45 ---- // can be tweaked easier. + + class Frame2 : public Frame { + public: + + double ratio; + + Frame2(int max_items); + virtual ~Frame2(); + + virtual void erase(); + virtual void draw(); + virtual void prepare(); + void setsurface(Surface *newsurface); + }; + + + class GameBare : public Physics { *************** *** 32,35 **** --- 55,64 ---- public: + Frame2 *tempframe; + TWindow *T; + AreaTablet *maparea; // for game drawing + + WindowInfo wininfo; + GameBare *prev, *next, *gamerequest; bool state; *************** *** 94,98 **** --- 123,133 ---- + virtual void init_menu(); + + // performance check + Histograph *tic_history; + Histograph *render_history; void GameBare::show_ticinfo(Frame *f, Histograph *tic_history, Histograph *render_history, double hist_power); + }; Index: gamesolarview.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamesolarview.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gamesolarview.cpp 18 Nov 2003 17:18:50 -0000 1.1.1.1 --- gamesolarview.cpp 14 Dec 2003 14:20:58 -0000 1.2 *************** *** 21,24 **** --- 21,36 ---- + void GameSolarview::init_menu() + { + // place the menu into video-memory, cause we're using this as basis for + // drawing; the game draws onto part of the menu. + T = new TWindow("gamex/interface/planetview", 0, 0, game_screen, true); + + maparea = new AreaTablet(T, "map_"); + } + + + + void GameSolarview::init() { *************** *** 27,44 **** double H = 4000; ! size = Vector2(H, H); ! ! view->window->locate( ! 0, 0, ! 0, 0, ! 0, 0.75, ! 0, 1.0 ! ); ! prepare(); // mapwrap = false; ! wininfo.init( Vector2(200,200), 1024.0, view->frame ); wininfo.zoomlimit(size.x); wininfo.scaletowidth(size.x); // zoom out to this width. --- 39,48 ---- double H = 4000; ! size = Vector2(H, H*tempframe->ratio); prepare(); // mapwrap = false; ! //wininfo.init( Vector2(200,200), 1024.0, tempframe ); wininfo.zoomlimit(size.x); wininfo.scaletowidth(size.x); // zoom out to this width. Index: gamesolarview.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamesolarview.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gamesolarview.h 18 Nov 2003 17:18:50 -0000 1.1.1.1 --- gamesolarview.h 14 Dec 2003 14:20:58 -0000 1.2 *************** *** 11,15 **** { ! WindowInfo wininfo; class ThePlaya : public LocalPlayerInfo --- 11,15 ---- { ! //WindowInfo wininfo; class ThePlaya : public LocalPlayerInfo *************** *** 32,35 **** --- 32,37 ---- SpaceSprite *starspr, *playerspr, *planetspr[32]; + + virtual void init_menu(); }; Index: gamestarmap.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamestarmap.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gamestarmap.cpp 18 Nov 2003 17:18:50 -0000 1.1.1.1 --- gamestarmap.cpp 14 Dec 2003 14:20:58 -0000 1.2 *************** *** 49,52 **** --- 49,63 ---- + + void GameStarmap::init_menu() + { + // place the menu into video-memory, cause we're using this as basis for + // drawing; the game draws onto part of the menu. + T = new TWindow("gamex/interface/starmap", 0, 0, game_screen, true); + + maparea = new AreaTablet(T, "map_"); + } + + void GameStarmap::init() { *************** *** 64,68 **** // mapwrap = false; ! wininfo.init( Vector2(400,400), 800.0, view->frame ); wininfo.zoomlimit(size.x); wininfo.center(Vector2(0,0)); --- 75,79 ---- // mapwrap = false; ! //wininfo.init( Vector2(400,400), 800.0, tempframe ); wininfo.zoomlimit(size.x); wininfo.center(Vector2(0,0)); Index: gamestarmap.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gamestarmap.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gamestarmap.h 18 Nov 2003 17:18:50 -0000 1.1.1.1 --- gamestarmap.h 14 Dec 2003 14:20:58 -0000 1.2 *************** *** 36,40 **** MousePtr *ptr; ! WindowInfo wininfo; MapSpacebody *starmap; --- 36,40 ---- MousePtr *ptr; ! //WindowInfo wininfo; MapSpacebody *starmap; *************** *** 51,54 **** --- 51,55 ---- virtual void quit(); //virtual bool handle_key(int k); + virtual void init_menu(); virtual void calculate(); Index: projectx.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/projectx.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** projectx.cpp 12 Dec 2003 15:53:18 -0000 1.3 --- projectx.cpp 14 Dec 2003 14:20:58 -0000 1.4 *************** *** 76,81 **** ! // add( new GameStarmap() ); ! add( new GamePlanetview() ); // add( new GamePlanetscan() ); // add( new GameMelee() ); --- 76,81 ---- ! add( new GameStarmap() ); ! // add( new GamePlanetview() ); // add( new GamePlanetscan() ); // add( new GameMelee() ); |
From: <geo...@us...> - 2003-12-14 14:21:01
|
Update of /cvsroot/timewarp/source/melee In directory sc8-pr-cvs1:/tmp/cvs-serv1263/melee Modified Files: mview.cpp Log Message: fg interface update Index: mview.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mview.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mview.cpp 14 Dec 2003 02:14:29 -0000 1.10 --- mview.cpp 14 Dec 2003 14:20:58 -0000 1.11 *************** *** 386,395 **** messages[num_messages].color = palette_color[c]; num_messages += 1; ! // change GEO: best if there's no "uncontrolled" animation ... ! // animate(NULL);clean();return; ! // if (!game) animate(NULL); ! // else if (game->is_paused()) animate(NULL); ! if (!(game && game->view && game->view->frame && game->view->frame->surface)) ! animate(0); // sometimes you do need uncontrolled animation to reduce overhead? clean(); return; --- 386,393 ---- messages[num_messages].color = palette_color[c]; num_messages += 1; ! ! // if (!(game && game->view && game->view->frame && game->view->frame->surface)) ! // animate(0); // sometimes you do need uncontrolled animation to reduce overhead? ! clean(); return; |
From: <geo...@us...> - 2003-12-14 10:54:24
|
Update of /cvsroot/timewarp/source/games In directory sc8-pr-cvs1:/tmp/cvs-serv3680/games Modified Files: gmissions.cpp Log Message: interface update Index: gmissions.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/gmissions.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** gmissions.cpp 12 Dec 2003 16:49:19 -0000 1.18 --- gmissions.cpp 13 Dec 2003 14:30:32 -0000 1.19 *************** *** 685,694 **** { alertlose->show(); ! alertlose->focus(); } if ( i == 2 ) { alertwin->show(); ! alertwin->focus(); } --- 685,694 ---- { alertlose->show(); ! //alertlose->focus(); } if ( i == 2 ) { alertwin->show(); ! //alertwin->focus(); } *************** *** 880,884 **** { missionselectmenu->show(); ! missionselectmenu->focus(); } --- 880,884 ---- { missionselectmenu->show(); ! //missionselectmenu->focus(); } *************** *** 886,890 **** { popupinfo->show(); ! popupinfo->focus(); } } --- 886,890 ---- { popupinfo->show(); ! //popupinfo->focus(); } } |
From: <geo...@us...> - 2003-12-14 10:54:24
|
Update of /cvsroot/timewarp/source/melee In directory sc8-pr-cvs1:/tmp/cvs-serv3826/melee Modified Files: mship.h mview.cpp Log Message: no message Index: mship.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mship.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mship.h 22 Nov 2003 18:16:31 -0000 1.11 --- mship.h 13 Dec 2003 14:31:35 -0000 1.12 *************** *** 22,35 **** struct keyflag { enum { ! left = 1, ! right = 2, ! thrust = 4, ! back = 8, ! fire = 16, ! special = 32, ! altfire = 64, ! next = 128, ! prev = 256, ! closest = 512 }; }; --- 22,41 ---- struct keyflag { enum { ! left = 0x0001, ! right = 0x0002, ! thrust = 0x0004, ! back = 0x0008, ! fire = 0x0010, ! special = 0x0020, ! altfire = 0x0040, ! next = 0x0080, ! prev = 0x0100, ! closest = 0x0200, ! extra1 = 0x0400, ! extra2 = 0x0800, ! extra3 = 0x01000, ! extra4 = 0x02000, ! extra5 = 0x04000, ! extra6 = 0x08000 }; }; Index: mview.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mview.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mview.cpp 21 Nov 2003 10:20:18 -0000 1.8 --- mview.cpp 13 Dec 2003 14:31:35 -0000 1.9 *************** *** 386,394 **** messages[num_messages].color = palette_color[c]; num_messages += 1; ! // added GEO (uncommented that one line just below) ! // cause such a basic thing shouldn't depend on one Game type. ! animate(NULL);clean();return; ! if (!game) animate(NULL); ! else if (game->is_paused()) animate(NULL); clean(); return; --- 386,393 ---- messages[num_messages].color = palette_color[c]; num_messages += 1; ! // change GEO: best if there's no "uncontrolled" animation ... ! // animate(NULL);clean();return; ! // if (!game) animate(NULL); ! // else if (game->is_paused()) animate(NULL); clean(); return; *************** *** 432,435 **** --- 431,438 ---- void message_type::animate(Frame *frame) {STACKTRACE + + if (num_messages <= 0) + return; + int i, x = 0, y = 0, tmp; BITMAP *bmp; *************** *** 451,456 **** y += text_height(font); } ! if (frame) frame->add_box(0, 0, x, y); ! else videosystem.window.unlock(); ox = x; oy = y; --- 454,459 ---- y += text_height(font); } ! if (frame && !frame->full_redraw) frame->add_box(0, 0, x, y); ! if (!frame) videosystem.window.unlock(); ox = x; oy = y; |
From: <geo...@us...> - 2003-12-14 10:43:21
|
Update of /cvsroot/timewarp/source/gamex In directory sc8-pr-cvs1:/tmp/cvs-serv4213/gamex Modified Files: gameproject.cpp gameproject.h Log Message: no message Index: gameproject.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gameproject.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gameproject.cpp 18 Nov 2003 17:18:50 -0000 1.1.1.1 --- gameproject.cpp 13 Dec 2003 14:33:11 -0000 1.2 *************** *** 14,17 **** --- 14,18 ---- + GameBare::GameBare() { *************** *** 532,533 **** --- 533,570 ---- + + void GameBare::show_ticinfo(Frame *f, Histograph *tic_history, Histograph *render_history, double hist_power) + { + + // show the render time ... + int dur = 1; + + double tt = pow(tic_history->get_average(0, 1000/frame_time), 1/hist_power); + double rt = pow(render_history->get_average(0, 1000/frame_time), 1/hist_power); + char *tmp; + + if (tt*8 < frame_time) + tmp = "good"; + else if (tt*2 < frame_time) + tmp = "ok"; + else if (tt < frame_time) + tmp = "bad"; + else + tmp = "BAD!"; + message.print(dur, 12, "tic time: %.3fms (that's %s)", tt, tmp); + + if (rt < 2) + tmp = "good"; + else if (rt < 20) + tmp = "ok"; + else if (rt < 50) + tmp = "bad"; + else + tmp = "BAD!"; + message.print(dur, 12, "render time: %.3fms (that's %s)", rt, tmp); + message.print(dur, 12, "debug: %d", debug_value); + message.print(dur, 12, "shipdatas loaded: %d", shipdatas_loaded); + + message.animate(f); + message.flush(); + } Index: gameproject.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gameproject.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gameproject.h 18 Nov 2003 17:18:50 -0000 1.1.1.1 --- gameproject.h 13 Dec 2003 14:33:11 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- #include "../melee/mview.h" #include "../frame.h" + #include "../util/history.h" *************** *** 20,24 **** class GameBare : public Physics { ! private: double next_tic_time; --- 21,25 ---- class GameBare : public Physics { ! protected: double next_tic_time; *************** *** 26,33 **** double next_render_time; - virtual void idle(int time = 5); - double escapetime; public: --- 27,33 ---- double next_render_time; double escapetime; + virtual void idle(int time = 5); public: *************** *** 92,95 **** --- 92,98 ---- virtual void calc_kinetic(SpaceLocation *s); virtual void handle_edge(SpaceLocation *s); + + + void GameBare::show_ticinfo(Frame *f, Histograph *tic_history, Histograph *render_history, double hist_power); }; |
From: <geo...@us...> - 2003-12-14 10:38:49
|
Update of /cvsroot/timewarp/source/games In directory sc8-pr-cvs1:/tmp/cvs-serv3772/games Modified Files: vgGenSys.cpp Log Message: bug fix/ net playability Index: vgGenSys.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/vgGenSys.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** vgGenSys.cpp 12 Dec 2003 15:57:24 -0000 1.6 --- vgGenSys.cpp 13 Dec 2003 14:31:09 -0000 1.7 *************** *** 770,774 **** register_init(&VGenSystem::init_objectsVSysWhiteDwarf, "White dwarf"); register_init(&VGenSystem::init_objectsVSysWhiteStar, "White star"); ! register_init(&VGenSystem::init_objectsVSysYellowThreePlanets, "Yellow three planets"); register_init(&VGenSystem::init_objectsVSysVoid, "Void"); register_init(&VGenSystem::init_objectsVSysBrownDwarf, "Brown dwarf"); --- 770,774 ---- register_init(&VGenSystem::init_objectsVSysWhiteDwarf, "White dwarf"); register_init(&VGenSystem::init_objectsVSysWhiteStar, "White star"); ! register_init(&VGenSystem::init_objectsVSysYellowThreePlanets, "Yellow 3 planets"); register_init(&VGenSystem::init_objectsVSysVoid, "Void"); register_init(&VGenSystem::init_objectsVSysBrownDwarf, "Brown dwarf"); *************** *** 794,798 **** popupl = new PopupList(screen, "interfaces/gametest/popuplist", "text/", 0, 0, videosystem.get_font(2), 0); popupl->tbl->set_optionlist(functitle, Ninit, makecol(255,255,128)); - popupl->show(); popupl->xshift = 0; popupl->yshift = 0; --- 794,797 ---- *************** *** 800,803 **** --- 799,803 ---- popupl->tree_doneinit(); + popupl->show(); //WindowManager *winman; *************** *** 806,809 **** --- 806,811 ---- popupl->tree_setscreen(screen); + popupl->center(); + show_mouse(screen); unscare_mouse(); *************** *** 814,817 **** --- 816,821 ---- popupl->tree_calculate(); + + //clear_to_color(screen, 0); popupl->tree_animate(); } |
From: <geo...@us...> - 2003-12-14 10:38:48
|
Update of /cvsroot/timewarp/source/games In directory sc8-pr-cvs1:/tmp/cvs-serv3517/games Modified Files: gflmelee.cpp Log Message: working on net-playability Index: gflmelee.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/gflmelee.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** gflmelee.cpp 12 Dec 2003 15:57:15 -0000 1.13 --- gflmelee.cpp 13 Dec 2003 14:29:56 -0000 1.14 *************** *** 3,15 **** equal to the player's fleet). - To-do: - - pointer ImIndicators - - array sizes - - ship panel - - about identifying the killer (for his stats): --- 3,6 ---- *************** *** 54,57 **** --- 45,51 ---- #include "gflmelee.h" + #include "../melee/mlog.h" + + #define Num_Planet_Pics 7 *************** *** 195,200 **** ShipPanelBmp *player_panel[2]; int toggle_showstats, toggle_playership, toggle_healthbars, toggle_fleetlist, toggle_radar, toggle_panel, toggle_radarpos; ! int lastkey_playership, lastkey_healthbars, lastkey_fleetlist, lastkey_radar, lastkey_panel, lastkey_radarpos, lastkey_radarlayout; StatsManager *statsmanager; --- 189,196 ---- ShipPanelBmp *player_panel[2]; + int localplayer; // which player number is "local" ... is this needed at all ? + int toggle_showstats, toggle_playership, toggle_healthbars, toggle_fleetlist, toggle_radar, toggle_panel, toggle_radarpos; ! int lastkey_playership[2], lastkey_healthbars, lastkey_fleetlist, lastkey_radar, lastkey_panel, lastkey_radarpos, lastkey_radarlayout; StatsManager *statsmanager; *************** *** 505,510 **** */ ! start_menu(allyfleet); log_file("gflmelee.ini"); --- 501,537 ---- */ ! if (log->type == Log::log_net1server || log->type == Log::log_normal) ! { ! start_menu(allyfleet); ! } ! // send (or receive) ... channel_server is locally either the server, or the client. ! log_int(channel_server, allyfleet[0]); ! log_int(channel_server, allyfleet[1]); ! ! ! // initialize server/client controls. ! localplayer = 0; ! ! Control *c; ! ! // create the local player ! c = create_control(channel_server, "Human"); ! playercontrols[0] = c; ! add_focus(c, c->channel); ! ! // create the remote player ! if (log->type == Log::log_net1server || log->type == Log::log_net1client) ! { ! // it's "client" from local perspective ??? ! c = create_control(channel_client, "Human"); ! playercontrols[1] = c; ! add_focus(c, c->channel); ! } else ! playercontrols[1] = 0; + // player 0 = local ? + // player 1 = remote ? + + log_file("gflmelee.ini"); *************** *** 516,523 **** alliance[1] = new_team(); ! playercontrols[0] = 0; ! playercontrols[1] = 0; ! Ship *takeovership = NULL; for ( iplayer = 0; iplayer < 2; ++iplayer ) --- 543,551 ---- alliance[1] = new_team(); ! // if (!playercontrols[0]) ! // playercontrols[1] = 0; ! ! Ship *takeovership = 0; for ( iplayer = 0; iplayer < 2; ++iplayer ) *************** *** 581,584 **** --- 609,613 ---- Ship *s; + /* if ( iplayer == 0 && iship == 0 ) { *************** *** 589,592 **** --- 618,622 ---- add_focus(c, c->channel); } + */ *************** *** 604,607 **** --- 634,638 ---- takeovership = s; + // have to do this, since the ship-init loads different ini files. *************** *** 636,640 **** toggle_showstats = 0; toggle_playership = 0; ! lastkey_playership = 0; lastkey_healthbars = 0; lastkey_fleetlist = 0; --- 667,672 ---- toggle_showstats = 0; toggle_playership = 0; ! lastkey_playership[0] = 0; ! lastkey_playership[1] = 0; lastkey_healthbars = 0; lastkey_fleetlist = 0; *************** *** 910,913 **** --- 942,946 ---- Control *c = playercontrols[0]; + // check death ... *************** *** 998,1001 **** --- 1031,1035 ---- //toggle_showstats = 1; + /* if (!lastkey_playership && key[KEY_V]) toggle_playership = 1; *************** *** 1005,1008 **** --- 1039,1043 ---- toggle_playership = 0; lastkey_playership = key[KEY_V] || key[KEY_C]; + */ // (...) *************** *** 1098,1153 **** ! ! if ( playercontrols[0]->ship && toggle_playership ) { ! // jump to the ship in this list: ! int itarget, lastitarget; ! itarget = 0; ! while ( game->target[itarget] != c->ship && itarget < num_targets-1 ) ! ++itarget; ! lastitarget = itarget; ! // then start searching for the next entry; ! itarget = lastitarget + toggle_playership; ! while ( itarget != lastitarget ) ! { ! if ( itarget > num_targets-1 ) ! itarget -= num_targets; ! if ( itarget < 0 ) ! itarget += num_targets; ! SpaceObject *o = game->target[itarget]; ! // Control *c = playercontrols[0]; // is already done earlier ! if ( o->isShip() && is_in_team(o, alliance[0]) ) { - Ship *shp = (Ship*) o; ! Control *c1, *c2; ! Ship *s1, *s2; ! ! c1 = shp->control; ! s1 = shp; ! ! c2 = playercontrols[0]; ! s2 = c2->ship; ! ! oldcontrol->select_ship(s2, "none"); // re-assign original control ai. ! oldcontrol = s1->control; // remember control ai of the new ship ! playercontrols[0]->select_ship(s1, "none"); // take over the new ship ! ! ! break; } ! ! itarget += toggle_playership; } ! } - // check if the player panel(s) still exist (shouldn't be needed, since --- 1133,1212 ---- ! int iplayer; ! for ( iplayer = 0; iplayer < 2; ++iplayer ) { ! if (!playercontrols[iplayer]) ! continue; ! int k = playercontrols[iplayer]->keys; ! ! // next player ship ! if (!lastkey_playership[iplayer] && (k & keyflag::extra1) ) ! toggle_playership = 1; ! // previous player ship ! else if (!lastkey_playership[iplayer] && (k & keyflag::extra2) ) ! toggle_playership = -1; ! else ! toggle_playership = 0; ! lastkey_playership[iplayer] = k & (keyflag::extra1 | keyflag::extra2); ! ! if ( playercontrols[iplayer]->ship && toggle_playership ) ! { ! c = playercontrols[iplayer]; ! ! // jump to the ship in this list: ! int itarget, lastitarget; ! itarget = 0; ! while ( game->target[itarget] != c->ship && itarget < num_targets-1 ) ! ++itarget; ! lastitarget = itarget; ! ! // then start searching for the next entry; ! itarget = lastitarget + toggle_playership; ! while ( itarget != lastitarget ) { ! if ( itarget > num_targets-1 ) ! itarget -= num_targets; ! if ( itarget < 0 ) ! itarget += num_targets; ! ! SpaceObject *o = game->target[itarget]; ! ! // Control *c = playercontrols[0]; // is already done earlier ! ! if ( o->isShip() && is_in_team(o, alliance[iplayer]) ) ! { ! Ship *shp = (Ship*) o; ! ! Control *c1, *c2; ! Ship *s1, *s2; ! ! c1 = shp->control; ! s1 = shp; ! ! c2 = playercontrols[iplayer]; ! s2 = c2->ship; ! ! oldcontrol->select_ship(s2, "none"); // re-assign original control ai. ! oldcontrol = s1->control; // remember control ai of the new ship ! playercontrols[iplayer]->select_ship(s1, "none"); // take over the new ship ! ! ! break; ! } ! ! itarget += toggle_playership; } ! } ! } // check if the player panel(s) still exist (shouldn't be needed, since |
From: <geo...@us...> - 2003-12-14 09:38:55
|
Update of /cvsroot/timewarp/source In directory sc8-pr-cvs1:/tmp/cvs-serv3948 Modified Files: ais.h Log Message: net-playability, extra keys support Index: ais.h =================================================================== RCS file: /cvsroot/timewarp/source/ais.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ais.h 24 Aug 2003 10:55:33 -0000 1.4 --- ais.h 13 Dec 2003 14:32:23 -0000 1.5 *************** *** 28,31 **** --- 28,32 ---- int prev; int closest; + int extra1, extra2, extra3, extra4, extra5, extra6; public: virtual void load(const char* inifile, const char* inisection); |
From: <geo...@us...> - 2003-12-14 09:38:54
|
Update of /cvsroot/timewarp/source/twgui In directory sc8-pr-cvs1:/tmp/cvs-serv3852/twgui Modified Files: twbuttontypes.h twwindow.cpp twwindow.h utils.cpp utils.h Log Message: small twgui update Index: twbuttontypes.h =================================================================== RCS file: /cvsroot/timewarp/source/twgui/twbuttontypes.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** twbuttontypes.h 12 Dec 2003 15:58:01 -0000 1.1 --- twbuttontypes.h 13 Dec 2003 14:31:56 -0000 1.2 *************** *** 33,41 **** { protected: - BITMAP *backgr, *drawarea; public: ! AreaTablet(TWindow *menu, char *identbranch, int asciicode, bool akeepkey = 0); virtual ~AreaTablet(); --- 33,41 ---- { protected: public: + BITMAP *backgr, *drawarea; ! AreaTablet(TWindow *menu, char *identbranch, int asciicode = 0, bool akeepkey = 0); virtual ~AreaTablet(); Index: twwindow.cpp =================================================================== RCS file: /cvsroot/timewarp/source/twgui/twwindow.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** twwindow.cpp 12 Dec 2003 15:58:01 -0000 1.1 --- twwindow.cpp 13 Dec 2003 14:31:56 -0000 1.2 *************** *** 22,26 **** // default_W is the screen width for which all buttons in the menu are developed, and // this is used to scale them to other screen resolutions. ! TWindow::TWindow(char *identbase, int dx, int dy, BITMAP *outputscreen) { prev = 0; --- 22,26 ---- // default_W is the screen width for which all buttons in the menu are developed, and // this is used to scale them to other screen resolutions. ! TWindow::TWindow(char *identbase, int dx, int dy, BITMAP *outputscreen, bool vidwin) { prev = 0; *************** *** 77,81 **** // this is the background, in scaled form ! backgr = bmp(backgrname); // for "automatic placement" purposes, which can be used if the "default buttons" --- 77,81 ---- // this is the background, in scaled form ! backgr = bmp(backgrname, vidwin); // for "automatic placement" purposes, which can be used if the "default buttons" *************** *** 115,119 **** // used for drawing ! drawarea = create_bitmap_ex(bitmap_color_depth(screen), W, H); //Nareas = 0; --- 115,131 ---- // used for drawing ! ! if (vidwin) ! drawarea = create_video_bitmap(W, H); ! ! if (!(vidwin && drawarea)) ! drawarea = create_bitmap_ex(bitmap_color_depth(screen), W, H); ! ! ! if (is_same_bitmap(backgr, drawarea) || !backgr || !drawarea || !screen) ! { ! tw_error("oh my!"); ! } ! //Nareas = 0; *************** *** 204,208 **** // if this window is "exclusive", other windows cannot be accessed while this one has focus ! if (current->exclusive) { current->calculate(); --- 216,220 ---- // if this window is "exclusive", other windows cannot be accessed while this one has focus ! if (current->exclusive && !current->disabled) { current->calculate(); *************** *** 322,326 **** ! BITMAP* TWindow::bmp(char *bmpname) { BITMAP *bmp, *tmpbmp; --- 334,338 ---- ! BITMAP* TWindow::bmp(char *bmpname, bool vidmem) { BITMAP *bmp, *tmpbmp; *************** *** 342,346 **** tmpbmp = load_bitmap(objname, 0); ! bmp = clone_bitmap(bpp, tmpbmp, scale); if (tmpbmp) destroy_bitmap(tmpbmp); --- 354,358 ---- tmpbmp = load_bitmap(objname, 0); ! bmp = clone_bitmap(bpp, tmpbmp, scale, vidmem); if (tmpbmp) destroy_bitmap(tmpbmp); *************** *** 403,408 **** void TWindow::show() { ! hidden = false; ! enable(); } --- 415,421 ---- void TWindow::show() { ! hidden = false; // allow animation ! enable(); // allow calculation ! focus(); // bring this window to the front of the list, so that it draws on top of the rest } *************** *** 636,643 **** if (!disabled) { // draw the background // also copy transparent color! ! blit(backgr, drawarea, 0, 0, 0, 0, W, H); // draw the buttons EmptyButton *button; --- 649,661 ---- if (!disabled) { + // draw the background // also copy transparent color! ! ! // release for in-game drawing ! //release_bitmap(drawarea); + blit(backgr, drawarea, 0, 0, 0, 0, W, H); + // draw the buttons EmptyButton *button; *************** *** 652,656 **** // update the main screen // ignore transparent color ! masked_blit(drawarea, screen, 0, 0, x, y, W, H); } else //draw_lit_sprite(drawarea, screen, x, y, makecol(100,100,100)); --- 670,680 ---- // update the main screen // ignore transparent color ! if (screen) ! { ! //acquire_bitmap(screen); ! masked_blit(drawarea, screen, 0, 0, x, y, W, H); ! //release_bitmap(screen); ! } ! } else //draw_lit_sprite(drawarea, screen, x, y, makecol(100,100,100)); Index: twwindow.h =================================================================== RCS file: /cvsroot/timewarp/source/twgui/twwindow.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** twwindow.h 12 Dec 2003 15:58:01 -0000 1.1 --- twwindow.h 13 Dec 2003 14:31:56 -0000 1.2 *************** *** 103,107 **** ! TWindow(char *identbase, int dx, int dy, BITMAP *outputscreen); virtual ~TWindow(); --- 103,108 ---- ! // vidwin: places the bitmaps used by the menu in video-memory, which is faster. ! TWindow(char *identbase, int dx, int dy, BITMAP *outputscreen, bool vidwin = false); virtual ~TWindow(); *************** *** 116,120 **** // return a bmp from the data file ! BITMAP* bmp(char *bmpname); // this centers the bitmap on this position. --- 117,121 ---- // return a bmp from the data file ! BITMAP* bmp(char *bmpname, bool vidmem = false); // this centers the bitmap on this position. Index: utils.cpp =================================================================== RCS file: /cvsroot/timewarp/source/twgui/utils.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** utils.cpp 12 Dec 2003 15:55:06 -0000 1.6 --- utils.cpp 13 Dec 2003 14:31:56 -0000 1.7 *************** *** 78,82 **** ! BITMAP *clone_bitmap(int bpp, BITMAP *src, double scale) { BITMAP *dest, *convert; --- 78,82 ---- ! BITMAP *clone_bitmap(int bpp, BITMAP *src, double scale, bool vidmem) { BITMAP *dest, *convert; *************** *** 101,104 **** --- 101,120 ---- destroy_bitmap(convert); + + + + // try to store this in memory, if there's enough room for it + // cause the menu-bitmaps are pretty large, and take lotsa time to draw ... + if (vidmem) + { + convert = create_video_bitmap(W, H); + if (convert) + { + blit(dest, convert, 0, 0, 0, 0, W, H); + // destroy_bitmap(dest); + dest = convert; + } + } + return dest; Index: utils.h =================================================================== RCS file: /cvsroot/timewarp/source/twgui/utils.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** utils.h 12 Dec 2003 15:55:06 -0000 1.6 --- utils.h 13 Dec 2003 14:31:56 -0000 1.7 *************** *** 12,16 **** BITMAP *find_datafile_bmp(DATAFILE *datafile, char *identif); ! BITMAP *clone_bitmap(int bpp, BITMAP *src, double scale); --- 12,16 ---- BITMAP *find_datafile_bmp(DATAFILE *datafile, char *identif); ! BITMAP *clone_bitmap(int bpp, BITMAP *src, double scale, bool vidmem); |
From: <geo...@us...> - 2003-12-14 09:38:54
|
Update of /cvsroot/timewarp/source/gamex In directory sc8-pr-cvs1:/tmp/cvs-serv4115/gamex Modified Files: gameplanetview.cpp gameplanetview.h Log Message: creating an interface Index: gameplanetview.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gameplanetview.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gameplanetview.cpp 12 Dec 2003 15:53:18 -0000 1.2 --- gameplanetview.cpp 13 Dec 2003 14:32:55 -0000 1.3 *************** *** 26,29 **** --- 26,32 ---- #include "stuff/backgr_stars.h" + #include "../twgui/twgui.h" + + Frame2::Frame2(int max_items) *************** *** 76,84 **** ); ! T = new TWindow("gamex/interface/planetview", 0, 0, screen); ! T->tree_doneinit(); ! tmpbmp = create_sub_bitmap(T->backgr, 30, 30, 700, 400); // use this for game-drawing to part of the menu --- 79,111 ---- ); + // first, allocate the (old) screen from memory ... this should match + // exactly the "global" screen ... + newscreen = create_video_bitmap(screen->w, screen->h); + if (!newscreen) + { + tw_error("Oh my !"); + } + show_video_bitmap(newscreen); + clear_to_color(newscreen, 0); ! // ok ... so we've safely allocated the drawable area I guess ... ! // this is needed, cause ! // this global one gets deleted for some reason, perhaps a view callback? ! // and any "new" video_bitmap is *first* allocated from this global area !! So you ! // can't use this global area normally while you're using other video-bitmaps. ! // place the menu into video-memory, cause we're using this as basis for ! // drawing; the game draws onto part of the menu. ! T = new TWindow("gamex/interface/planetview", 0, 0, newscreen, true); ! ! AreaTablet *maparea; ! maparea = new AreaTablet(T, "map_"); ! ! FONT *usefont; ! usefont = videosystem.get_font(3); ! ! ! ! tmpbmp = maparea->backgr;//create_sub_bitmap(T->backgr, 30, 30, 700, 400); // use this for game-drawing to part of the menu *************** *** 102,106 **** wininfo.init( Vector2(200,200), 800.0, tempframe);//view->frame ); wininfo.zoomlimit(size.x); ! wininfo.scaletowidth(2*size.x); // zoom out to this width. --- 129,133 ---- wininfo.init( Vector2(200,200), 800.0, tempframe);//view->frame ); wininfo.zoomlimit(size.x); ! wininfo.scaletowidth(size.x); // zoom out to this width. *************** *** 123,126 **** --- 150,160 ---- + // Button that displays the name of the planet. + TextEditBox *starname; + starname = new TextEditBox(T, "starname_", usefont, planetmap->name, 128); + starname->set_textcolor(makecol(255,255,0)); + // (on exit, you should copy the (edited) name to the star/planet structure. + + // from this, you know the planet position, relative to the sun - we use it // the other way around this time: the sun position, relative to the planet !! *************** *** 228,233 **** add(player); - player->pos = Vector2(0,0); - player->angle = 0.25 * PI; // switch_team(player->ally_flag, team_player); --- 262,265 ---- *************** *** 235,238 **** --- 267,274 ---- + // test + player->pos = Vector2(0,0); + player->angle = 0.25 * PI; + // an enemy fleet *************** *** 245,251 **** StarBackgr *sb; sb = new StarBackgr(); ! sb->init(100, view->frame); add(sb); } --- 281,293 ---- StarBackgr *sb; sb = new StarBackgr(); ! sb->init(100, tempframe); add(sb); + T->tree_doneinit(); + + + // performance check + tic_history = new Histograph(128); + render_history = new Histograph(128); } *************** *** 272,275 **** --- 314,320 ---- destroy_bitmap(tmpbmp); + if (newscreen) + delete (newscreen); + GameBare::quit(); } *************** *** 290,293 **** --- 335,340 ---- return; + double t = get_time2(); + T->tree_calculate(); *************** *** 327,330 **** --- 374,380 ---- } */ + + t = get_time2() - t;// - paused_time; + tic_history->add_element(pow(t, 4.0)); } *************** *** 369,401 **** ! ! ! ! void GamePlanetview::animate(Frame *frame) { ! if (next) ! return; ::space_zoom = wininfo.zoomlevel; ::space_center = wininfo.mapcenter; ! FULL_REDRAW = 1; ! ! // draws to the raw screen (?) ! FULL_REDRAW = true; tempframe->full_redraw = true; tempframe->erase(); tempframe->prepare(); ! // this draws to the menu (frame2) ! GameBare::animate(tempframe); // the menu draws to the game frame ! T->tree_setscreen(frame->surface); T->tree_animate(); - // (and the game frame then draws to video memory?) } --- 419,469 ---- ! void GamePlanetview::animate() { ! double t = get_time2(); + //idle(20); + ::space_zoom = wininfo.zoomlevel; ::space_center = wininfo.mapcenter; + ::space_view_size = wininfo.framesize; ! // override the use of the "default" screen, instead re-route everything to the ! // menu bitmaps. tempframe->full_redraw = true; + FULL_REDRAW = true; tempframe->erase(); tempframe->prepare(); ! ! // message.print(1500, 14, "%p %p %p", T->drawarea, T->backgr, ::screen); ! ! animate(tempframe); + + // the menu draws to the game frame ! //T->tree_setscreen(frame->surface); ! ! T->tree_setscreen(newscreen); T->tree_animate(); + t = get_time2() - t;// - paused_time; + render_history->add_element(pow(t, 4.0)); + } + + + void GamePlanetview::animate(Frame *frame) + { + if (next) + return; + + // this draws to the menu (frame2) + GameBare::animate(frame); + + // (and the game frame then draws to video memory?) + show_ticinfo(frame, tic_history, render_history, 4.0); } *************** *** 436,438 **** --- 504,509 ---- + GamePlanetview::~GamePlanetview() + { + } Index: gameplanetview.h =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gameplanetview.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gameplanetview.h 12 Dec 2003 15:53:18 -0000 1.2 --- gameplanetview.h 13 Dec 2003 14:32:55 -0000 1.3 *************** *** 37,44 **** TWindow *T; Frame2 *tempframe; // this sets the drawing surface to a subarea of T ... ! BITMAP *tmpbmp; WindowInfo wininfo; class ThePlaya : public LocalPlayerInfo { --- 37,46 ---- TWindow *T; Frame2 *tempframe; // this sets the drawing surface to a subarea of T ... ! BITMAP *tmpbmp, *newscreen; WindowInfo wininfo; + virtual ~GamePlanetview(); + class ThePlaya : public LocalPlayerInfo { *************** *** 59,62 **** --- 61,65 ---- virtual void calculate(); + virtual void animate(); virtual void animate(Frame *frame); *************** *** 64,67 **** --- 67,74 ---- SpaceSprite *planetspr, *playerspr, *fleetspr, *moonspr[32]; + + // performance check + Histograph *tic_history; + Histograph *render_history; }; |
From: <geo...@us...> - 2003-12-14 09:38:54
|
Update of /cvsroot/timewarp/source/other In directory sc8-pr-cvs1:/tmp/cvs-serv3772/other Modified Files: vbodies.cpp Log Message: bug fix/ net playability Index: vbodies.cpp =================================================================== RCS file: /cvsroot/timewarp/source/other/vbodies.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** vbodies.cpp 26 Oct 2003 10:43:17 -0000 1.7 --- vbodies.cpp 13 Dec 2003 14:31:09 -0000 1.8 *************** *** 903,917 **** } } ! for(i=0;i<20;i++) { ! j = tw_random()%12; ! if(this->Installation[j]!=NULL) ! if(this->Installation[j]->isDestroyed==false) { ! //message.print(500,5,"j=%d",j); ! this->Installation[j]->handle_damage(source, normal, direct); ! return(1); ! } } //twenty tries, can't find a valid damage recipient, give up now. ! tw_error("about to try to VPlanet::handle damage #3"); return(0); } --- 903,932 ---- } } ! ! // select a random installation to handle the damage. ! int k; ! k = 0; ! for ( i = 0; i < 12; i++) ! { ! if (Installation[i] && !Installation[i]->isDestroyed) ! ++k; ! } ! if (k == 0) ! return 0; ! ! j = random(k); ! ! for ( i = 0; i < 12; i++) ! { ! if (Installation[i] && !Installation[i]->isDestroyed) ! --k; ! if ( k == 0 ) ! { ! Installation[j]->handle_damage(source, normal, direct); ! return(1); ! } } //twenty tries, can't find a valid damage recipient, give up now. ! tw_error("about to try to VPlanet::handle damage #3 -- this should never ever happen!"); return(0); } |
From: <geo...@us...> - 2003-12-14 09:38:53
|
Update of /cvsroot/timewarp/source/ais In directory sc8-pr-cvs1:/tmp/cvs-serv3517/ais Modified Files: c_input.cpp Log Message: working on net-playability Index: c_input.cpp =================================================================== RCS file: /cvsroot/timewarp/source/ais/c_input.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** c_input.cpp 11 Oct 2003 21:00:58 -0000 1.4 --- c_input.cpp 13 Dec 2003 14:29:56 -0000 1.5 *************** *** 116,119 **** --- 116,125 ---- 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); + extra6 = get_config_int(inisection, "Extra6", 0); return; } *************** *** 131,134 **** --- 137,146 ---- set_config_int(inisection, "Prev_Target", prev); set_config_int(inisection, "Closest_Target", closest); + 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); + set_config_int(inisection, "Extra6", extra6); return; } *************** *** 150,153 **** --- 162,172 ---- if (key_pressed(prev)) r |= keyflag::prev; if (key_pressed(closest)) r |= keyflag::closest; + if (key_pressed(extra1)) r |= keyflag::extra1; + 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; + if (key_pressed(extra6)) r |= keyflag::extra6; return r; } *************** *** 156,162 **** #define KEY_DIALOG_MODIFY 0 ! #define KEY_DIALOG_OK 11 ! #define KEY_DIALOG_CANCEL 12 ! #define KEY_DIALOG_CALIBRATE 13 DIALOG keyDialog[] = { --- 175,181 ---- #define KEY_DIALOG_MODIFY 0 ! #define KEY_DIALOG_OK 17 ! #define KEY_DIALOG_CANCEL 18 ! #define KEY_DIALOG_CALIBRATE 19 DIALOG keyDialog[] = { *************** *** 172,176 **** { d_button_proc, 60, 300, 500, 25, 255, 0, 0, D_EXIT, 0, 0, dialog_string[8], NULL, NULL }, { d_button_proc, 60, 330, 500, 25, 255, 0, 0, D_EXIT, 0, 0, dialog_string[9], NULL, NULL }, ! { d_button_proc, 60, 360, 500, 25, 255, 0, 0, D_EXIT, 0, 0, dialog_string[10], NULL, NULL }, { d_button_proc, 180, 20, 180, 25, 255, 0, 0, D_EXIT, 0, 0, (void*)"Accept Changes", NULL, NULL }, { d_button_proc, 180, 50, 180, 25, 255, 0, 0, D_EXIT, 0, 0, (void*)"Cancel", NULL, NULL }, --- 191,202 ---- { d_button_proc, 60, 300, 500, 25, 255, 0, 0, D_EXIT, 0, 0, dialog_string[8], NULL, NULL }, { d_button_proc, 60, 330, 500, 25, 255, 0, 0, D_EXIT, 0, 0, dialog_string[9], NULL, NULL }, ! { d_button_proc, 60, 360, 500, 15, 255, 0, 0, D_EXIT, 0, 0, dialog_string[10], NULL, NULL }, ! { d_button_proc, 60, 375, 500, 15, 255, 0, 0, D_EXIT, 0, 0, dialog_string[11], NULL, NULL }, ! { d_button_proc, 60, 390, 500, 15, 255, 0, 0, D_EXIT, 0, 0, dialog_string[12], NULL, NULL }, ! { d_button_proc, 60, 405, 500, 15, 255, 0, 0, D_EXIT, 0, 0, dialog_string[13], NULL, NULL }, ! { d_button_proc, 60, 420, 500, 15, 255, 0, 0, D_EXIT, 0, 0, dialog_string[14], NULL, NULL }, ! { d_button_proc, 60, 435, 500, 15, 255, 0, 0, D_EXIT, 0, 0, dialog_string[15], NULL, NULL }, ! { d_button_proc, 60, 450, 500, 15, 255, 0, 0, D_EXIT, 0, 0, dialog_string[16], NULL, NULL }, ! { d_button_proc, 180, 20, 180, 25, 255, 0, 0, D_EXIT, 0, 0, (void*)"Accept Changes", NULL, NULL }, { d_button_proc, 180, 50, 180, 25, 255, 0, 0, D_EXIT, 0, 0, (void*)"Cancel", NULL, NULL }, *************** *** 186,192 **** --- 212,221 ---- char *s; int index = 0; + s = dialog_string[index]; index += 1; + s += sprintf(s, "Set Your Keys\nController %s", getDescription()); s = dialog_string[index]; index += 1; + s += sprintf ( s, "Left: "); key_to_description(left, s); *************** *** 218,221 **** --- 247,270 ---- s += sprintf ( s, "Closest Target: "); key_to_description ( closest, s ); + + s = dialog_string[index]; index += 1; + s += sprintf ( s, "Extra1: "); + key_to_description ( extra1, s ); + s = dialog_string[index]; index += 1; + s += sprintf ( s, "Extra2: "); + 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: "); + key_to_description ( extra4, s ); + s = dialog_string[index]; index += 1; + s += sprintf ( s, "Extra5: "); + key_to_description ( extra5, s ); + s = dialog_string[index]; index += 1; + s += sprintf ( s, "Extra6: "); + key_to_description ( extra6, s ); + s = dialog_string[index]; index += 1; *************** *** 250,253 **** --- 299,308 ---- 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: extra6 = t; break; case KEY_DIALOG_OK: save("scp.ini", getDescription()); return; case KEY_DIALOG_CANCEL: load("scp.ini", getDescription()); return; |
From: <geo...@us...> - 2003-12-14 08:47:53
|
Update of /cvsroot/timewarp/source/melee In directory sc8-pr-cvs1:/tmp/cvs-serv17948/melee Modified Files: mview.cpp Log Message: no message Index: mview.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mview.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mview.cpp 13 Dec 2003 14:31:35 -0000 1.9 --- mview.cpp 14 Dec 2003 02:14:29 -0000 1.10 *************** *** 390,393 **** --- 390,395 ---- // if (!game) animate(NULL); // else if (game->is_paused()) animate(NULL); + if (!(game && game->view && game->view->frame && game->view->frame->surface)) + animate(0); // sometimes you do need uncontrolled animation to reduce overhead? clean(); return; |