From 9fa7c26b174b79fe66a3bcb0b6b69586044480c6 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Fri, 21 Aug 2020 22:56:58 +0930 Subject: added license information --- chip8.c | 15 +++++++++++++++ chip8.h | 15 +++++++++++++++ main.c | 45 ++++++++++++++++----------------------------- 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 . + */ + #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 . + */ + #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 . + */ + #include #include #include @@ -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(); -- cgit v1.2.3