GIT
/
REPO
/
FRED-BOY
Projects
/
d2df-sdl.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
render: remove graphics data from TAnimationState
[d2df-sdl.git]
/
src
/
game
/
opengl
/
r_map.pas
diff --git
a/src/game/opengl/r_map.pas
b/src/game/opengl/r_map.pas
index 9efb062512f975054c65b7f011fd189132e7a4a2..35445c35fe00b08ecc51ec8ecbada997370e29ed 100644
(file)
--- a/
src/game/opengl/r_map.pas
+++ b/
src/game/opengl/r_map.pas
@@
-30,7
+30,6
@@
interface
procedure r_Map_Update;
procedure r_Map_Update;
- procedure r_Map_DrawBack (dx, dy: Integer);
procedure r_Map_DrawPanels (PanelType: Word; hasAmbient: Boolean; constref ambColor: TDFColor); // unaccelerated
procedure r_Map_CollectDrawPanels (x0, y0, wdt, hgt: Integer);
procedure r_Map_DrawPanelShadowVolumes (lightX: Integer; lightY: Integer; radius: Integer);
procedure r_Map_DrawPanels (PanelType: Word; hasAmbient: Boolean; constref ambColor: TDFColor); // unaccelerated
procedure r_Map_CollectDrawPanels (x0, y0, wdt, hgt: Integer);
procedure r_Map_DrawPanelShadowVolumes (lightX: Integer; lightY: Integer; radius: Integer);
@@
-43,7
+42,7
@@
implementation
uses
{$INCLUDE ../nogl/noGLuses.inc}
uses
{$INCLUDE ../nogl/noGLuses.inc}
- SysUtils, Classes, Math, e_log, wadreader, CONFIG, utils,
+ SysUtils, Classes, Math, e_log, wadreader, CONFIG, utils,
g_language,
r_graphics, r_animations, r_textures, g_textures,
g_base, g_basic, g_game, g_options,
g_map
r_graphics, r_animations, r_textures, g_textures,
g_base, g_basic, g_game, g_options,
g_map
@@
-249,14
+248,6
@@
begin
it.release();
end;
it.release();
end;
-procedure r_Map_DrawBack(dx, dy: Integer);
-begin
- if gDrawBackGround and (BackID <> DWORD(-1)) then
- e_DrawSize(BackID, dx, dy, 0, False, False, gBackSize.X, gBackSize.Y)
- else
- e_Clear(GL_COLOR_BUFFER_BIT, 0, 0, 0);
-end;
-
procedure r_Map_DrawFlags;
var i, dx: Integer; Mirror: TMirrorType; f: PFlag;
begin
procedure r_Map_DrawFlags;
var i, dx: Integer; Mirror: TMirrorType; f: PFlag;
begin
@@
-272,7
+263,7
@@
end;
else
Mirror := TMirrorType.None;
dx := IfThen(f.Direction = TDirection.D_LEFT, -1, +1);
else
Mirror := TMirrorType.None;
dx := IfThen(f.Direction = TDirection.D_LEFT, -1, +1);
- r_AnimationState_Draw(FlagFrames[i], FlagAnim, f.Obj.X + dx, f.Obj.Y + 1,
Mirror
);
+ r_AnimationState_Draw(FlagFrames[i], FlagAnim, f.Obj.X + dx, f.Obj.Y + 1,
0, Mirror, False
);
if g_debug_Frames then
e_DrawQuad(f.Obj.X + f.Obj.Rect.X, f.Obj.Y + f.Obj.Rect.Y, f.Obj.X + f.Obj.Rect.X + f.Obj.Rect.Width - 1, f.Obj.Y + f.Obj.Rect.Y + f.Obj.Rect.Height - 1, 0, 255, 0)
end
if g_debug_Frames then
e_DrawQuad(f.Obj.X + f.Obj.Rect.X, f.Obj.Y + f.Obj.Rect.Y, f.Obj.X + f.Obj.Rect.X + f.Obj.Rect.Width - 1, f.Obj.Y + f.Obj.Rect.Y + f.Obj.Rect.Height - 1, 0, 255, 0)
end
@@
-296,7
+287,7
@@
end;
h := RenTextures[Texture].Height;
for xx := 0 to p.Width div w - 1 do
for yy := 0 to p.Height div h - 1 do
h := RenTextures[Texture].Height;
for xx := 0 to p.Width div w - 1 do
for yy := 0 to p.Height div h - 1 do
- r_AnimationState_Draw(FramesID, p.TextureIDs[p.FCurTexture].AnTex, p.X + xx * w, p.Y + yy * h,
TMirrorType.None
);
+ r_AnimationState_Draw(FramesID, p.TextureIDs[p.FCurTexture].AnTex, p.X + xx * w, p.Y + yy * h,
p.Alpha, TMirrorType.None, p.Blending
);
end
end
else
end
end
else
DEADSOFTWARE 2012-2025