X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fdots.c;h=07f3d3b23dc066bf10b0e0de875d3357e09a4bb9;hb=refs%2Fheads%2Frenders;hp=8b4bb8e2059c559e6b7be6866b0b5cc8454e7068;hpb=534310c1f131bb9a53be865c32d90342ed026734;p=flatwaifu.git diff --git a/src/dots.c b/src/dots.c index 8b4bb8e..c529c81 100644 --- a/src/dots.c +++ b/src/dots.c @@ -1,32 +1,26 @@ -/* - Copyright (C) Prikol Software 1996-1997 - Copyright (C) Aleksey Volynskov 1996-1997 - Copyright (C) 2011 - - This file is part of the Doom2D:Rembo project. - - Doom2D:Rembo is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - Doom2D:Rembo 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 St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +/* Copyright (C) 1996-1997 Aleksey Volynskov + * Copyright (C) 2011 Rambo + * Copyright (C) 2020 SovietPony + * + * This program 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, version 3 of the License ONLY. + * + * This program 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 . + */ #include "glob.h" +#include #include -#include "vga.h" #include "view.h" #include "dots.h" #include "misc.h" -#include "my.h" #define MAXINI 50 #define MAXSR 20 @@ -40,8 +34,6 @@ #define SP_MINT 5 #define SP_MAXT 7 -extern byte z_dot; - typedef struct{ int xv,yv; byte c,t; @@ -53,47 +45,6 @@ static init_t bl_ini[MAXINI],sp_ini[MAXINI]; static int bl_r,sp_r,sr_r,sxr[MAXSR],syr[MAXSR]; static int ldot; -void DOT_savegame (FILE *h) { - int i, n; - for (i = n = 0; i < MAXDOT; ++i) { - if (dot[i].t) { - ++n; - } - } - myfwrite32(n, h); - for (i = 0; i < MAXDOT; ++i) { - if (dot[i].t) { - myfwrite32(dot[i].o.x, h); - myfwrite32(dot[i].o.y, h); - myfwrite32(dot[i].o.xv, h); - myfwrite32(dot[i].o.yv, h); - myfwrite32(dot[i].o.vx, h); - myfwrite32(dot[i].o.vy, h); - myfwrite32(dot[i].o.r, h); - myfwrite32(dot[i].o.h, h); - myfwrite8(dot[i].c, h); - myfwrite8(dot[i].t, h); - } - } -} - -void DOT_loadgame (FILE *h) { - int i, n; - n = myfread32(h); - for (i = 0; i < n; i++) { - dot[i].o.x = myfread32(h); - dot[i].o.y = myfread32(h); - dot[i].o.xv = myfread32(h); - dot[i].o.yv = myfread32(h); - dot[i].o.vx = myfread32(h); - dot[i].o.vy = myfread32(h); - dot[i].o.r = myfread32(h); - dot[i].o.h = myfread32(h); - dot[i].c = myfread8(h); - dot[i].t = myfread8(h); - } -} - void DOT_init(void) { int i;