ref: e4a472faa9a21e9041db36a032a2f68ab5dbb51a
parent: 3f806a476dcb15fa9753f0de95cf3e3097821b40
author: levesqu8 <levesqu8@msu.edu>
date: Mon Dec 25 21:25:23 EST 2017
added coord calc for health/ammo hud items
--- a/rott/rt_game.c
+++ b/rott/rt_game.c
@@ -418,6 +418,7 @@
void DrawPlayScreen (boolean bufferofsonly)
{
pic_t *shape;
+
int shapenum;
int ShowKillsYoffset = 0;//bna++
@@ -468,12 +469,14 @@
if (iGLOBAL_SCREENWIDTH == 640) {
if (iGLOBAL_SCREENHEIGHT == 400)
{
- pic_t * shapeTile = ( pic_t * )W_CacheLumpName( "backtile", PU_CACHE, Cvt_pic_t, 1 );
- DrawTiledRegion( 0, iGLOBAL_SCREENHEIGHT - 16, topBarCenterOffsetX, 16, 0,16, shapeTile );
+ shape = ( pic_t * )W_CacheLumpName( "backtile", PU_CACHE, Cvt_pic_t, 1 );
+// DrawTiledRegion( 0, iGLOBAL_SCREENHEIGHT - 16, topBarCenterOffsetX, 16, 0,16, shape );
+ DrawTiledRegion( 0, iGLOBAL_SCREENHEIGHT - 16, iGLOBAL_SCREENWIDTH, 16, 0,16, shape );
+
shape = ( pic_t * ) W_CacheLumpName( "bottbar", PU_CACHE, Cvt_pic_t, 1 );
- DrawTiledRegion( 0, iGLOBAL_SCREENHEIGHT - 16, topBarCenterOffsetX, 16, 0,16, shapeTile );
- DrawTiledRegion(320 + topBarCenterOffsetX, iGLOBAL_SCREENHEIGHT -16, topBarCenterOffsetX ,16, 0, 16, shapeTile);
+ //DrawTiledRegion( 0, iGLOBAL_SCREENHEIGHT - 16, topBarCenterOffsetX, 16, 0,16, shape );
+ //DrawTiledRegion(320 + topBarCenterOffsetX, iGLOBAL_SCREENHEIGHT -16, topBarCenterOffsetX ,16, 0, 16, shapeTile);
GameMemToScreen( shape, topBarCenterOffsetX, iGLOBAL_SCREENHEIGHT - 16, bufferofsonly ); //using topBarCenterOffsetX since bottbar dims == statbar dims
}
else
@@ -492,17 +495,24 @@
}
} else if (iGLOBAL_SCREENWIDTH == 800) {
- GameMemToScreen( shape, 800-320, 584-ShowKillsYoffset, bufferofsonly );
+ shape = ( pic_t * )W_CacheLumpName( "backtile", PU_CACHE, Cvt_pic_t, 1 );
+ DrawTiledRegion( 0, iGLOBAL_SCREENHEIGHT - 16, iGLOBAL_SCREENWIDTH, 16, 0,16, shape );
+ shape = ( pic_t * ) W_CacheLumpName( "bottbar", PU_CACHE, Cvt_pic_t, 1 );
+
+ //DrawTiledRegion( 0, iGLOBAL_SCREENHEIGHT - 16, topBarCenterOffsetX, 16, 0,16, shapeTile );
+ //DrawTiledRegion(320 + topBarCenterOffsetX, iGLOBAL_SCREENHEIGHT -16, topBarCenterOffsetX , 16, 0, 16, shapeTile);
+ GameMemToScreen( shape, topBarCenterOffsetX, iGLOBAL_SCREENHEIGHT - 16, bufferofsonly ); //using topBarCenterOffsetX since bottbar dims == statbar dims
+ //GameMemToScreen( shape, 800-320, 584-ShowKillsYoffset, bufferofsonly );
//copy next shape to mem
- GameMemToScreen( shape, 300, 584-ShowKillsYoffset, bufferofsonly );
+ //GameMemToScreen( shape, 300, 584-ShowKillsYoffset, bufferofsonly );
//copy next shape to mem
- GameMemToScreen( shape, 0, 584-ShowKillsYoffset, bufferofsonly );
+ //GameMemToScreen( shape, 0, 584-ShowKillsYoffset, bufferofsonly );
// delete 2 bullets in middle of shape picture
- DrawPPic( 305, 584+1-ShowKillsYoffset, 8 >> 2, 16,
- ( byte * )&erase->data, 2, true, bufferofsonly );
+ //DrawPPic( 305, 584+1-ShowKillsYoffset, 8 >> 2, 16,
+ // ( byte * )&erase->data, 2, true, bufferofsonly );
// delete hart in middle of shape picture
- DrawPPic( 610, 584+1-ShowKillsYoffset, 8 >> 2, 16,
- ( byte * )&erase->data, 2, true, bufferofsonly );
+ //DrawPPic( 610, 584+1-ShowKillsYoffset, 8 >> 2, 16,
+ // ( byte * )&erase->data, 2, true, bufferofsonly );
} else {
GameMemToScreen( shape, 0, 184, bufferofsonly );
--- a/rott/winrott.c
+++ b/rott/winrott.c
@@ -55,11 +55,26 @@
iGLOBAL_SCREENWIDTH = Width;
iGLOBAL_SCREENHEIGHT = Height;
+
+ iGLOBAL_FOCALWIDTH = 160 - FocalWidthOffset;
+ dGLOBAL_FPFOCALWIDTH = (double) iGLOBAL_FOCALWIDTH;
+ int middleWidth = Width / 2;
+
+ iGLOBAL_AMMO_X = middleWidth + 160 - 20;
+
+ iGLOBAL_AMMO_Y = iGLOBAL_SCREENHEIGHT - 16;
+
+ iGLOBAL_HEALTH_X = middleWidth - 160 + 20;
+
+ iGLOBAL_HEALTH_Y = iGLOBAL_AMMO_Y;
iGLOBAL_SCREENBWIDE = iGLOBAL_SCREENWIDTH*(96/320);
iG_SCREENWIDTH = iGLOBAL_SCREENWIDTH*(96/320);;// default screen width in bytes
+
+ dTopYZANGLELIMIT = (44*FINEANGLES/360);;
+/*
if (iGLOBAL_SCREENWIDTH == 320) {
iGLOBAL_FOCALWIDTH = 160 - FocalWidthOffset;
dGLOBAL_FPFOCALWIDTH = 160.0 - FocalWidthOffset;
@@ -107,6 +122,7 @@
dTopYZANGLELIMIT = (90*FINEANGLES/360);;
}
+*/
//dYZANGLELIMIT = (12*FINEANGLES/360);
//#define YZANGLELIMIT (12*FINEANGLES/360)//bna--(30*FINEANGLES/360)