X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fpalettel.c;h=929db1f5c80ab3b5d51681d2b5db78b953b8f691;hb=04fe364b1c5b4fdddca823044c2d584531691af6;hp=7493b7e47beeff2a8dfd9e10deb5bb0b03247393;hpb=ac915c4d7c3e89f7eb2d37209ca54fa0bcad5f37;p=proj16%2F16.git diff --git a/src/palettel.c b/src/palettel.c index 7493b7e4..929db1f5 100755 --- a/src/palettel.c +++ b/src/palettel.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2021 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -19,28 +19,25 @@ * Fifth Floor, Boston, MA 02110-1301 USA. * */ - -#include "src/lib/modex16.h" - -void -main(int argc, char *argv[]) +#include "src/lib/16_vl.h" +void main(int argc, char *argv[]) { - byte *pal; - char *bakapee; - - //modexEnter(); - - //pal = modexNewPal(); - bakapee = malloc(64); - - if(argv[1]) bakapee = argv[1]; - else bakapee = "data/default.pal"; -// modexPalSave(pal); - modexPalBlack(); - - modexLoadPalFile(bakapee, &pal); - modexFadeOn(1, pal); - modexPalUpdate1(pal); + static global_game_variables_t gvar; word i; char bakapee[64] = "data/16.pal"; + if(argv[1]) strcpy(bakapee, argv[1]);// modexPalSave(&gvar.video.dpal); modexFadeOff(4, &gvar.video.dpal); modexPalBlack(); - //modexLeave(); + TL_VidInit(&gvar); VGAmodeX(1, 0, &gvar); + VL_LoadPalFile(bakapee, &gvar.video.palette, &gvar); //modexLoadPalFile(bakapee, &(gvar.video.palette)); + PALPROGRAMSNEWPAGE + VL_ShowPage(&gvar.video.page[0], 1, 0); + modexpdump(0, &gvar); + while(!kbhit()){ /*VL_modexPalScramble(&gvar.video.palette);*/ } + modexPalSave(&gvar.video.palette); + VGAmodeX(0, 0, &gvar); + for(i=0;i<16;i++) + { + printf("%02x", gvar.video.palette[i]); + if((!(i%16)) && i) printf("\n"); + else printf(" "); + } + modexPalUpdate(&gvar.video.palette); }