fixed minor issues
authorJohn Tsiombikas <nuclear@member.fsf.org>
Sat, 11 Jul 2020 05:18:11 +0000 (01:18 -0400)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Sat, 11 Jul 2020 05:18:11 +0000 (01:18 -0400)
GNUmakefile
libs/imago/src/conv.c
libs/imago/src/filetga.c
libs/imago/src/inttypes.h [deleted file]
libs/imago/src/types.h [new file with mode: 0644]
src/glut/main.c

index 0054bbc..8b0f6fb 100644 (file)
@@ -15,8 +15,8 @@ warn = -pedantic -Wall -Wno-unused-variable -Wno-unused-function
 #opt = -O3 -ffast-math
 dbg = -g
 
 #opt = -O3 -ffast-math
 dbg = -g
 
-CFLAGS = $(arch) $(warn) -MMD $(opt) -fno-pie -fno-strict-aliasing $(dbg) $(inc)
-LDFLAGS = $(arch) -no-pie -Llibs/imago -Llibs/mikmod -limago -lmikmod \
+CFLAGS = $(arch) $(warn) -MMD $(opt) -fno-strict-aliasing $(dbg) $(inc)
+LDFLAGS = $(arch) -Llibs/imago -Llibs/mikmod -limago -lmikmod \
                  $(sndlib_$(sys)) -lm
 
 cpu ?= $(shell uname -m | sed 's/i.86/i386/')
                  $(sndlib_$(sys)) -lm
 
 cpu ?= $(shell uname -m | sed 's/i.86/i386/')
index 94fb87f..756469c 100644 (file)
@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 #include <string.h>
 #include "imago2.h"
 */
 #include <string.h>
 #include "imago2.h"
-#include "inttypes.h"
+#include "types.h"
 
 /* pixel-format conversions are sub-optimal at the moment to avoid
  * writing a lot of code. optimize at some point ?
 
 /* pixel-format conversions are sub-optimal at the moment to avoid
  * writing a lot of code. optimize at some point ?
index 97504ca..2192ff4 100644 (file)
@@ -20,7 +20,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <string.h>
 #include <stdlib.h>
 
 #include <string.h>
 #include <stdlib.h>
-#include "inttypes.h"
+#include "types.h"
 #include "imago2.h"
 #include "ftmodule.h"
 
 #include "imago2.h"
 #include "ftmodule.h"
 
diff --git a/libs/imago/src/inttypes.h b/libs/imago/src/inttypes.h
deleted file mode 100644 (file)
index cbcc4d0..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-colcycle - color cycling image viewer
-Copyright (C) 2016  John Tsiombikas <nuclear@member.fsf.org>
-
-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 INT_TYPES_H_
-#define INT_TYPES_H_
-
-#if defined(__DOS__) || defined(__MSDOS__)
-typedef char int8_t;
-typedef short int16_t;
-typedef long int32_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned long uint32_t;
-
-typedef unsigned long intptr_t;
-#else
-
-#ifdef _MSC_VER
-typedef __int8 int8_t;
-typedef __int16 int16_t;
-typedef __int32 int32_t;
-typedef unsigned __int8 uint8_t;
-typedef unsigned __int16 uint16_t;
-typedef unsigned __int32 uint32_t;
-
-#ifdef _WIN64
-typedef __int64 intptr_t;
-#else
-typedef __int32 intptr_t;
-#endif
-#else  /* not msvc */
-
-#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199900
-#include <stdint.h>
-#else
-#include <sys/types.h>
-#endif
-
-#endif /* end !msvc */
-#endif /* end !dos */
-
-#endif /* INT_TYPES_H_ */
diff --git a/libs/imago/src/types.h b/libs/imago/src/types.h
new file mode 100644 (file)
index 0000000..d06e5c0
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+colcycle - color cycling image viewer
+Copyright (C) 2016  John Tsiombikas <nuclear@member.fsf.org>
+
+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 INT_TYPES_H_
+#define INT_TYPES_H_
+
+#if defined(__DOS__) || defined(__MSDOS__)
+typedef char int8_t;
+typedef short int16_t;
+typedef long int32_t;
+
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned long uint32_t;
+
+typedef unsigned long intptr_t;
+#else
+
+#ifdef _MSC_VER
+typedef __int8 int8_t;
+typedef __int16 int16_t;
+typedef __int32 int32_t;
+typedef unsigned __int8 uint8_t;
+typedef unsigned __int16 uint16_t;
+typedef unsigned __int32 uint32_t;
+
+#ifdef _WIN64
+typedef __int64 intptr_t;
+#else
+typedef __int32 intptr_t;
+#endif
+#else  /* not msvc */
+
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199900
+#include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
+
+#endif /* end !msvc */
+#endif /* end !dos */
+
+#endif /* INT_TYPES_H_ */
index 79833d9..638438d 100644 (file)
@@ -73,7 +73,12 @@ static cgm_quat rot = {0, 0, 0, 1};
 int main(int argc, char **argv)
 {
        glutInit(&argc, argv);
 int main(int argc, char **argv)
 {
        glutInit(&argc, argv);
-       glutInitWindowSize(1280, 960);
+
+       if(glutGet(GLUT_SCREEN_HEIGHT) <= 1024) {
+               glutInitWindowSize(640, 480);
+       } else {
+               glutInitWindowSize(1280, 960);
+       }
        glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
        glutCreateWindow("Mindlapse");
 
        glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
        glutCreateWindow("Mindlapse");