jinx: finish doomgeneric port

This commit is contained in:
Matheus
2022-10-21 18:25:56 -03:00
parent 97f2f25752
commit 897019dca7
+21 -17
View File
@@ -1,7 +1,7 @@
diff -ruN doomgeneric/doomgeneric/doomgeneric_astral.c Astral/sources/doomgeneric/doomgeneric/doomgeneric_astral.c diff -ruN -x Astral/sources/doomgeneric/doomgeneric/doomgeneric.map doomgeneric/doomgeneric/doomgeneric_astral.c Astral/sources/doomgeneric/doomgeneric/doomgeneric_astral.c
--- doomgeneric/doomgeneric/doomgeneric_astral.c 1969-12-31 21:00:00.000000000 -0300 --- doomgeneric/doomgeneric/doomgeneric_astral.c 1969-12-31 21:00:00.000000000 -0300
+++ Astral/sources/doomgeneric/doomgeneric/doomgeneric_astral.c 2022-10-14 18:57:20.269819323 -0300 +++ Astral/sources/doomgeneric/doomgeneric/doomgeneric_astral.c 2022-10-21 18:20:21.098988763 -0300
@@ -0,0 +1,194 @@ @@ -0,0 +1,198 @@
+#include "doomkeys.h" +#include "doomkeys.h"
+ +
+#include "doomgeneric.h" +#include "doomgeneric.h"
@@ -23,6 +23,10 @@ diff -ruN doomgeneric/doomgeneric/doomgeneric_astral.c Astral/sources/doomgeneri
+static void* frame; +static void* frame;
+static struct termios ttysave; +static struct termios ttysave;
+ +
+static struct timespec starttime;
+
+
+
+static int seekordie(int fd, off_t offset, int whence){ +static int seekordie(int fd, off_t offset, int whence){
+ int ret = lseek(fd, offset, whence); + int ret = lseek(fd, offset, whence);
+ if(ret == -1){ + if(ret == -1){
@@ -180,25 +184,25 @@ diff -ruN doomgeneric/doomgeneric/doomgeneric_astral.c Astral/sources/doomgeneri
+ return 1; + return 1;
+} +}
+ +
+void DG_SleepMs(uint32_t ms){} +void DG_SleepMs(uint32_t ms){
+static int aa = 0; + usleep(ms*1000);
+ +}
+// I need gettimeanddate() already
+ +
+uint32_t DG_GetTicksMs(){ +uint32_t DG_GetTicksMs(){
+ static int w = 0; +
+ if(w++ == 40000){ + struct timespec time;
+ w = 0; +
+ return aa++; + clock_gettime(CLOCK_REALTIME, &time);
+ } +
+ else { + return time.tv_sec * 1000 + time.tv_nsec / 1000000;
+ return aa; +
+ } +
+} +}
+
+void DG_SetWindowTitle(const char* title){} +void DG_SetWindowTitle(const char* title){}
diff -ruN doomgeneric/doomgeneric/Makefile Astral/sources/doomgeneric/doomgeneric/Makefile diff -ruN -x Astral/sources/doomgeneric/doomgeneric/doomgeneric.map doomgeneric/doomgeneric/Makefile Astral/sources/doomgeneric/doomgeneric/Makefile
--- doomgeneric/doomgeneric/Makefile 2022-10-08 20:18:58.119998127 -0300 --- doomgeneric/doomgeneric/Makefile 2022-10-08 20:18:58.119998127 -0300
+++ Astral/sources/doomgeneric/doomgeneric/Makefile 2022-10-14 17:10:52.856538703 -0300 +++ Astral/sources/doomgeneric/doomgeneric/Makefile 2022-10-14 19:18:47.719808959 -0300
@@ -12,17 +12,17 @@ @@ -12,17 +12,17 @@
endif endif