summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jones <admin@danieljon.es>2020-08-21 22:56:58 +0930
committerDaniel Jones <admin@danieljon.es>2020-08-21 22:56:58 +0930
commit9fa7c26b174b79fe66a3bcb0b6b69586044480c6 (patch)
tree7c943b5978eab16099323266105cd8c67eed8bce
parent96aee8e563cbe395881c86d39e46ae4649426eec (diff)
downloadchip8-9fa7c26b174b79fe66a3bcb0b6b69586044480c6.tar.gz
chip8-9fa7c26b174b79fe66a3bcb0b6b69586044480c6.zip
added license information
-rw-r--r--chip8.c15
-rw-r--r--chip8.h15
-rw-r--r--main.c45
3 files changed, 46 insertions, 29 deletions
diff --git a/chip8.c b/chip8.c
index 97d67ff..f64a207 100644
--- a/chip8.c
+++ b/chip8.c
@@ -1,3 +1,18 @@
+/*
+ * 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, either version 3 of the License, or
+ *(at your option) any later version.
+ *
+ * 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 "chip8.h"
uint16_t opcode; // 2 byte opcode
diff --git a/chip8.h b/chip8.h
index 6d59ea8..d19f439 100644
--- a/chip8.h
+++ b/chip8.h
@@ -1,3 +1,18 @@
+/*
+ * 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, either version 3 of the License, or
+ *(at your option) any later version.
+ *
+ * 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/>.
+ */
+
#ifndef CHIP8_H
#define CHIP8_H
diff --git a/main.c b/main.c
index b00d5b2..876fc1a 100644
--- a/main.c
+++ b/main.c
@@ -1,3 +1,18 @@
+/*
+ * 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, either version 3 of the License, or
+ *(at your option) any later version.
+ *
+ * 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 <stdio.h>
#include <stdlib.h>
#include <SDL2/SDL.h>
@@ -205,41 +220,13 @@ int main(int argc, char *argv[])
init_video();
- const int fps = 900;
+ const int fps = 300;
const int frame_delay = 1000/fps;
uint32_t frame_start;
uint32_t frame_time;
int do_quit = 0;
- /*
- chip8_draw_sprite(0, 0, 0xD*5, 0x5);
- chip8_draw_sprite(5, 0, 0xE*5, 0x5);
- chip8_draw_sprite(10, 0, 0xA*5, 0x5);
- chip8_draw_sprite(15, 0, 0xD*5, 0x5);
- chip8_draw_sprite(20, 0, 0xB*5, 0x5);
- chip8_draw_sprite(25, 0, 0xE*5, 0x5);
- chip8_draw_sprite(30, 0, 0xE*5, 0x5);
- chip8_draw_sprite(35, 0, 0xf*5, 0x5);
-
- chip8_draw_sprite(0, 9, 0xD*5, 0x5);
- chip8_draw_sprite(5, 9, 0xE*5, 0x5);
- chip8_draw_sprite(10, 9, 0xA*5, 0x5);
- chip8_draw_sprite(15, 9, 0xD*5, 0x5);
- chip8_draw_sprite(20, 9, 0xB*5, 0x5);
- chip8_draw_sprite(25, 9, 0xE*5, 0x5);
- chip8_draw_sprite(30, 9, 0xE*5, 0x5);
- chip8_draw_sprite(35, 9, 0xf*5, 0x5);
-
- chip8_draw_sprite(0, 20, 0x200, 0x6);
- chip8_draw_sprite(8, 20, 0x200, 0x6);
- chip8_draw_sprite(16, 20, 0x200, 0x6);
- chip8_draw_sprite(18, 20, 0x200, 0x6);
-
- chip8_draw_sprite(61, 25, 0x200, 0x6);
- chip8_draw_sprite(50, 30, 0x200, 0x6);
- */
-
while(!do_quit)
{
frame_start = SDL_GetTicks();