Bennu Game Development

English Forums => News and Releases => Mensaje iniciado por: SplinterGU en Octubre 19, 2008, 01:05:31 am

Título: Developer's diary
Publicado por: SplinterGU en Octubre 19, 2008, 01:05:31 am
Wip 14, Linux/Win32

Core:

- args fix, now argc (argument count) say count of argv... and argv[0] is dcbname in not stub version, and executable name in stub version.

Modules:

- Several casts
- Add some includes
- Indent
- Some pointers size fix
- Remove unused vars
- Fix in use of grlib_destroy when error creation.
- Somes casts in palette module
- Linux port of libvideo
- Load map functions return 0 on fail
- Split MAGIC used in fpg/map/pal to MAGIC of 7 bytes and 1 byte for version
Título: Re: Developer's diary
Publicado por: SplinterGU en Octubre 20, 2008, 12:54:53 am
- new set_window_pos, get_window_pos and get_window_size functions
- GET_WINDOW_SIZE now difference between window size and client area
- GET_DESKTOP_SIZE added
- Linux Port (need tested)
Título: Re: Developer's diary
Publicado por: SplinterGU en Octubre 24, 2008, 10:38:24 pm
- Prohibit unload font 0
- Fix controls points + mirrors + angle
- Check if graph exist on gr_save_png
- Fix on 32 bits collision
- Fix on 32 bits blits
Título: Re: Developer's diary
Publicado por: blostec en Octubre 25, 2008, 08:55:11 am
Greats improvements, you never stop.  :D
Título: Re: Developer's diary
Publicado por: SplinterGU en Octubre 26, 2008, 06:28:41 am
- mod_debug added! with some improvements... ;)

I forget...

- Spanish runtime error translated to English
Título: Re: Developer's diary
Publicado por: SplinterGU en Octubre 26, 2008, 04:42:51 pm
- Linux Port
- Fixes on mod_wm, linux

Wip 15 uploaded...
Título: Re: Developer's diary
Publicado por: Sandman en Octubre 26, 2008, 09:00:07 pm
Good to have the debugger back, I missed it. :)
Título: Re: Developer's diary
Publicado por: SplinterGU en Octubre 26, 2008, 11:03:44 pm
- Some debug fixes

WIP15a uploaded!
Título: Re: Developer's diary
Publicado por: SplinterGU en Octubre 29, 2008, 01:40:39 am
- Debugger's new appearance
- New characters added to debug's system font
- New debug's functions: breakall, breakalltypes, deleteall, deletealltypes, go, nextframe, nextproc.
- Process list in brief mode
- Process browse window, by id or by type, allowing to set/remove breakpoints, inspect his variables, etc...
- Palete fix on 8 bits fpg save
- Mirror fix on angle = 0
- Several module's dependencies added
- SDL_Initializations on some modules
- Debug info add at loading modules in runtime...
- English messages in compiler
Título: Re: Developer's diary
Publicado por: SplinterGU en Octubre 29, 2008, 03:33:01 am
Wip 15b uploaded...
Título: Re: Developer's diary
Publicado por: Sandman en Octubre 29, 2008, 07:13:45 pm
Looks fantastic. Great functionality.
Título: Re: Developer's diary
Publicado por: Sandman en Noviembre 06, 2008, 12:52:26 pm
Think I got two bugs:

- seems the console fails in 8bit mode
- STRINGS command in console doesn't display any strings
Título: Re: Developer's diary
Publicado por: SplinterGU en Noviembre 06, 2008, 02:09:01 pm
Think I got two bugs:

- seems the console fails in 8bit mode
- STRINGS command in console doesn't display any strings

- 8 bits mode... already fixed two days ago... (I need upload new version...)
- At this moment, STRING only stdout output...
Título: Re: Developer's diary
Publicado por: Sandman en Noviembre 06, 2008, 04:18:45 pm
Okay cool.

Another thing:
Código: [Seleccionar]
#define func() i

process main()
private
int i;
begin
i = func();
end

gives:
Código: [Seleccionar]
macro.prg:7: error: Incorrect number of parameters. Function: FUNC MinParams: -1. ("(")
Título: Re: Developer's diary
Publicado por: HaCkZJuaNN en Noviembre 06, 2008, 05:03:38 pm
You cannot use () on #defines, i think thats the problem with that.
Título: Re: Developer's diary
Publicado por: SplinterGU en Noviembre 06, 2008, 05:09:16 pm
yes, is correct... if you use () in a define, you must include arguments in it...
Título: Re: Developer's diary
Publicado por: Sandman en Noviembre 06, 2008, 07:40:29 pm
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.
Título: Re: Developer's diary
Publicado por: SplinterGU en Noviembre 06, 2008, 08:05:52 pm
maybe... I'll considere it... thanks...
Título: Re: Developer's diary
Publicado por: Sandman en Noviembre 07, 2008, 12:44:18 am
Another one:
- delete_draw() makes bgdi crash on a nonexistent drawID.
Título: Re: Developer's diary
Publicado por: SplinterGU en Noviembre 07, 2008, 01:43:15 am
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)?
Título: Re: Developer's diary
Publicado por: Sandman en Noviembre 07, 2008, 12:47:24 pm
True.
Título: Re: Developer's diary
Publicado por: Sandman en Noviembre 08, 2008, 08: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 (http://en.wikipedia.org/wiki/IEEE_754), like NaN (http://en.wikipedia.org/wiki/NaN).
Título: Re: Developer's diary
Publicado por: SplinterGU en Noviembre 09, 2008, 12:16:13 am
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
Título: Re: Developer's diary
Publicado por: SplinterGU en Noviembre 09, 2008, 10: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
Título: Re: Developer's diary
Publicado por: SplinterGU en Diciembre 29, 2008, 02:22:03 am
svn created

http://bennugd.svn.sourceforge.net/viewvc/bennugd/
Título: Re: Developer's diary
Publicado por: SplinterGU en Febrero 05, 2009, 02:33:14 am
revision 22 binaries windows and linux for download
http://betatester.bennugd.org/betas/
Título: Re: Developer's diary
Publicado por: Sandman en Febrero 11, 2009, 12:21:29 pm
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.
Título: Re: Developer's diary
Publicado por: SplinterGU en Marzo 08, 2009, 03:41:20 am
32 bits fade support
Título: Re: Developer's diary
Publicado por: SplinterGU en Marzo 12, 2009, 10: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
Título: Re: Developer's diary
Publicado por: SplinterGU en Marzo 13, 2009, 02:09:02 am
r28 disponible para descargar...
Título: Re: Developer's diary
Publicado por: SplinterGU en Marzo 13, 2009, 09:05:56 pm
r29 in svn...
Título: Re: Developer's diary
Publicado por: SplinterGU en Marzo 15, 2009, 12:04:47 am
r30 in svn...

core:

- new string_ptoa more efficient and same result in different SO.
- check constants already defined as variable
- Fix variant arg for pointer vars
- Fix unsigned comparations

modules:
   
- 32 bits drawing alpha support (alpha-pixel and drawing_alpha)
- speed up some drawing functions
- write_var pointer vars support

sample:

Código: [Seleccionar]
import "mod_draw"
import "mod_wm"
import "mod_key"
import "mod_video"
import "mod_text"
import "mod_say"
import "mod_rand"
import "mod_map"

Process Main()
private
unsigned int ga = 255;
unsigned int r = 255, g = 255, b = 255;
unsigned int a = 255;
char * rgba;

Begin
    set_mode(640,480,32);

    write(0,10,10,0,"drawing_alpha:");   write_var(0,110,10,0,ga);
    write(0,10,20,0,"r:");               write_var(0,110,20,0,r);
    write(0,10,30,0,"g:");               write_var(0,110,30,0,g);
    write(0,10,40,0,"b:");               write_var(0,110,40,0,b);
    write(0,10,50,0,"alpha");            write_var(0,110,50,0,a);
    write(0,10,60,0,"color32:");         write_var(0,110,60,0,rgba);

    Repeat
        if (key(_1) and ga>0) drawing_alpha(ga--); end
        if (key(_2) and ga<255) drawing_alpha(ga++); end

        if (key(_q) and r>0) drawing_color(rgba(r--,g,b,a)); end
        if (key(_a) and r<255) drawing_color(rgba(r++,g,b,a)); end

        if (key(_w) and g>0) drawing_color(rgba(r,g--,b,a)); end
        if (key(_s) and g<255) drawing_color(rgba(r,g++,b,a)); end

        if (key(_e) and b>0) drawing_color(rgba(r,g,b--,a)); end
        if (key(_d) and b<255) drawing_color(rgba(r,g,b++,a)); end

        if (key(_r) and a>0) drawing_color(rgba(r,g,b,a--)); end
        if (key(_f) and a<255) drawing_color(rgba(r,g,b,a++)); end

        if (key(_SPACE)) draw_box(rand(0,640),rand(0,480),rand(0,640),rand(0,480)); end

        rgba = rgba(r,g,b,a);

        frame;

    Until(exit_status||key(_ESC))

End
Título: Re: Developer's diary
Publicado por: SplinterGU en Abril 02, 2009, 02:40:14 pm
r38 in svn
Título: Re: Developer's diary
Publicado por: SplinterGU en Abril 04, 2009, 01:22:43 am
r39 available!
Título: Re: Developer's diary
Publicado por: splinter_work en Mayo 11, 2009, 02:10:11 pm
Already available in SVN "Bennu Game Development 1.0.0 RC (Release Candidate)"...
Título: Re: Developer's diary
Publicado por: josebita en Mayo 11, 2009, 03:41:09 pm
I... need... more... time.... aghhhh!!
I'll upload them as soon as possible to my PPA.
Splinter, I know I owe you something, just give me some more time, my real life is starting to take all of my time :)
Título: Re: Developer's diary
Publicado por: splinter_work en Mayo 11, 2009, 03:52:25 pm
take it easy... don't hurry up.
Título: Re: Developer's diary
Publicado por: SplinterGU en Mayo 25, 2009, 11:42:14 pm
svn updated!

- New instances system, hash on priority, type. Speed up improved on iterate instances.
- Instances now are limited to 65536 running at same time
- Instances dirty list by change on priority is removed.
- collision, getid, signal,... speed up improved by use of new instance system and other.
- speed up improved on show debug info
- compiler parse number is fixed
- debug console parse number is fixed
- debug console color tags fixed
- several casts are added in code
- several sizeof are added in code
- libvideo now start in 32 bits as default
- getscreen now return graphic without control point 0, (centered)
Título: Re: Developer's diary
Publicado por: MythomizeR en Mayo 26, 2009, 12:49:59 pm
Awesome update!
Título: Re: Developer's diary
Publicado por: josebita en Mayo 27, 2009, 12:39:41 am
PPA updated (should hit the servers soon, bennugd-core is already compiled & packaged in launchpad, bennugd-modules is being compiled right now).
Título: Re: Developer's diary
Publicado por: SplinterGU en Enero 20, 2010, 12:50:48 am
well, after a long time without an update... I just now release a new version that include all new fixes, included the use of openssl for encryption...

win32's installer works again (well, I mean, I can do compile it...)

take a look to my signature for the download... version 1.0 RC11(r131)
Título: Re: Developer's diary
Publicado por: blostec en Enero 24, 2010, 12:13:02 pm
Great news, thanks for your work!
Título: Re: Developer's diary
Publicado por: Burbruee en Febrero 04, 2010, 05:22:12 pm
Latest win32-exe didn't work for me. Just flashed a command prompt quickly and disappeared and nothing was updated. Had to update manually with the compressed .rar
On Windows 7, 64-bit. UAC disabled so I have full admin rights.
Título: Re: Developer's diary
Publicado por: Moogster en Marzo 10, 2010, 01:27:10 pm
Bug report!

The map blitting functions seem to have trouble with blitting transparant onto transparant..

[code language="bennu"]

import "mod_dir"
import "mod_draw"
import "mod_debug"
import "mod_grproc"
import "mod_key"
import "mod_map"
import "mod_math"
import "mod_proc"
import "mod_screen"
import "mod_string"
import "mod_sys"
import "mod_text"
import "mod_video"
import "mod_wm"


global
   int mapToBlit;
   int mapToBlitOn;
end

process main();
private
   int i,j;
begin
   set_title("Bug!");
   set_mode(320,240,32);
   
   //Colour the background
   map_clear(0,0,rgb(200,100,100));
   
   //Make a map to draw a circle in and make it green
   mapToBlit = map_new(100,100,32);
   map_clear(0,mapToBlit,rgb(0,200,0));
   
   //Make every point further than 30px from the center transparant
   for(i=0;i<100;i++)
      for(j=0;j<100;j++)
         if(fget_dist(50,50,i,j) > 30)
            map_put_pixel(0,mapToBlit,i,j,rgba(0,0,0,0));
         end
      end
   end
   
   //Make a big empty map
   mapToBlitOn = map_new(320,240,32);
   
   
   //Try to put the circle on the empty map
   map_put(0,mapToBlitOn,mapToBlit,160,120);
   
   
   //Should give a green circle on the red main background
   graph = mapToBlitOn;
   x = 160; y = 120;
   
   //But it doesn't, even though the map with the circle DOES have transparant surroundings!
   while(!key(_ESC) && !exit_status)
   
      //Press S to see that the map with the circle is transparant
      if(key(_s))
         graph = mapToBlit;
      end
      
      frame;
   end
end
[/code]
Título: Re: Developer's diary
Publicado por: Windgate en Marzo 10, 2010, 02:29:08 pm
Some graphic functions don't works well with 32 bits colour mode... I don't know what is a "blit", but that bug may be only with 32 bits colour mode.
Título: Re: Developer's diary
Publicado por: josebita en Marzo 10, 2010, 10:06:17 pm
I think that the blitting functions don't work in 32bpp mode because of huge memory usage issues.
I recall discussing this some time ago, and Splinter argued that this would result in a huge memory footprint for Bennu.
Título: Re: Developer's diary
Publicado por: SplinterGU en Marzo 11, 2010, 02:21:43 am
I was made the changes, but I lost them...
Título: Re: Developer's diary
Publicado por: DCelso en Marzo 11, 2010, 08:04:01 am
ohh, It's a bad notice. and ¿Did you forget the changes in your mind?
Título: Re: Developer's diary
Publicado por: SplinterGU en Marzo 11, 2010, 04:45:53 pm
I don't need remember it... I need write lot of code... the changes mean arround 100 or 200 lines of code... I don't remember, but are several lines...
Título: Re: Developer's diary
Publicado por: SplinterGU en Octubre 26, 2010, 01:39:50 am
RC18 (r181) available

Snapshot: http://betatester.bennugd.org/snapshot/
Sources: http://bennugd.svn.sourceforge.net/
Título: Re: Developer's diary
Publicado por: SplinterGU en Enero 04, 2011, 10:48:22 pm
RC20 released.

List of changes:

- char[] initialization fix         
- full arrays copy support added
- glyph_set fix
- better error messages
- Added 1bpp png support (save/load)
- Multiple sources can be compiled from command line (like #include)
- new fonts functions, new_fnt or fnt_new.

syntax:

FNT_NEW (CHARSET, DEPTH)
FNT_NEW (FILE, GRAPH, CHARSET, WITDH, HEIGHT, FIRST, LAST, FLAGS)

where CHARSET can be:

CHARSET_ISO8859
CHARSET_CP850

where flags can be:

NFB_VARIABLEWIDTH
NFB_FIXEDWIDTH

The most sexy function is the last one [ FNT_NEW (FILE, GRAPH, CHARSET, WITDH, HEIGHT, FIRST, LAST, FLAGS) ], this function allow us create font from maps loaded in memory.

- Video blitter crash fix
- Optimize memory used for strings in compilation
- Fix max sources files in debug information (before 256, now 4093)
- Fix dcb version detection
- Several improvements in the core
- Better debug info messages
- Compilation warnings now are disabled by default
- New lib system, now can be possible build dcl libraries.
Título: Re: Developer's diary
Publicado por: SplinterGU en Enero 05, 2011, 01:11:48 am
- New version, fix functions are interpreted as process
Título: Re: Developer's diary
Publicado por: SplinterGU en Enero 05, 2011, 02:15:30 pm
- mod_debug fix, for support new dcb files.
Título: Re: Developer's diary
Publicado por: handsource-dyko en Enero 05, 2011, 03:21:32 pm
Cool that it's now possible to create fonts. I could envision a font creation tool being made with bennu. Very handy that you can create dcb libs, (I've peeked on the spanish forum) that seems very usefull for a modular software design approach. Can you compile the dcl files seperately and update these library functions without having to recompile the entire program that uses it? That would make it possible to make a build system.

I've read that it's now possible to copy array's. Can this also be used for structs, and does the size matter? I suppose the target array needs to be the same size or larger then the source array.
Título: Re: Developer's diary
Publicado por: SplinterGU en Enero 05, 2011, 08:47:36 pm
At this moment, you need rebuild your dcb... maybe in the future this don't be necessary.

you can copy arrays and structs, don't matter size, well the elements to copy must be same size.
Título: Re: Developer's diary
Publicado por: SplinterGU en Enero 20, 2011, 04:10:08 am
- fix dcl system
- fix debug in libmode

This is an important bug if anybody use dcl files or compile using a dcl file... I must release a new version..
Título: Re: Developer's diary
Publicado por: SplinterGU en Septiembre 13, 2011, 12:10:12 am
- add build compile script for mingw32 cross on linux
- change all sdk now on /opt
Título: Re: Developer's diary
Publicado por: handsource-dyko en Septiembre 13, 2011, 08:37:19 am
If I undstand this correctly, I can now compile a win32 version of bennu in linux without having to use that dreadfull mingw32 on windows?
(something I did not get to work at all because I'm stupid when it comes to make and gnu tools wich require the knowledge of a rocket scientist).
Título: Re: Developer's diary
Publicado por: josebita en Septiembre 13, 2011, 08:44:30 am
Yeah, that's right!
You can now compile bennugd for windows using the dreadful mingw32 on linux!  :P
Título: Re: Developer's diary
Publicado por: SplinterGU en Septiembre 13, 2011, 12:44:38 pm
without no...

you must compile using mingw32 linux.
Título: Re: Developer's diary
Publicado por: handsource-dyko en Septiembre 13, 2011, 12:46:33 pm
So, it should be easier this way, since the gnu tools are native part of linux. Gcc seems quite alien on windows. It was made for unix like
enviornments. On linux pretty much everything seems to be in place by most distributions, but on windows you need mingw. To me, gnu tools and windows seem like to be "incompatible worlds" to each other. I've read that there's some project sponsered by apple and google to replace gcc by some bsd licensed thing. It's apperantly more modern than gnu. :D
Título: Re: Developer's diary
Publicado por: SplinterGU en Septiembre 13, 2011, 01:02:32 pm
but, is a bit complex configure the mingw32 linux...
Título: Re: Developer's diary
Publicado por: josebita en Septiembre 13, 2011, 03:01:14 pm
So, it should be easier this way, since the gnu tools are native part of linux. Gcc seems quite alien on windows. It was made for unix like
enviornments. On linux pretty much everything seems to be in place by most distributions, but on windows you need mingw. To me, gnu tools and windows seem like to be "incompatible worlds" to each other. I've read that there's some project sponsered by apple and google to replace gcc by some bsd licensed thing. It's apperantly more modern than gnu. :D
Once you've set up the dependencies, cross compiling should be a matter of running the script and it should be just as easy in windows as it is in linux provided you're using something like msys in win.

What apple is sponsoring is a different compiler. It can also be used to compile bennu, but yoy'd still have to set up the dependencies, which is the hard part.

I'd like to set up a page on the wiki onsetting up the system for cross compiling, when I find some free time.
Título: Re:Developer's diary
Publicado por: SplinterGU en Febrero 25, 2012, 12:28:51 am
- Add new functions
WRITE*(fontid, x, y, z, alignm, ...)
SET_TEXT_COLOR(textid, color)
GET_TEXT_COLOR(textid)
MOVE_TEXT(textid, x, y, z)

Título: Re:Developer's diary
Publicado por: SplinterGU en Febrero 25, 2012, 04:03:42 am

- compiler improved, now can possible mix overload functions with V++
  and others params, but it must get diffent params count, pe.:

  "IIIIV++"

  and

  "IIIIIV++"

  and

  "IIIIIII"

Título: Re:Developer's diary
Publicado por: SplinterGU en Febrero 25, 2012, 04:12:31 am
code sample

Código: [Seleccionar]
import "mod_text";
import "mod_mouse";
import "mod_key";
import "mod_video";
import "mod_rand";
import "mod_map";

private
    txt[10];
    counter;
    tz;
begin
    set_mode(640,480,32);

    txt[0]=write_int(0,10,10,10,0,&counter);
    txt[1]=write_int(0,10,20,-5,0,&tz);
    txt[2]=write(0,10,10,0,0,"hello world");

    set_text_color(txt[1], rgb(255,0,0));


    while(!key(_ESC))

        counter++;

        move_text(txt[2], mouse.x, mouse.y, tz );

        set_text_color(txt[0], rand(0101010h, 0ffffffh));

        if ( key( _DOWN ) ) tz--; end
        if ( key( _UP ) ) tz++; end

        frame;
    end
end

use the mouse for move the "hello world" text, and use UP and DOWN for change Z of this text.
you can move it over the other 2 texts, that are in differents Z.
Título: Re:Developer's diary
Publicado por: handsource-dyko en Febrero 25, 2012, 11:10:51 am

- compiler improved, now can possible mix overload functions with V++
  and others params, but it must get diffent params count, pe.:

  "IIIIV++"

  and

  "IIIIIV++"

  and

  "IIIIIII"



Ehhh.... What is function overloading exactly? Could you be a bit more specific?
Título: Re:Developer's diary
Publicado por: SplinterGU en Febrero 25, 2012, 04:17:13 pm
modules/dll/so functions.
Título: Re:Developer's diary
Publicado por: SplinterGU en Febrero 26, 2012, 04:56:05 am
- better map render with small size_x and/or size_y.
Título: Re:Developer's diary
Publicado por: SplinterGU en Febrero 28, 2012, 11:04:15 pm
- new internal lib for background load
- fix bgload fpg & others
- add new backgound load functions
LOAD_MAP(filename, &id)
LOAD_PNG(filename, &id)
LOAD_PCX(filename, &id)
LOAD_SONG(filename, &id)
LOAD_WAV(filename, &id)
LOAD_PAL(filename, &id)
LOAD_FNT(filename, &id)
LOAD_BDF(filename, &id)
MAP_LOAD(filename, &id)
PNG_LOAD(filename, &id)
PCX_LOAD(filename, &id)
SONG_LOAD(filename, &id)
WAV_LOAD(filename, &id)
PAL_LOAD(filename, &id)
FNT_LOAD(filename, &id)
BDF_LOAD(filename, &id)
Título: Re:Developer's diary
Publicado por: josebita en Febrero 28, 2012, 11:21:58 pm
Jeje, vuelves a la carga, ¿eh?.


==========


[Ups! Edit] You're back in track, right?
Título: Re:Developer's diary
Publicado por: SplinterGU en Febrero 28, 2012, 11:24:49 pm
:)

liberando la lista de pendientes... y pensando en algunas otras cosas...
Título: Re:Developer's diary
Publicado por: KeoH en Febrero 29, 2012, 01:39:39 am
:)

liberando la lista de pendientes... y pensando en algunas otras cosas...


Perfect ... un dia de estos nos tienes q contar cuales son tus ideas del desarrollo de Bennu a medio y largo plazo xDD Karma .. esto es algo estupendo para los q estamos experimentando con juegos bennu en fullHD (1920x1080) :)
Título: Re:Developer's diary
Publicado por: SplinterGU en Febrero 29, 2012, 02:38:00 am
I can't...

I must keep new feature in secret until I can release them...
Título: Re:Developer's diary
Publicado por: SplinterGU en Marzo 06, 2012, 05:24:15 am
- now if set_mode fail return -1, else return 0
Título: Re:Developer's diary
Publicado por: SplinterGU en Marzo 17, 2012, 05:10:00 pm
- several bug fix in pal system functions
Título: Re:Developer's diary
Publicado por: SplinterGU en Marzo 22, 2012, 02:47:55 am
- fix font cp850 charset use.
Título: Re:Developer's diary
Publicado por: SplinterGU en Marzo 23, 2012, 04:30:25 pm
r282 released!
Título: Re:Developer's diary
Publicado por: josebita en Marzo 23, 2012, 05:46:44 pm
Great, thanks!
Título: Re:Developer's diary
Publicado por: handsource-dyko en Marzo 25, 2012, 10:25:35 am
Can someone create a small list of changes so that I can update the wiki?
Título: Re:Developer's diary
Publicado por: gecko en Marzo 25, 2012, 07:07:03 pm
I'll try to condense the changes

- Add new functions
WRITE* (fontid, x, y, z, alignm, ...)
SET_TEXT_COLOR(textid, color)
GET_TEXT_COLOR(textid)
MOVE_TEXT(textid, x, y, z)

Código: [Seleccionar]
// [ TEXT FUNCTIONS CODE SAMPLE ]
import "mod_text";
import "mod_mouse";
import "mod_key";
import "mod_video";
import "mod_rand";
import "mod_map";

private
    txt[10];
    counter;
    tz;
begin
    set_mode(640,480,32);

    txt[0]=write_int(0,10,10,10,0,&counter);
    txt[1]=write_int(0,10,20,-5,0,&tz);
    txt[2]=write(0,10,10,0,0,"hello world");

    set_text_color(txt[1], rgb(255,0,0));


    while(!key(_ESC))

        counter++;

        move_text(txt[2], mouse.x, mouse.y, tz );

        set_text_color(txt[0], rand(0101010h, 0ffffffh));

        if ( key( _DOWN ) ) tz--; end
        if ( key( _UP ) ) tz++; end

        frame;
    end
end

- add new backgound load functions
LOAD_MAP(filename, &id)
LOAD_PNG(filename, &id)
LOAD_PCX(filename, &id)
LOAD_SONG(filename, &id)
LOAD_WAV(filename, &id)
LOAD_PAL(filename, &id)
LOAD_FNT(filename, &id)
LOAD_BDF(filename, &id)
MAP_LOAD(filename, &id)
PNG_LOAD(filename, &id)
PCX_LOAD(filename, &id)
SONG_LOAD(filename, &id)
WAV_LOAD(filename, &id)
PAL_LOAD(filename, &id)
FNT_LOAD(filename, &id)
BDF_LOAD(filename, &id)

Código: [Seleccionar]
//[ BACKGROUND LOADING CODE SAMPLE 1 ]
      load_fpg("archivo_gordo.fpg", &idFpg);
      while(idFpg==-2)
            say("Big File Loading ....");
            frame;
      end
      if(idFpg==-1)
          say("Something went wrong!!");
          exit(); // o return
      end

      say("Big file loaded ok!!");

      file=idFpg;

      graph = 7;

Código: [Seleccionar]
//[ BACKGROUND LOADING CODE SAMPLE 2 ]
       load_fpg("archivo_gordo.fpg", &file);
      while(file==-2)
            say("Big File Loading ....");
            frame;
      end
      if(file==-1)
          say("Something went wrong!!");
          exit(); // o return
      end

      say("Big file loaded ok!!");

      graph = 7;

- now if set_mode fail return -1, else return 0

Título: Re:Developer's diary
Publicado por: SplinterGU en Marzo 25, 2012, 08:21:09 pm
and several fix, I remember:

- Palette system fixs
- blitter on little graphs fixed
Título: Re:Developer's diary
Publicado por: SplinterGU en Octubre 30, 2012, 03:29:21 am

- add env var VIDEO_FULLSCREEN
- add support set_video with width=0 and height=0
Título: Re:Developer's diary
Publicado por: handsource-dyko en Octubre 30, 2012, 06:43:40 pm
What is width=0 and height=0 used for?
Título: Re:Developer's diary
Publicado por: JaViS en Octubre 30, 2012, 07:03:14 pm
It'll detect your native resolution and set the game to it.
Título: Re:Developer's diary
Publicado por: JaViS en Octubre 30, 2012, 07:03:49 pm
- add env var VIDEO_FULLSCREEN


Great addition by the way!
Título: Re:Developer's diary
Publicado por: handsource-dyko en Octubre 31, 2012, 08:05:38 am
Oh, so it happens automatically this way. Nice!  :)
Título: Re:Developer's diary
Publicado por: MisterN en Noviembre 01, 2012, 04:20:11 am
could you make that work with scalemode?
Título: Re:Developer's diary
Publicado por: SplinterGU en Noviembre 01, 2012, 07:50:16 am
could you make that work with scalemode?

which of them? enviroment vars? width = height = 0? which?
Título: Re:Developer's diary
Publicado por: MisterN en Noviembre 01, 2012, 10:20:52 pm
width = height = 0
Título: Re:Developer's diary
Publicado por: SplinterGU en Noviembre 01, 2012, 10:58:25 pm
scale mode don't have width or/and height...

scale_resolution have it... and yes, scale_resolution can be w=0,h=0
Título: Re:Developer's diary
Publicado por: Grew en Julio 25, 2015, 08:17:11 am
Is there a depot of bennu sources ? It will be nice if we could contribute and send pull request. What do you think ?
Título: Re:Developer's diary
Publicado por: Grew en Julio 29, 2015, 07:22:37 pm
Oops Sorry, I didn't know there was a sourceforge depot : http://sourceforge.net/p/bennugd/code/HEAD/tree/.
Título: Re:Developer's diary
Publicado por: SplinterGU en Marzo 07, 2017, 04:34:52 am
r338 released!