refactoring
This commit is contained in:
parent
95afd87656
commit
baaa87b18f
62 changed files with 7231 additions and 6636 deletions
|
@ -1,28 +1,13 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Toni Spets <toni.spets@iki.fi>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#include "ddraw.h"
|
||||
#include "palette.h"
|
||||
#include "surface.h"
|
||||
#include "dd.h"
|
||||
#include "ddpalette.h"
|
||||
#include "ddsurface.h"
|
||||
#include "lodepng.h"
|
||||
|
||||
BOOL screenshot(struct IDirectDrawSurfaceImpl *src)
|
||||
BOOL ss_take_screenshot(struct IDirectDrawSurfaceImpl *src)
|
||||
{
|
||||
if (!src || !src->palette || !src->surface)
|
||||
return FALSE;
|
||||
|
@ -33,7 +18,7 @@ BOOL screenshot(struct IDirectDrawSurfaceImpl *src)
|
|||
char str_time[64];
|
||||
time_t t = time(NULL);
|
||||
|
||||
strncpy(title, ddraw->title, sizeof(ddraw->title));
|
||||
strncpy(title, g_ddraw->title, sizeof(g_ddraw->title));
|
||||
|
||||
for (i = 0; i<strlen(title); i++) {
|
||||
if (title[i] == ' ')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue