This site is no longer active and is available for archival purposes only. Registration and login is disabled.

SH-3 VERSION OF PQ UP AND RUNNING!


Re: SH-3 VERSION OF PQ UP AND RUNNING!

Postby Jay » Mar 29, 2001 @ 6:05am

/* <br>================ <br>D_PolysetRecursiveTriangle <br>================ <br>*/ <br>void D_PolysetRecursiveTriangle (int *lp1, int *lp2, int *lp3) <br>{ <br>     int            *temp; <br>     int            d; <br>     int            new[6]; <br>     int            z; <br>     short      *zbuf; <br><br>---> d = lp2[0] - lp1[0]; <br>     if (d < -1 || d > 1) <br>           goto split; <br>     d = lp2[1] - lp1[1]; <br>     if (d < -1 || d > 1) <br>           goto split; <br><br>     d = lp3[0] - lp2[0]; <br>     if (d < -1 || d > 1) <br>           goto split2; <br>     d = lp3[1] - lp2[1]; <br>     if (d < -1 || d > 1) <br>           goto split2; <br><br>     d = lp1[0] - lp3[0]; <br>     if (d < -1 || d > 1) <br>           goto split3; <br>     d = lp1[1] - lp3[1]; <br>     if (d < -1 || d > 1) <br>     { <br>split3: <br>           temp = lp1; <br>           lp1 = lp3; <br>           lp3 = lp2; <br>           lp2 = temp; <br><br>           goto split; <br>     } <br><br>     return;                  // entire tri is filled <br><br>split2: <br>     temp = lp1; <br>     lp1 = lp2; <br>     lp2 = lp3; <br>     lp3 = temp; <br><br>split: <br>// split this edge <br>     new[0] = (lp1[0] + lp2[0]) >> 1; <br>     new[1] = (lp1[1] + lp2[1]) >> 1; <br>     new[2] = (lp1[2] + lp2[2]) >> 1; <br>     new[3] = (lp1[3] + lp2[3]) >> 1; <br>     new[5] = (lp1[5] + lp2[5]) >> 1; <br><br>// draw the point if splitting a leading edge <br>     if (lp2[1] > lp1[1]) <br>           goto nodraw; <br>     if ((lp2[1] == lp1[1]) && (lp2[0] < lp1[0])) <br>           goto nodraw; <br><br><br>     z = new[5]>>16; <br>     zbuf = zspantable[new[1] + new[0]; <br>     if (z >= *zbuf) <br>     { <br>           int            pix; <br>            <br>           *zbuf = z; <br>           pix = d_pcolormap[skintable[new[3]>>16][new[2]>>16]; <br>           d_viewbuffer[d_scantable[new[1] + new[0] = pix; <br>     } <br><br>nodraw: <br>// recursively continue <br>     _PolysetRecursiveTriangle (lp3, lp1, new); <br>     _PolysetRecursiveTriangle (lp3, new, lp2); <br>}
Jay
pm Member
 
Posts: 114
Joined: Mar 28, 2001 @ 7:17pm


Re: SH-3 VERSION OF PQ UP AND RUNNING!

Postby Jay » Mar 29, 2001 @ 6:05am

there, can you help Dan?
Jay
pm Member
 
Posts: 114
Joined: Mar 28, 2001 @ 7:17pm


Re: SH-3 VERSION OF PQ UP AND RUNNING!

Postby Jay » Mar 29, 2001 @ 6:11am

ah yes, take out that function and what do you get?  Carpediem's sh-3 build!  lol
Jay
pm Member
 
Posts: 114
Joined: Mar 28, 2001 @ 7:17pm


Re: SH-3 VERSION OF PQ UP AND RUNNING!

Postby Dan East » Mar 29, 2001 @ 6:21am

No, I can't ICQ. Start debugging again so you get the error. Then hold your mouse over the lp2 and lp1 variables. A tooltip should appear telling you the values. I need those please. Also, I need to know what called that func (if it was through recursion or not, might be running out of stack space). When it stops with the error, click on View->Debug Windows->Call Stack. At the top of the list you will see the current function, and down below is the stack of functions called to get to that point. Please copy the top several functions and paste them here for me.<br>Thanks!<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: SH-3 VERSION OF PQ UP AND RUNNING!

Postby Jay » Mar 29, 2001 @ 6:22am

ok, one sec
Jay
pm Member
 
Posts: 114
Joined: Mar 28, 2001 @ 7:17pm


Re: SH-3 VERSION OF PQ UP AND RUNNING!

Postby Jay » Mar 29, 2001 @ 6:34am

lp2[0]=0x00000022<br>lp1[0]=0x00000000<br><br>D_PolysetRecursiveTriangle(int * 0x00000000, int * 0x00000022, int * 0x00000035) line 335<br>D_DrawSubdiv() line 245<br>D_PolysetDraw() line 139<br>R_AliasPrepareUnclippedPoints() line 1070<br>R_AliasDrawModel(alight_t * 0x45d3ae00) line 1417<br>R_DrawEntitiesOnList() line 1005<br>R_RenderView_() line 1895<br>R_RenderView() line 2060<br>V_RenderView() line 1683<br>SCR_UpdateScreen() line 971<br>_Host_Frame(float 4.20390e-045) line 861<br>Host_Frame(float 0.000000) line 902<br>WinMain(HINSTANCE__ * 0x00000000, HINSTANCE__ * 0x00000000, unsigned short * 0x00000000, int 0) line 938<br>WinMainCRTStartup(HINSTANCE__ * 0x00000000, HINSTANCE__ * 0x00000000, unsigned short * 0x00000000, int 0) line 8 + 12 bytes<br>21fae0d8()<br>
Jay
pm Member
 
Posts: 114
Joined: Mar 28, 2001 @ 7:17pm


Re: SH-3 VERSION OF PQ UP AND RUNNING!

Postby Dan East » Mar 29, 2001 @ 6:42am

Okay, the real problem is in D_DrawSubdiv. It's passing bad int pointers to Recursive Triangle. I'm looking...<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: SH-3 VERSION OF PQ UP AND RUNNING!

Postby Dan East » Mar 29, 2001 @ 6:54am

Next step :), I need you to tell me the value of the pfv var in D_DrawSubdiv. That var is assigned in the begging of the function. You can set a breakpoint to the line after the assignment using the Hand toolbar button. Or, you can let it crash as it has been, then double click the D_DrawSubdiv function in the call stack.<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: SH-3 VERSION OF PQ UP AND RUNNING!

Postby Jay » Mar 29, 2001 @ 6:59am

pfv isn't giving me a value, it's not even in the context window for the func.  ???  By the way, when I do look at the context menu, it says error expression cannot be evaluated for vertindex and facesfront
Jay
pm Member
 
Posts: 114
Joined: Mar 28, 2001 @ 7:17pm


Re: SH-3 VERSION OF PQ UP AND RUNNING!

Postby Dan East » Mar 29, 2001 @ 7:03am

Make sure you have the D_DrawSubdiv function selected in the call stack (there will be a yellow arrow next to it). You can also just type in pfv in the watch window (in the name column).<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: SH-3 VERSION OF PQ UP AND RUNNING!

Postby Jay » Mar 29, 2001 @ 7:09am

it says error, symbol pfv not found
Jay
pm Member
 
Posts: 114
Joined: Mar 28, 2001 @ 7:17pm


Re: SH-3 VERSION OF PQ UP AND RUNNING!

Postby Dan East » Mar 29, 2001 @ 7:12am

Did you try setting a breakpoint on the line after pfv is assigned in D_DrawSubdiv?<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: SH-3 VERSION OF PQ UP AND RUNNING!

Postby Jay » Mar 29, 2001 @ 7:13am

no, let me try that
Jay
pm Member
 
Posts: 114
Joined: Mar 28, 2001 @ 7:17pm


Re: SH-3 VERSION OF PQ UP AND RUNNING!

Postby Jay » Mar 29, 2001 @ 7:16am

it won't give me that
Jay
pm Member
 
Posts: 114
Joined: Mar 28, 2001 @ 7:17pm


Re: SH-3 VERSION OF PQ UP AND RUNNING!

Postby Jay » Mar 29, 2001 @ 7:16am

it'll give me all the other variables, just not that
Jay
pm Member
 
Posts: 114
Joined: Mar 28, 2001 @ 7:17pm


PreviousNext

Return to Pocket Quake 1 and 2


Sort


Forum Description

Discuss Pocket Quake 1 and 2 by Dan East

Moderators:

Dan East, sponge, James S

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum