File: readxpm.C

package info (click to toggle)
xshisen 1:1.51-4.1+deb8u1
  • links: PTS
  • area: main
  • in suites: jessie
  • size: 1,156 kB
  • ctags: 553
  • sloc: cpp: 4,008; sh: 152; perl: 146; makefile: 114
file content (18 lines) | stat: -rw-r--r-- 590 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "body.h"

void
InitGlobalMahjong(Widget w, const char *directory, const char *subdir)
{
  static const char *files[PKIND] = {
    "p1", "p2", "p3", "p4", "p5", "p6", "p7", "p8", "p9",
    "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9",
    "m1", "m2", "m3", "m4", "m5", "m6", "m7", "m8", "m9",
    "ton", "nan", "sha", "pei", "haku", "hatsu", "chun",
    "hana", "hishi" };
  char buffer[1024];

  for(int i=0; i<PKIND; i++) {
    snprintf(buffer,sizeof(buffer)-1, "%s/%s/%s.xpm", directory, subdir, files[i]);
    Mp[i].ReadFile(w, buffer, i, globRes.colorCloseness);
  }
}