Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: Manny Najera Newsgroups: scea.yaroze.programming.3d_graphics Subject: Problem makin' a TMD Date: Mon, 25 Aug 1997 23:54:15 -0500 Organization: SCEA News Server Lines: 79 Message-ID: <34026175.80A4028F@ix.netcom.com> NNTP-Posting-Host: ara-il8-10.ix.netcom.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.01 [en] (Win95; I) X-Priority: 3 (Normal) I'm trying to make a simple 4 sided polygon. This chunk of code is supposed to make an F_4_NL, but for some reason, it doesn't work. If I have: #define thingTMD (u_long *)0x800b0000 then I call this function like so: make_thing(thingTMD); then I link it to a GsDOBJ2 like I'm supposed to, I set up the lights and everything, but this code still does not work. void make_thing(u_long *addr) { TMD_OBJ *obj_table; u_long *vert_table; u_long *norm_table; u_long *prim_table; TMD_VERT v; // header setTMD_HDR((TMD_HDR *)addr, 0x00000041, 1, 1); addr = (u_long *)((TMD_HDR *)addr + 1); // object table obj_table = (TMD_OBJ *)addr; addr = (u_long *)((TMD_OBJ *)addr + 1); // prim table prim_table = addr; setPRIM_HDR((PRIM_HDR *)addr, F_4_NL, 1, 3, 5); addr = (u_long *)((PRIM_HDR *)addr + 1); setTMD_F_4_NL((TMD_F_4_NL *)addr, 128, 128, 128, 0, 1, 2, 3); addr = (u_long *)((TMD_F_4_NL *)addr + 1); // vert table vert_table = addr; setVector(&v, 0, 64, 0); setTMD_VERT((TMD_VERT *)addr, v.vx, v.vy, v.vz); addr = (u_long *)((TMD_VERT *)addr + 1); setVector(&v, 32, 64, 0); setTMD_VERT((TMD_VERT *)addr, v.vx, v.vy, v.vz); addr = (u_long *)((TMD_VERT *)addr + 1); setVector(&v, 64, 64, 0); setTMD_VERT((TMD_VERT *)addr, v.vx, v.vy, v.vz); addr = (u_long *)((TMD_VERT *)addr + 1); setVector(&v, 96, 64, 0); setTMD_VERT((TMD_VERT *)addr, v.vx, v.vy, v.vz); addr = (u_long *)((TMD_VERT *)addr + 1); // norm table norm_table = addr; // setup object table setTMD_OBJ(obj_table, vert_table, 4, norm_table, 0, prim_table, 1, 0); } And... why don't the libraries support straight lines in a tmd? This is pure sillines! My whole game is based on straight lines! Manny Najera