shithub: tinygl

Download patch

ref: 59367f98c6d6c435cb1cf0b6d8d690520c206661
parent: 06766bd1561b74aaa5cdd562ce193a08d994a74b
author: David <gek@katherine>
date: Mon Feb 15 08:10:01 EST 2021

opinfo update

--- a/LICENSE
+++ b/LICENSE
@@ -21,4 +21,4 @@
 If you redistribute modified sources, I would appreciate that you
 include in the files history information documenting your changes.
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Version: TinyGL 0.5-CCHADS
\ No newline at end of file
+Version: TinyGL 0.8-CCHADS
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@
 
 
 
-TinyGL 0.7 (c) 1997-2021 Fabrice Bellard, C-Chads, Gek (see License, it's free software)
+TinyGL 0.8 (c) 1997-2021 Fabrice Bellard, C-Chads, Gek (see License, it's free software)
 
 This is a maintained fork of TinyGL, by the C-Chads.
 It is a small, suckless Software-only partial GL 1.1 implementation.
@@ -58,7 +58,7 @@
 
 * A lot of prototypes are missing.
 
-* A triangle cannot be textured and lit at the same time.
+* A triangle cannot be textured and lit at the same time. (This is planned to be fixed)
 
 * <Undocumented limitations that have not been tested>
 
@@ -91,6 +91,8 @@
 
 ### glTextSize(GLTEXTSIZE mode)
 
+This function can be added to display lists.
+
 Set size of text drawn to the buffer in aforementioned function.
 
 ### glPlotPixel(int x, int y, unsigned int pixel)
@@ -127,7 +129,7 @@
 The library is now able to be configured properly for RGBA rendering. Note that the output *is actually ABGR* 
 but adjusting it is easy, see the SDL examples under SDL_EXAMPLES (They require SDL 1.2 and Mixer to compile)
 
-The library is sometimes by default configured for RGBA or 5R6G5B, check zfeatures.h and change the values in this table:
+The library is sometimes by default configured for RGBA or 5R6G5B, check include/zfeatures.h and change the values in this table:
 ```c
 #define TGL_FEATURE_8_BITS         0
 #define TGL_FEATURE_24_BITS        0
--- a/src/LICENSE
+++ b/src/LICENSE
@@ -21,4 +21,4 @@
 If you redistribute modified sources, I would appreciate that you
 include in the files history information documenting your changes.
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Version: TinyGL 0.7-CCHADS
+Version: TinyGL 0.8-CCHADS
--- a/src/opinfo.h
+++ b/src/opinfo.h
@@ -70,5 +70,6 @@
 
 /* Gek's Added Functions */
 ADD_OP(PlotPixel, 2, "%d %d")
+ADD_OP(TextSize, 1, "%d")
 
 #undef ADD_OP
--- a/src/ztext.c
+++ b/src/ztext.c
@@ -8,7 +8,15 @@
 #include "font8x8_basic.h"
 GLTEXTSIZE textsize = 1;
 
-void glTextSize(GLTEXTSIZE mode){textsize = mode;}//Set text size
+void glTextSize(GLTEXTSIZE mode){
+	GLParam p[2];
+	p[0].op = OP_TextSize;
+	p[1].ui = mode;
+	gl_add_op(p);
+}
+void glopTextSize(GLContext * c,GLParam * p){
+	textsize = p[1].ui;
+}//Set text size
 void renderchar(GLbyte *bitmap, GLint _x, GLint _y, GLuint p) {
     GLint x,y;
     GLint set;