diff options
Diffstat (limited to 'source')
29 files changed, 265 insertions, 271 deletions
diff --git a/source/blender/blenloader/intern/genfile.c b/source/blender/blenloader/intern/genfile.c index 0a5eca85c3a..f985879de32 100644 --- a/source/blender/blenloader/intern/genfile.c +++ b/source/blender/blenloader/intern/genfile.c @@ -122,6 +122,7 @@ DONE: - pointer conversion (32-64 bits) IMPORTANT: + - do not use #defines in structs for array lenghts, this cannot be read by the dna functions - do not use uint, but unsigned int instead, ushort and ulong are allowed - only use a long in Blender if you want this to be the size of a pointer. so it is 32 bits or 64 bits, dependant at the cpu architecture diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index f99de9106a8..e653f896e36 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -46,7 +46,7 @@ extern "C" { struct Library; struct FileData; -/* let op: Sequence heeft identiek begin. */ +/* watch it: Sequence has identical beginning. */ /** * ID is the first thing included in all serializable types. It * provides a common handle to place all data in double-linked lists. @@ -66,14 +66,14 @@ typedef struct ID { } ID; /** - * ?? + * For each library file used, a Library struct is added to Main */ typedef struct Library { ID id; ID *idblock; struct FileData *filedata; char name[160]; - int tot, pad; /* tot, idblock en filedata zijn voor lezen en schrijven */ + int tot, pad; /* tot, idblock and filedata are only fo read and write */ } Library; /** @@ -129,8 +129,7 @@ typedef struct Library { #define IPO_CO MAKE_ID2('C', 'O') /* NOTE! This is not an ID, but is needed for g.sipo->blocktype */ -/* id->flag: eerste 8 bits altijd op nul zetten bij inlezen */ -/* (always zero the first 8 bits when reading a file) */ +/* id->flag: set frist 8 bits always at zero while reading */ #define LIB_LOCAL 0 #define LIB_EXTERN 1 #define LIB_INDIRECT 2 @@ -142,7 +141,7 @@ typedef struct Library { #define LIB_NEW 256 #define LIB_FAKEUSER 512 -/* vrije testflag */ +/* free test flag */ #define LIB_DOIT 1024 #ifdef __cplusplus diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h index 61286c846b9..aa126ff6f5d 100644 --- a/source/blender/makesdna/DNA_camera_types.h +++ b/source/blender/makesdna/DNA_camera_types.h @@ -48,9 +48,9 @@ typedef struct Camera { short type, flag, drawzoom, hold; float clipsta, clipend; - float netsta, netend; /* network camera */ + float netsta, netend; /* network camera (obsolete -ton) */ float lens, drawsize; - float hololen, hololen1; + float hololen, hololen1; /* obsolete (ton) */ struct Ipo *ipo; diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 55d38171a10..b7bc03364ba 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -131,7 +131,7 @@ typedef struct Curve { /* default */ short resolu, resolv; - /* font stuk */ + /* font part */ short len, lines, pos, spacemode; float spacing, linedist, shear, fsize; float xof, yof; diff --git a/source/blender/makesdna/DNA_effect_types.h b/source/blender/makesdna/DNA_effect_types.h index 4d843772ce9..00d0546f1ec 100644 --- a/source/blender/makesdna/DNA_effect_types.h +++ b/source/blender/makesdna/DNA_effect_types.h @@ -34,11 +34,11 @@ #ifndef DNA_EFFECT_TYPES_H #define DNA_EFFECT_TYPES_H -/* DENK ERAAN: NIEUWE EFFECTEN OOK IN DE WRITEFILE.C IVM DNA!!! */ +/* don't forget, new effects also in writefile.c for dna!!! */ #define PAF_MAXMULT 4 - /* paf->flag (bitje 0 vrij houden ivm compatibility) */ + /* paf->flag (keep bit 0 free for compatibility) */ #define PAF_BSPLINE 2 #define PAF_STATIC 4 #define PAF_FACE 8 diff --git a/source/blender/makesdna/DNA_ika_types.h b/source/blender/makesdna/DNA_ika_types.h index 9024672fa01..2ddbc4ed4a3 100644 --- a/source/blender/makesdna/DNA_ika_types.h +++ b/source/blender/makesdna/DNA_ika_types.h @@ -1,8 +1,10 @@ /** * blenlib/DNA_ika_types.h (mar-2001 nzc) * - * Old ika types. These will be superceded by Reevan's stuff, soon (I - * hope). + * Old ika types. These have been superceded by Reevan's stuff + * (armatures and bones) + * + * Can be removed! (ton) * * $Id$ * @@ -46,9 +48,9 @@ struct Ipo; typedef struct Deform { struct Object *ob; short flag, partype; - int par1, par2, par3; /* kunnen vertexnrs zijn */ + int par1, par2, par3; /* can be vertexnrs */ float imat[4][4], premat[4][4], postmat[4][4]; - float vec[3]; /* als partype==LIMB, voor distfunc */ + float vec[3]; /* when partype==LIMB, for distfunc */ float fac, dist, pad; } Deform; @@ -67,12 +69,12 @@ typedef struct Ika { short partype, flag, iter, lastfra; ListBase limbbase; - float eff[3], effg[3], effn[3]; /* current, global en (local)wanted */ + float eff[3], effg[3], effn[3]; float mem, slow, toty, totx, xyconstraint; struct Ipo *ipo; struct Object *parent; - int par1, par2, par3; /* kunnen vertexnrs zijn */ + int par1, par2, par3; int totdef; Deform *def; diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h index a2dfdf00fd8..256d69456e8 100644 --- a/source/blender/makesdna/DNA_image_types.h +++ b/source/blender/makesdna/DNA_image_types.h @@ -52,12 +52,12 @@ typedef struct Image { short ok, flag; short lastframe, lastquality; - /* texture pagina */ + /* texture page */ short tpageflag, totbind; short xrep, yrep; short twsta, twend; unsigned int bindcode; - unsigned int *repbind; /* om subregio's te kunnen repeaten */ + unsigned int *repbind; /* for repeat of parts of images */ struct PackedFile * packedfile; diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h index 1ee62ac2640..69dcef38b57 100644 --- a/source/blender/makesdna/DNA_ipo_types.h +++ b/source/blender/makesdna/DNA_ipo_types.h @@ -270,7 +270,7 @@ typedef short IPO_Channel; #define IPO_FLOAT 4 #define IPO_DOUBLE 5 #define IPO_FLOAT_DEGR 6 -/* zeer speciaal geval in keys */ +/* very special case, in keys */ #define IPO_BEZTRIPLE 100 #define IPO_BPOINT 101 diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h index 0722c5d8cb6..3e3ca20134a 100644 --- a/source/blender/makesdna/DNA_lamp_types.h +++ b/source/blender/makesdna/DNA_lamp_types.h @@ -56,7 +56,7 @@ typedef struct Lamp { float clipsta, clipend, shadspotsize; float bias, soft; - /* texact is voor buttons */ + /* texact is for buttons */ short texact, shadhalostep; struct MTex *mtex[8]; diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index d21b27897ed..3789a296120 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -43,12 +43,12 @@ struct MTex; struct Ipo; struct Material; -/* LET OP: type veranderen? ook in ipo.h doen */ +/* WATCH IT: change type? also make changes in ipo.h */ typedef struct Material { ID id; - short colormodel, lay; /* lay: voor dynamics */ + short colormodel, lay; /* lay: for dynamics (old engine, until 2.04) */ float r, g, b; float specr, specg, specb; float mirr, mirg, mirb; @@ -65,7 +65,7 @@ typedef struct Material { short flarec, starc, linec, ringc; float hasize, flaresize, subsize, flareboost; - /* onderstaand is voor buttons en render*/ + /* for buttons and render*/ char rgbsel, texact, pr_type, septex; short pr_back, pr_lamp; diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 6c04a243020..af5f98cfe95 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -76,7 +76,7 @@ typedef struct TFace { /* this one gets interpreted as a image in texture.c */ void *tpage; - float uv[4][2]; /* als je dit wijzigt: ook fie set_correct_uv editmesh.c, ook andere plekken maken gebruik van de lengte van dit blok */ + float uv[4][2]; /* when you change this: also do function set_correct_uv in editmesh.c, and there are more locations that use the size of this part */ unsigned int col[4]; char flag, transp; short mode, tile, pad; @@ -132,7 +132,7 @@ typedef struct Mesh { struct Mesh *texcomesh; float *orco; - struct OcInfo *oc; /* niet in file */ + struct OcInfo *oc; /* not written in file */ void *sumohandle; int totvert, totface; @@ -168,7 +168,7 @@ typedef struct Mesh { #define ME_SMESH 64 #define ME_SUBSURF 128 -/* puno (mface) */ +/* puno = vertexnormal (mface) */ #define ME_FLIPV1 1 #define ME_FLIPV2 2 #define ME_FLIPV3 4 @@ -187,8 +187,6 @@ typedef struct Mesh { /* flag (mface) */ #define ME_SMOOTH 1 -/* tface->mode (beetje compatible met PMD formaat) */ -/* sharedvert bepaalt hoe de PSX versie wordt, sharedcol is vertexkleur en puno */ #define TF_DYNAMIC 1 /* #define TF_INVISIBLE 2 */ diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 4083394c1c9..32be260b450 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -69,7 +69,7 @@ typedef struct Object { ID id; short type, partype; - int par1, par2, par3; /* kunnen vertexnrs zijn */ + int par1, par2, par3; /* can be vertexnrs */ char parsubstr[32]; /* String describing subobject info */ void *pardata; struct Object *parent, *track; @@ -89,28 +89,28 @@ typedef struct Object { ListBase defbase; struct Material **mat; - /* rot en drot moeten achterelkaar! (transform('r' en 's')) */ + /* rot en drot have to be together! (transform('r' en 's')) */ float loc[3], dloc[3], orig[3]; float size[3], dsize[3]; float rot[3], drot[3]; float quat[4], dquat[4]; float obmat[4][4]; float parentinv[4][4]; - float imat[4][4]; /* voor bij render, tijdens simulate, tijdelijk: ipokeys van transform */ + float imat[4][4]; /* for during render, old game engine, temporally: ipokeys of transform */ - unsigned int lay; /* kopie van Base */ - short flag; /* kopie van Base */ - short colbits; /* nul==van obdata */ + unsigned int lay; /* copy of Base */ + short flag; /* copy of Base */ + short colbits; /* when zero, from obdata */ char transflag, ipoflag; char trackflag, upflag; - short ipowin, scaflag; /* ipowin: blocktype laatste ipowindow */ + short ipowin, scaflag; /* ipowin: blocktype last ipowindow */ short scavisflag, boundtype; short dupon, dupoff, dupsta, dupend; float sf, ctime; - /* tijdens realtime */ + /* during realtime */ /* note that inertia is only called inertia for historical reasons * and is not changed to avoid DNA surgery. It actually reflects the @@ -129,7 +129,7 @@ typedef struct Object { float rdamping, sizefac; char dt, dtx; - char totcol; /* kopie van mesh of curve of meta */ + char totcol; /* copy of mesh or curve or meta */ char actcol; ScriptLink scriptlink; diff --git a/source/blender/makesdna/DNA_oops_types.h b/source/blender/makesdna/DNA_oops_types.h index 52130c113cc..3b03af4dfd9 100644 --- a/source/blender/makesdna/DNA_oops_types.h +++ b/source/blender/makesdna/DNA_oops_types.h @@ -44,7 +44,7 @@ struct ID; typedef struct Oops { struct Oops *next, *prev; short type, flag, dt, hide; - float x, y; /* linksonder */ + float x, y; /* left - bottom */ float dx, dy; /* shuffle */ struct ID *id; ListBase link; @@ -56,7 +56,7 @@ typedef struct OopsLink { struct OopsLink *next, *prev; short type, flag; ID **idfrom; - Oops *to, *from; /* from is voor temp */ + Oops *to, *from; /* from is for temp */ float xof, yof; char name[12]; } OopsLink; diff --git a/source/blender/makesdna/DNA_radio_types.h b/source/blender/makesdna/DNA_radio_types.h index 29fd2bf082d..adaa4e6e159 100644 --- a/source/blender/makesdna/DNA_radio_types.h +++ b/source/blender/makesdna/DNA_radio_types.h @@ -40,12 +40,12 @@ typedef struct Radio { short hemires, maxiter; - short drawtype, flag; /* bit 0 en 1: limits laten zien */ + short drawtype, flag; /* bit 0 and 1: show limits */ short subshootp, subshoote, nodelim, maxsublamp; - short pama, pami, elma, elmi; /* patch en elem limits */ + short pama, pami, elma, elmi; /* patch and elem limits */ int maxnode; float convergence; - float radfac, gamma; /* voor afbeelden */ + float radfac, gamma; /* for display */ } Radio; diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 3cc676587be..bd5f1d80f4c 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -82,10 +82,9 @@ typedef struct AviCodecData { typedef struct RenderData { struct AviCodecData *avicodecdata; - /* hoe gaat tijd gedefinieerd worden? */ - short cfra, sfra, efra; /* plaatjes */ + short cfra, sfra, efra; /* fames as in 'images' */ short images, framapto, flag; - float ctime; /* hiermee rekenen? */ + float ctime; /* use for calcutions */ float framelen, blurfac; /** For UR edge rendering: give the edges this colour */ @@ -98,7 +97,7 @@ typedef struct RenderData { short pad[3]; short size, maximsize; /* size in %, max in Kb */ - /* uit buttons: */ + /* from buttons: */ /** * The desired number of pixels in the x direction */ @@ -217,8 +216,8 @@ typedef struct Scene { float cursor[3]; unsigned int lay; - /* enkele realtime vars */ - struct FreeCamera *fcam; + /* some realtime vars */ + struct FreeCamera *fcam; /* old, can be removed (ton) */ void *ed; struct Radio *radio; @@ -256,7 +255,7 @@ typedef struct Scene { #define R_PANORAMA 0x0400 #define R_MOVIECROP 0x0800 #define R_COSMO 0x1000 -/* deze verschillen tussen IrisGL en OpenGL!!! */ +/* these difines were different between IrisGL and OpenGL!!! */ #define R_ODDFIELD 0x2000 #define R_MBLUR 0x4000 #define R_UNIFIED 0x8000 @@ -303,21 +302,21 @@ typedef struct Scene { #define R_RENDERING 16 #define R_ANIMRENDER 32 -/* vlakren->flag */ +/* vlakren->flag (vlak = face in dutch) */ #define R_SMOOTH 1 #define R_VISIBLE 2 #define R_NOPUNOFLIP 8 #define R_CMAPCODE 16 #define R_FACE_SPLIT 32 -/* vertren->texofs (texcoordinaten offset vanaf vertren->orco */ +/* vertren->texofs (texcoordinate offset relative to vertren->orco */ #define R_UVOFS3 1 /* **************** SCENE ********************* */ #define RAD_PHASE_PATCHES 1 #define RAD_PHASE_FACES 2 -/* base->flag en ob->flag */ +/* base->flag and ob->flag */ #define BA_WASSEL 2 #define BA_PARSEL 4 #define BA_WHERE_UPDATE 8 diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index 7fee3f7ca17..2eb315e9f98 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -48,7 +48,7 @@ typedef struct bScreen { struct Scene *scene; short startx, endx, starty, endy; /* framebuffer coords */ short sizex, sizey; - short scenenr, screennr; /* alleen voor pupmenu */ + short scenenr, screennr; /* only for pupmenu */ short full, rt; short mainwin, winakt; } bScreen; @@ -63,7 +63,7 @@ typedef struct ScrVert { typedef struct ScrEdge { struct ScrEdge *next, *prev; ScrVert *v1, *v2; - short border; /* 1 als op rand screen */ + short border; /* 1 when at edge of screen */ short flag; int pad; } ScrEdge; @@ -81,12 +81,12 @@ typedef unsigned short dna_ushort_fix; typedef struct ScrArea { struct ScrArea *next, *prev; ScrVert *v1, *v2, *v3, *v4; - bScreen *full; /* als area==full, dit is de parent */ + bScreen *full; /* if area==full, this is the parent */ float winmat[4][4]; rcti totrct, headrct, winrct; short headwin, win; - short headertype; /* 0=niets, 1= down, 2= up */ + short headertype; /* 0=no header, 1= down, 2= up */ char spacetype, butspacetype; /* SPACE_... */ short winx, winy; /* size */ char head_swap, head_equal; @@ -101,7 +101,7 @@ typedef struct ScrArea { #define MAXWIN 128 -/* Als je EDGEWIDTH verandert, ook globale array edcol[] goedzetten */ +/* If you change EDGEWIDTH, also do the global arrat edcol[] */ #define EDGEWIDTH 5 #define EDGEWIDTH2 (2) #define AREAGRID 4 diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index d7d72788c7a..f3827f5e0b2 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -78,7 +78,7 @@ typedef struct PluginSeq { } PluginSeq; -/* LET OP: eerste stuk identiek aan ID (ivm ipo's) */ +/* WATCH IT: first part identical to ID (for use in ipo's) */ typedef struct Sequence { @@ -105,7 +105,7 @@ typedef struct Sequence { PluginSeq *plugin; - /* pointers voor effecten: */ + /* pointers for effects: */ struct Sequence *seq1, *seq2, *seq3; /* meta */ @@ -138,7 +138,7 @@ typedef struct Editing { #define SEQ_OVERLAP 8 #define SEQ_FILTERY 16 -/* seq->type LET OP BITJE 3!!! */ +/* seq->type WATCH IT: BIT 3!!! */ #define SEQ_IMAGE 0 #define SEQ_META 1 #define SEQ_SCENE 2 diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 88803e9e983..f34979486b2 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -96,7 +96,7 @@ typedef struct SpaceButs { int pad2; View2D v2d; - short mainb, menunr; /* texnr en menunr moeten shorts blijven */ + short mainb, menunr; /* texnr and menunr have to remain shorts */ short pin, mainbo; void *lockpoin; @@ -186,7 +186,7 @@ typedef struct SpaceImage { struct Image *image; float zoom; - float pad2; /* MAART: is this needed? Ton: yes, padding with 8 bytes aligned */ + float pad2; /* padding is with 8 bytes aligned */ short mode, pin; short imanr, curtile; short xof, yof; @@ -364,7 +364,7 @@ typedef struct SpaceImaSel { #define BUTS_ACT_ACT 128 #define BUTS_ACT_LINK 256 -/* deze getallen ook invullen in blender.h SpaceFile: struct dna herkent geen defines */ +/* these values need to be hardcoded in blender.h SpaceFile: struct dna does not recognize defines */ #define FILE_MAXDIR 160 #define FILE_MAXFILE 80 @@ -396,8 +396,8 @@ typedef struct SpaceImaSel { #define MOVIEFILE 32 #define PYSCRIPTFILE 64 -#define SCROLLH 16 /* hoogte scrollbar */ -#define SCROLLB 16 /* breedte scrollbar */ +#define SCROLLH 16 /* height scrollbar */ +#define SCROLLB 16 /* width scrollbar */ /* SpaceImage->mode */ #define SI_TEXTURE 0 diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index 9a222850519..32559fe7d80 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -179,7 +179,7 @@ typedef struct Tex { #define TEX_FLIPBLEND 2 #define TEX_NEGALPHA 4 -/* extend (begint bij 1 ivm backward comp.) */ +/* extend (starts with 1 because of backward comp.) */ #define TEX_EXTEND 1 #define TEX_CLIP 2 #define TEX_REPEAT 3 diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 1cae50f58a6..da5c8736a08 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -93,7 +93,7 @@ typedef struct View3D { float lens, grid, near, far; float ofs[3], cursor[3]; - short mx, my; /* moeten achter elkaar blijven staan ivm als pointer doorgeven */ + short mx, my; /* have to remain together, because used as single pointer */ short mxo, myo; short gridlines, viewbut; diff --git a/source/blender/makesdna/DNA_wave_types.h b/source/blender/makesdna/DNA_wave_types.h index e8f2607cee4..f499004fff8 100644 --- a/source/blender/makesdna/DNA_wave_types.h +++ b/source/blender/makesdna/DNA_wave_types.h @@ -38,6 +38,10 @@ struct Ipo; + +/* a Wave has never been implemented... it was meant as a 'free' mathematical + deformation object type (ton) */ + typedef struct Wave { ID id; diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 0be86f53f56..4ff94472df2 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -131,14 +131,14 @@ int maxdata= 500000, maxnr= 50000; int nr_names=0; int nr_types=0; int nr_structs=0; -char **names, *namedata; /* op adres names[a] staat string a */ -char **types, *typedata; /* op adres types[a] staat string a */ -short *typelens; /* op typelens[a] staat de lengte van type a */ +char **names, *namedata; /* at adress names[a] is string a */ +char **types, *typedata; /* at adress types[a] is string a */ +short *typelens; /* at typelens[a] is de length of type a */ short *alphalens; /* contains sizes as they are calculated on the alpha */ -short **structs, *structdata; /* op sp= structs[a] staat eerste adres structdefinitie - sp[0] is typenummer - sp[1] is aantal elementen - sp[2] sp[3] is typenr, namenr (enz) */ +short **structs, *structdata; /* at sp= structs[a] is the first adress of a struct definition + sp[0] is type number + sp[1] is amount of elements + sp[2] sp[3] is typenr, namenr (etc) */ /* * debugSDNA: * - 0 = no output, except errors @@ -225,7 +225,7 @@ int add_type(char *str, int len) if(str[0]==0) return -1; - /* zoek typearray door */ + /* search through type array */ for(nr=0; nr<nr_types; nr++) { if(strcmp(str, types[nr])==0) { if (len) { @@ -236,7 +236,7 @@ int add_type(char *str, int len) } } - /* nieuw type appenden */ + /* append new type */ if(nr_types==0) cp= typedata; else { cp= types[nr_types-1]+strlen(types[nr_types-1])+1; @@ -356,14 +356,14 @@ int add_name(char *str) name = str; } - /* zoek name array door */ + /* search name array */ for(nr=0; nr<nr_names; nr++) { if(strcmp(name, names[nr])==0) { return nr; } } - /* nieuw type appenden */ + /* append new type */ if(nr_names==0) cp= namedata; else { cp= names[nr_names-1]+strlen(names[nr_names-1])+1; @@ -415,7 +415,7 @@ int preprocess_include(char *maindata, int len) memcpy(temp, maindata, len); // remove all c++ comments - /* alle enters/tabs/etc vervangen door spaties */ + /* replace all enters/tabs/etc with spaces */ cp= temp; a= len; comment = 0; @@ -430,7 +430,7 @@ int preprocess_include(char *maindata, int len) } - /* data uit temp naar maindata kopieeren, verwijder commentaar en dubbele spaties */ + /* data from temp copy to maindata, remove comments and double spaces */ cp= temp; md= maindata; newlen= 0; @@ -447,10 +447,10 @@ int preprocess_include(char *maindata, int len) cp[0]=cp[1]= 32; } - /* niet kopieeren als: */ + /* do not copy when: */ if(comment); else if( cp[0]==' ' && cp[1]==' ' ); - else if( cp[-1]=='*' && cp[0]==' ' ); /* pointers met spatie */ + else if( cp[-1]=='*' && cp[0]==' ' ); /* pointers with a space */ else { md[0]= cp[0]; md++; @@ -498,8 +498,8 @@ void *read_file_data(char *filename, int *len_r) int convert_include(char *filename) { - /* lees includefile, sla structen over die op regel ervoor '#' hebben. - sla alle data op in tijdelijke arrays. + /* read include file, skip structs with a '#' before it. + store all data in temporal arrays. */ int filelen, count, overslaan, slen, type, name, strct; short *structpoin, *sp; @@ -514,12 +514,12 @@ int convert_include(char *filename) filelen= preprocess_include(maindata, filelen); mainend= maindata+filelen-1; - /* we zoeken naar '{' en dan terug naar 'struct' */ + /* we look for '{' and then back to 'struct' */ count= 0; overslaan= 0; while(count<filelen) { - /* code voor struct overslaan: twee hekjes. (voor spatie zorgt preprocess) */ + /* code for skipping a struct: two hashes. (preprocess added a space) */ if(md[0]=='#' && md[1]==' ' && md[2]=='#') { overslaan= 1; } @@ -532,10 +532,10 @@ int convert_include(char *filename) else { if(md[-1]==' ') md[-1]= 0; md1= md-2; - while( *md1!=32) md1--; /* naar begin woord */ + while( *md1!=32) md1--; /* to beginning of word */ md1++; - /* structnaam te pakken, als... */ + /* we've got a struct name when... */ if( strncmp(md1-7, "struct", 6)==0 ) { @@ -545,7 +545,7 @@ int convert_include(char *filename) if (debugSDNA > 1) printf("\t|\t|-- detected struct %s\n", types[strct]); - /* eerst overal keurige strings van maken */ + /* first lets make it all nice strings */ md1= md+1; while(*md1 != '}') { if( ((long)md1) > ((long)mainend) ) break; @@ -554,17 +554,17 @@ int convert_include(char *filename) md1++; } - /* types en namen lezen tot eerste karakter niet '}' */ + /* read types and names until first character that is not '}' */ md1= md+1; while( *md1 != '}' ) { if( ((long)md1) > ((long)mainend) ) break; - /* als er 'struct' of 'unsigned' staat, overslaan */ + /* skip when it says 'struct' or 'unsigned' */ if(*md1) { if( strncmp(md1, "struct", 6)==0 ) md1+= 7; if( strncmp(md1, "unsigned", 6)==0 ) md1+= 9; - /* type te pakken! */ + /* we've got a type! */ type= add_type(md1, 0); if (debugSDNA > 1) printf("\t|\t|\tfound type %s (", md1); @@ -572,12 +572,12 @@ int convert_include(char *filename) md1+= strlen(md1); - /* doorlezen tot ';' */ + /* read until ';' */ while( *md1 != ';' ) { if( ((long)md1) > ((long)mainend) ) break; if(*md1) { - /* Name te pakken. slen needs + /* We've got a name. slen needs * correction for function * pointers! */ slen= strlen(md1); @@ -663,12 +663,12 @@ int calculate_structlens(void) lastunknown= unknown; unknown= 0; - /* loop alle structen af... */ + /* check all structs... */ for(a=0; a<nr_structs; a++) { structpoin= structs[a]; structtype= structpoin[0]; - /* als lengte nog niet bekend */ + /* when length is not known... */ if(typelens[structtype]==0) { sp= structpoin+2; @@ -676,16 +676,16 @@ int calculate_structlens(void) alphalen = 0; has_pointer = 0; - /* loop alle elementen in struct af */ + /* check all elements in struct */ for(b=0; b<structpoin[1]; b++, sp+=2) { type= sp[0]; cp= names[sp[1]]; namelen= strlen(cp); - /* is het een pointer of functiepointer? */ + /* is it a pointer or function pointer? */ if(cp[0]=='*' || cp[1]=='*') { has_pointer = 1; - /* heeft de naam een extra lengte? (array) */ + /* has the name an extra length? (array) */ mul= 1; if( cp[namelen-1]==']') mul= arraysize(cp, namelen); @@ -711,7 +711,7 @@ int calculate_structlens(void) alphalen += 8 * mul; } else if( typelens[type] ) { - /* heeft de naam een extra lengte? (array) */ + /* has the name an extra length? (array) */ mul= 1; if( cp[namelen-1]==']') mul= arraysize(cp, namelen); @@ -763,7 +763,7 @@ int calculate_structlens(void) structpoin= structs[a]; structtype= structpoin[0]; - /* lengte nog niet bekend */ + /* length unknown */ if(typelens[structtype]!=0) { printf(" %s\n", types[structtype]); } @@ -777,7 +777,7 @@ int calculate_structlens(void) structpoin= structs[a]; structtype= structpoin[0]; - /* lengte nog niet bekend */ + /* length unkown yet */ if(typelens[structtype]==0) { printf(" %s\n", types[structtype]); } @@ -818,7 +818,7 @@ void printStructLenghts(void) lastunknown= unknown; unknown= 0; - /* loop alle structen af... */ + /* check all structs... */ for(a=0; a<nr_structs; a++) { structpoin= structs[a]; structtype= structpoin[0]; @@ -846,20 +846,20 @@ int make_structDNA(FILE *file) printf("\tProgram version: %s\n", DNA_VERSION_DATE); } - /* de allerlangst bekende struct is 50k, 100k is ruimte genoeg! */ + /* the longest known struct is 50k, so we assume 100k is sufficent! */ namedata= MEM_callocN(maxdata, "namedata"); typedata= MEM_callocN(maxdata, "typedata"); structdata= MEM_callocN(maxdata, "structdata"); - /* maximaal 5000 variablen, vast voldoende? */ + /* a maximum of 5000 variables, must be sufficient? */ names= MEM_callocN(sizeof(char *)*maxnr, "names"); types= MEM_callocN(sizeof(char *)*maxnr, "types"); typelens= MEM_callocN(sizeof(short)*maxnr, "typelens"); alphalens= MEM_callocN(sizeof(short)*maxnr, "alphalens"); structs= MEM_callocN(sizeof(short)*maxnr, "structs"); - /* inserten alle bekende types */ - /* let op: uint komt niet voor! gebruik in structen unsigned int */ + /* insertion of all known types */ + /* watch it: uint is not allowed! use in structs an unsigned int */ add_type("char", 1); /* 0 */ add_type("uchar", 1); /* 1 */ add_type("short", 2); /* 2 */ @@ -903,7 +903,7 @@ int make_structDNA(FILE *file) return(1); } - /* DIT DEEL VOOR DEBUG */ + /* FOR DEBUG */ if (debugSDNA > 1) { int a,b; @@ -934,7 +934,7 @@ int make_structDNA(FILE *file) } } - /* file schrijven */ + /* file writing */ if (debugSDNA > -1) printf("Writing file ... "); @@ -943,34 +943,34 @@ int make_structDNA(FILE *file) strcpy(str, "SDNA"); dna_write(file, str, 4); - /* SCHRIJF NAMEN */ + /* write names */ strcpy(str, "NAME"); dna_write(file, str, 4); len= nr_names; dna_write(file, &len, 4); - /* lengte berekenen datablok met strings */ + /* calculate size of datablock with strings */ cp= names[nr_names-1]; - cp+= strlen(names[nr_names-1]) + 1; /* +1: nul-terminator */ + cp+= strlen(names[nr_names-1]) + 1; /* +1: null-terminator */ len= (long)cp - (long)(names[0]); len= (len+3) & ~3; dna_write(file, names[0], len); - /* SCHRIJF TYPES */ + /* write TYPES */ strcpy(str, "TYPE"); dna_write(file, str, 4); len= nr_types; dna_write(file, &len, 4); - /* lengte berekenen datablok */ + /* calculate datablock size */ cp= types[nr_types-1]; - cp+= strlen(types[nr_types-1]) + 1; /* +1: nul-terminator */ + cp+= strlen(types[nr_types-1]) + 1; /* +1: null-terminator */ len= (long)cp - (long)(types[0]); len= (len+3) & ~3; dna_write(file, types[0], len); - /* SCHRIJF TYPELENGTES */ + /* WRITE TYPELENGTHS */ strcpy(str, "TLEN"); dna_write(file, str, 4); @@ -978,13 +978,13 @@ int make_structDNA(FILE *file) if(nr_types & 1) len+= 2; dna_write(file, typelens, len); - /* SCHRIJF STRUCTEN */ + /* WRITE STRUCTS */ strcpy(str, "STRC"); dna_write(file, str, 4); len= nr_structs; dna_write(file, &len, 4); - /* lengte berekenen datablok */ + /* calc datablock size */ sp= structs[nr_structs-1]; sp+= 2+ 2*( sp[1] ); len= (long)sp - (long)(structs[0]); @@ -992,7 +992,7 @@ int make_structDNA(FILE *file) dna_write(file, structs[0], len); - /* dna padding test */ + /* a simple dna padding test */ if (0) { FILE *fp; @@ -1036,7 +1036,7 @@ int make_structDNA(FILE *file) return(0); } -/* ************************* END MAKEN DNA ********************** */ +/* ************************* END MAKE DNA ********************** */ void make_bad_file(char *file) { diff --git a/source/blender/radiosity/extern/include/radio_types.h b/source/blender/radiosity/extern/include/radio_types.h index b485495e845..4d5e56d7a15 100644 --- a/source/blender/radiosity/extern/include/radio_types.h +++ b/source/blender/radiosity/extern/include/radio_types.h @@ -72,7 +72,7 @@ typedef struct RadView { #define RAD_BACKFACE 8 -typedef struct RNode { /* lengte: 76 */ +typedef struct RNode { /* length: 76 */ struct RNode *down1, *down2, *up; struct RNode *ed1, *ed2, *ed3, *ed4; struct RPatch *par; @@ -87,7 +87,7 @@ typedef struct RNode { /* lengte: 76 */ } RNode; -typedef struct Elem { /* lengte: 44 */ +typedef struct Elem { /* length: 44 */ struct RPatch *par; short type; /* type: 4==QUAD, 3==TRIA */ @@ -99,7 +99,7 @@ typedef struct Elem { /* lengte: 44 */ } Elem; -typedef struct Face { /* lengte: 24 */ +typedef struct Face { /* length: 24 */ float *v1, *v2, *v3, *v4; unsigned int col, matindex; } Face; @@ -114,7 +114,7 @@ typedef struct RPatch { struct Object *from; int type; /* 3: TRIA, 4: QUAD */ - short f, f1; /* flags f: als node, alleen subdiv */ + short f, f1; /* flags f: if node, only for subdiv */ float ref[3], emit[3], unshot[3]; float cent[3], norm[3]; @@ -124,7 +124,7 @@ typedef struct RPatch { } RPatch; -typedef struct VeNoCo { /* nodig voor splitconnected */ +typedef struct VeNoCo { /* needed for splitconnected */ struct VeNoCo *next; float *v; float *n; @@ -133,7 +133,7 @@ typedef struct VeNoCo { /* nodig voor splitconnected */ } VeNoCo; -typedef struct EdSort { /* sorteren edges */ +typedef struct EdSort { /* sort edges */ float *v1, *v2; RNode *node; int nr; @@ -144,18 +144,18 @@ typedef struct { unsigned int *hemibuf; struct ListBase patchbase; int totpatch, totelem, totvert, totlamp; - RNode **elem; /* globaal array van alle pointers */ - VeNoCo *verts; /* tijdelijk vertices van patches */ - float *formfactors; /* een factor per element */ - float *topfactors, *sidefactors; /* LUT voor delta's */ - int *index; /* LUT voor bovenstaande LUT */ + RNode **elem; /* global array with all pointers */ + VeNoCo *verts; /* temporal vertices from patches */ + float *formfactors; /* 1 factor per element */ + float *topfactors, *sidefactors; /* LUT for delta's */ + int *index; /* LUT for above LUT */ Face **facebase; int totface; float min[3], max[3], size[3], cent[3]; /* world */ float maxsize, totenergy; float patchmin, patchmax; float elemmin, elemmax; - float radfactor, lostenergy, igamma; /* radfac zit in button, radfactor wordt berekend */ + float radfactor, lostenergy, igamma; /* radfac is in button, radfactor is calculated */ int phase; /* to preserve materials as used before, max 16 */ Material *matar[MAXMAT]; @@ -163,11 +163,11 @@ typedef struct { /* this part is a copy of struct Radio */ short hemires, maxiter; - short drawtype, flag; /* bit 0 en 1: limits laten zien */ + short drawtype, flag; /* bit 0 en 1: show limits */ short subshootp, subshoote, nodelim, maxsublamp; int maxnode; float convergence; - float radfac, gamma; /* voor afbeelden */ + float radfac, gamma; /* for display */ } RadGlobal; diff --git a/source/blender/radiosity/intern/source/raddisplay.c b/source/blender/radiosity/intern/source/raddisplay.c index de8ffbacd81..8046f07874d 100644 --- a/source/blender/radiosity/intern/source/raddisplay.c +++ b/source/blender/radiosity/intern/source/raddisplay.c @@ -66,9 +66,7 @@ #include "radio.h" -/* Mij afspraak is cpack een getal dat als 0xFFaa66 of zo kan worden - * uitgedrukt. Is dus gevoelig voor endian. Met deze define wordt het - * altijd goed afgebeeld */ +/* cpack has to be endian-insensitive! (old irisgl function) */ #define cpack(x) glColor3ub( ((x)&0xFF), (((x)>>8)&0xFF), (((x)>>16)&0xFF) ) char calculatecolor(float col) @@ -217,7 +215,7 @@ void drawpatch_ext(RPatch *patch, unsigned int col) sa= G.curscreen->areabase.first; while(sa) { if (sa->spacetype==SPACE_VIEW3D) { - /* hier mywinget() gebruiken: anders wordt in header getekend */ + /* use mywinget() here: otherwise it draws in header */ if(sa->win != mywinget()) areawinset(sa->win); drawnodeWire(patch->first); } @@ -358,7 +356,7 @@ void drawsquare(float *cent, float size, short cox, short coy) void drawlimits() { - /* centreer rond cent */ + /* centre around cent */ short cox=0, coy=1; if((RG.flag & 3)==2) coy= 2; @@ -404,7 +402,7 @@ void pseudoAmb() float fac; char col[4]; - /* zet pseudo ambient kleuren in de nodes */ + /* sets pseudo ambient color in the nodes */ rp= RG.patchbase.first; while(rp) { @@ -429,7 +427,7 @@ void pseudoAmb() void RAD_drawall(int depth_is_on) { - /* maakt afbeelding van elements of van faces */ + /* displays elements or faces */ Face *face = NULL; RNode **el; RPatch *rp; @@ -518,7 +516,7 @@ void rad_forcedraw() sa= G.curscreen->areabase.first; while(sa) { if (sa->spacetype==SPACE_VIEW3D) { - /* hier mywinget() gebruiken: anders wordt in header getekend */ + /* use mywinget() here: othwerwise it draws in header */ if(sa->win != mywinget()) areawinset(sa->win); scrarea_do_windraw(sa); } diff --git a/source/blender/radiosity/intern/source/radfactors.c b/source/blender/radiosity/intern/source/radfactors.c index 1111593de5b..d0b6a7752a9 100644 --- a/source/blender/radiosity/intern/source/radfactors.c +++ b/source/blender/radiosity/intern/source/radfactors.c @@ -69,18 +69,18 @@ RadView hemitop, hemiside; float calcStokefactor(RPatch *shoot, RPatch *rp, RNode *rn, float *area) { float tvec[3], fac; - float vec[4][3]; /* vectoren van shootcent naar vertices rp */ - float cross[4][3]; /* uitprodukten hiervan */ - float rad[4]; /* hoeken tussen vecs */ + float vec[4][3]; /* vectors of shoot->cent to vertices rp */ + float cross[4][3]; /* cross products of this */ + float rad[4]; /* anlgles between vecs */ - /* test op richting */ + /* test for direction */ VecSubf(tvec, shoot->cent, rp->cent); if( tvec[0]*shoot->norm[0]+ tvec[1]*shoot->norm[1]+ tvec[2]*shoot->norm[2]>0.0) return 0.0; if(rp->type==4) { - /* hoekvectors */ + /* corner vectors */ VecSubf(vec[0], shoot->cent, rn->v1); VecSubf(vec[1], shoot->cent, rn->v2); VecSubf(vec[2], shoot->cent, rn->v3); @@ -91,7 +91,7 @@ float calcStokefactor(RPatch *shoot, RPatch *rp, RNode *rn, float *area) Normalise(vec[2]); Normalise(vec[3]); - /* uitprod */ + /* cross product */ Crossf(cross[0], vec[0], vec[1]); Crossf(cross[1], vec[1], vec[2]); Crossf(cross[2], vec[2], vec[3]); @@ -101,7 +101,7 @@ float calcStokefactor(RPatch *shoot, RPatch *rp, RNode *rn, float *area) Normalise(cross[2]); Normalise(cross[3]); - /* hoeken */ + /* angles */ rad[0]= vec[0][0]*vec[1][0]+ vec[0][1]*vec[1][1]+ vec[0][2]*vec[1][2]; rad[1]= vec[1][0]*vec[2][0]+ vec[1][1]*vec[2][1]+ vec[1][2]*vec[2][2]; rad[2]= vec[2][0]*vec[3][0]+ vec[2][1]*vec[3][1]+ vec[2][2]*vec[3][2]; @@ -112,7 +112,7 @@ float calcStokefactor(RPatch *shoot, RPatch *rp, RNode *rn, float *area) rad[2]= acos(rad[2]); rad[3]= acos(rad[3]); - /* Stoke formule */ + /* Stoke formula */ VecMulf(cross[0], rad[0]); VecMulf(cross[1], rad[1]); VecMulf(cross[2], rad[2]); @@ -125,7 +125,7 @@ float calcStokefactor(RPatch *shoot, RPatch *rp, RNode *rn, float *area) fac+= tvec[0]*cross[3][0]+ tvec[1]*cross[3][1]+ tvec[2]*cross[3][2]; } else { - /* hoekvectors */ + /* corner vectors */ VecSubf(vec[0], shoot->cent, rn->v1); VecSubf(vec[1], shoot->cent, rn->v2); VecSubf(vec[2], shoot->cent, rn->v3); @@ -134,7 +134,7 @@ float calcStokefactor(RPatch *shoot, RPatch *rp, RNode *rn, float *area) Normalise(vec[1]); Normalise(vec[2]); - /* uitprod */ + /* cross product */ Crossf(cross[0], vec[0], vec[1]); Crossf(cross[1], vec[1], vec[2]); Crossf(cross[2], vec[2], vec[0]); @@ -142,7 +142,7 @@ float calcStokefactor(RPatch *shoot, RPatch *rp, RNode *rn, float *area) Normalise(cross[1]); Normalise(cross[2]); - /* hoeken */ + /* angles */ rad[0]= vec[0][0]*vec[1][0]+ vec[0][1]*vec[1][1]+ vec[0][2]*vec[1][2]; rad[1]= vec[1][0]*vec[2][0]+ vec[1][1]*vec[2][1]+ vec[1][2]*vec[2][2]; rad[2]= vec[2][0]*vec[0][0]+ vec[2][1]*vec[0][1]+ vec[2][2]*vec[0][2]; @@ -151,7 +151,7 @@ float calcStokefactor(RPatch *shoot, RPatch *rp, RNode *rn, float *area) rad[1]= acos(rad[1]); rad[2]= acos(rad[2]); - /* Stoke formule */ + /* Stoke formula */ VecMulf(cross[0], rad[0]); VecMulf(cross[1], rad[1]); VecMulf(cross[2], rad[2]); @@ -228,8 +228,8 @@ void calcSidefactors() void initradiosity() { - /* alloceert en maakt LUTs voor top/side factors */ - /* alloceert en maakt index array */ + /* allocates and makes LUTs for top/side factors */ + /* allocates and makes index array */ int a, hres2; if(RG.topfactors) MEM_freeN(RG.topfactors); @@ -261,7 +261,7 @@ void rad_make_hocos(RadView *vw) /* } */ } -void rad_setmatrices(RadView *vw) /* voor hemi's */ +void rad_setmatrices(RadView *vw) /* for hemi's */ { float up1[3], len, twist; @@ -292,7 +292,7 @@ void hemizbuf(RadView *vw) rad_setmatrices(vw); RE_zbufferall_radio(vw, RG.elem, RG.totelem); - /* factors tellen */ + /* count factors */ if(vw->recty==vw->rectx) factors= RG.topfactors; else factors= RG.sidefactors; hres= RG.hemires/2; @@ -730,13 +730,13 @@ void subdivideshootElements(int it) if(blender_test_break()) break; } - /* test op extreem weinig kleurverloop binnen patch met subdivflag */ + /* test for extreme small color change within a patch with subdivflag */ rp= RG.patchbase.first; while(rp) { - if(rp->f & RAD_SUBDIV) { /* rp heeft elems die moet gesubd */ - /* minstens 4 levels diep */ + if(rp->f & RAD_SUBDIV) { /* rp has elems that need subdiv */ + /* at least 4 levels deep */ rn= rp->first->down1; if(rn) { rn= rn->down1; @@ -748,13 +748,13 @@ void subdivideshootElements(int it) if(rn) { min[0]= min[1]= min[2]= 1.0e10; max[0]= max[1]= max[2]= -1.0e10; - /* errmin en max zijn de gefilterde kleuren */ + /* errmin and max are the filtered colors */ errmin[0]= errmin[1]= errmin[2]= 1.0e10; errmax[0]= errmax[1]= errmax[2]= -1.0e10; minmaxradelemfilt(rp->first, min, max, errmin, errmax); - /* verschil tussen kleuren klein: toch maar niet subd */ - /* test ook voor de gefilterde: maar kritischer */ + /* if small difference between colors: no subdiv */ + /* also test for the filtered ones: but with higher critical level */ contin= 0; a= abs( calculatecolor(min[0])-calculatecolor(max[0])); @@ -837,7 +837,7 @@ void subdivideshootPatches(int it) stoke= calcStokefactor(shoot, rp, rp->first, &area); if(stoke!= 0.0) { - if(area>.1) { /* ontvangt patch meer dan (ong)10% van energie? */ + if(area>.1) { /* does patch receive more than (about)10% of energy? */ rp->f= RAD_SUBDIV; } else { @@ -853,16 +853,6 @@ void subdivideshootPatches(int it) rp->f= RAD_SUBDIV; - /* if(get_qual()&LR_SHIFTKEY); - else { - drawpatch_ext(rp, 0xFF77FF); - - printf("Pa hemi %f stoke %f err %f area %f\n", *fp, stoke, err, area); - - while(get_mbut()&L_MOUSE==0); - while(get_mbut()&L_MOUSE); - } - */ } } } @@ -919,7 +909,7 @@ void inithemiwindows() { RadView *vw; - /* de hemiwindows */ + /* the hemiwindows */ vw= &(hemitop); memset(vw, 0, sizeof(RadView)); vw->rectx= RG.hemires; diff --git a/source/blender/radiosity/intern/source/radio.c b/source/blender/radiosity/intern/source/radio.c index b601605157a..08968483a18 100644 --- a/source/blender/radiosity/intern/source/radio.c +++ b/source/blender/radiosity/intern/source/radio.c @@ -279,7 +279,6 @@ int rad_go(void) /* return 0 when user escapes */ { double stime= PIL_check_seconds_timer(); int retval; - /* firsttime moet vervangen worden door radphase? */ if(RG.totface) return 0; @@ -311,7 +310,7 @@ int rad_go(void) /* return 0 when user escapes */ removeEqualNodes(RG.nodelim); - make_face_tab(); /* nu geankerd */ + make_face_tab(); /* now anchored */ closehemiwindows(); RG.phase= 0; diff --git a/source/blender/radiosity/intern/source/radnode.c b/source/blender/radiosity/intern/source/radnode.c index 522f08d4e00..844973e4d1f 100644 --- a/source/blender/radiosity/intern/source/radnode.c +++ b/source/blender/radiosity/intern/source/radnode.c @@ -237,7 +237,7 @@ void setnodelimit(float limit) } -/* ************ GEHEUGENBEHEER *********** */ +/* ************ memory management *********** */ int Ntotvert=0, Ntotnode=0, Ntotpatch=0; @@ -313,7 +313,7 @@ void freePatch(RPatch *patch) void replaceAllNode(RNode *neighb, RNode *newn) { - /* verandert van alle buren de edgepointers die naar newn->up wijzen in new */ + /* changes from all neighbours the edgepointers that point to newn->up in new */ int ok= 0; @@ -345,7 +345,7 @@ void replaceAllNode(RNode *neighb, RNode *newn) void replaceAllNodeInv(RNode *neighb, RNode *old) { - /* verandert van alle buren de edgepointers die naar old wijzen in old->up */ + /* changes from all neighbours the edgepointers that point to old in old->up */ if(neighb==0) return; if(old->up==0) return; @@ -370,7 +370,7 @@ void replaceAllNodeInv(RNode *neighb, RNode *old) void replaceAllNodeUp(RNode *neighb, RNode *old) { - /* verandert van alle buren de edgepointers die naar old wijzen in old->up */ + /* changes from all neighbours the edgepointers that point to old in old->up */ if(neighb==0) return; if(old->up==0) return; neighb= neighb->up; @@ -397,15 +397,15 @@ void replaceAllNodeUp(RNode *neighb, RNode *old) void replaceTestNode(RNode *neighb, RNode **edpp, RNode *newn, int level, float *vert) { - /* IF neighb->ed wijst naar newn->up - * IF edgelevels gelijk - IF testvert zit in neighb->ed - pointers beide kanten op veranderen + /* IF neighb->ed points to newn->up + * IF edgelevels equal + IF testvert is in neighb->ed + change pointers both ways ELSE RETURN ELSE - IF neighb edgelevel is dieper - verander neighb pointer + IF neighb edgelevel is deeper + change neighb pointer */ int ok= 0; @@ -484,7 +484,7 @@ void replaceTestNode(RNode *neighb, RNode **edpp, RNode *newn, int level, float int setvertexpointersNode(RNode *neighb, RNode *node, int level, float **v1, float **v2) { - /* vergelijkt edgelevels , als gelijk zet het de vertexpointers */ + /* compares edgelevels , if equal it sets the vertexpointers */ if(neighb==0) return 0; @@ -542,7 +542,7 @@ void subdivideTriNode(RNode *node, RNode *edge) return; } - /* bepaal subdivide richting */ + /* defines subdivide direction */ if(edge==0) { /* areathreshold */ @@ -563,7 +563,7 @@ void subdivideTriNode(RNode *node, RNode *edge) else uvl= 3; } - /* moeten naastliggende nodes dieper? Recursief! */ + /* should neighbour nodes be deeper? Recursive! */ n1= 0; if(uvl==1) { if(node->ed1 && node->ed1->down1==0) n1= node->ed1; @@ -576,7 +576,7 @@ void subdivideTriNode(RNode *node, RNode *edge) } if(n1) { up= node->up; - while(up) { /* ook testen op ed4 !!! */ + while(up) { /* also test for ed4 !!! */ if(n1->ed1==up || n1->ed2==up || n1->ed3==up || n1->ed4==up) { subdivideNode(n1, up); break; @@ -585,7 +585,7 @@ void subdivideTriNode(RNode *node, RNode *edge) } } - /* Het subdividen */ + /* the subsidiving */ n1= mallocNode(); memcpy(n1, node, sizeof(RNode)); n2= mallocNode(); @@ -600,22 +600,22 @@ void subdivideTriNode(RNode *node, RNode *edge) /* subdivide edge 1 */ if(uvl==1) { - /* EERSTE NODE krijgt edge 2 */ + /* FIRST NODE gets edge 2 */ n1->ed3= n2; n1->lev3= 0; replaceAllNode(n1->ed2, n1); n1->lev1++; replaceTestNode(n1->ed1, &(n1->ed1), n1, n1->lev1, n1->v2); - /* TWEEDE NODE krijgt edge 3 */ + /* SECOND NODE gets edge 3 */ n2->ed2= n1; n2->lev2= 0; replaceAllNode(n2->ed3, n2); n2->lev1++; replaceTestNode(n2->ed1, &(n2->ed1), n2, n2->lev1, n2->v1); - /* NIEUWE VERTEX uit edge 1 */ - if( setvertexpointersNode(n1->ed1, n1, n1->lev1, &v1, &v2) ) { /* nodes hebben gelijke levels */ + /* NEW VERTEX from edge 1 */ + if( setvertexpointersNode(n1->ed1, n1, n1->lev1, &v1, &v2) ) { /* nodes have equal levels */ if(v1== n1->v2) { n1->v1= v2; n2->v2= v2; @@ -635,22 +635,22 @@ void subdivideTriNode(RNode *node, RNode *edge) } else if(uvl==2) { - /* EERSTE NODE krijgt edge 1 */ + /* FIRST NODE gets edge 1 */ n1->ed3= n2; n1->lev3= 0; replaceAllNode(n1->ed1, n1); n1->lev2++; replaceTestNode(n1->ed2, &(n1->ed2), n1, n1->lev2, n1->v2); - /* TWEEDE NODE krijgt edge 3 */ + /* SECOND NODE gets edge 3 */ n2->ed1= n1; n2->lev1= 0; replaceAllNode(n2->ed3, n2); n2->lev2++; replaceTestNode(n2->ed2, &(n2->ed2), n2, n2->lev2, n2->v3); - /* NIEUWE VERTEX uit edge 2 */ - if( setvertexpointersNode(n1->ed2, n1, n1->lev2, &v1, &v2) ) { /* nodes hebben gelijke levels */ + /* NEW VERTEX from edge 2 */ + if( setvertexpointersNode(n1->ed2, n1, n1->lev2, &v1, &v2) ) { /* nodes have equal levels */ if(v1== n1->v2) { n1->v3= v2; n2->v2= v2; @@ -670,22 +670,22 @@ void subdivideTriNode(RNode *node, RNode *edge) } else if(uvl==3) { - /* EERSTE NODE krijgt edge 1 */ + /* FIRST NODE gets edge 1 */ n1->ed2= n2; n1->lev2= 0; replaceAllNode(n1->ed1, n1); n1->lev3++; replaceTestNode(n1->ed3, &(n1->ed3), n1, n1->lev3, n1->v1); - /* TWEEDE NODE krijgt edge 2 */ + /* SECOND NODE gets edge 2 */ n2->ed1= n1; n2->lev1= 0; replaceAllNode(n2->ed2, n2); n2->lev3++; replaceTestNode(n2->ed3, &(n2->ed3), n2, n2->lev3, n2->v3); - /* NIEUWE VERTEX uit edge 3 */ - if( setvertexpointersNode(n1->ed3, n1, n1->lev3, &v1, &v2) ) { /* nodes hebben gelijke levels */ + /* NEW VERTEX from edge 3 */ + if( setvertexpointersNode(n1->ed3, n1, n1->lev3, &v1, &v2) ) { /* nodes have equal levels */ if(v1== n1->v1) { n1->v3= v2; n2->v1= v2; @@ -727,7 +727,7 @@ void subdivideNode(RNode *node, RNode *edge) return; } - /* bepaal subdivide richting */ + /* defines subdivide direction */ if(edge==0) { /* areathreshold */ @@ -744,7 +744,7 @@ void subdivideNode(RNode *node, RNode *edge) else uvl= 2; } - /* moeten naastliggende nodes dieper? Recursief! */ + /* do neighbour nodes have to be deeper? Recursive! */ n1= n2= 0; if(uvl==1) { if(node->ed1 && node->ed1->down1==0) n1= node->ed1; @@ -777,7 +777,7 @@ void subdivideNode(RNode *node, RNode *edge) } } - /* Het subdividen */ + /* the subdividing */ n1= mallocNode(); memcpy(n1, node, sizeof(RNode)); n2= mallocNode(); @@ -789,10 +789,10 @@ void subdivideNode(RNode *node, RNode *edge) node->down1= n1; node->down2= n2; - /* subdivide edge 1 en 3 */ + /* subdivide edge 1 and 3 */ if(uvl==1) { - /* EERSTE NODE krijgt edge 2 */ + /* FIRST NODE gets edge 2 */ n1->ed4= n2; n1->lev4= 0; replaceAllNode(n1->ed2, n1); @@ -801,7 +801,7 @@ void subdivideNode(RNode *node, RNode *edge) replaceTestNode(n1->ed1, &(n1->ed1), n1, n1->lev1, n1->v2); replaceTestNode(n1->ed3, &(n1->ed3), n1, n1->lev3, n1->v3); - /* TWEEDE NODE krijgt edge 4 */ + /* SECOND NODE gets edge 4 */ n2->ed2= n1; n2->lev2= 0; replaceAllNode(n2->ed4, n2); @@ -810,8 +810,8 @@ void subdivideNode(RNode *node, RNode *edge) replaceTestNode(n2->ed1, &(n2->ed1), n2, n2->lev1, n2->v1); replaceTestNode(n2->ed3, &(n2->ed3), n2, n2->lev3, n2->v4); - /* NIEUWE VERTEX uit edge 1 */ - if( setvertexpointersNode(n1->ed1, n1, n1->lev1, &v1, &v2) ) { /* nodes hebben gelijke levels */ + /* NEW VERTEX from edge 1 */ + if( setvertexpointersNode(n1->ed1, n1, n1->lev1, &v1, &v2) ) { /* nodes have equal levels */ if(v1== n1->v2) { n1->v1= v2; n2->v2= v2; @@ -829,8 +829,8 @@ void subdivideNode(RNode *node, RNode *edge) n1->v1[3]= node->v1[3]; /* color */ } - /* NIEUWE VERTEX uit edge 3 */ - if( setvertexpointersNode(n1->ed3, n1, n1->lev3, &v1, &v2) ) { /* nodes hebben gelijke levels */ + /* NEW VERTEX from edge 3 */ + if( setvertexpointersNode(n1->ed3, n1, n1->lev3, &v1, &v2) ) { /* nodes have equal levels */ if(v1== n1->v3) { n1->v4= v2; n2->v3= v2; @@ -848,10 +848,10 @@ void subdivideNode(RNode *node, RNode *edge) n1->v4[3]= node->v4[3]; /* color */ } } - /* subdivide edge 2 en 4 */ + /* subdivide edge 2 and 4 */ else if(uvl==2) { - /* EERSTE NODE krijgt edge 1 */ + /* FIRST NODE gets edge 1 */ n1->ed3= n2; n1->lev3= 0; replaceAllNode(n1->ed1, n1); @@ -860,7 +860,7 @@ void subdivideNode(RNode *node, RNode *edge) replaceTestNode(n1->ed2, &(n1->ed2), n1, n1->lev2, n1->v2); replaceTestNode(n1->ed4, &(n1->ed4), n1, n1->lev4, n1->v1); - /* TWEEDE NODE krijgt edge 3 */ + /* SECOND NODE gets edge 3 */ n2->ed1= n1; n2->lev1= 0; replaceAllNode(n2->ed3, n2); @@ -869,8 +869,8 @@ void subdivideNode(RNode *node, RNode *edge) replaceTestNode(n2->ed2, &(n2->ed2), n2, n2->lev2, n2->v3); replaceTestNode(n2->ed4, &(n2->ed4), n2, n2->lev4, n2->v4); - /* NIEUWE VERTEX uit edge 2 */ - if( setvertexpointersNode(n1->ed2, n1, n1->lev2, &v1, &v2) ) { /* nodes hebben gelijke levels */ + /* NEW VERTEX from edge 2 */ + if( setvertexpointersNode(n1->ed2, n1, n1->lev2, &v1, &v2) ) { /* nodes have equal levels */ if(v1== n1->v2) { n1->v3= v2; n2->v2= v2; @@ -888,8 +888,8 @@ void subdivideNode(RNode *node, RNode *edge) n1->v3[3]= node->v3[3]; /* color */ } - /* NIEUWE VERTEX uit edge 4 */ - if( setvertexpointersNode(n1->ed4, n1, n1->lev4, &v1, &v2) ) { /* nodes hebben gelijke levels */ + /* NEW VERTEX from edge 4 */ + if( setvertexpointersNode(n1->ed4, n1, n1->lev4, &v1, &v2) ) { /* nodes have equal levels */ if(v1== n1->v1) { n1->v4= v2; n2->v1= v2; @@ -916,15 +916,18 @@ void subdivideNode(RNode *node, RNode *edge) int comparelevel(RNode *node, RNode *nb, int level) { - /* recursief afdalen: bij diepste node testen */ - /* return 1 is gelijk of hoger */ + /* recursive descent: test with deepest node */ + /* return 1 means equal or higher */ if(nb==0) return 1; if(nb->down1) { return 0; - /* HIER ZIT EEN FOUT, MAAR WELKE? (zonder dit werkt 't ook, maar langzamer) + /* THERE IS AN ERROR HERE, BUT WHAT? (without this function the system + works too, but is slower) (ton) */ + + /* n1= nb->down1; if(n1->ed1==node) return comparelevel(node, n1, level); if(n1->ed2==node) return comparelevel(node, n1, level); @@ -947,17 +950,17 @@ int comparelevel(RNode *node, RNode *nb, int level) /* if(nb->ed3==node) return (nb->lev3<=level); */ /* if(nb->ed4==node) return (nb->lev4<=level); */ - return 1; /* is hogere node */ + return 1; /* is higher node */ } return 1; } -void deleteTriNodes(RNode *node) /* beide kinderen van node */ +void deleteTriNodes(RNode *node) /* both children of node */ { RNode *n1, *n2; - /* als naastliggende nodes dieper zijn: geen delete */ - /* enkel twee nodes testen, van andere verandert level niet */ + /* if neighbour nodes are deeper: no delete */ + /* just test 2 nodes, from the others the level doesn't change */ n1= node->down1; n2= node->down2; @@ -966,7 +969,7 @@ void deleteTriNodes(RNode *node) /* beide kinderen van node */ if(n1->down1 || n2->down1) return; - /* aan edges mag geen gesubdivide node zitten */ + /* at the edges no subdivided node is allowed */ if(n1->ed1 && n1->ed1->down1) return; if(n1->ed2 && n1->ed2->down1) return; @@ -992,7 +995,7 @@ void deleteTriNodes(RNode *node) /* beide kinderen van node */ replaceAllNodeUp(n2->ed2, n2); replaceAllNodeUp(n2->ed3, n2); - n1->down1= (RNode *)12; /* voor debug */ + n1->down1= (RNode *)12; /* for debug */ n2->down1= (RNode *)12; freeNode(n1); @@ -1001,13 +1004,13 @@ void deleteTriNodes(RNode *node) /* beide kinderen van node */ } - /* beide kinderen van node */ + /* both children of node */ void deleteNodes(RNode *node) { RNode *n1, *n2; - - /* als naastliggende nodes dieper zijn: geen delete */ - /* enkel twee nodes testen, van andere verandert level niet */ + + /* if neighbour nodes are deeper: no delete */ + /* just test 2 nodes, from the others the level doesn't change */ if(node->type==3) { deleteTriNodes(node); @@ -1023,7 +1026,7 @@ void deleteNodes(RNode *node) if(n1->ed3==n2) { - /* aan edges mag geen gesubdivide node zitten */ + /* at the edges no subdivided node is allowed */ if(n1->ed1 && n1->ed1->down1) return; if(n1->ed2 && n1->ed2->down1) return; @@ -1049,7 +1052,7 @@ void deleteNodes(RNode *node) replaceAllNodeUp(n2->ed3, n2); replaceAllNodeUp(n2->ed4, n2); - n1->down1= (RNode *)12; /* voor debug */ + n1->down1= (RNode *)12; /* for debug */ n2->down1= (RNode *)12; freeNode(n1); @@ -1084,7 +1087,7 @@ void deleteNodes(RNode *node) replaceAllNodeUp(n2->ed3, n2); replaceAllNodeUp(n2->ed4, n2); - n1->down1= (RNode *)12; /* voor debug */ + n1->down1= (RNode *)12; /* for debug */ n2->down1= (RNode *)12; freeNode(n1); diff --git a/source/blender/radiosity/intern/source/radpostprocess.c b/source/blender/radiosity/intern/source/radpostprocess.c index 010189ccb81..7b362b0e508 100644 --- a/source/blender/radiosity/intern/source/radpostprocess.c +++ b/source/blender/radiosity/intern/source/radpostprocess.c @@ -365,7 +365,7 @@ float *findmiddlevertex(RNode *node, RNode *nb, float *v1, float *v2) return 0; } -void make_face_tab() /* zorgt voor ankers */ +void make_face_tab() /* takes care of anchoring */ { RNode *rn, **el; Face *face = NULL; @@ -380,7 +380,7 @@ void make_face_tab() /* zorgt voor ankers */ RG.igamma= 1.0/RG.gamma; RG.radfactor= RG.radfac*pow(64*64, RG.igamma); - /* vlakkleuren omzetten */ + /* convert face colors */ el= RG.elem; for(a=RG.totelem; a>0; a--, el++) { rn= *el; @@ -391,7 +391,7 @@ void make_face_tab() /* zorgt voor ankers */ charcol[1]= calculatecolor(rn->totrad[2]); } - /* nodes aflopen en Face's maken */ + /* check nodes and make faces */ el= RG.elem; for(a=RG.totelem; a>0; a--, el++) { @@ -402,7 +402,7 @@ void make_face_tab() /* zorgt voor ankers */ rn->v3[3]= 0.0; if(rn->v4) rn->v4[3]= 0.0; - /* test edges op subdivide */ + /* test edges for subdivide */ flag= 0; v1= v2= v3= v4= 0; if(rn->ed1) { @@ -425,7 +425,7 @@ void make_face_tab() /* zorgt voor ankers */ if(v4) flag |= 8; } - /* met flag en vertexpointers kunnen nu Face's gemaakt*/ + /* using flag and vertexpointers now Faces can be made */ if(flag==0) { makeface(rn->v1, rn->v2, rn->v3, rn->v4, rn); @@ -434,7 +434,7 @@ void make_face_tab() /* zorgt voor ankers */ else anchorTriface(rn, v1, v2, v3, flag); } - /* optellen */ + /* add */ for(a=0; a<RG.totface; a++) { RAD_NEXTFACE(a); @@ -457,20 +457,20 @@ void make_face_tab() /* zorgt voor ankers */ void filterFaces() { - /* alle kleuren van vertices in faces en weer terug */ + /* put vertex colors in faces, and put them back */ Face *face = NULL; int a, w1, w2, w3; if(RG.totface==0) return; - /* wissen */ + /* clear */ for(a=0; a<RG.totface; a++) { RAD_NEXTFACE(a); face->col= 0; } - /* optellen: punten bij vlakken */ + /* add: vertices with faces */ for(a=0; a<RG.totface; a++) { RAD_NEXTFACE(a); @@ -488,7 +488,7 @@ void filterFaces() } } - /* wissen */ + /* clear */ for(a=0; a<RG.totface; a++) { RAD_NEXTFACE(a); face->v1[3]= 0.0; @@ -498,7 +498,7 @@ void filterFaces() } - /* optellen: vlakken bij punten */ + /* add: faces with vertices */ for(a=0; a<RG.totface; a++) { RAD_NEXTFACE(a); @@ -559,14 +559,14 @@ void calcfiltrad(RNode *rn, float *cd) void filterNodes() { - /* alle kleuren van nodes in tempblok en weer terug */ + /* colors from nodes in tempblock and back */ RNode *rn, **el; float *coldata, *cd; int a; if(RG.totelem==0) return; - /* de upnodes moeten kleur hebben */ + /* the up-nodes need a color */ el= RG.elem; for(a=0; a<RG.totelem; a++, el++) { rn= *el; @@ -596,7 +596,7 @@ void filterNodes() } } - /* met area optellen */ + /* add using area */ cd= coldata= MEM_mallocN(3*4*RG.totelem, "filterNodes"); el= RG.elem; for(a=0; a<RG.totelem; a++, el++) { @@ -616,7 +616,7 @@ void filterNodes() void removeEqualNodes(short limit) { - /* nodes met kleur gelijk aan elkaar: verwijderen */ + /* nodes with equal colors: remove */ RNode **el, *rn, *rn1; float thresh, f1, f2; int a, foundone=1, ok; @@ -811,7 +811,7 @@ void rad_addmesh(void) md[3]= coldata[mface->v4]; } - /* boundbox en centrenew */ + /* boundbox and centrenew */ INIT_MINMAX(min, max); diff --git a/source/blender/radiosity/intern/source/radpreprocess.c b/source/blender/radiosity/intern/source/radpreprocess.c index 9946809926d..a1fb90abecc 100644 --- a/source/blender/radiosity/intern/source/radpreprocess.c +++ b/source/blender/radiosity/intern/source/radpreprocess.c @@ -72,15 +72,16 @@ void setparelem(RNode *rn, RPatch *par); void splitconnected() { - /* voor zover de videoscapefile nog gedeelde vertices leverde, worden de vlakken getest - * op normaal en kleur. Doe dit door voor elke vertex een normaal en een kleur te onthouden. + /* Since input meshes can have faces with sharing vertices, the geometry is being tested here. + * Using normals and colors, faces are split separately. we do this by storing for each + * vertex a normal and a color */ RPatch *rp; RNode *rn; VeNoCo *vnc, *next, *vnc1; int a; - /* test of gesplit moet worden */ + /* test if we need a split */ rp= RG.patchbase.first; while(rp) { @@ -98,7 +99,7 @@ void splitconnected() vnc->col= (float *)rp->ref; vnc->flag= 1; } - else { /* mag vlak deze vertex gebruiken voor gouraud? */ + else { /* is face from this vertex allowed for gouraud? */ vnc1= vnc; while(vnc1) { if(VecCompare(vnc1->n, rp->norm, 0.01)) { @@ -127,7 +128,7 @@ void splitconnected() } rp= rp->next; } - /* de vertexpointers van nodes aanpassen */ + /* adapt vertexpointers from nodes */ rp= RG.patchbase.first; while(rp) { @@ -141,7 +142,7 @@ void splitconnected() } - /* het hele zaakje vrijgeven */ + /* free all */ vnc= RG.verts; for(a=0; a<RG.totvert; a++) { vnc1= vnc->next; @@ -218,8 +219,8 @@ static void setedge(RNode *node, RNode *nb, int nr, int nrb) void setedgepointers() { - /* edge-array maken en sorteren */ - /* paren edges staan bij elkaar: pointers invullen in nodes */ + /* make edge-array and sort it */ + /* pairs of edges are put together: fill in pointers in nodes */ EdSort *es, *esblock; RPatch *rp; RNode *rn; @@ -430,7 +431,7 @@ void rad_collect_meshes() v4= (RG.verts+mface->v4+offs)->v; } rn->par= rp; - rn->f= RAD_PATCH; /* deze node is Patch */ + rn->f= RAD_PATCH; /* this node is a Patch */ rn->type= rp->type; CalcNormFloat(v1, v2, v3, rp->norm); @@ -439,7 +440,7 @@ void rad_collect_meshes() rn->area= rp->area; - /* kleur en emit */ + /* color and emit */ if(mface->mat_nr != index) { index= mface->mat_nr; ma= give_current_material(ob, index+1); @@ -516,7 +517,7 @@ void countelem(RNode *rn) void countglobaldata() { - /* telt aantal elements en patches*/ + /* counts elements and patches*/ RPatch *rp; RG.totelem= RG.totpatch= 0; @@ -559,7 +560,7 @@ void makeGlobalElemArray() return; } - /* recursief elements toevoegen */ + /* recursive adding elements */ rp= RG.patchbase.first; while(rp) { addelem(&el, rp->first, rp); @@ -574,7 +575,7 @@ void makeGlobalElemArray() RG.formfactors= 0; } -void splitpatch(RPatch *old) /* bij overflow gedurende shoot */ +void splitpatch(RPatch *old) /* in case of overflow during shoot */ { RNode *rn; float **fpp; @@ -670,7 +671,7 @@ void addpatch(RPatch *old, RNode *rn) void converttopatches() { - /* loopt patcheslijst af, als node gesubdivided: nieuwe patch */ + /* chacks patches list, if node subdivided: new patch */ RPatch *rp, *next; rp= RG.patchbase.first; @@ -693,7 +694,7 @@ void subdiv_elements() rad_init_energy(); - /* eerst maxsize elements */ + /* first maxsize elements */ while(toobig) { toobig= 0; @@ -773,7 +774,7 @@ void maxsizePatches() if(toobig) converttopatches(); } - /* aantal lampen tellen */ + /* count lamps */ rp= RG.patchbase.first; RG.totlamp= 0; while(rp) { |