Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
8297fec7
Commit
8297fec7
authored
Jul 30, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
Jul 30, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ddraw_tex to add texture snooping without needing to recompile.
parent
152b98fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
19 deletions
+8
-19
d3dtexture.c
dlls/ddraw/d3dtexture.c
+8
-14
helper.c
dlls/ddraw/helper.c
+0
-5
No files found.
dlls/ddraw/d3dtexture.c
View file @
8297fec7
...
...
@@ -34,13 +34,8 @@
#include "mesa_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ddraw
);
WINE_DECLARE_DEBUG_CHANNEL
(
ddraw_tex
);
/* Define this if you want to save to a file all the textures used by a game
(can be funny to see how they managed to cram all the pictures in
texture memory) */
#undef TEXTURE_SNOOP
#ifdef TEXTURE_SNOOP
#include <stdio.h>
static
void
...
...
@@ -48,18 +43,15 @@ snoop_texture(IDirectDrawSurfaceImpl *This) {
IDirect3DTextureGLImpl
*
glThis
=
(
IDirect3DTextureGLImpl
*
)
This
->
tex_private
;
char
buf
[
128
];
FILE
*
f
;
TRACE_
(
ddraw_tex
)(
"Dumping surface id (%5d) level (%2d) :
\n
"
,
glThis
->
tex_name
,
This
->
mipmap_level
);
DDRAW_dump_surface_desc
(
&
(
This
->
surface_desc
));
sprintf
(
buf
,
"tex_%05d_%02d.pnm"
,
glThis
->
tex_name
,
This
->
mipmap_level
);
f
=
fopen
(
buf
,
"wb"
);
DDRAW_dump_surface_to_disk
(
This
,
f
);
}
#else
#define snoop_texture(a)
#endif
static
IDirectDrawSurfaceImpl
*
get_sub_mimaplevel
(
IDirectDrawSurfaceImpl
*
tex_ptr
)
{
...
...
@@ -261,9 +253,11 @@ gltex_upload_texture(IDirectDrawSurfaceImpl *surf_ptr, IDirect3DDeviceImpl *d3dd
}
else
{
TRACE
(
" - uploading texture level %d (initial done = %d).
\n
"
,
surf_ptr
->
mipmap_level
,
gl_surf_ptr
->
initial_upload_done
);
/* Texture snooping for the curious :-) */
snoop_texture
(
surf_ptr
);
if
(
TRACE_ON
(
ddraw_tex
))
{
snoop_texture
(
surf_ptr
);
}
if
(
upload_surface_to_tex_memory_init
(
surf_ptr
,
surf_ptr
->
mipmap_level
,
&
(
gl_surf_ptr
->
current_internal_format
),
gl_surf_ptr
->
initial_upload_done
==
FALSE
,
TRUE
,
0
,
0
)
==
DD_OK
)
{
...
...
dlls/ddraw/helper.c
View file @
8297fec7
...
...
@@ -579,11 +579,6 @@ void DDRAW_dump_surface_to_disk(IDirectDrawSurfaceImpl *surface, FILE *f)
{
int
i
;
if
(
TRACE_ON
(
ddraw
))
{
DPRINTF
(
"Dumping surface :
\n
"
);
DDRAW_dump_surface_desc
(
&
(
surface
->
surface_desc
));
}
fprintf
(
f
,
"P6
\n
%ld %ld
\n
255
\n
"
,
surface
->
surface_desc
.
dwWidth
,
surface
->
surface_desc
.
dwHeight
);
if
(
surface
->
surface_desc
.
u4
.
ddpfPixelFormat
.
dwFlags
&
DDPF_PALETTEINDEXED8
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment