Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 17521 Details for
Bug 28466
WolfGL misses sprite rotation support and has a wrong sample rate for the audio
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Sprite rotation patch (from SF project page).
sprites.patch (text/plain), 2.27 KB, created by
Tony Vroon (RETIRED)
on 2003-09-11 12:13:21 UTC
(
hide
)
Description:
Sprite rotation patch (from SF project page).
Filename:
MIME Type:
Creator:
Tony Vroon (RETIRED)
Created:
2003-09-11 12:13:21 UTC
Size:
2.27 KB
patch
obsolete
>--- common/wl_agent.c.orig 2003-09-11 20:39:02.674298800 +0200 >+++ common/wl_agent.c 2003-09-11 20:42:17.229721880 +0200 >@@ -919,32 +919,31 @@ > viewdist = 0x7fffffffl; > closest = NULL; > >-// while (1) >+ while (1) > { > oldclosest = closest; > > for (check=ob->next ; check ; check=check->next) > if ((check->flags & FL_SHOOTABLE) >- //&& >+ && > // (check->flags & FL_VISABLE) && >-// (abs(check->viewx - centerx) < shootdelta) >+ (abs(check->viewx - centerx) < shootdelta) > ) >-// { >+ { > if (CheckLine(check)) >-// if (check->transx < viewdist) >+ if (check->transx < viewdist) > { >-// viewdist = check->transx; >+ viewdist = check->transx; > closest = check; >- break; > } >-// } >+ } > > if (closest == oldclosest) > return; // no more targets, all missed > > // trace a line from player to enemey >-// if (CheckLine(closest)) >-// break; >+ if (CheckLine(closest)) >+ break; > } > > // hit something >--- common/wl_draw.c.orig 2003-09-11 20:43:26.473195272 +0200 >+++ common/wl_draw.c 2003-09-11 20:46:57.859059736 +0200 >@@ -877,7 +877,7 @@ > tilespot = &tilemap[0][0]+spotloc; > > // could be in any of the nine surrounding tiles >- if ((*visspot) || >+ if (1 || (*visspot) || > (*(visspot-1) && !*(tilespot-1)) || > (*(visspot+1) && !*(tilespot+1)) || > (*(visspot-65) && !*(tilespot-65)) || >@@ -980,6 +980,8 @@ > > for (obj = player->next; obj; obj = obj->next) > { >+ int sprite; >+ > if (!areabyplayer[obj->areanumber]) > continue; > if (!gamestates[obj->state].shapenum) >@@ -989,10 +991,14 @@ > glTranslated((float)obj->x/(1<<16), (float)obj->y/(1<<16), 0); > glRotated(-player->angle, 0,0,1); > >- if (texture_index[PMSpriteStart+gamestates[obj->state].shapenum] == 0) >- CreateSprite(PMSpriteStart+gamestates[obj->state].shapenum); >+ sprite = gamestates[obj->state].shapenum; >+ if (gamestates[obj->state].rotate) >+ sprite += CalcRotate(obj); >+ >+ if (texture_index[PMSpriteStart+sprite] == 0) >+ CreateSprite(PMSpriteStart+sprite); > else >- glBindTexture(GL_TEXTURE_2D, texture_index[PMSpriteStart+gamestates[obj->state].shapenum]); >+ glBindTexture(GL_TEXTURE_2D, texture_index[PMSpriteStart+sprite]); > > glBegin(GL_QUADS); > glTexCoord2f(0,0);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 28466
:
17518
|
17519
|
17520
| 17521