Skip to content

Commit

Permalink
Fixed SET_SECTOR_TEXTURE fade params, not working propely as document…
Browse files Browse the repository at this point in the history
…ation says. (#2)

* Fixed SET_SECTOR_TEXTURE fade param not working properly
  • Loading branch information
CicTec authored and MikeDX committed Nov 27, 2016
1 parent 2bb39b8 commit dc8b7e5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/runtime/vpe/vpedll.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ void get_point_m8(void)

void set_sector_texture(void)
{
int fade =( 15-pila[sp--] )%16;
int fade=pila[sp--];
int techo=pila[sp--];
int suelo=pila[sp--];
int num_region=pila[sp];
Expand All @@ -689,9 +689,11 @@ void set_sector_texture(void)

if (!vpe_inicializada) return;

if (fade < -1 || fade > 15) return;

new_region=(struct Region *)Regions.ptr[num_region];

if( fade !=-1 ) new_region->Fade=fade;
if( fade !=-1 ) new_region->Fade= 15 - fade;
if( suelo!=-1 ) TexAlloc(&new_region->FloorTC,suelo,num_fpg_aux);
if( techo!=-1 ) TexAlloc(&new_region->CeilTC,techo,num_fpg_aux);
}
Expand Down

0 comments on commit dc8b7e5

Please sign in to comment.