Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Add glyph2tile array. #288

Merged
merged 5 commits into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/lint_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
name: "clang-format"
runs-on: ubuntu-latest
steps:
- name: Clone NLE repo
uses: actions/checkout@v2
- name: Run clang
run: "./nle/scripts/run-clang-format -r win/rl src/nle.c sys/unix/nledl.c include/nle.h include/nledl.h include/nleobs.h"
- uses: actions/checkout@v2
- uses: DoozyX/[email protected]
with:
source: 'win/rl src/nle.c sys/unix/nledl.c include/nle.h include/nledl.h include/nleobs.h'
clangFormatVersion: 12
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ repos:
- id: clang-format
name: clang-format
description: Format files with clang-format
entry: nle/scripts/run-clang-format
entry: clang-format
language: system
files: ^(src\/nle|include\/nle|win\/rl)\.(c|cc|cxx|cpp|cu|h|hpp|hxx|cuh|proto)$
files: ^(src\/nle|include\/nle|win\/rl|sys\/unix\/nle).*\.(c|cc|cxx|cpp|cu|h|hpp|hxx|cuh|proto)$
- repo: https://github.com/pycqa/isort
rev: 5.8.0
hooks:
Expand Down
15 changes: 12 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ add_compile_definitions(
HACKDIR="${HACKDIR}"
DEFAULT_WINDOW_SYS="rl"
DLB
NOCWD_ASSUMPTIONS)
NOCWD_ASSUMPTIONS
NLE_USE_TILES)

option(USE_SEEDING "Use seeding support in NLE" ON)

Expand All @@ -70,6 +71,8 @@ set(NLE_INC ${nle_SOURCE_DIR}/include)
set(NLE_DAT ${nle_SOURCE_DIR}/dat)
set(NLE_UTIL ${nle_SOURCE_DIR}/util)
set(NLE_DOC ${nle_SOURCE_DIR}/doc)
set(NLE_SSYS ${nle_SOURCE_DIR}/sys/share)
set(NLE_WIN ${nle_SOURCE_DIR}/win)

set(NLE_SRC_GEN ${nle_BINARY_DIR}/src)
set(NLE_INC_GEN ${nle_BINARY_DIR}/include)
Expand Down Expand Up @@ -125,8 +128,14 @@ add_dependencies(rlmain util) # For pm.h.

# pybind11 python library.
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/pybind11)
pybind11_add_module(_pynethack win/rl/pynethack.cc src/monst.c src/decl.c
src/drawing.c src/objects.c)
pybind11_add_module(
_pynethack
win/rl/pynethack.cc
src/monst.c
src/decl.c
src/drawing.c
src/objects.c
$<TARGET_OBJECTS:tile>)
target_link_libraries(_pynethack PUBLIC nethackdl)
set_target_properties(_pynethack PROPERTIES CXX_STANDARD 14)
target_include_directories(_pynethack PUBLIC ${NLE_INC_GEN})
Expand Down
4 changes: 2 additions & 2 deletions Files.nle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Following Files.nh, this is a listing of all files that NLE adds to the NetHack
Following Files.nh, this is a listing of some files that NLE adds to the NetHack
distribution.

.:
Expand Down Expand Up @@ -63,7 +63,7 @@ __init__.py actions.py nethack.py print_message.py ptyprocess.py
nle/scripts:
(files for the nle.scripts module)
__init__.py check_nethack_speed.py collect_env.py lint_changed.sh
nh-clean-install play.py plot.py run-clang-format
nh-clean-install play.py plot.py
test_raw_nethack.py ttyplay.py ttyrec.py

nle/tests:
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ recursive-include src *
recursive-include sys *
recursive-include util *
recursive-include win/rl *
recursive-include win/share *
recursive-include win/tty *
recursive-include third_party *

recursive-exclude build *
exclude nle/dashboard
exclude nle/scripts/nh-clean-install.sh
exclude nle/scripts/run-clang-format.py
exclude nle/scripts/line-changed.sh
1 change: 1 addition & 0 deletions include/nleobs.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#define NLE_BL_CONDITION 25 /* condition bit mask */

/* #define NLE_ALLOW_SEEDING 1 */ /* Set in CMakeLists.txt if not disabled. */
/* #define NLE_USE_TILES 1 */ /* Set in CMakeLists.txt. */

typedef struct nle_observation {
int action;
Expand Down
Loading