Browse Source

* Put font in share/

* Fixed file headers


git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/pwntcha/trunk@383 92316355-f0b4-4df1-b90c-862c8a59935f
master
sam 20 years ago
parent
commit
63ca545c23
6 changed files with 10 additions and 10 deletions
  1. +1
    -0
      Makefile.am
  2. BIN
      share/font_dilated_half.png
  3. +2
    -2
      src/Makefile.am
  4. +2
    -2
      src/image.c
  5. +0
    -1
      src/main.c
  6. +5
    -5
      src/slashdot.c

+ 1
- 0
Makefile.am View File

@@ -6,6 +6,7 @@ DIST_SUBDIRS = $(SUBDIRS)
EXTRA_DIST = \
bootstrap \
ChangeLog \
share/font_dilated_half.png \
$(NULL)

AUTOMAKE_OPTIONS = dist-bzip2


BIN
share/font_dilated_half.png View File

Before After
Width: 596  |  Height: 65  |  Size: 19 KiB

+ 2
- 2
src/Makefile.am View File

@@ -1,9 +1,9 @@
NULL =

bin_PROGRAMS = pwntcha
pwntcha_CFLAGS = $(ADDITIONAL_CFLAGS) -Wall
pwntcha_CFLAGS = $(ADDITIONAL_CFLAGS) -Wall -O6
pwntcha_LDFLAGS = $(ADDITIONAL_LDFLAGS)
pwntcha_SOURCES = main.c image.c slashdot.c
pwntcha_SOURCES = main.c image.c slashdot.c common.h

if USE_IMLIB2
ADDITIONAL_CFLAGS = `imlib2-config --cflags` -DX_DISPLAY_MISSING=1


+ 2
- 2
src/image.c View File

@@ -10,7 +10,6 @@
*/

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>

#include "config.h"
@@ -133,14 +132,15 @@ int setpixel(struct image *img, int x, int y, int r, int g, int b)

void display_image(struct image *img)
{
char name[BUFSIZ];
#if defined(HAVE_IMLIB2_H)
//char name[BUFSIZ];
//static int i = 0;
//sprintf(name, "image%i-%ix%i.png", i++, img->width, img->height);
//imlib_context_set_image(img->priv);
//imlib_save_image(name);
//fprintf(stderr, "saved to %s\n", name);
#elif defined(HAVE_CV_H)
char name[BUFSIZ];
sprintf(name, "Image %p (%i x %i)", img, img->width, img->height);
cvNamedWindow(name, 0);
cvShowImage(name, img->priv);


+ 0
- 1
src/main.c View File

@@ -10,7 +10,6 @@
*/

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>

#include "config.h"


+ 5
- 5
src/slashdot.c View File

@@ -10,8 +10,8 @@
*/

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

#include "config.h"
@@ -19,9 +19,9 @@

/* Our macros */
#define FACTOR 1
//#define FONTNAME "font.png" // use with FACTOR = 2
//#define FONTNAME "font_dilated.png" // use with FACTOR = 2
#define FONTNAME "font_dilated_half.png" // use with FACTOR = 1
//#define FONTNAME "share/font.png" // use with FACTOR = 2
//#define FONTNAME "share/font_dilated.png" // use with FACTOR = 2
#define FONTNAME "share/font_dilated_half.png" // use with FACTOR = 1

/* Global stuff */
char *result;
@@ -604,7 +604,7 @@ while(cur < 7)

char * slashdot_decode(char *image)
{
struct image *img, *tmp, *tmp2, *dst;
struct image *img, *tmp, *tmp2;

img = load_image(image);
if(img == NULL)


Loading…
Cancel
Save