Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 180081 | Differences between
and this patch

Collapse All | Expand All

(-)abuse_sdl-0.7.0-old/src/dev.cpp (-5 / +5 lines)
Lines 885-895 Link Here
885
  if (get_option("-no_autolight"))
885
  if (get_option("-no_autolight"))
886
    disable_autolight=0;
886
    disable_autolight=0;
887
887
888
  if ((get_option("-size") || get_option("-vmode")) && !start_edit)
888
//  if ((get_option("-size") || get_option("-vmode")) && !start_edit)
889
  {
889
//  {
890
    printf("%s\n",symbol_str("no_hirez"));
890
//    printf("%s\n",symbol_str("no_hirez"));
891
    exit(0);
891
//    exit(0);
892
  }
892
//  }
893
893
894
  fg_reversed=prop->getd("fg_reversed",0);
894
  fg_reversed=prop->getd("fg_reversed",0);
895
  mouse_scrolling=prop->getd("mouse_scrolling",0);
895
  mouse_scrolling=prop->getd("mouse_scrolling",0);
(-)abuse_sdl-0.7.0-old/src/endgame.cpp (-16 / +16 lines)
Lines 178-185 Link Here
178
178
179
  for (si=sinfo,i=0;i<800;i++)
179
  for (si=sinfo,i=0;i<800;i++)
180
  {
180
  {
181
    *(si++)=jrand()%320; 
181
    *(si++)=jrand()%xres; 
182
    *(si++)=jrand()%200;     
182
    *(si++)=jrand()%yres;     
183
    *(si++)=c[jrand()%4];     
183
    *(si++)=c[jrand()%4];     
184
    screen->putpixel(si[-3],si[-2],si[-1]);
184
    screen->putpixel(si[-3],si[-2],si[-1]);
185
  }
185
  }
Lines 195-201 Link Here
195
      paddr[i]=(pal->red(i)<<16)|(pal->green(i)<<8)|(pal->blue(i));
195
      paddr[i]=(pal->red(i)<<16)|(pal->green(i)<<8)|(pal->blue(i));
196
  }
196
  }
197
197
198
  int dx=(xres+1)/2-320/2,dy=(yres+1)/2-200/2;
198
  int dx=(xres+1)/2-xres/2,dy=(yres+1)/2-yres/2;
199
199
200
200
201
  scan_map(screen,ex,ey,cash.img(planet),cash.img(planet2),0,paddr,p,cash.img(mask)->height(),eoff,coff);      
201
  scan_map(screen,ex,ey,cash.img(planet),cash.img(planet2),0,paddr,p,cash.img(mask)->height(),eoff,coff);      
Lines 248-255 Link Here
248
            cash.sfx(zip_snd)->play(127);
248
            cash.sfx(zip_snd)->play(127);
249
      }
249
      }
250
        
250
        
251
      eoff+=2; if (eoff>=320) eoff-=320;
251
      eoff+=2; if (eoff>=xres) eoff-=xres;
252
      coff+=1; if (coff>=320) coff-=320;      
252
      coff+=1; if (coff>=xres) coff-=xres;
253
      eh->flush_screen();
253
      eh->flush_screen();
254
      i++;
254
      i++;
255
    }
255
    }
Lines 276-283 Link Here
276
      scan_map(screen,ex,ey,cash.img(planet),
276
      scan_map(screen,ex,ey,cash.img(planet),
277
	       cash.img(planet2),i*256/200,paddr,p,cash.img(mask)->height(),eoff,coff);      
277
	       cash.img(planet2),i*256/200,paddr,p,cash.img(mask)->height(),eoff,coff);      
278
278
279
      eoff+=2; if (eoff>=320) eoff-=320;
279
      eoff+=2; if (eoff>=xres) eoff-=xres;
280
      coff+=1; if (coff>=320) coff-=320;      
280
      coff+=1; if (coff>=xres) coff-=xres;      
281
281
282
      i++;
282
      i++;
283
      if (i<150 || (i<170 && ((i-149)%2)==0) || (i<180 && ((i-149)%4)==0) || (i<190 && ((i-149)%8)==0))
283
      if (i<150 || (i<170 && ((i-149)%2)==0) || (i<180 && ((i-149)%4)==0) || (i<190 && ((i-149)%8)==0))
Lines 341-348 Link Here
341
	       cash.img(planet2),
341
	       cash.img(planet2),
342
	       256,paddr,
342
	       256,paddr,
343
	       p,cash.img(mask)->height(),eoff,coff);      
343
	       p,cash.img(mask)->height(),eoff,coff);      
344
      eoff+=2; if (eoff>=320) eoff-=320;
344
      eoff+=2; if (eoff>=xres) eoff-=xres;
345
      coff+=1; if (coff>=320) coff-=320;      
345
      coff+=1; if (coff>=xres) coff-=xres;      
346
      eh->flush_screen();
346
      eh->flush_screen();
347
      i++;
347
      i++;
348
    }
348
    }
Lines 363-369 Link Here
363
  time_marker start;
363
  time_marker start;
364
364
365
  ev.type=EV_SPURIOUS;
365
  ev.type=EV_SPURIOUS;
366
  for (i=0;i<320 && ev.type!=EV_KEY;i++)
366
  for (i=0;i<xres && ev.type!=EV_KEY;i++)
367
  {
367
  {
368
    screen->clear();
368
    screen->clear();
369
    int j;
369
    int j;
Lines 374-380 Link Here
374
	     cash.img(planet2),
374
	     cash.img(planet2),
375
	     256,paddr,
375
	     256,paddr,
376
	     p,cash.img(mask)->height(),eoff,coff);      
376
	     p,cash.img(mask)->height(),eoff,coff);      
377
    text_draw(205-i,dx+10,dy,dx+319-10,dy+199,lstring_value(end_plot),eh->font(),cmap,eh->bright_color());
377
    text_draw(205-i,dx+10,dy,dx+xres-1-10,dy+yres-1,lstring_value(end_plot),eh->font(),cmap,eh->bright_color());
378
    eh->flush_screen();
378
    eh->flush_screen();
379
    time_marker now; while (now.diff_time(&start)<0.18) now.get_time(); start.get_time();
379
    time_marker now; while (now.diff_time(&start)<0.18) now.get_time(); start.get_time();
380
380
Lines 434-446 Link Here
434
434
435
  event ev; ev.type=EV_SPURIOUS;
435
  event ev; ev.type=EV_SPURIOUS;
436
  time_marker start;
436
  time_marker start;
437
  for (i=0;i<320 && ev.type!=EV_KEY;i++)
437
  for (i=0;i<xres && ev.type!=EV_KEY;i++)
438
  {
438
  {
439
    im->put_image(screen,dx,dy);
439
    im->put_image(screen,dx,dy);
440
    console_font->put_string(screen,xres/2+35,yres/2+100-console_font->height()-2,
440
    console_font->put_string(screen,xres/2+35,yres/2+100-console_font->height()-2,
441
			   lstring_value(to_be));
441
			   lstring_value(to_be));
442
442
443
    text_draw(205-i,dx+10,dy,dx+319-10,dy+199,lstring_value(mid_plot),eh->font(),cmap,eh->bright_color());
443
    text_draw(205-i,dx+10,dy,dx+xres-1-10,dy+yres-1,lstring_value(mid_plot),eh->font(),cmap,eh->bright_color());
444
    eh->flush_screen();
444
    eh->flush_screen();
445
    time_marker now; while (now.diff_time(&start)<0.18) now.get_time(); start.get_time();
445
    time_marker now; while (now.diff_time(&start)<0.18) now.get_time(); start.get_time();
446
    while (eh->event_waiting() && ev.type!=EV_KEY) eh->get_event(ev);
446
    while (eh->event_waiting() && ev.type!=EV_KEY) eh->get_event(ev);
Lines 471-477 Link Here
471
471
472
  image *im=cash.img(cash.reg("art/endgame.spe","end.pcx",SPEC_IMAGE,1));
472
  image *im=cash.img(cash.reg("art/endgame.spe","end.pcx",SPEC_IMAGE,1));
473
473
474
  int dx=(xres+1)/2-320/2,dy=(yres+1)/2-200/2;
474
  int dx=(xres+1)/2-xres/2,dy=(yres+1)/2-yres/2;
475
475
476
  void *end_plot=symbol_value(make_find_symbol("plot_end"));
476
  void *end_plot=symbol_value(make_find_symbol("plot_end"));
477
  p_ref r2(end_plot);
477
  p_ref r2(end_plot);
Lines 486-496 Link Here
486
486
487
  event ev; ev.type=EV_SPURIOUS;
487
  event ev; ev.type=EV_SPURIOUS;
488
  time_marker start;
488
  time_marker start;
489
  for (i=0;i<320 && ev.type!=EV_KEY;i++)
489
  for (i=0;i<xres && ev.type!=EV_KEY;i++)
490
  {
490
  {
491
    im->put_image(screen,dx,dy);
491
    im->put_image(screen,dx,dy);
492
492
493
    text_draw(205-i,dx+10,dy,dx+319-10,dy+199,lstring_value(end_plot),eh->font(),cmap,eh->bright_color());
493
    text_draw(205-i,dx+10,dy,dx+xres-1-10,dy+yres-1,lstring_value(end_plot),eh->font(),cmap,eh->bright_color());
494
    eh->flush_screen();
494
    eh->flush_screen();
495
    time_marker now; while (now.diff_time(&start)<0.18) now.get_time(); start.get_time();
495
    time_marker now; while (now.diff_time(&start)<0.18) now.get_time(); start.get_time();
496
    while (eh->event_waiting() && ev.type!=EV_KEY) eh->get_event(ev);
496
    while (eh->event_waiting() && ev.type!=EV_KEY) eh->get_event(ev);
(-)abuse_sdl-0.7.0-old/src/game.cpp (-2 / +2 lines)
Lines 1316-1326 Link Here
1316
			ev.type=EV_SPURIOUS;
1316
			ev.type=EV_SPURIOUS;
1317
			time_marker start;
1317
			time_marker start;
1318
1318
1319
			for( i = 0; i < 320 && ( ev.type != EV_KEY && ev.type != EV_MOUSE_BUTTON ); i++ )
1319
			for( i = 0; i < xres && ( ev.type != EV_KEY && ev.type != EV_MOUSE_BUTTON ); i++ )
1320
			{
1320
			{
1321
				gray->put_image( screen, dx, dy );
1321
				gray->put_image( screen, dx, dy );
1322
				smoke[i % 5]->put_image( screen, dx + 24, dy + 5 );
1322
				smoke[i % 5]->put_image( screen, dx + 24, dy + 5 );
1323
				text_draw( 205 - i, dx + 15, dy, dx + 320 - 15, dy + 199, str, eh->font(), cmap, eh->bright_color() );
1323
				text_draw( 205 - i, dx + 15, dy, dx + xres - 15, dy + yres - 1, str, eh->font(), cmap, eh->bright_color() );
1324
				eh->flush_screen();
1324
				eh->flush_screen();
1325
				time_marker now;
1325
				time_marker now;
1326
1326
(-)abuse_sdl-0.7.0-old/src/innet.cpp (-3 / +3 lines)
Lines 520-526 Link Here
520
				st=i;
520
				st=i;
521
			
521
			
522
				game_object *o=create(current_start_type,0,0);
522
				game_object *o=create(current_start_type,0,0);
523
				game_object *start=current_level->get_random_start(320,NULL);
523
				game_object *start=current_level->get_random_start(xres,NULL);
524
				if (start) { o->x=start->x; o->y=start->y; }
524
				if (start) { o->x=start->x; o->y=start->y; }
525
				else { o->x=100; o->y=100; }
525
				else { o->x=100; o->y=100; }
526
			
526
			
Lines 537-544 Link Here
537
			
537
			
538
				v->cx1=5;
538
				v->cx1=5;
539
				v->cy1=5;
539
				v->cy1=5;
540
				v->cx2=319-5;
540
				v->cx2=xres-1-5;
541
				v->cy2=199-5;
541
				v->cy2=yres-1-5;
542
				join_list=join_list->next;
542
				join_list=join_list->next;
543
      }     
543
      }     
544
      base->join_list=NULL;
544
      base->join_list=NULL;
(-)abuse_sdl-0.7.0-old/src/menu.cpp (-1 / +1 lines)
Lines 704-710 Link Here
704
	inm->allow_no_selections();
704
	inm->allow_no_selections();
705
	inm->clear_current();
705
	inm->clear_current();
706
706
707
	screen->add_dirty(0,0,319,199);
707
	screen->add_dirty(0,0,xres-1,yres-1);
708
708
709
	event ev;
709
	event ev;
710
710
(-)abuse_sdl-0.7.0-old/src/newlight.cpp (-2 / +2 lines)
Lines 588-594 Link Here
588
    {
588
    {
589
      unsigned char *sl=screen->scan_line(lp->y1)+lp->x1,*dest;
589
      unsigned char *sl=screen->scan_line(lp->y1)+lp->x1,*dest;
590
#ifdef __WATCOMC__
590
#ifdef __WATCOMC__
591
      if (get_vmode()==19) dest=(uchar *)0xa0000+lp->y1*320+lp->x1;
591
      if (get_vmode()==19) dest=(uchar *)0xa0000+lp->y1*xres+lp->x1;
592
      else dest=sl;
592
      else dest=sl;
593
#else
593
#else
594
      dest=sl;
594
      dest=sl;
Lines 611-617 Link Here
611
611
612
      uchar *yaddr=screen->scan_line(lp->y1)+lp->x1,*dyaddr;
612
      uchar *yaddr=screen->scan_line(lp->y1)+lp->x1,*dyaddr;
613
#ifdef __WATCOMC__
613
#ifdef __WATCOMC__
614
      if (get_vmode()==19) dyaddr=((uchar *)0xa0000)+lp->y1*320+lp->x1;
614
      if (get_vmode()==19) dyaddr=((uchar *)0xa0000)+lp->y1*xres+lp->x1;
615
      else dyaddr=yaddr;
615
      else dyaddr=yaddr;
616
#else
616
#else
617
      dyaddr=yaddr;
617
      dyaddr=yaddr;
(-)abuse_sdl-0.7.0-old/src/old_earth_menu.cpp (-3 / +3 lines)
Lines 577-583 Link Here
577
//  pmenu *main_pm=new pmenu(0,0,game_sub,screen,eh);
577
//  pmenu *main_pm=new pmenu(0,0,game_sub,screen,eh);
578
  time_marker old_time;
578
  time_marker old_time;
579
579
580
  screen->add_dirty(0,0,319,199);
580
  screen->add_dirty(0,0,xres-1,yres-1);
581
581
582
  
582
  
583
  // create sphere map
583
  // create sphere map
Lines 608-615 Link Here
608
        eoff+=2; coff+=1;
608
        eoff+=2; coff+=1;
609
      }
609
      }
610
610
611
      if (eoff>=320) eoff-=320;
611
      if (eoff>=xres) eoff-=xres;
612
      if (coff>=320) coff-=320;      
612
      if (coff>=xres) coff-=xres;
613
      eh->flush_screen();
613
      eh->flush_screen();
614
    }
614
    }
615
615
(-)abuse_sdl-0.7.0-old/src/old_server.cpp (-2 / +2 lines)
Lines 481-487 Link Here
481
	    st=i;
481
	    st=i;
482
482
483
	game_object *o=create(current_start_type,0,0);
483
	game_object *o=create(current_start_type,0,0);
484
	game_object *start=current_level->get_random_start(320,NULL);
484
	game_object *start=current_level->get_random_start(xres,NULL);
485
	if (start) { o->x=start->x; o->y=start->y; }
485
	if (start) { o->x=start->x; o->y=start->y; }
486
	else { o->x=100; o->y=100; }
486
	else { o->x=100; o->y=100; }
487
487
Lines 575-581 Link Here
575
  if (current_level)
575
  if (current_level)
576
    delete current_level;
576
    delete current_level;
577
577
578
  long vs[4]={lltl(320/2-155),lltl(200/2-95),lltl(320/2+155),lltl(200/2+70)};
578
  long vs[4]={lltl(xres/2-155),lltl(yres/2-95),lltl(xres/2+155),lltl(yres/2+70)};
579
  pk.write((uchar *)vs,4*4);
579
  pk.write((uchar *)vs,4*4);
580
  if (!send_pkt(os,pk))   { printf("Unable to write to server\n"); exit(0);  }
580
  if (!send_pkt(os,pk))   { printf("Unable to write to server\n"); exit(0);  }
581
  
581
  
(-)abuse_sdl-0.7.0-old/src/remap.cpp (-4 / +4 lines)
Lines 18-24 Link Here
18
18
19
19
20
20
21
	unsigned char *s = (unsigned char *) malloc(320*200);
21
	unsigned char *s = (unsigned char *) malloc(xres*yres);
22
22
23
	unsigned char *r, *seq;
23
	unsigned char *r, *seq;
24
24
Lines 40-54 Link Here
40
40
41
			r[j*256+i] = i+j;
41
			r[j*256+i] = i+j;
42
42
43
	for (i=0 ; i<320*200 ; i++) s[i] = i&0xff;
43
	for (i=0 ; i<xres*yres ; i++) s[i] = i&0xff;
44
44
45
	for (i=0 ; i<40 ; i++) seq[i] = i;
45
	for (i=0 ; i<40 ; i++) seq[i] = i;
46
46
47
47
48
48
49
	for (j=0 ; j<200 ; j++)
49
	for (j=0 ; j<yres ; j++)
50
50
51
                remap_line_asm(s+j*320, r, seq, 40);
51
                remap_line_asm(s+j*xres, r, seq, 40);
52
52
53
53
54
54
(-)abuse_sdl-0.7.0-old/src/sdlport/event.cpp (-4 / +4 lines)
Lines 372-384 Link Here
372
	buttons = SDL_GetMouseState( &x, &y );
372
	buttons = SDL_GetMouseState( &x, &y );
373
	x = (x << 16) / mouse_xscale;
373
	x = (x << 16) / mouse_xscale;
374
	y = (y << 16) / mouse_yscale;
374
	y = (y << 16) / mouse_yscale;
375
	if( x > 319 )
375
	if( x > xres-1 )
376
	{
376
	{
377
		x = 319;
377
		x = xres-1;
378
	}
378
	}
379
	if( y > 199 )
379
	if( y > yres-1 )
380
	{
380
	{
381
		y = 199;
381
		y = yres-1;
382
	}
382
	}
383
	ev.mouse_move.x = x;
383
	ev.mouse_move.x = x;
384
	ev.mouse_move.y = y;
384
	ev.mouse_move.y = y;
(-)abuse_sdl-0.7.0-old/src/sdlport/mouse.cpp (-4 / +4 lines)
Lines 82-94 Link Here
82
void JCMouse::set_position( int new_mx, int new_my )
82
void JCMouse::set_position( int new_mx, int new_my )
83
{
83
{
84
	// Make sure the values we are given are sensible.
84
	// Make sure the values we are given are sensible.
85
	if( new_mx > 319 )
85
	if( new_mx > xres-1 )
86
	{
86
	{
87
		new_mx = 319;
87
		new_mx = xres-1;
88
	}
88
	}
89
	if( new_my > 199 )
89
	if( new_my > yres-1 )
90
	{
90
	{
91
		new_my = 199;
91
		new_my = yres-1;
92
	}
92
	}
93
93
94
	// Set the new position
94
	// Set the new position
(-)abuse_sdl-0.7.0-old/src/server2.cpp (-1 / +1 lines)
Lines 180-186 Link Here
180
	  st=i;
180
	  st=i;
181
181
182
      game_object *o=create(current_start_type,0,0);
182
      game_object *o=create(current_start_type,0,0);
183
      game_object *start=current_level->get_random_start(320,NULL);
183
      game_object *start=current_level->get_random_start(xres,NULL);
184
      if (start) { o->x=start->x; o->y=start->y; }
184
      if (start) { o->x=start->x; o->y=start->y; }
185
      else { o->x=100; o->y=100; }
185
      else { o->x=100; o->y=100; }
186
186
(-)abuse_sdl-0.7.0-old/src/unixnfc.cpp (-3 / +3 lines)
Lines 451-457 Link Here
451
	st=i;
451
	st=i;
452
452
453
	game_object *o=create(current_start_type,0,0);
453
	game_object *o=create(current_start_type,0,0);
454
	game_object *start=current_level->get_random_start(320,NULL);
454
	game_object *start=current_level->get_random_start(xres,NULL);
455
	if (start) { o->x=start->x; o->y=start->y; }
455
	if (start) { o->x=start->x; o->y=start->y; }
456
	else { o->x=100; o->y=100; }
456
	else { o->x=100; o->y=100; }
457
457
Lines 468-475 Link Here
468
468
469
	v->cx1=5;
469
	v->cx1=5;
470
	v->cy1=5;
470
	v->cy1=5;
471
	v->cx2=319-5;
471
	v->cx2=xres-1-5;
472
	v->cy2=199-5;
472
	v->cy2=yres-1-5;
473
	join_list=shm2real(join_struct,join_list->next);
473
	join_list=shm2real(join_struct,join_list->next);
474
      }     
474
      }     
475
      base->join_list=NULL;
475
      base->join_list=NULL;
(-)abuse_sdl-0.7.0-old/src/view.cpp (-2 / +2 lines)
Lines 798-804 Link Here
798
      f->next=new view(o,NULL,f->player_number+1);
798
      f->next=new view(o,NULL,f->player_number+1);
799
      v=f->next;
799
      v=f->next;
800
    }
800
    }
801
    v->cx1=320/2-155; v->cy1=200/2-95; v->cx2=320/2+155; v->cy2=200/2+(total_weapons ? 60 : 95);
801
    v->cx1=xres/2-155; v->cy1=yres/2-95; v->cx2=xres/2+155; v->cy2=yres/2+(total_weapons ? 60 : 95);
802
    v->focus->set_controller(v);
802
    v->focus->set_controller(v);
803
    total--;
803
    total--;
804
    rdw=1;
804
    rdw=1;
Lines 848-854 Link Here
848
  if (focus)
848
  if (focus)
849
  {
849
  {
850
   
850
   
851
    game_object *start=current_level ? current_level->get_random_start(320,focus->controller()) : 0;
851
    game_object *start=current_level ? current_level->get_random_start(xres,focus->controller()) : 0;
852
    focus->defaults();
852
    focus->defaults();
853
    if (start)
853
    if (start)
854
    {
854
    {

Return to bug 180081