22 package com.realtime.crossfire.jxclient.faces;
24 import java.util.Arrays;
25 import org.jetbrains.annotations.NotNull;
43 faces[0] =
new Face(0,
"empty", 0);
51 faces[face.getFaceNum()] = face;
61 final Face face = faces[faceNum];
66 System.err.println(
"Warning: accessing undefined face "+faceNum);
67 faces[faceNum] =
new Face(faceNum,
"face#"+faceNum, 0);
68 return faces[faceNum];
76 Arrays.fill(faces, null);
77 faces[0] =
new Face(0,
"empty", 0);
87 public void addFace(
final int faceNum,
final int faceSetNum,
final int faceChecksum, @NotNull
final String faceName) {
89 if (faces[faceNum] != null) {
90 System.err.println(
"Warning: defining duplicate face "+faceNum+
" ("+faceName+
")");
92 faces[faceNum] =
new Face(faceNum, faceName, faceChecksum);
void addFace(final int faceNum, final int faceSetNum, final int faceChecksum, @NotNull final String faceName)
Adds a new face.
A cache for Face instances.
void addFace(@NotNull final Face face)
Adds a new face to the cache.
FaceCache()
Creates a new instance.
final Face [] faces
The cached faces.
Face getFace(final int faceNum)
Returns a face by face id.
void reset()
Forgets about all face information.