[Scummvm-cvs-logs] CVS: scummvm/bs2/driver render.cpp,1.25,1.26 render.h,1.5,1.6
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Sat Sep 27 08:39:04 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/bs2/driver palette.cpp,1.16,1.17
- Next message: [Scummvm-cvs-logs] CVS: scummex image.cpp,1.18,1.19 image.h,1.12,1.13 resource.h,1.11,1.12 scummex.cpp,1.25,1.26 scummex.h,1.14,1.15 wxwindows.cpp,1.24,1.25 wxwindows.h,1.12,1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/bs2/driver
In directory sc8-pr-cvs1:/tmp/cvs-serv29593/driver
Modified Files:
render.cpp render.h
Log Message:
cleanup
Index: render.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/driver/render.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- render.cpp 24 Sep 2003 06:40:23 -0000 1.25
+++ render.cpp 27 Sep 2003 15:38:42 -0000 1.26
@@ -108,11 +108,6 @@
//
//=============================================================================
-
-
-
-//#include "ddraw.h"
-
#include "stdafx.h"
#include "driver96.h"
#include "d_draw.h"
@@ -122,46 +117,29 @@
#include "menu.h"
#include "../sword2.h"
-
-
#define MILLISECSPERCYCLE 83
-
-
-#if PROFILING == 1
-int32 profileCopyScreenBuffer = 0;
-int32 profileRenderLayers = 0;
-int32 profileSpriteRender = 0;
-int32 profileDecompression = 0;
-#endif
-
-
-
-
// Scroll variables. scrollx and scrolly hold the current scroll position,
-// and scrollxTarget and scrollyTarget are the target position for the end
-// of the game cycle.
-
-//int16 scrollx;
-//int16 scrolly;
-extern int16 scrollx;
-extern int16 scrolly;
-int16 parallaxScrollx;
-int16 parallaxScrolly;
-int16 locationWide;
-int16 locationDeep;
-
-static int16 scrollxTarget;
-static int16 scrollyTarget;
-static int16 scrollxOld;
-static int16 scrollyOld;
-static uint16 layer = 0;
+// and scrollxTarget and scrollyTarget are the target position for the end
+// of the game cycle.
+extern int16 scrollx;
+extern int16 scrolly;
+int16 parallaxScrollx;
+int16 parallaxScrolly;
+int16 locationWide;
+int16 locationDeep;
+static int16 scrollxTarget;
+static int16 scrollyTarget;
+static int16 scrollxOld;
+static int16 scrollyOld;
+static uint16 layer = 0;
#define RENDERAVERAGETOTAL 4
+
int32 renderCountIndex = 0;
-int32 renderTimeLog[RENDERAVERAGETOTAL] = {60, 60, 60, 60};
+int32 renderTimeLog[RENDERAVERAGETOTAL] = { 60, 60, 60, 60 };
int32 initialTime;
int32 startTime;
int32 totalTime;
@@ -169,9 +147,6 @@
int32 framesPerGameCycle;
int32 renderTooSlow;
-
-
-
#define BLOCKWIDTH 64
#define BLOCKHEIGHT 64
#define BLOCKWBITS 6
@@ -512,14 +487,7 @@
return RD_OK;
}
-
-
-
-
-
-int32 PlotPoint(uint16 x, uint16 y, uint8 colour)
-
-{
+int32 PlotPoint(uint16 x, uint16 y, uint8 colour) {
warning("stub PlotPoint( %d, %d, %d )", x, y, colour);
/*
int16 newx, newy;
@@ -557,11 +525,8 @@
}
-
// Uses Bressnham's incremental algorithm!
-int32 DrawLine(int16 x0, int16 y0, int16 x1, int16 y1, uint8 colour)
-
-{
+int32 DrawLine(int16 x0, int16 y0, int16 x1, int16 y1, uint8 colour) {
warning("stub DrawLine( %d, %d, %d, %d, %d )", x0, y0, x1, y1, colour);
/*
int dx, dy;
@@ -792,21 +757,14 @@
IDirectDrawSurface2_Unlock(lpBackBuffer, ddsd.lpSurface);
}
*/
- return(RD_OK);
-
+ return RD_OK;
}
-
-
-int32 SetLocationMetrics(uint16 w, uint16 h)
-
-{
-
+int32 SetLocationMetrics(uint16 w, uint16 h) {
locationWide = w;
locationDeep = h;
- return(RD_OK);
-
+ return RD_OK;
}
int32 RenderParallax(_parallax *p, int16 l) {
@@ -851,42 +809,6 @@
return RD_OK;
}
-
-/*
-#define LOGSIZE 10
-int32 previousTimeLog[LOGSIZE];
-int32 renderCycleStartLog[LOGSIZE];
-int32 lastRenderTimeLog[LOGSIZE];
-int32 renderCycleEndLog[LOGSIZE];
-int32 timeLeftLog[LOGSIZE];
-int32 scrollxOldLog[LOGSIZE];
-int32 scrollxLog[LOGSIZE];
-int32 scrollxTargetLog[LOGSIZE];
-
-
-void LogMe(int32 in)
-{
- static int32 i;
-
- if (in == 0)
- i = 0;
-
- previousTimeLog[i] = previousTime;
- aveRenderCycleLog[i] = aveRenderCycle;
- renderCycleStartLog[i] = renderCycleStart;
- lastRenderTimeLog[i] = lastRenderTime;
- renderCycleEndLog[i] = renderCycleEnd;
- timeLeftLog[i] = timeLeft;
- scrollxOldLog[i] = scrollxOld;
- scrollxLog[i] = scrollx;
- scrollxTargetLog[i] = scrollxTarget;
-
- if (++i == LOGSIZE)
- i = 0;
-
-}
-*/
-
// Uncomment this when benchmarking the drawing routines.
#define LIMIT_FRAME_RATE
@@ -981,6 +903,7 @@
int32 SetScrollTarget(int16 sx, int16 sy) {
scrollxTarget = sx;
scrollyTarget = sy;
+
return RD_OK;
}
Index: render.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/driver/render.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- render.h 23 Sep 2003 16:53:25 -0000 1.5
+++ render.h 27 Sep 2003 15:38:42 -0000 1.6
@@ -30,36 +30,28 @@
//
//=============================================================================
-
#ifndef RENDER_H
#define RENDER_H
#include "menu.h"
-#define RENDERWIDE 640
-#define ALIGNRENDERDEEP 480
-#define RENDERDEEP (ALIGNRENDERDEEP - (MENUDEEP * 2))
-
-
-#define PROFILING 0
-
+#define RENDERWIDE 640
+#define ALIGNRENDERDEEP 480
+#define RENDERDEEP (ALIGNRENDERDEEP - (MENUDEEP * 2))
-typedef struct
-{
- uint16 packets;
- uint16 offset;
+typedef struct {
+ uint16 packets;
+ uint16 offset;
} _parallaxLine;
-
-
-extern int16 scrollx; // current x offset into background of display
-extern int16 scrolly; // current y offset into background of display
-extern int16 parallaxScrollx; // current x offset to link a sprite to the parallax layer
-extern int16 parallaxScrolly; // current y offset to link a sprite to the parallax layer
-extern int16 locationWide;
-extern int16 locationDeep;
-
-// extern uint8 myScreenBuffer[RENDERWIDE * RENDERDEEP];
+extern int16 scrollx; // current x offset into background of display
+extern int16 scrolly; // current y offset into background of display
+extern int16 parallaxScrollx; // current x offset to link a sprite to the
+ // parallax layer
+extern int16 parallaxScrolly; // current y offset to link a sprite to the
+ // parallax layer
+extern int16 locationWide;
+extern int16 locationDeep;
void SquashImage(byte *dst, uint16 dstPitch, uint16 dstWidth, uint16 dstHeight, byte *src, uint16 srcPitch, uint16 srcWidth, uint16 srcHeight, byte *backbuf);
void StretchImage(byte *dst, uint16 dstPitch, uint16 dstWidth, uint16 dstHeight, byte *src, uint16 srcPitch, uint16 srcWidth, uint16 srcHeight, byte *backbuf);
@@ -67,4 +59,3 @@
void UploadRect(ScummVM::Rect *r);
#endif
-
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/bs2/driver palette.cpp,1.16,1.17
- Next message: [Scummvm-cvs-logs] CVS: scummex image.cpp,1.18,1.19 image.h,1.12,1.13 resource.h,1.11,1.12 scummex.cpp,1.25,1.26 scummex.h,1.14,1.15 wxwindows.cpp,1.24,1.25 wxwindows.h,1.12,1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list