diff --git a/src/soft/vga.c b/src/soft/vga.c
index ce83101ec24dbabf5d61fad05295fb9915ca5705..5f9078533aea39957dfa1c9ae8acaaabbb7010da 100644 (file)
--- a/src/soft/vga.c
+++ b/src/soft/vga.c
-/*
- Copyright (C) Prikol Software 1996-1997
- Copyright (C) Aleksey Volynskov 1996-1997
- Copyright (C) <ARembo@gmail.com> 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 <http://www.gnu.org/licenses/> 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 <http://www.gnu.org/licenses/>.
+ */
#include "glob.h"
#include "vga.h"
#include "files.h"
#include "system.h"
+#include "common/endianness.h"
+
#include <string.h>
#include <assert.h>
return V_getvgaimg(F_getresid(name));
}
+void V_update_buffer (void) {
+ Y_get_buffer(&buffer, &buf_w, &buf_h, &pitch);
+ V_setrect(0, 0, buf_w, buf_h);
+}
+
static void draw_rect (int x, int y, int w, int h, int c) {
int i;
int x0 = max(x, cx1);
}
void V_setrect (short x, short w, short y, short h) {
+ assert(w >= 0);
+ assert(h >= 0);
cx1 = max(x, 0);
cx2 = min(x + w - 1, buf_w - 1);
cy1 = max(y, 0);