Bug get_real_point: No toma en cuenta angle

Issue #27 resolved
Gabriel Garrote created an issue
program get_real_point;

import "mod_key"
import "mod_video"
import "mod_map"
import "mod_proc"
import "mod_grproc"


private map1, map2;
coso_rojo;

begin

    set_mode(800,600,waitvsync);

    map1 = map_new(100, 10, 32, 0);
    map2 = map_new(50, 50, 32, 0);

    map_clear(0, map1, rgb(0, 0, 255));
    map_clear(0, map2, rgb(255, 0, 0));

    //Centro en un extremo para el grafico que hará de cursor del ratón
    center_set(0, map1, 0, 5);
    //Punto de control en el otro extremo
    point_set(0, map1, 1, 100, 5);

    graph=map1;

    coso_rojo = coso(map2);

    repeat
        x = mouse.x;
        y = mouse.y;

        //Con la rueda del ratón estiramos o encogemos en x
        if(mouse.wheelup) size_x += 10; end
        if(mouse.wheeldown) size_x -= 10; end

        //Con los botones del ratón cambiamos el ángulo. A diferencia del resize, get_real_point no tiene esto en cuenta
        if(mouse.left) angle -= 2000; end
        if(mouse.right) angle += 2000; end

        //Ponemos el chirimbolo rojo en el punto de control del raton
        get_real_point(1, offset coso_rojo.x, offset coso_rojo.y);
        frame;
    until(key(_esc))

    exit();

end

process coso(graph)
begin
    loop frame; end
end

Comments (3)

  1. Joseba Echevarria García repo owner

    I can replicate the bug, thanks a lot.

    Will let you know when it's fixed!

  2. Log in to comment