fpg editors being strange with image dumps

Started by MisterN, August 23, 2012, 02:28:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

handsource-dyko


SplinterGU

try with this


//BATCH FPG

#ifndef __VERSION__
    import "mod_sdlevthandler";
    import "mod_pathfind";
#else
    import "mod_map";
#endif

GLOBAL
   int num;
   int my_fpg;
   int temp_file;
   int temp_graph;
   int g, cx, cy;


PROCESS main ();
BEGIN

      // create a new fpg archive
      my_fpg = fpg_new ();

      num=1;

      FOR (num=1; num<307; num+=1)
             // get one png file an store it temporary. this assumes that the files have filenames with niumbers,
             // i.e. 001.png, 002.png, 003.png, etc
             temp_file = load_png (num+".png");

             g = map_new(map_info(0,temp_file,g_width),map_info(0,temp_file,g_height),16);

             point_get(0,temp_file,0,&cx,&cy);

             map_put(0,g,temp_file,cx,cy);

             // add the current png to the fpg
             fpg_add ( my_fpg, num, 0, g );

             // unload the temp png
             unload_map (0, temp_file);
             unload_map (0, g);
      END

      // save the fpg
      fpg_save (my_fpg, "FPG_FILE.fpg");

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

MisterN

i changed that to temp_file,0 after I posted
werg

SplinterGU

are you tried with my code? It will generate 16 bit fpg.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

MisterN

werg

SplinterGU

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