scale_resolution : mouse position problem

Issue #24 resolved
Benjamin Hoffmann created an issue

The mouse position is relative to the scale_resolution. It should be relative to the screen.

Comments (6)

  1. Joseba Echevarria García repo owner

    Thanks a lot for testing the code and for reporting your findings.

    Although the issue is clear, could you please include a simple test case? That'd really help me fix it faster.

    Cheers

  2. Benjamin Hoffmann reporter
    import "mod_video"
    import "mod_key"
    import "mod_map"
    import "mod_draw"
    import "mod_mouse"
    import "mod_proc"
    
    PROCESS int main();
    Private
        int time;
        int pid;
    
    BEGIN
        scale_resolution=06400480;
        set_mode(320, 240);
        set_fps(0, 0);
    
    
        mouse.graph = map_new(16, 16, 32);
        drawing_map(0, mouse.graph);
        drawing_color(rgb(255, 255, 255));
        draw_box(0, 0, 16, 16);
    
        LOOP
            if(key(_esc))
                let_me_alone();
                break;
            end
            FRAME;
        End
    END
    
  3. Benjamin Hoffmann reporter

    i just find out that I can't load any image or FPG. I have no error but the images are not displayed (with png_load). Is it a known bug or must I create a repport ?

  4. Joseba Echevarria García repo owner

    Thanks for the code. I'll fix it ASAP.

    FPG and PNG loading should be working fine. Please write a new bug report with an example and I'll have a look at it.

  5. Log in to comment