資源簡介
aview的安裝包壓縮包1.3的版本,aview的安裝包壓縮包1.3的版本
代碼片段和文件信息
/*?Copyright?1993?J.?Remyn?*/
/*?This?program?is?freely?distributable?but?there?is?no?warranty?*/
/*?of?any?kind.?*/
/*?version?0.3?*/
/*?Modified?for?aaflip?version?1.0?by?Jan?Hubicka*/
#include?
#include?
#include?
#include?
#include?
#include?“general.h“
#include?“fli.h“
#define?NAMELEN?256
struct?OPTIONS?{
char?filename[NAMELEN]; /*?filename?given?on?command?line?*/
char?fast; /*?1?=?play?without?delays?*/
char?verbose; /*?1?=?show?info?about?flic?file?*/
char?release; /*?1?=?don‘t?keep?frames?in?memory?*/
char?firstp; /*?1?=?process?frames?while?loading?*/
char?blank; /*?1?=?keep?black?screen?while?loading?*/
char?stdinp; /*?1?=?take?flic?file?from?stdin?*/
int?speed; /*?speed?gotten?from?command?line?(-1?if?nothing?gotten)?*/
int?playrep; /*?nr?of?times?to?play?animation?*/
}?options;
struct?FLI_frameCHUNK?{
long?size; /*?Size?of?chunk?data?part?*/
long?file_offset; /*?Offset?of?chunk?data?part?into?flic?file?*/
int?subchunks; /*?Number?of?subchunks?in?data?part?*/
void?*cd; /*?Pointer?to?memory?containing?data?part?*/
/*?is?NULL?if?data?not?kept?in?memory?*/
};
struct?FLI?{
char?filename[NAMELEN];?/*?filename?of?fli?file?*/
char?flc; /*?0?=?fli?1?=?flc?*/
int?mode; /*?vgalib?mode?number?to?be?used?*/
int?scr_width; /*?width?of?screen?mode?used?*/
int?scr_height; /*?guess?*/
int?current; /*?current?frame?index?*/
long?time; /*?time?of?last?processed?frame?in?usec?*/
FILE?*f; /*?file?pointer?of?opened?flic?file?*/
struct?FLI_HEADER?h; /*?128?byte?fli?file?header?structure?*/
struct?FLI_frameCHUNK?*frame;
/*?pointer?to?an?allocated?‘array‘?of?
???ames>?FLI_frameCHUNK?structs?*/
}?fli;
static?aa_palette?pal;
static?aa_context?*context;
static?aa_renderparams?*params;
static?char?*graph_mem;
static?void?dcd_color_64(?char?*data?)?{
uchar?start?=?0;
int?ops;
int?count;
int?i;
/* puts(?“color_64“?);?*/
ops?=?*(short?int?*)data;
data?=?(void?*)(((short?int?*)data)?+?1);
while(?ops--?>?0?)?{
start?+=?*(uchar?*)data;
data?=?(void?*)?((uchar?*)data?+?1);
if(?(count?=?(int)*(uchar?*)data)?==?0?)
count?=?256;
data?=?(void?*)?((uchar?*)data?+?1);
for(?i=0;?i /*?(s)vgalib?requires?a?table?of?ints?for?setting?a?group
?*?of?colors?quickly?but?we‘ve?got?a?table?of?chars?:(?
?*?so?we?have?to?set?each?color?individually?(slow)?*/
aa_setpalette(pal?start?+?i?
((int)*(uchar?*)data)*4
((int)*((uchar?*)data+1)*4)
((int)*((uchar?*)data+2)*4)
);
data?=?(void?*)((uchar?*)data?+?3);
}
start?+=?count;
}
}
static?void?dcd_color_256(?char?*data?)?{
uchar?start?=?0;
int?ops;
int?count;
int?i;
/* puts(?“color_256“?);?*/
ops?=?*(short?int?*)data;
data?=?(void?*)((short?int?*)data?+?1);?
while(?ops--?>?0?)?{
start?+=?*(uchar?*)data;
data?=?(void?*)((uchar?*)data?+?1);
if(?(count?=?(int)*(uchar?*)data)?==?0?)
count?=?256;
data?=?(void?*)((uchar?*)data?+?1);
for(?i=0;?i
評論
共有 條評論