Autor Tema: [BUG] mod_grproc: collision() using map with width 1 and angled map  (Leído 2386 veces)

Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
Check it out.
Código: [Seleccionar]
import "mod_video"
import "mod_map"
import "mod_grproc"
import "mod_proc"
import "mod_wm"
import "mod_key"
import "mod_mouse"
import "mod_text"

#define SCREEN_DEPTH 16

Process Main()
Begin

set_mode(320,200,SCREEN_DEPTH);

steady(80,100,0);
steady(100,100,0);
steady(130,100,45000);

Movable();

Repeat
frame;
Until(exit_status||key(_ESC))

OnExit
let_me_alone();
End

Process Steady(int x, int y, int angle)
Begin

flags = B_ABLEND;
graph = new_map(50,50,SCREEN_DEPTH);
map_clear(0,graph,rgb(x,y,100));

Loop
frame;
End

OnExit
if(map_exists(0,graph))
map_unload(0,graph);
end
End
Process Movable()
Private
int colID;
int txt[9];
int i;
Begin
z = -1;
graph = new_map(1,100,SCREEN_DEPTH);
map_clear(0,graph,rgb(255,255,255));
Loop
x = mouse.x;
y = mouse.y;
for(i=0; i<10; i++)
if(colID=collision(type Steady))
txt[i] = write(0,0,i*10,0,"Collision: " + colID);
else
break;
end
end
frame;
for(i=0; i<10; i++)
if(txt[i])
delete_text(txt[i]);
txt[i] = 0;
end
end
End
OnExit
for(i=0; i<10; i++)
if(txt[i])
delete_text(txt[i]);
end
end
if(map_exists(0,graph))
map_unload(0,graph);
end
End

The angled process does not collide according to collision()!
It does work with height==1 pixel, but not with width==1 pixel.
-- Sandman

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12960
  • Karma: 378
Re: [BUG] mod_grproc: collision() using map with width 1 and angled map
« Respuesta #1 en: Febrero 27, 2009, 01:57:00 am »
I know... this is a float precision stuff...

oh, sorry, I interpreter other stuff... let me take a look... thanks...

yes, again...
"I know... this is a float precision stuff.."

well, I think so... the problem maybe is gr_rotate_blit.
« última modificación: Febrero 27, 2009, 02:51:49 am por SplinterGU »
Download Lastest BennuGD Release: http://www.bennugd.org/node/2