Re: [dev] Pseudo-3D shooter written completely in awk using raycasting technique

2016-01-18 Thread Jonathen Russell
Saw it on HN the other day, tried it out for a bit. Kind of hard to
use but I was surprised nonetheless.

On Tue, Jan 19, 2016 at 2:08 PM, Marc Collin  wrote:
> A friend told me about something you don't see every-day and I'm sure
> people here are going to enjoy. [0]
> It's a game inspired by the classic Wolfenstein 3D and Doom. The
> novelty? It's a single awk file with ~650 lines of code. Wall
> rendering is done using ray casting. Monsters and projectiles are
> added after that as sprites. Ray casting is a simple rendering
> algorithm that doesn't require any 3d modeling or complex computation.
> Let me know what you think.
>
> Best wishes.
>
> [0] https://github.com/TheMozg/awk-raycaster
>



Re: [dev] [dwm] improved maximize patch

2015-12-30 Thread Jonathen Russell
Thanks Hiltjo, wasn't sure if there was a repo I could submit it too. I'll
do that soon.

I also added better class and name hint matching to runorraise, could I
submit that too?

jgr
On Wed, Dec 30, 2015 at 9:12 PM, Hiltjo Posthuma  wrote:
>
> On Tue, Dec 29, 2015 at 5:41 PM, Jonathen Russell  wrote:
> > Minor changes to this patch while applying it to latest git tonight.
> >
> > Changes:
> >
> > * change boolean values to integers
> > * remove redundant window size saving (resizeclient() does this already)
> >
> > jgr
>
> Nice, just push it to the wiki at git://git.suckless.org/sites .
>
> Kind regards,
> Hiltjo
>



[dev] [dwm] improved maximize patch

2015-12-29 Thread Jonathen Russell
Minor changes to this patch while applying it to latest git tonight.

Changes:

* change boolean values to integers
* remove redundant window size saving (resizeclient() does this already)

jgr
diff --git a/dwm-6.1-maximize_vert_horz.diff b/./dwm-git-maximize_vert_horz.diff
index 5da0b61..6010626 100644
--- a/dwm-6.1-maximize_vert_horz.diff
+++ b/./dwm-git-maximize_vert_horz.diff
@@ -7,29 +7,29 @@ Index: dwm/dwm.c
 ===
 --- dwm/dwm.c.orig 2014-02-09 15:24:12.552116979 +0100
 +++ dwm/dwm.c  2014-02-09 15:24:12.548116979 +0100
-@@ -91,7 +91,7 @@
+@@ -92,7 +92,7 @@
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int bw, oldbw;
unsigned int tags;
--  Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
-+  Bool ismax, wasfloating, isfixed, isfloating, isurgent, neverfocus, 
oldstate, isfullscreen;
+-  int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
++  int ismax, wasfloating, isfixed, isfloating, isurgent, neverfocus, 
oldstate, isfullscreen;
Client *next;
Client *snext;
Monitor *mon;
-@@ -1047,6 +1047,8 @@
+@@ -1072,6 +1072,8 @@
updatewmhints(c);
XSelectInput(dpy, w, 
EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
-   grabbuttons(c, False);
-+  c->wasfloating = False;
-+  c->ismax = False;
-   if(!c->isfloating)
+   grabbuttons(c, 0);
++  c->wasfloating = 0;
++  c->ismax = 0;
+   if (!c->isfloating)
c->isfloating = c->oldstate = trans != None || c->isfixed;
-   if(c->isfloating)
+   if (c->isfloating)
 Index: dwm/maximize.c
 ===
 --- /dev/null  1970-01-01 00:00:00.0 +
 +++ dwm/maximize.c 2014-02-09 15:24:12.548116979 +0100
-@@ -0,0 +1,45 @@
+@@ -0,0 +1,41 @@
 +void
 +maximize(int x, int y, int w, int h) {
 +  XEvent ev;
@@ -39,23 +39,19 @@ Index: dwm/maximize.c
 +  XRaiseWindow(dpy, selmon->sel->win);
 +  if(!selmon->sel->ismax) {
 +  if(!selmon->lt[selmon->sellt]->arrange || 
selmon->sel->isfloating)
-+  selmon->sel->wasfloating = True;
++  selmon->sel->wasfloating = 1;
 +  else {
 +  togglefloating(NULL);
-+  selmon->sel->wasfloating = False;
++  selmon->sel->wasfloating = 0;
 +  }
-+  selmon->sel->oldx = selmon->sel->x;
-+  selmon->sel->oldy = selmon->sel->y;
-+  selmon->sel->oldw = selmon->sel->w;
-+  selmon->sel->oldh = selmon->sel->h;
-+  resize(selmon->sel, x, y, w, h, True);
-+  selmon->sel->ismax = True;
++  resize(selmon->sel, x, y, w, h, 1);
++  selmon->sel->ismax = 1;
 +  }
 +  else {
-+  resize(selmon->sel, selmon->sel->oldx, selmon->sel->oldy, 
selmon->sel->oldw, selmon->sel->oldh, True);
++  resize(selmon->sel, selmon->sel->oldx, selmon->sel->oldy, 
selmon->sel->oldw, selmon->sel->oldh, 1);
 +  if(!selmon->sel->wasfloating)
 +  togglefloating(NULL);
-+  selmon->sel->ismax = False;
++  selmon->sel->ismax = 0;
 +  }
 +  drawbar(selmon);
 +  while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));