~sebsite/generic-tetromino-game

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH] Colors: add BLACK

Lorenz (xha) <me@xha.li>
Details
Message ID
<20230520141918.2073-1-me@xha.li>
DKIM signature
missing
Download raw message
Patch: +3 -0
---
Since there is white, BLACK should also exist?! The portal mod doesn't work
without it and I need it for a mod that I am currently developing :-)

 main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/main.c b/main.c
index 3637e2b..53aadad 100644
--- a/main.c
+++ b/main.c
@@ -70,6 +70,7 @@
#define INPUT_MASK_START (1 << 6)
#define INPUT_MASK_REPEAT (1 << 7)

#define BLACK 0x00000000
#define WHITE 0xffffffff
#define GREEN 0x287200ff
#define RED 0x982220ff
@@ -6855,6 +6856,8 @@ init_lua(void)
	lua_seti(L, -2, EV_TOPOUT);
	lua_setfield(L, -2, "__useroptions");
	lua_createtable(L, 0, 0); /* game.color */
	lua_pushinteger(L, (lua_Integer)BLACK);
	lua_setfield(L, -2, "BLACK");
	lua_pushinteger(L, (lua_Integer)WHITE);
	lua_setfield(L, -2, "WHITE");
	lua_pushinteger(L, (lua_Integer)GREEN);
-- 
2.40.1
Lorenz (xha) <me@xha.li>
Details
Message ID
<20230520165723.d73gnc5n3hee42sq@xha.li>
In-Reply-To
<20230520141918.2073-1-me@xha.li> (view parent)
DKIM signature
missing
Download raw message
Actually, thinking about it, it is probably not necessary since you can just
specify 0 as color. sry

On Sat, May 20, 2023 at 04:19:18PM +0200, Lorenz (xha) wrote:
> ---
> Since there is white, BLACK should also exist?! The portal mod doesn't work
> without it and I need it for a mod that I am currently developing :-)
> 
>  main.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/main.c b/main.c
> index 3637e2b..53aadad 100644
> --- a/main.c
> +++ b/main.c
> @@ -70,6 +70,7 @@
>  #define INPUT_MASK_START (1 << 6)
>  #define INPUT_MASK_REPEAT (1 << 7)
>  
> +#define BLACK 0x00000000
>  #define WHITE 0xffffffff
>  #define GREEN 0x287200ff
>  #define RED 0x982220ff
> @@ -6855,6 +6856,8 @@ init_lua(void)
>  	lua_seti(L, -2, EV_TOPOUT);
>  	lua_setfield(L, -2, "__useroptions");
>  	lua_createtable(L, 0, 0); /* game.color */
> +	lua_pushinteger(L, (lua_Integer)BLACK);
> +	lua_setfield(L, -2, "BLACK");
>  	lua_pushinteger(L, (lua_Integer)WHITE);
>  	lua_setfield(L, -2, "WHITE");
>  	lua_pushinteger(L, (lua_Integer)GREEN);
> -- 
> 2.40.1
> 
Details
Message ID
<CSRESHAM5SHG.RTIL44R6C57J@notmylaptop>
In-Reply-To
<20230520165723.d73gnc5n3hee42sq@xha.li> (view parent)
DKIM signature
missing
Download raw message
On Sat May 20, 2023 at 12:57 PM EDT, Lorenz (xha) wrote:
> Actually, thinking about it, it is probably not necessary since you can just
> specify 0 as color. sry

Hm, BLACK might still be good to have. Just for parity with WHITE and
the other colors. I'm not opposed to it. Even if it isn't added, the
portal mod would still need to be updated to not use it.

If you do add it, the API documentation on the website also needs to be
updated.

> > Since there is white, BLACK should also exist?! The portal mod doesn't work
> > without it and I need it for a mod that I am currently developing :-)

Oooooh I'm really excited for this :D
Reply to thread Export thread (mbox)