Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 120490 Details for
Bug 180081
games-action/abuse_sdl-0.7.0-r2: PATCH for 1) shots that go left insist on 45 degree angles and 2) mouse won't go to other parts of screen in edit mode
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
abuse.hires.patch
abuse.hires.patch (text/plain), 12.93 KB, created by
Triffid Hunter
on 2007-05-28 02:46:13 UTC
(
hide
)
Description:
abuse.hires.patch
Filename:
MIME Type:
Creator:
Triffid Hunter
Created:
2007-05-28 02:46:13 UTC
Size:
12.93 KB
patch
obsolete
>diff -ur abuse_sdl-0.7.0-old/src/dev.cpp abuse_sdl-0.7.0/src/dev.cpp >--- abuse_sdl-0.7.0-old/src/dev.cpp 2002-12-15 15:00:32.000000000 +1000 >+++ abuse_sdl-0.7.0/src/dev.cpp 2007-05-28 11:35:34.000000000 +1000 >@@ -885,11 +885,11 @@ > if (get_option("-no_autolight")) > disable_autolight=0; > >- if ((get_option("-size") || get_option("-vmode")) && !start_edit) >- { >- printf("%s\n",symbol_str("no_hirez")); >- exit(0); >- } >+// if ((get_option("-size") || get_option("-vmode")) && !start_edit) >+// { >+// printf("%s\n",symbol_str("no_hirez")); >+// exit(0); >+// } > > fg_reversed=prop->getd("fg_reversed",0); > mouse_scrolling=prop->getd("mouse_scrolling",0); >diff -ur abuse_sdl-0.7.0-old/src/endgame.cpp abuse_sdl-0.7.0/src/endgame.cpp >--- abuse_sdl-0.7.0-old/src/endgame.cpp 2002-12-15 15:00:32.000000000 +1000 >+++ abuse_sdl-0.7.0/src/endgame.cpp 2007-05-28 07:32:37.000000000 +1000 >@@ -178,8 +178,8 @@ > > for (si=sinfo,i=0;i<800;i++) > { >- *(si++)=jrand()%320; >- *(si++)=jrand()%200; >+ *(si++)=jrand()%xres; >+ *(si++)=jrand()%yres; > *(si++)=c[jrand()%4]; > screen->putpixel(si[-3],si[-2],si[-1]); > } >@@ -195,7 +195,7 @@ > paddr[i]=(pal->red(i)<<16)|(pal->green(i)<<8)|(pal->blue(i)); > } > >- int dx=(xres+1)/2-320/2,dy=(yres+1)/2-200/2; >+ int dx=(xres+1)/2-xres/2,dy=(yres+1)/2-yres/2; > > > scan_map(screen,ex,ey,cash.img(planet),cash.img(planet2),0,paddr,p,cash.img(mask)->height(),eoff,coff); >@@ -248,8 +248,8 @@ > cash.sfx(zip_snd)->play(127); > } > >- eoff+=2; if (eoff>=320) eoff-=320; >- coff+=1; if (coff>=320) coff-=320; >+ eoff+=2; if (eoff>=xres) eoff-=xres; >+ coff+=1; if (coff>=xres) coff-=xres; > eh->flush_screen(); > i++; > } >@@ -276,8 +276,8 @@ > scan_map(screen,ex,ey,cash.img(planet), > cash.img(planet2),i*256/200,paddr,p,cash.img(mask)->height(),eoff,coff); > >- eoff+=2; if (eoff>=320) eoff-=320; >- coff+=1; if (coff>=320) coff-=320; >+ eoff+=2; if (eoff>=xres) eoff-=xres; >+ coff+=1; if (coff>=xres) coff-=xres; > > i++; > if (i<150 || (i<170 && ((i-149)%2)==0) || (i<180 && ((i-149)%4)==0) || (i<190 && ((i-149)%8)==0)) >@@ -341,8 +341,8 @@ > cash.img(planet2), > 256,paddr, > p,cash.img(mask)->height(),eoff,coff); >- eoff+=2; if (eoff>=320) eoff-=320; >- coff+=1; if (coff>=320) coff-=320; >+ eoff+=2; if (eoff>=xres) eoff-=xres; >+ coff+=1; if (coff>=xres) coff-=xres; > eh->flush_screen(); > i++; > } >@@ -363,7 +363,7 @@ > time_marker start; > > ev.type=EV_SPURIOUS; >- for (i=0;i<320 && ev.type!=EV_KEY;i++) >+ for (i=0;i<xres && ev.type!=EV_KEY;i++) > { > screen->clear(); > int j; >@@ -374,7 +374,7 @@ > cash.img(planet2), > 256,paddr, > p,cash.img(mask)->height(),eoff,coff); >- text_draw(205-i,dx+10,dy,dx+319-10,dy+199,lstring_value(end_plot),eh->font(),cmap,eh->bright_color()); >+ text_draw(205-i,dx+10,dy,dx+xres-1-10,dy+yres-1,lstring_value(end_plot),eh->font(),cmap,eh->bright_color()); > eh->flush_screen(); > time_marker now; while (now.diff_time(&start)<0.18) now.get_time(); start.get_time(); > >@@ -434,13 +434,13 @@ > > event ev; ev.type=EV_SPURIOUS; > time_marker start; >- for (i=0;i<320 && ev.type!=EV_KEY;i++) >+ for (i=0;i<xres && ev.type!=EV_KEY;i++) > { > im->put_image(screen,dx,dy); > console_font->put_string(screen,xres/2+35,yres/2+100-console_font->height()-2, > lstring_value(to_be)); > >- text_draw(205-i,dx+10,dy,dx+319-10,dy+199,lstring_value(mid_plot),eh->font(),cmap,eh->bright_color()); >+ text_draw(205-i,dx+10,dy,dx+xres-1-10,dy+yres-1,lstring_value(mid_plot),eh->font(),cmap,eh->bright_color()); > eh->flush_screen(); > time_marker now; while (now.diff_time(&start)<0.18) now.get_time(); start.get_time(); > while (eh->event_waiting() && ev.type!=EV_KEY) eh->get_event(ev); >@@ -471,7 +471,7 @@ > > image *im=cash.img(cash.reg("art/endgame.spe","end.pcx",SPEC_IMAGE,1)); > >- int dx=(xres+1)/2-320/2,dy=(yres+1)/2-200/2; >+ int dx=(xres+1)/2-xres/2,dy=(yres+1)/2-yres/2; > > void *end_plot=symbol_value(make_find_symbol("plot_end")); > p_ref r2(end_plot); >@@ -486,11 +486,11 @@ > > event ev; ev.type=EV_SPURIOUS; > time_marker start; >- for (i=0;i<320 && ev.type!=EV_KEY;i++) >+ for (i=0;i<xres && ev.type!=EV_KEY;i++) > { > im->put_image(screen,dx,dy); > >- text_draw(205-i,dx+10,dy,dx+319-10,dy+199,lstring_value(end_plot),eh->font(),cmap,eh->bright_color()); >+ text_draw(205-i,dx+10,dy,dx+xres-1-10,dy+yres-1,lstring_value(end_plot),eh->font(),cmap,eh->bright_color()); > eh->flush_screen(); > time_marker now; while (now.diff_time(&start)<0.18) now.get_time(); start.get_time(); > while (eh->event_waiting() && ev.type!=EV_KEY) eh->get_event(ev); >diff -ur abuse_sdl-0.7.0-old/src/game.cpp abuse_sdl-0.7.0/src/game.cpp >--- abuse_sdl-0.7.0-old/src/game.cpp 2002-12-15 15:00:32.000000000 +1000 >+++ abuse_sdl-0.7.0/src/game.cpp 2007-05-28 07:09:31.000000000 +1000 >@@ -1316,11 +1316,11 @@ > ev.type=EV_SPURIOUS; > time_marker start; > >- for( i = 0; i < 320 && ( ev.type != EV_KEY && ev.type != EV_MOUSE_BUTTON ); i++ ) >+ for( i = 0; i < xres && ( ev.type != EV_KEY && ev.type != EV_MOUSE_BUTTON ); i++ ) > { > gray->put_image( screen, dx, dy ); > smoke[i % 5]->put_image( screen, dx + 24, dy + 5 ); >- text_draw( 205 - i, dx + 15, dy, dx + 320 - 15, dy + 199, str, eh->font(), cmap, eh->bright_color() ); >+ text_draw( 205 - i, dx + 15, dy, dx + xres - 15, dy + yres - 1, str, eh->font(), cmap, eh->bright_color() ); > eh->flush_screen(); > time_marker now; > >diff -ur abuse_sdl-0.7.0-old/src/innet.cpp abuse_sdl-0.7.0/src/innet.cpp >--- abuse_sdl-0.7.0-old/src/innet.cpp 2002-12-15 15:00:32.000000000 +1000 >+++ abuse_sdl-0.7.0/src/innet.cpp 2007-05-28 07:32:51.000000000 +1000 >@@ -520,7 +520,7 @@ > st=i; > > game_object *o=create(current_start_type,0,0); >- game_object *start=current_level->get_random_start(320,NULL); >+ game_object *start=current_level->get_random_start(xres,NULL); > if (start) { o->x=start->x; o->y=start->y; } > else { o->x=100; o->y=100; } > >@@ -537,8 +537,8 @@ > > v->cx1=5; > v->cy1=5; >- v->cx2=319-5; >- v->cy2=199-5; >+ v->cx2=xres-1-5; >+ v->cy2=yres-1-5; > join_list=join_list->next; > } > base->join_list=NULL; >diff -ur abuse_sdl-0.7.0-old/src/menu.cpp abuse_sdl-0.7.0/src/menu.cpp >--- abuse_sdl-0.7.0-old/src/menu.cpp 2002-12-15 15:00:32.000000000 +1000 >+++ abuse_sdl-0.7.0/src/menu.cpp 2007-05-28 07:33:06.000000000 +1000 >@@ -704,7 +704,7 @@ > inm->allow_no_selections(); > inm->clear_current(); > >- screen->add_dirty(0,0,319,199); >+ screen->add_dirty(0,0,xres-1,yres-1); > > event ev; > >diff -ur abuse_sdl-0.7.0-old/src/newlight.cpp abuse_sdl-0.7.0/src/newlight.cpp >--- abuse_sdl-0.7.0-old/src/newlight.cpp 2002-12-15 15:00:32.000000000 +1000 >+++ abuse_sdl-0.7.0/src/newlight.cpp 2007-05-28 07:09:53.000000000 +1000 >@@ -588,7 +588,7 @@ > { > unsigned char *sl=screen->scan_line(lp->y1)+lp->x1,*dest; > #ifdef __WATCOMC__ >- if (get_vmode()==19) dest=(uchar *)0xa0000+lp->y1*320+lp->x1; >+ if (get_vmode()==19) dest=(uchar *)0xa0000+lp->y1*xres+lp->x1; > else dest=sl; > #else > dest=sl; >@@ -611,7 +611,7 @@ > > uchar *yaddr=screen->scan_line(lp->y1)+lp->x1,*dyaddr; > #ifdef __WATCOMC__ >- if (get_vmode()==19) dyaddr=((uchar *)0xa0000)+lp->y1*320+lp->x1; >+ if (get_vmode()==19) dyaddr=((uchar *)0xa0000)+lp->y1*xres+lp->x1; > else dyaddr=yaddr; > #else > dyaddr=yaddr; >diff -ur abuse_sdl-0.7.0-old/src/old_earth_menu.cpp abuse_sdl-0.7.0/src/old_earth_menu.cpp >--- abuse_sdl-0.7.0-old/src/old_earth_menu.cpp 2002-12-15 15:00:32.000000000 +1000 >+++ abuse_sdl-0.7.0/src/old_earth_menu.cpp 2007-05-28 07:33:20.000000000 +1000 >@@ -577,7 +577,7 @@ > // pmenu *main_pm=new pmenu(0,0,game_sub,screen,eh); > time_marker old_time; > >- screen->add_dirty(0,0,319,199); >+ screen->add_dirty(0,0,xres-1,yres-1); > > > // create sphere map >@@ -608,8 +608,8 @@ > eoff+=2; coff+=1; > } > >- if (eoff>=320) eoff-=320; >- if (coff>=320) coff-=320; >+ if (eoff>=xres) eoff-=xres; >+ if (coff>=xres) coff-=xres; > eh->flush_screen(); > } > >diff -ur abuse_sdl-0.7.0-old/src/old_server.cpp abuse_sdl-0.7.0/src/old_server.cpp >--- abuse_sdl-0.7.0-old/src/old_server.cpp 2002-12-15 15:00:32.000000000 +1000 >+++ abuse_sdl-0.7.0/src/old_server.cpp 2007-05-28 07:27:18.000000000 +1000 >@@ -481,7 +481,7 @@ > st=i; > > game_object *o=create(current_start_type,0,0); >- game_object *start=current_level->get_random_start(320,NULL); >+ game_object *start=current_level->get_random_start(xres,NULL); > if (start) { o->x=start->x; o->y=start->y; } > else { o->x=100; o->y=100; } > >@@ -575,7 +575,7 @@ > if (current_level) > delete current_level; > >- long vs[4]={lltl(320/2-155),lltl(200/2-95),lltl(320/2+155),lltl(200/2+70)}; >+ long vs[4]={lltl(xres/2-155),lltl(yres/2-95),lltl(xres/2+155),lltl(yres/2+70)}; > pk.write((uchar *)vs,4*4); > if (!send_pkt(os,pk)) { printf("Unable to write to server\n"); exit(0); } > >diff -ur abuse_sdl-0.7.0-old/src/remap.cpp abuse_sdl-0.7.0/src/remap.cpp >--- abuse_sdl-0.7.0-old/src/remap.cpp 2002-12-15 15:00:32.000000000 +1000 >+++ abuse_sdl-0.7.0/src/remap.cpp 2007-05-28 07:11:38.000000000 +1000 >@@ -18,7 +18,7 @@ > > > >- unsigned char *s = (unsigned char *) malloc(320*200); >+ unsigned char *s = (unsigned char *) malloc(xres*yres); > > unsigned char *r, *seq; > >@@ -40,15 +40,15 @@ > > r[j*256+i] = i+j; > >- for (i=0 ; i<320*200 ; i++) s[i] = i&0xff; >+ for (i=0 ; i<xres*yres ; i++) s[i] = i&0xff; > > for (i=0 ; i<40 ; i++) seq[i] = i; > > > >- for (j=0 ; j<200 ; j++) >+ for (j=0 ; j<yres ; j++) > >- remap_line_asm(s+j*320, r, seq, 40); >+ remap_line_asm(s+j*xres, r, seq, 40); > > > >diff -ur abuse_sdl-0.7.0-old/src/sdlport/event.cpp abuse_sdl-0.7.0/src/sdlport/event.cpp >--- abuse_sdl-0.7.0-old/src/sdlport/event.cpp 2002-12-15 15:00:32.000000000 +1000 >+++ abuse_sdl-0.7.0/src/sdlport/event.cpp 2007-05-28 07:41:02.000000000 +1000 >@@ -372,13 +372,13 @@ > buttons = SDL_GetMouseState( &x, &y ); > x = (x << 16) / mouse_xscale; > y = (y << 16) / mouse_yscale; >- if( x > 319 ) >+ if( x > xres-1 ) > { >- x = 319; >+ x = xres-1; > } >- if( y > 199 ) >+ if( y > yres-1 ) > { >- y = 199; >+ y = yres-1; > } > ev.mouse_move.x = x; > ev.mouse_move.y = y; >diff -ur abuse_sdl-0.7.0-old/src/sdlport/mouse.cpp abuse_sdl-0.7.0/src/sdlport/mouse.cpp >--- abuse_sdl-0.7.0-old/src/sdlport/mouse.cpp 2002-12-15 15:00:32.000000000 +1000 >+++ abuse_sdl-0.7.0/src/sdlport/mouse.cpp 2007-05-28 07:38:18.000000000 +1000 >@@ -82,13 +82,13 @@ > void JCMouse::set_position( int new_mx, int new_my ) > { > // Make sure the values we are given are sensible. >- if( new_mx > 319 ) >+ if( new_mx > xres-1 ) > { >- new_mx = 319; >+ new_mx = xres-1; > } >- if( new_my > 199 ) >+ if( new_my > yres-1 ) > { >- new_my = 199; >+ new_my = yres-1; > } > > // Set the new position >diff -ur abuse_sdl-0.7.0-old/src/server2.cpp abuse_sdl-0.7.0/src/server2.cpp >--- abuse_sdl-0.7.0-old/src/server2.cpp 2002-12-15 15:00:32.000000000 +1000 >+++ abuse_sdl-0.7.0/src/server2.cpp 2007-05-28 07:27:32.000000000 +1000 >@@ -180,7 +180,7 @@ > st=i; > > game_object *o=create(current_start_type,0,0); >- game_object *start=current_level->get_random_start(320,NULL); >+ game_object *start=current_level->get_random_start(xres,NULL); > if (start) { o->x=start->x; o->y=start->y; } > else { o->x=100; o->y=100; } > >diff -ur abuse_sdl-0.7.0-old/src/unixnfc.cpp abuse_sdl-0.7.0/src/unixnfc.cpp >--- abuse_sdl-0.7.0-old/src/unixnfc.cpp 2002-12-15 15:00:32.000000000 +1000 >+++ abuse_sdl-0.7.0/src/unixnfc.cpp 2007-05-28 07:33:32.000000000 +1000 >@@ -451,7 +451,7 @@ > st=i; > > game_object *o=create(current_start_type,0,0); >- game_object *start=current_level->get_random_start(320,NULL); >+ game_object *start=current_level->get_random_start(xres,NULL); > if (start) { o->x=start->x; o->y=start->y; } > else { o->x=100; o->y=100; } > >@@ -468,8 +468,8 @@ > > v->cx1=5; > v->cy1=5; >- v->cx2=319-5; >- v->cy2=199-5; >+ v->cx2=xres-1-5; >+ v->cy2=yres-1-5; > join_list=shm2real(join_struct,join_list->next); > } > base->join_list=NULL; >diff -ur abuse_sdl-0.7.0-old/src/view.cpp abuse_sdl-0.7.0/src/view.cpp >--- abuse_sdl-0.7.0-old/src/view.cpp 2002-12-15 15:00:32.000000000 +1000 >+++ abuse_sdl-0.7.0/src/view.cpp 2007-05-28 07:27:59.000000000 +1000 >@@ -798,7 +798,7 @@ > f->next=new view(o,NULL,f->player_number+1); > v=f->next; > } >- v->cx1=320/2-155; v->cy1=200/2-95; v->cx2=320/2+155; v->cy2=200/2+(total_weapons ? 60 : 95); >+ v->cx1=xres/2-155; v->cy1=yres/2-95; v->cx2=xres/2+155; v->cy2=yres/2+(total_weapons ? 60 : 95); > v->focus->set_controller(v); > total--; > rdw=1; >@@ -848,7 +848,7 @@ > if (focus) > { > >- game_object *start=current_level ? current_level->get_random_start(320,focus->controller()) : 0; >+ game_object *start=current_level ? current_level->get_random_start(xres,focus->controller()) : 0; > focus->defaults(); > if (start) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 180081
: 120490 |
120492