- Unes guardes que no deurien fer falta, pero bueno, per ara...
This commit is contained in:
10
main.cpp
10
main.cpp
@@ -42,8 +42,8 @@ int current_sector = 38;
|
|||||||
int current_sector2 = 38;
|
int current_sector2 = 38;
|
||||||
|
|
||||||
vec2 position = { 1056.0f, -3616.0f };
|
vec2 position = { 1056.0f, -3616.0f };
|
||||||
float height = 48.0f;
|
float height = 32.0f;
|
||||||
float real_height = 48.0f;
|
float real_height = 32.0f;
|
||||||
float orientation = 270.0f;
|
float orientation = 270.0f;
|
||||||
|
|
||||||
float accel = 500.0f;
|
float accel = 500.0f;
|
||||||
@@ -452,9 +452,10 @@ void drawColumn(sector &s, int screen_column, int start, int end, float a_inc, v
|
|||||||
if (upper_wall_height>0.0f)
|
if (upper_wall_height>0.0f)
|
||||||
{
|
{
|
||||||
// Pinta la pared
|
// Pinta la pared
|
||||||
|
if (w->upper_surf)
|
||||||
for (int i=0; i<upper_wall_height; ++i) {
|
for (int i=0; i<upper_wall_height; ++i) {
|
||||||
if (wall_start+i>=end) break;
|
if (wall_start+i>=end) break;
|
||||||
draw::putpd(screen_column, wall_start+i, w->surf->pixels[(int(v)%w->surf->w)+(int(cpix)%w->surf->h)*w->surf->w], stright_dist);
|
draw::putpd(screen_column, wall_start+i, w->upper_surf->pixels[(int(v)%w->upper_surf->w)+(int(cpix)%w->upper_surf->h)*w->upper_surf->w], stright_dist);
|
||||||
cpix += dpix;
|
cpix += dpix;
|
||||||
}
|
}
|
||||||
wall_start += upper_wall_height;
|
wall_start += upper_wall_height;
|
||||||
@@ -478,9 +479,10 @@ void drawColumn(sector &s, int screen_column, int start, int end, float a_inc, v
|
|||||||
{
|
{
|
||||||
cpix += (wall_height-lower_wall_height)*dpix;
|
cpix += (wall_height-lower_wall_height)*dpix;
|
||||||
// Pinta la pared
|
// Pinta la pared
|
||||||
|
if (w->lower_surf)
|
||||||
for (int i=0; i<lower_wall_height; ++i) {
|
for (int i=0; i<lower_wall_height; ++i) {
|
||||||
if (wall_end+i>=end) break;
|
if (wall_end+i>=end) break;
|
||||||
draw::putpd(screen_column, wall_end+i, w->surf->pixels[(int(v)%w->surf->w)+(int(cpix)%w->surf->h)*w->surf->w], stright_dist);
|
draw::putpd(screen_column, wall_end+i, w->lower_surf->pixels[(int(v)%w->lower_surf->w)+(int(cpix)%w->lower_surf->h)*w->lower_surf->w], stright_dist);
|
||||||
cpix += dpix;
|
cpix += dpix;
|
||||||
}
|
}
|
||||||
//wall_start += upper_wall_height;
|
//wall_start += upper_wall_height;
|
||||||
|
|||||||
Reference in New Issue
Block a user