public TextureMapper(HashMap<String, float[]> textureCoords, Bitmap tileMap) { Logger.i(this, "Generated Tile Map " + tileMap.getWidth() + "x" + tileMap.getHeight()); /*for(Entry<String, float[]> e : textureCoords.entrySet()){ Logger.i(this, e.getKey()); for(float f : e.getValue()){ Logger.i(this, " "+f); } }*/ this.textureCoordLookup = textureCoords; this.bitmap = tileMap; }
@Override public boolean send(String message) { if (!socket.isConnected()) return false; try { output.writeUTF(message); Logger.i(this, "has send string " + message.length()); } catch (IOException e) { Logger.printException(this, e); return false; } return true; }
@Override public boolean connect(String host, int port) { initSocket(); if (socket.isConnected()) return false; try { socket.connect(new InetSocketAddress(host, port), Config.SOCKET_TIMEOUT); input = new DataInputStream(socket.getInputStream()); output = new DataOutputStream(socket.getOutputStream()); } catch (ConnectException e) { Logger.i(this, "Connection refused..."); } catch (java.net.SocketTimeoutException e) { Logger.e(this, "Socket Timout!"); } catch (IOException e) { Logger.printException(this, e); } return socket.isConnected(); }
public void setLoaded(boolean loaded) { this.loaded = loaded; Logger.i(this, "TextureMapper has been Loaded to Graphics Memory"); }