Autor Tema: Developer's diary  (Leído 39072 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12476
  • Karma: 367
  • Sexo: Masculino
    • Ver Perfil
Re: Developer's diary
« Respuesta #15 en: Noviembre 06, 2008, 09:09:16 am »
yes, is correct... if you use () in a define, you must include arguments in it...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Desconectado Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
  • Sexo: Masculino
    • Ver Perfil
Re: Developer's diary
« Respuesta #16 en: Noviembre 06, 2008, 11:40:29 am »
You cannot use () on #defines, i think thats the problem with that.
You can and it provides much power.

yes, is correct... if you use () in a define, you must include arguments in it...
Yes, I figured as much. My suggestion is to make FUNC() work as well (like C).
Also, the compiler error doesn't say what you say the error is.
-- Sandman

Desconectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12476
  • Karma: 367
  • Sexo: Masculino
    • Ver Perfil
Re: Developer's diary
« Respuesta #17 en: Noviembre 06, 2008, 12:05:52 pm »
maybe... I'll considere it... thanks...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Desconectado Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
  • Sexo: Masculino
    • Ver Perfil
Re: Developer's diary
« Respuesta #18 en: Noviembre 06, 2008, 04:44:18 pm »
Another one:
- delete_draw() makes bgdi crash on a nonexistent drawID.
-- Sandman

Desconectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12476
  • Karma: 367
  • Sexo: Masculino
    • Ver Perfil
Re: Developer's diary
« Respuesta #19 en: Noviembre 06, 2008, 05:43:15 pm »
This is a pointer to struct, if you use an invalid pointer, this hangup... only is test for NULL pointer...
this not is a bug... what happen if you do in C free (nonexistalloc)?
« última modificación: Noviembre 06, 2008, 05:48:12 pm por SplinterGU »
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Desconectado Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
  • Sexo: Masculino
    • Ver Perfil
Re: Developer's diary
« Respuesta #20 en: Noviembre 07, 2008, 04:47:24 am »
True.
-- Sandman

Desconectado Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
  • Sexo: Masculino
    • Ver Perfil
Re: Developer's diary
« Respuesta #21 en: Noviembre 08, 2008, 12:20:48 pm »
Seems to be something wrong with the ? operator.

Código: [Seleccionar]
import "mod_say"

Process main()
Private
int i;
Begin

i = 0;

if(i)
say("IF says: i is !0");
else
say("IF says: i is 0");
end

say("? says: i is " + (i?"!0":"0") );

End

Result:
Citar
IF says: i is 0
? says: i is !0

So I guess the ? operator needs some tinkering.

I also have a feature request: the support of special float functionality, like NaN.
-- Sandman

Desconectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12476
  • Karma: 367
  • Sexo: Masculino
    • Ver Perfil
Re: Developer's diary
« Respuesta #22 en: Noviembre 08, 2008, 04:16:13 pm »
Seems to be something wrong with the ? operator.

Código: [Seleccionar]
import "mod_say"

Process main()
Private
int i;
Begin

i = 0;

if(i)
say("IF says: i is !0");
else
say("IF says: i is 0");
end

say("? says: i is " + (i?"!0":"0") );

End

Result:
Citar
IF says: i is 0
? says: i is !0

So I guess the ? operator needs some tinkering.


- Fixed... and improved speed when expression is constant... thanks
« última modificación: Noviembre 08, 2008, 04:24:47 pm por SplinterGU »
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Desconectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12476
  • Karma: 367
  • Sexo: Masculino
    • Ver Perfil
Re: Developer's diary
« Respuesta #23 en: Noviembre 09, 2008, 02:12:00 am »
- Now division by zero are allow in float expresions, new functions are added:
  int isinf(float x);
  int isnan(float x);
  int finite(float x);
- Ternary condition fixed... and improved speed in ternary condition when expression is constant.
- Add core's functions bgdrtm_entry and bgdrtm_exit to bgdrtm...
- Now exit code can be return at finish execution of bgdi
- Lib WM now don't exit when close botton are clicked, only set exit_status to true
- EXIT(...) functions now fixed, and use the params
« última modificación: Noviembre 09, 2008, 02:13:59 am por SplinterGU »
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Desconectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12476
  • Karma: 367
  • Sexo: Masculino
    • Ver Perfil
Re: Developer's diary
« Respuesta #24 en: Diciembre 28, 2008, 06:22:03 pm »
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Desconectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12476
  • Karma: 367
  • Sexo: Masculino
    • Ver Perfil
Re: Developer's diary
« Respuesta #25 en: Febrero 04, 2009, 06:33:14 pm »
revision 22 binaries windows and linux for download
http://betatester.bennugd.org/betas/
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Desconectado Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
  • Sexo: Masculino
    • Ver Perfil
Re: Developer's diary
« Respuesta #26 en: Febrero 11, 2009, 04:21:29 am »
As a reply to revision 23:

An English translation of the readme:
Código: [Seleccionar]
Bennu Project 1.0
=================

Instructions for compiling the project.
========================================

You need the following packages (which can be installed in any directory of MinGW, Win32 only):

MinGW-5.1.0 (mingw-runtime-3.11.tar.gz
            w32api-3.8.tar.gz
            binutils-2.15.91-20040904-1.tar.gz
            gcc-core-3.4.2-20040916-1.tar.gz
            gcc-g++-3.4.2-20040916-1.tar.gz
            mingw32-make-3.80.0-3.tar.gz)

MSYS-1.0.10.exe

(Valid libraries for UNIX)

libpng-1.2.12.tar.gz
SDL-1.2.11.tar.gz
SDL_mixer-1.2.7.tar.gz
smpeg-0.4.3.tar.gz
zlib-1.2.3.tar.gz


NOTES:
    Although these versions were used at this time, any version of these packages should work correctly.

Steps to compile:

    ./configure
    make

WIN32 NOTES:
    If you have installed MSVC, be sure to eliminate the seven variables of the MSVC compiler (INCLUDE, LIB, etc.) in the MSYS console.
    Copy SDL.dll to the root directory of the project before running configure.

Linux
-----

lib32z1-dev

./configure --target=i386-pc-linux-gnu --host=i386-pc-linux-gnu --build=i386-pc-linux-gnu (Ubuntu 64)

I included a text file of how I compiled Bennu in MSYS. There could be things missing, but it could be helpful.

Btw, ./configure --target=i386-pc-linux-gnu --host=i386-pc-linux-gnu --build=i386-pc-linux-gnu is the same as ./configure --build=i386-pc-linux-gnu by default, but you probably knew that.
« última modificación: Febrero 11, 2009, 04:25:28 am por Sandman »
-- Sandman

Desconectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12476
  • Karma: 367
  • Sexo: Masculino
    • Ver Perfil
Re: Developer's diary
« Respuesta #27 en: Marzo 07, 2009, 07:41:20 pm »
32 bits fade support
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Desconectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12476
  • Karma: 367
  • Sexo: Masculino
    • Ver Perfil
Re: Developer's diary
« Respuesta #28 en: Marzo 12, 2009, 02:53:05 pm »
- Fixed Translucent tables in 8 bits
- Fixed blend operations in 8 bits
- Fixed Translucent+Blend in 8 bits

sample
Código: [Seleccionar]
Program Pruebas;

#ifdef __VERSION__
import "mod_screen";
import "mod_video";
import "mod_map";
import "mod_say";
import "mod_text";
import "mod_rand";
import "mod_mouse";
#endif
import "mod_file";
import "mod_key";
import "mod_draw";
import "mod_proc";
import "mod_math";

#define GR_DEPTH    depth
//#define GR_DEPTH    16

global
   int recta;
   int cubo;
   int fondo;
   int depth = 32;
   int gflags = 0;
   int gangle = 0;
   int gsize = 100;
   int galpha = 255;
   int sw = 0;

begin

    set_fps(0,0);

    action();

    While (NOT key(_esc))
        if (key(_TAB))
            let_me_alone();

            depth /= 2;
            if (depth<8) depth = 32; end

            delete_text(all_text);
            unload_map(0,fondo);
            unload_map(0,cubo);
            unload_map(0,recta);
            unload_map(0,mouse.graph);
            action();
            while (key(_TAB)) frame; end;
         end

        frame;
    end
end



process action()
private
map;
count ;
Begin
//    scale_mode = scale_normal2x;

/*
    dump_type=1;
    restore_type=1;
*/
    set_mode(640,480,GR_DEPTH|WAITVSYNC); // For rgb for graphs

    cubo=new_map(100,100,GR_DEPTH);
    drawing_map(0,cubo);
    drawing_color(rgb(0,0,200));
    draw_box(50,0,100,100);
    drawing_color(rgb(0,100,200));
    draw_box(0,0,50,100);
    drawing_color(rgba(100,0,200,50));
    draw_box(25,0,75,25);
    /* Hole */
    drawing_color(rgba(255,255,0,200));
    draw_box(35,35,65,65);
    drawing_color(rgba(255,0,255,64));
    draw_box(45,45,55,55);

/*
    cubo=new_map(100,100,GR_DEPTH);
    drawing_map(0,cubo);
    drawing_color(rgb(0,0,200));
    draw_fcircle(50,50,50);
    drawing_color(rgb(0,100,200));
    draw_fcircle(50,25,20);
*/

    recta=new_map(5,100,GR_DEPTH);
    drawing_map(0,recta);
    drawing_color(rgb(200,0,0));
    draw_box(0,0,5,100);
    drawing_color(rgb(0,200,0));
    draw_box(0,0,5,5);
    drawing_color(rgb(0,0,200));
    draw_box(5,0,5,100);

    set_mode(640,480,depth);

    mouse.graph=png_load("pngtest.png");

    fondo=new_map(640,480,depth);

    for (y=0;y<480;y++)
        for (x=0;x<640;x++)
             //((y*100/256)<<(((y>>2)%3)<<3))
//            map_put_pixel(0,fondo,x,y,rgb(y*256/480,y*256/480,y*256/480));
            map_put_pixel(0,fondo,x,y,rgb((y&1)?x*256/640:0,(x&1)?x*256/640:0,(y&1)?y*256/480:0));
        end
    end

    put_screen(0,fondo);

    write_int (0,100,10,1,&fps);
    write_int (0,200,10,1,&depth);

    write_int (0,300,10,1,&gangle);
    write_int (0,400,10,1,&gsize);
    write_int (0,500,10,1,&galpha);

    jugador(120,180,cubo,-180000,0);
    jugador(240,180,cubo,-180000,B_HMIRROR);
    jugador(120,300,cubo,-180000,B_VMIRROR);
    jugador(240,300,cubo,-180000,B_HMIRROR|B_VMIRROR);

    jugador(440,180,recta,-180000,0);
    jugador(560,180,recta,-180000,B_HMIRROR);
    jugador(440,300,recta,-180000,B_VMIRROR);
    jugador(560,300,recta,-180000,B_HMIRROR|B_VMIRROR);

    While (NOT key(_esc))
        gangle+=100;

        If (key(_F1)) gflags |= B_TRANSLUCENT; end
        If (key(_F2)) gflags = gflags & ~B_TRANSLUCENT; end
        If (key(_F3)) gflags |= B_ABLEND; end
        If (key(_F4)) gflags = gflags & ~B_ABLEND; end
        If (key(_F5)) gflags |= B_SBLEND; end
        If (key(_F6)) gflags = gflags & ~B_SBLEND; end

        If (key(_minus)) gsize-=10; if (shift_status) while(key(_minus)) frame; end ;end; end
        If (key(_plus))  gsize+=10; if (shift_status) while(key(_plus))  frame; end ;end; end

        If (key(_1) && galpha > 0)   galpha--; if (shift_status) while(key(_1)) frame; end ;end; end
        If (key(_2) && galpha < 255) galpha++; if (shift_status) while(key(_2)) frame; end ;end; end

        If (key(_q)) gangle-=1000;   if (shift_status) while(key(_q)) frame; end ;end; end
        If (key(_w)) gangle+=1000;   if (shift_status) while(key(_w)) frame; end ;end; end
        If (key(_a)) gangle-=100;    if (shift_status) while(key(_a)) frame; end ;end; end
        If (key(_s)) gangle+=100;    if (shift_status) while(key(_s)) frame; end ;end; end
        If (key(_z)) gangle-=10;     if (shift_status) while(key(_z)) frame; end ;end; end
        If (key(_x)) gangle+=10;     if (shift_status) while(key(_x)) frame; end ;end; end

        If (key(_9) && !fading) fade_off(); while(key(_9)) frame; end; end
        If (key(_0) && !fading) fade_on() ; while(key(_0)) frame; end; end

        if ( key( _H ) ) gflags ^= B_HMIRROR; while ( key( _H ) ) frame; end; end
        if ( key( _V ) ) gflags ^= B_VMIRROR; while ( key( _V ) ) frame; end; end

        if ( key(_F10)) map = get_screen(); while(file_exists("capture"+count+".png"));count++;end;save_png(0,map,"capture"+count+".png"); unload_map(0,map);while ( key(_F10)) frame; end; end

        if ( key( _SPACE ) ) gangle = 0; end

        Frame;
    End

    let_me_alone();

End

Process jugador(x,y,graph,angle,iflags)
Private
    int mapa;
Begin
    While (NOT key(_esc))
        alpha = galpha;
        size = gsize;
        angle = gangle;
        flags = gflags ^ iflags;

        Frame;
    End
End
« última modificación: Marzo 12, 2009, 02:56:48 pm por SplinterGU »
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Desconectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12476
  • Karma: 367
  • Sexo: Masculino
    • Ver Perfil
Re: Developer's diary
« Respuesta #29 en: Marzo 12, 2009, 06:09:02 pm »
r28 disponible para descargar...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2