static errcode GetLandScape(parsehandle * ph, SceneHandle scene) {
  void * tex;
  apivector ctr;
  apiflt wx, wy;
  int m, n;
  float a,b;
  errcode rc;

  rc = GetString(ph, "RES");
  fscanf(ph->ifp, "%d %d", &m, &n);

  rc |= GetString(ph, "SCALE");
  fscanf(ph->ifp, "%f %f", &a, &b);   
  wx=a;
  wy=b;

  rc |= GetString(ph, "CENTER");
  rc |= GetVector(ph, &ctr);

  rc |= GetTexture(ph, scene, &tex);

  rt_landscape(scene, tex, m, n, ctr, wx, wy);

  return rc;
}
Exemplo n.º 2
0
static errcode GetLandScape(FILE * dfile) {
  void * tex;
  vector ctr;
  apiflt wx, wy;
  int m, n;
  float a,b;
  errcode rc;

  rc = GetString(dfile, "RES");
  fscanf(dfile, "%d %d", &m, &n);

  rc |= GetString(dfile, "SCALE");
  fscanf(dfile, "%f %f", &a, &b);   
  wx=a;
  wy=b;

  rc |= GetString(dfile, "CENTER");
  rc |= GetVector(dfile, &ctr);

  rc |= GetTexture(dfile, &tex);

  rt_landscape(tex, m, n, ctr, wx, wy);

  return rc;
}