+ bnstate = ~REG_KEYINPUT;
+
+ draw_tunnel();
+
+ vblperf_end();
+ wait_vblank();
+ present(backbuf);
+ vblperf_begin();
+ }
+}
+
+#define TUN_U(x) ((x) & 0x3f)
+#define TUN_V(x) (((x) >> 6) & 0x3ff)
+#define TEXEL(x, y, lvl) \
+ shadelut[((int)tex[((y) << 5) + (x)] << 3) + (lvl)]
+
+__attribute__((noinline, target("arm"), section(".iwram")))
+static void draw_tunnel(void)
+{
+ int i, j, tx, ty, u, v, angle, depth, zoffs, uoffs, flip, tunturn, shade;
+ static int tunsweep;
+ uint16_t pptop, ppbot;
+ uint16_t *top, *bot;
+ uint32_t tun, *tunptr;
+
+ //tunsweep = SIN(nframes) >> 4;
+
+ if((bnstate & BN_RT) && tunsweep > -31) tunsweep--;
+ if((bnstate & BN_LT) && tunsweep < 31) tunsweep++;
+
+ flip = tunsweep < 0;
+ tunturn = abs(tunsweep) & 0x1f;