projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Many thunders from origin to random points on a rotating sphere
[dosdemo]
/
src
/
tunnel.c
diff --git
a/src/tunnel.c
b/src/tunnel.c
index
63f0f9f
..
56d0793
100644
(file)
--- a/
src/tunnel.c
+++ b/
src/tunnel.c
@@
-6,6
+6,7
@@
#include "imago2.h"
#include "demo.h"
#include "screen.h"
#include "imago2.h"
#include "demo.h"
#include "screen.h"
+#include "gfxutil.h"
#ifndef M_PI
#define M_PI 3.1415926535
#ifndef M_PI
#define M_PI 3.1415926535
@@
-213,18
+214,13
@@
static void tunnel_color(int *rp, int *gp, int *bp, long toffs, unsigned int tpa
*bp = (b * fog) >> 8;
}
*bp = (b * fog) >> 8;
}
-#define PACK_RGB16(r, g, b) \
- (((((r) >> 3) & 0x1f) << 11) | ((((g) >> 2) & 0x3f) << 5) | (((b) >> 3) & 0x1f))
-#define PACK_RGB32(r, g, b) \
- ((((r) & 0xff) << 16) | (((g) & 0xff) << 8) | ((b) & 0xff))
-
static void draw_tunnel_range(unsigned short *pix, int xoffs, int yoffs, int starty, int num_lines, long tm)
{
int i, j;
unsigned int *tmap = tunnel_map + (starty + yoffs) * vxsz + xoffs;
unsigned char *fog = tunnel_fog + (starty + yoffs) * vxsz + xoffs;
static void draw_tunnel_range(unsigned short *pix, int xoffs, int yoffs, int starty, int num_lines, long tm)
{
int i, j;
unsigned int *tmap = tunnel_map + (starty + yoffs) * vxsz + xoffs;
unsigned char *fog = tunnel_fog + (starty + yoffs) * vxsz + xoffs;
- long toffs = tm / 4;
+ long toffs = tm / 8;
unsigned int *pixels = (unsigned int*)pix + starty * (fb_width >> 1);
for(i=0; i<num_lines; i++) {
unsigned int *pixels = (unsigned int*)pix + starty * (fb_width >> 1);
for(i=0; i<num_lines; i++) {