rayzor

changeset 2:c273c6f799a4

added fixcase utility to fix the ftp-ed files' case on linux
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 05 Apr 2014 18:31:00 +0300
parents a826bf0fb169
children 9035507275d6
files hg.bat src/m3dimpl.h src/min3d.c util/fixcase
diffstat 4 files changed, 35 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/hg.bat	Sat Apr 05 18:31:00 2014 +0300
     1.3 @@ -0,0 +1,1 @@
     1.4 +ftp 192.168.0.4 <util\%1.ftp
     2.1 --- a/src/m3dimpl.h	Sat Apr 05 09:05:26 2014 +0300
     2.2 +++ b/src/m3dimpl.h	Sat Apr 05 18:31:00 2014 +0300
     2.3 @@ -10,6 +10,13 @@
     2.4  	int top;
     2.5  };
     2.6  
     2.7 +struct min3d_vertex {
     2.8 +	float pos[4];
     2.9 +	float color[4];
    2.10 +	float normal[4];
    2.11 +	float tex[2];
    2.12 +};
    2.13 +
    2.14  struct min3d_context {
    2.15  	struct m3d_image *cbuf;
    2.16  	uint16_t *zbuf;
     3.1 --- a/src/min3d.c	Sat Apr 05 09:05:26 2014 +0300
     3.2 +++ b/src/min3d.c	Sat Apr 05 18:31:00 2014 +0300
     3.3 @@ -165,6 +165,24 @@
     3.4  	m3d_frustum(-aspect * x, aspect * x, -x, x, nr, fr);
     3.5  }
     3.6  
     3.7 +static void xform4(float *mat, float *vec)
     3.8 +{
     3.9 +	float x = mat[0] * vec[0] + mat[1] * vec[1] + mat[2] * vec[2] + mat[3];
    3.10 +	float y = mat[4] * vec[0] + mat[5] * vec[1] + mat[6] * vec[2] + mat[7];
    3.11 +	float z = mat[8] * vec[0] + mat[9] * vec[1] + mat[10] * vec[2] + mat[11];
    3.12 +	float w = mat[12] * vec[0] + mat[13] * vec[1] + mat[14] * vec[2] + mat[15];
    3.13 +
    3.14 +	vec[0] = x;
    3.15 +	vec[1] = y;
    3.16 +	vec[2] = z;
    3.17 +	vec[3] = w;
    3.18 +}
    3.19 +
    3.20 +static void proc_vertex(struct min3d_vertex *v)
    3.21 +{
    3.22 +	struct min3d_vertex *tv;
    3.23 +}
    3.24 +
    3.25  /* drawing */
    3.26  void m3d_draw(int prim, const float *varr, int vcount)
    3.27  {
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/util/fixcase	Sat Apr 05 18:31:00 2014 +0300
     4.3 @@ -0,0 +1,9 @@
     4.4 +#!/bin/sh
     4.5 +
     4.6 +for i in src/* util/*; do
     4.7 +	if echo $i | grep '[A-Z]' >/dev/null; then
     4.8 +		fixed=`echo $i | tr '[:upper:]' '[:lower:]'`
     4.9 +		echo "\"$i\" -> \"$fixed\""
    4.10 +		mv "$i" "$fixed"
    4.11 +	fi
    4.12 +done