X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_vl.h;h=0612a9bf6c585446bc79ec1bdc6d946a5769c81d;hb=8a04643047887934be90690e6a1254b403b17fc9;hp=a3769a28216aee6c9803865982e88e30064433cf;hpb=c5e2579e86b089548e88b75af850c6315f874b1d;p=16.git diff --git a/src/lib/16_vl.h b/src/lib/16_vl.h index a3769a28..0612a9bf 100755 --- a/src/lib/16_vl.h +++ b/src/lib/16_vl.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2022 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -68,6 +68,8 @@ typedef union /* -======================= Constants & Vars ==========================- */ extern byte far* VGA; /* The VGA Memory */ +extern byte far gamepal; +extern byte far corepal; //core palette used universally #define SCREEN_SEG 0xa000 #define VIDEO_INT 0x10 #define SET_MODE 0x00 @@ -200,12 +202,27 @@ void modexFlashOn(word fade, byte *palette); void modexFlashOff(word fade, byte *palette); /* palette loading and saving */ +void VL_SetPalette (byte far *palette, video_t *v); void modexPalSave(byte *palette); -//byte *modexNewPal(); +byte *modexNewPal(); void modexLoadPalFile(char *filename, byte *palette); +static void loadPcxStage1(FILE *file, bitmap_t *result); +void loadPcxPalette(FILE *file, bitmap_t *result); +bitmap_t bitmapLoadPcx(char *filename); +tileset_t bitmapLoadPcxTiles(char *filename, word twidth, word theight); +void oldDrawBmp(byte far* page, int x, int y, bitmap_t *bmp, byte sprite); +void modexDrawBmp(page_t *page, int x, int y, bitmap_t *bmp); +void modexDrawBmpRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp); +void modexDrawSprite(page_t *page, int x, int y, bitmap_t *bmp); +void modexDrawSpriteRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp); +void modexDrawBmpPBuf(page_t *page, int x, int y, planar_buf_t *bmp); /*pbuf version*/ +void modexDrawBmpPBufRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, planar_buf_t *bmp); +void modexDrawSpritePBuf(page_t *page, int x, int y, planar_buf_t *bmp); +void modexDrawSpritePBufRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, planar_buf_t *bmp); void VL_LoadPalFile(const char *filename, byte *palette, global_game_variables_t *gvar); void VL_LoadPalFileCore(byte *palette, global_game_variables_t *gvar); -//void VLL_LoadPalFilewithoffset(const char *filename, byte *palette, word o, global_game_variables_t *gvar); +void VL_SetCorePal(global_game_variables_t *gvar); +void VLL_LoadPalFilewithoffset(const char *filename, byte *palette, word o, word palsize, global_game_variables_t *gvar); void VL_UpdatePaletteWrite(byte *palette, word o, word palsize, global_game_variables_t *gvar); void VL_PaletteSync(global_game_variables_t *gvar); void modexSavePalFile(char *filename, byte *palette);