Developer's diary

Started by SplinterGU, October 19, 2008, 01:05:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SplinterGU

- several bug fix in pal system functions
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

SplinterGU

- fix font cp850 charset use.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

SplinterGU

Download Lastest BennuGD Release: http://www.bennugd.org/node/2

josebita


handsource-dyko

Can someone create a small list of changes so that I can update the wiki?

gecko

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)


// [ 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)

//[ 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;



//[ 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

Torres Baldi Studio
http://torresbaldi.com

SplinterGU

and several fix, I remember:

- Palette system fixs
- blitter on little graphs fixed
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

SplinterGU


- add env var VIDEO_FULLSCREEN
- add support set_video with width=0 and height=0
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

handsource-dyko

What is width=0 and height=0 used for?

JaViS

It'll detect your native resolution and set the game to it.
Working on Anarkade. A couch multiplayer 2D shooter.

JaViS

Working on Anarkade. A couch multiplayer 2D shooter.

handsource-dyko

Oh, so it happens automatically this way. Nice!  :)

MisterN

could you make that work with scalemode?
werg

SplinterGU

Quote from: DoctorN on November 01, 2012, 04:20:11 AM
could you make that work with scalemode?

which of them? enviroment vars? width = height = 0? which?
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

MisterN

werg