X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fpalettec.c;h=8f1ed3e7758121a4bc9ae5a81945320ec817608c;hb=2f1eeec31951744f38a172b730340610330ad754;hp=ba5e0b28a39eee47acd7c1220ef84da9e353ecac;hpb=e0335fc72d6856ec3df7a081281ebd8f36e3981d;p=16.git diff --git a/src/palettec.c b/src/palettec.c old mode 100644 new mode 100755 index ba5e0b28..8f1ed3e7 --- a/src/palettec.c +++ b/src/palettec.c @@ -1,38 +1,44 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 - * - * This file is part of Project 16. - * - * Project 16 is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Project 16 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see , or - * write to the Free Software Foundation, Inc., 51 Franklin Street, - * Fifth Floor, Boston, MA 02110-1301 USA. - * - */ - -#include "src/lib/modex16.h" +/* Project 16 Source Code~ + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include "src/lib/16_vl.h" void -main() { - byte *pal; +main(int argc, char *argv[]) +{ + static global_game_variables_t gvar; + char *bakapee; + + bakapee = malloc(64); + if(argv[1]) bakapee = argv[1]; + else bakapee = "data/default.pal"; - modexEnter(); + VGAmodeX(1, 1, &gvar); - pal = modexNewPal(); - modexPalSave(pal); + modexPalSave(&(gvar.video.palette)); - modexSavePalFile("data/default.pal", pal); + modexSavePalFile(bakapee, &(gvar.video.palette)); - modexLeave(); + VGAmodeX(0, 1, &gvar); + free(bakapee); }