Skip to content

Commit 8ce29e1

Browse files
committed
backend-infra-engineer: Release 0.2.2 snapshot
1 parent 18b7fb9 commit 8ce29e1

209 files changed

Lines changed: 7898 additions & 4085 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,7 @@ build/
44
.vscode/
55
disasm/
66
src/etc
7-
src/lib/SDL2
8-
src/lib/cmake
9-
src/lib/GL
10-
src/lib/abseil-cpp
11-
src/lib/libGLEW.2.2.0.dylib
12-
src/lib/libGLEW.2.2.dylib
13-
src/lib/libGLEW.a
14-
src/lib/libGLEW.dylib
15-
src/lib/libSDL2_test.a
16-
src/lib/libSDL2-2.0.0.dylib
17-
src/lib/libSDL2.a
18-
src/lib/libSDL2.dylib
19-
src/lib/libSDL2main.a
7+
src/lib/
208
checks.json
219
assets/lib/libasar.dll
2210
cmake/yaze.plist.in
@@ -29,4 +17,5 @@ assets/asm/EditorCore.asm
2917
src/app/emu/cpu/internal/old_cpu.cc
3018
build-windows
3119
src/lib/libpng
32-
src/lib/zlib
20+
src/lib/zlib
21+
assets/layouts/ow_toolset.zeml

.gitmodules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
[submodule "src/lib/imgui"]
22
path = src/lib/imgui
33
url = https://github.com/ocornut/imgui.git
4-
[submodule "src/lib/ImGuiFileDialog"]
5-
path = src/lib/ImGuiFileDialog
6-
url = https://github.com/aiekick/ImGuiFileDialog.git
7-
[submodule "src/lib/ImGuiColorTextEdit"]
8-
path = src/lib/ImGuiColorTextEdit
9-
url = https://github.com/BalazsJako/ImGuiColorTextEdit.git
104
[submodule "assets/asm/alttp-hacker-workspace"]
115
path = assets/asm/alttp-hacker-workspace
126
url = https://github.com/scawful/alttp-hacker-workspace.git

CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Yet Another Zelda3 Editor
22
# by scawful
33
cmake_minimum_required(VERSION 3.10)
4-
project(yaze VERSION 0.2.0
4+
project(yaze VERSION 0.2.2
55
DESCRIPTION "Yet Another Zelda3 Editor"
66
LANGUAGES CXX)
7+
configure_file(src/yaze_config.h.in yaze_config.h)
78

89
# Build Flags
910
set(YAZE_BUILD_APP ON)
@@ -18,7 +19,7 @@ set(YAZE_INSTALL_LIB OFF)
1819
add_definitions("-DYAZE_LIB_PNG=1")
1920

2021
# C++ Standard and CMake Specifications
21-
set(CMAKE_CXX_STANDARD 20)
22+
set(CMAKE_CXX_STANDARD 23)
2223
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2324
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
2425
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
@@ -28,11 +29,19 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
2829
set(BUILD_SHARED_LIBS OFF)
2930
set(CMAKE_FIND_FRAMEWORK LAST)
3031
set(CMAKE_SHARED_MODULE_PREFIX "")
32+
33+
if (UNIX)
3134
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dlinux -Dstricmp=strcasecmp")
35+
endif()
36+
3237
if (MACOS)
3338
set(CMAKE_INSTALL_PREFIX /usr/local)
3439
endif()
3540

41+
if (WIN32)
42+
include(cmake/vcpkg.cmake)
43+
endif()
44+
3645
# Abseil Standard Specifications
3746
include(cmake/absl.cmake)
3847

Doxyfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ PROJECT_NAME = "yaze"
4848
# could be handy for archiving the generated documentation or if some version
4949
# control system is used.
5050

51-
PROJECT_NUMBER = "0.2.0"
51+
PROJECT_NUMBER = "0.2.2"
5252

5353
# Using the PROJECT_BRIEF tag one can provide an optional one line description
5454
# for a project that appears at the top of each page and should give viewer a
@@ -1284,7 +1284,7 @@ ALPHABETICAL_INDEX = YES
12841284
# after removing the prefix.
12851285
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
12861286

1287-
IGNORE_PREFIX =
1287+
IGNORE_PREFIX = googletest
12881288

12891289
#---------------------------------------------------------------------------
12901290
# Configuration options related to the HTML output

cmake/absl.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
if (MINGW)
22
add_subdirectory(src/lib/abseil-cpp)
33
else()
4-
find_package(absl)
4+
find_package(absl)
55
endif()
66
set(ABSL_PROPAGATE_CXX_STD ON)
77
set(ABSL_CXX_STANDARD 17)
88
set(ABSL_USE_GOOGLETEST_HEAD ON)
99
set(ABSL_ENABLE_INSTALL ON)
1010
set(
11-
ABSL_TARGETS
11+
ABSL_TARGETS
1212
absl::strings
1313
absl::flags
1414
absl::status
@@ -21,4 +21,4 @@ set(
2121
absl::raw_logging_internal
2222
absl::failure_signal_handler
2323
absl::flat_hash_map
24-
)
24+
)

cmake/imgui.cmake

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,9 @@ file(GLOB IMGUI_SOURCES ${IMGUI_PATH}/*.cpp)
44
add_library("ImGui" STATIC ${IMGUI_SOURCES})
55
target_include_directories("ImGui" PUBLIC ${IMGUI_PATH})
66
target_include_directories(ImGui PUBLIC ${SDL2_INCLUDE_DIR})
7-
target_compile_definitions(ImGui PUBLIC
7+
target_compile_definitions(ImGui PUBLIC
88
IMGUI_IMPL_OPENGL_LOADER_CUSTOM=<SDL2/SDL_opengl.h> GL_GLEXT_PROTOTYPES=1)
99

10-
set(IMGUI_FILE_DLG_PATH ${CMAKE_SOURCE_DIR}/src/lib/ImGuiFileDialog)
11-
file(GLOB IMGUI_FILE_DLG_SOURCES ${IMGUI_FILE_DLG_PATH}/*.cpp)
12-
add_library("ImGuiFileDialog" STATIC ${IMGUI_FILE_DLG_SOURCES})
13-
target_include_directories(ImGuiFileDialog PUBLIC ${IMGUI_PATH} ${CMAKE_SOURCE_DIR}/src/lib)
14-
15-
set(IMGUI_COLOR_TEXT_EDIT_PATH ${CMAKE_SOURCE_DIR}/src/lib/ImGuiColorTextEdit)
16-
file(GLOB IMGUI_COLOR_TEXT_EDIT_SOURCES ${IMGUI_COLOR_TEXT_EDIT_PATH}/*.cpp)
17-
add_library("ImGuiColorTextEdit" STATIC ${IMGUI_COLOR_TEXT_EDIT_SOURCES})
18-
target_include_directories(ImGuiColorTextEdit PUBLIC ${IMGUI_PATH} ${CMAKE_SOURCE_DIR}/src/lib)
19-
2010
set(IMGUI_TEST_ENGINE_PATH ${CMAKE_SOURCE_DIR}/src/lib/imgui_test_engine/imgui_test_engine)
2111
file(GLOB IMGUI_TEST_ENGINE_SOURCES ${IMGUI_TEST_ENGINE_PATH}/*.cpp)
2212
add_library("ImGuiTestEngine" STATIC ${IMGUI_TEST_ENGINE_SOURCES})
@@ -25,16 +15,14 @@ target_link_libraries(ImGuiTestEngine PUBLIC ImGui)
2515

2616
set(
2717
IMGUI_SRC
28-
${IMGUI_PATH}/imgui.cpp
18+
${IMGUI_PATH}/imgui.cpp
2919
${IMGUI_PATH}/imgui_demo.cpp
30-
${IMGUI_PATH}/imgui_draw.cpp
20+
${IMGUI_PATH}/imgui_draw.cpp
3121
${IMGUI_PATH}/imgui_widgets.cpp
3222
${IMGUI_PATH}/backends/imgui_impl_sdl2.cpp
33-
${IMGUI_PATH}/backends/imgui_impl_sdlrenderer2.cpp
23+
${IMGUI_PATH}/backends/imgui_impl_sdlrenderer2.cpp
3424
${IMGUI_PATH}/misc/cpp/imgui_stdlib.cpp
35-
${IMGUI_FILE_DLG_PATH}/ImGuiFileDialog.cpp
36-
${IMGUI_COLOR_TEXT_EDIT_PATH}/TextEditor.cpp
3725
)
3826

3927
# For integration test
40-
add_definitions("-DIMGUI_ENABLE_TEST_ENGINE -DIMGUI_TEST_ENGINE_ENABLE_COROUTINE_STDTHREAD_IMPL=1")
28+
add_definitions("-DIMGUI_ENABLE_TEST_ENGINE -DIMGUI_TEST_ENGINE_ENABLE_COROUTINE_STDTHREAD_IMPL=1")

cmake/sdl2.cmake

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,8 @@ set(SDL_TARGETS SDL2::SDL2)
99

1010
if(WIN32 OR MINGW)
1111
list(PREPEND SDL_TARGETS SDL2::SDL2main ws2_32)
12-
add_definitions(-DSDL_MAIN_HANDLED)
12+
add_definitions("-DSDL_MAIN_HANDLED")
1313
endif()
1414

1515
# libpng
16-
if (MINGW)
17-
set(ZLIB_ROOT ${CMAKE_SOURCE_DIR}/build-windows/src/lib/zlib)
18-
set(ZLIB_LIBRARY ${CMAKE_SOURCE_DIR}/build-windows/lib/libzlib.dll.a)
19-
include_directories(${CMAKE_SOURCE_DIR}/src/lib/zlib ${CMAKE_SOURCE_DIR}/src/lib/libpng)
20-
set(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/lib/zlib)
21-
set(YAZE_BUILD_PYTHON OFF)
22-
set(YAZE_BUILD_EXTENSIONS OFF)
23-
add_subdirectory(src/lib/zlib)
24-
add_subdirectory(src/lib/libpng)
25-
else()
26-
find_package(PNG REQUIRED)
27-
endif()
16+
find_package(PNG REQUIRED)

cmake/vcpkg.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
add_definitions("-DMICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS=0")
3+
4+
set(VCPKG_TARGET_ARCHITECTURE x64)
5+
set(VCPKG_CRT_LINKAGE dynamic)
6+
set(VCPKG_LIBRARY_LINKAGE dynamic)

docs/asm-style-guide.md

Lines changed: 25 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ Custom assembly code applied to the game should be included through the `yaze.as
2323
## File Structure
2424

2525
- **File Extension**: Use `.asm` as the file extension for 65816 assembly files.
26-
- **Header Comments**: Include a header comment at the beginning of each file describing its purpose and the author.
26+
- **Header Comments**: Include a header comment at the beginning of each file describing its purpose and the author.
2727

2828
Example:
2929

3030
```asm
3131
; =========================================================
32-
; File: my_file.asm
3332
; Purpose: [Brief description of the file’s functionality]
3433
; Author: [Your Name]
3534
; =========================================================
@@ -68,11 +67,10 @@ Sprite_Minecart_Main:
6867
}
6968
```
7069

71-
7270
## Comments
7371

7472
- **Purpose**: Comments should explain why the code exists and what it is intended to do, especially for complex logic.
75-
- **Placement**:
73+
- **Placement**:
7674
- Comments can be placed above the code block they describe for longer explanations.
7775
- Inline comments can be used for single lines of code where the purpose might not be immediately clear.
7876
- **Clarity**: Avoid stating the obvious. Focus on explaining the logic rather than restating the code.
@@ -83,22 +81,6 @@ Example:
8381
LDA $22 : SEC : SBC $3F : STA $31 ; Adjust X position for camera movement
8482
```
8583

86-
## Directives
87-
88-
- **Organization**: Use `%macro`, `include`, and other Asar directives in a structured manner, keeping related directives grouped together.
89-
- **Usage**: Ensure all directives are used consistently throughout the codebase, following the naming conventions and formatting rules established.
90-
91-
Example:
92-
93-
```asm
94-
%macro InitMovement
95-
LDA.b $22 : STA.b $3F
96-
LDA.b $23 : STA.b $41
97-
LDA.b $20 : STA.b $3E
98-
LDA.b $21 : STA.b $40
99-
endmacro
100-
```
101-
10284
## Instructions
10385

10486
- **Single Line Instructions**: Combine multiple instructions on a single line using colons (`:`) where appropriate for related operations.
@@ -121,11 +103,11 @@ Example:
121103

122104
```asm
123105
%macro HandlePlayerCamera
124-
LDA $22 : SEC : SBC $3F : STA $31
125-
LDA $20 : SEC : SBC $3E : STA $30
126-
JSL Link_HandleMovingAnimation_FullLongEntry
127-
JSL HandleIndoorCameraAndDoors
128-
RTS
106+
LDA $22 : SEC : SBC $3F : STA $31
107+
LDA $20 : SEC : SBC $3E : STA $30
108+
JSL Link_HandleMovingAnimation_FullLongEntry
109+
JSL HandleIndoorCameraAndDoors
110+
RTS
129111
endmacro
130112
```
131113

@@ -137,12 +119,12 @@ endmacro
137119
Example:
138120

139121
```asm
140-
.loop_start
141-
LDA $00 : CMP #$10 : BEQ .end_loop
122+
.loop_start
123+
LDA $00 : CMP #$10 : BEQ .end_loop
142124
INC $00
143125
BRA .loop_start
144-
.end_loop
145-
RTS
126+
.end_loop
127+
RTS
146128
```
147129

148130
## Data Structures
@@ -155,10 +137,10 @@ Example:
155137
```asm
156138
.DirectionTileLookup
157139
{
158-
db $02, $00, $04, $00 ; North
159-
db $00, $00, $03, $01 ; East
160-
db $00, $02, $00, $04 ; South
161-
db $03, $01, $00, $00 ; West
140+
db $02, $00, $04, $00 ; North
141+
db $00, $00, $03, $01 ; East
142+
db $00, $02, $00, $04 ; South
143+
db $03, $01, $00, $00 ; West
162144
}
163145
```
164146

@@ -206,7 +188,6 @@ AncillaAdd_Hookshot:
206188
- **Logical Grouping**: Organize code into logical sections, with related routines and macros grouped together.
207189
- **Separation of Concerns**: Ensure that each section of code is responsible for a specific task or set of related tasks, avoiding tightly coupled code.
208190
- **Modularity**: Write code in a modular way, making it easier to reuse and maintain.
209-
- **Status Registers and Stack Operations**: Indent code blocks when using status register operations (REP, SEP, PHX, PLX, etc.) to improve readability.
210191

211192
Example:
212193

@@ -216,22 +197,20 @@ Example:
216197
; =========================================================
217198
Sprite_Minecart_Main:
218199
{
219-
JSR HandleTileDirections
220-
JSR HandleDynamicSwitchTileDirections
221-
PHX
222-
JSR HandleMinecartMovement
223-
PLX
224-
225-
REP #$20
226-
LDA !SpriteDirection : STA $00
227-
SEP #$20
228-
RTS
200+
PHX
201+
JSR HandleMinecartMovement
202+
PLX
203+
204+
REP #$20
205+
LDA !SpriteDirection : STA $00
206+
SEP #$20
207+
RTS
229208
}
230209
```
231210

232211
## Custom Code
233212

234-
- **Integration**: Include custom assembly code in the `yaze.asm` file to ensure it is applied correctly to the ROM. The module should include a define and conditional statement to allow users to disable the module if needed.
213+
- **Integration**: Include custom assembly code in the `yaze.asm` file to ensure it is applied correctly to the ROM. The module should include a define and conditional statement to allow users to disable the module if needed.
235214

236215
Example:
237216

@@ -241,4 +220,4 @@ Example:
241220
if !YAZE_CUSTOM_MOSAIC != 0
242221
incsrc "mosaic_change.asm"
243222
endif
244-
```
223+
```

0 commit comments

Comments
 (0)