<commit_before>package macbury.forge.editor.screens;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.scenes.scene2d.Stage;
import macbury.forge.ForgE;
import macbury.forge.editor.systems.EditorSystem;
import macbury.forge.graphics.camera.RTSCameraController;
import macbury.forge.level.Level;
import macbury.forge.level.LevelState;
import macbury.forge.screens.AbstractScreen;
import macbury.forge.ui.Overlay;

/**
 * Created by macbury on 18.10.14.
 */
public class EditorScreen extends AbstractScreen {
  public Level level;
  private Stage stage;
  private RTSCameraController cameraController;
  private Overlay overlay;
  public EditorSystem editorSystem;

  @Override
  protected void initialize() {
    this.overlay            = new Overlay();
    this.stage              = new Stage();
    this.level              = new Level(LevelState.heightMapTest());
    this.editorSystem       = new EditorSystem(level);
    level.camera.far        = 512;
    this.cameraController   = new RTSCameraController();
    cameraController.setCenter(level.terrainMap.getWidth() / 2, level.terrainMap.getDepth() / 2);
    cameraController.setCamera(level.camera);
    cameraController.setOverlay(overlay);

    editorSystem.setOverlay(overlay);
    level.entities.addSystem(editorSystem);
    stage.addActor(overlay);
  }

  @Override
  public void render(float delta) {
    stage.act(delta);
    cameraController.update(delta);
    ForgE.graphics.clearAll(Color.BLACK);
    level.render(delta);
    stage.draw();
  }

  @Override
  public void resize(int width, int height) {
    level.resize(width, height);
  }

  @Override
  public void show() {<commit_msg>editor screen<commit_after>package macbury.forge.editor.screens;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.scenes.scene2d.Stage;
import macbury.forge.ForgE;
import macbury.forge.editor.systems.EditorSystem;
import macbury.forge.graphics.camera.RTSCameraController;
import macbury.forge.level.Level;
import macbury.forge.level.LevelState;
import macbury.forge.screens.AbstractScreen;
import macbury.forge.ui.Overlay;

/**
 * Created by macbury on 18.10.14.
 */
public class EditorScreen extends AbstractScreen {
  private static final String TAG = "EditorScreen";
  public Level level;
  private Stage stage;
  private RTSCameraController cameraController;
  private Overlay overlay;
  public EditorSystem editorSystem;

  @Override
  protected void initialize() {
    this.overlay            = new Overlay();
    this.stage              = new Stage();
    this.level              = new Level(LevelState.heightMapTest());
    this.editorSystem       = new EditorSystem(level);
    level.camera.far        = 512;
    this.cameraController   = new RTSCameraController();
    cameraController.setCenter(level.terrainMap.getWidth() / 2, level.terrainMap.getDepth() / 2);
    cameraController.setCamera(level.camera);
    cameraController.setOverlay(overlay);

    editorSystem.setOverlay(overlay);
    level.entities.addSystem(editorSystem);
    stage.addActor(overlay);
  }

  @Override
  public void render(float delta) {
    stage.act(delta);
    cameraController.update(delta);
    ForgE.graphics.clearAll(Color.BLACK);
    level.render(delta);
    stage.draw();
  }

  @Override
  public void resize(int width, int height) {
    Gdx.app.log(TAG, "Resize: "+ width +"x"+height);

    level.resize(width, height);
    stage.getViewport().update(width,height);
    overlay.invalidateHierarchy();
  }

  @Override
  public void show() {
{'fraction_non_alphanumeric': 0.1097972972972973, 'fraction_numerical': 0.006756756756756757, 'mean_word_length': 3.7948717948717947, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5104493', 'n_tokens_mistral': 1113, 'n_tokens_neox': 1055, 'n_words': 211}