Skip to content

Commit

Permalink
Build with older SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
imustafin committed Oct 17, 2023
1 parent ced440b commit b3b3b6c
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 29 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ jobs:
GLOBAL_CACHE_VERSION: 1
PBDOOM_PATH: pbdoom
SDK_DOWNLOAD_PATH: sdk
SDK_REPO: pocketbook/SDK_6.3.0
SDK_REF: 23eb32c3a011a1df4ce3d8f22150dcdd34cbc75a
SDK_VARIANT: SDK-A13
SDK_REPO: blchinezu/pocketbook-sdk
SDK_REF: 64e9fa210dd90569f8eabea92da4d40f3d072fc1
SDK_VARIANT: SDK_481
steps:
- name: Checkout repo
uses: actions/checkout@v3
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Build
run: |
$SDK_DOWNLOAD_PATH/$SDK_VARIANT/bin/update_path.sh
sed -i "s@/srv/einkbuild/SDK2FREE/SDK-481@$SDK_DOWNLOAD_PATH/$SDK_VARIANT@g" $SDK_DOWNLOAD_PATH/$SDK_VARIANT/share/cmake/arm_conf.cmake
cd $PBDOOM_PATH
echo "../$SDK_DOWNLOAD_PATH/$SDK_VARIANT" > sdk_path
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build
build
*.~undo-tree~
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Removed `DitherAreaPattern2Level` dithering mode because it is not supported in the older SDK
- Support for older devices (GLIBC ≤ 2.4)

### Fixed

## [v0.0.5]
Expand Down
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ configure_file(
include_directories(${CMAKE_BINARY_DIR}/generated)
### end version


add_executable(game.app
main.c
pbdoom_state.h
Expand Down Expand Up @@ -173,5 +172,12 @@ sdldoom-1.10/z_zone.h
)
target_link_libraries(game.app ${INKVIEW_LIBRARIES})
target_link_libraries(game.app m)
target_link_libraries(game.app rt)

get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
foreach(dir ${dirs})
message(STATUS "include='${dir}'")
endforeach()

target_compile_options(game.app PRIVATE -Werror=implicit-function-declaration)
target_compile_options(game.app PRIVATE -Werror=implicit-function-declaration -D_GNU_SOURCE)
set_property(TARGET game.app PROPERTY C_STANDARD 99)
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export LC_ALL=C
SDK_PATH=$(cat sdk_path)
mkdir -p build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=$SDK_PATH/share/cmake/arm_conf.cmake .. && cmake --build .
2 changes: 1 addition & 1 deletion pbdoom/frames/color_settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ static void uninstall() {

}

const int NUM_BUF_S = 10;
#define NUM_BUF_S 10
char num_buf[NUM_BUF_S];

void draw_value_text(value *v) {
Expand Down
4 changes: 0 additions & 4 deletions pbdoom/frames/game.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ void game_frame_draw_screen(unsigned char *screen) {
case DYNAMIC_A2:
DynamicUpdateA2(ux, uy, uw, uh);
break;
case DITHER_AREA_PATTERN_2_LEVEL:
DitherAreaPattern2Level(ux, uy, uw, uh);
PartialUpdate(ux, uy, uw, uh);
break;
case DITHER_MANUAL_2_PATTERN:
DitherArea(ux, uy, uw, uh, 2, DITHER_PATTERN);
PartialUpdate(ux, uy, uw, uh);
Expand Down
7 changes: 3 additions & 4 deletions pbdoom/frames/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ extern frame game_frame;

typedef enum {
DYNAMIC_A2,
DITHER_AREA_PATTERN_2_LEVEL,
DITHER_MANUAL_2_PATTERN,
NO_DITHER
} ink_render_mode;
Expand All @@ -19,9 +18,9 @@ void game_frame_set_render_mode(ink_render_mode i_render_mode);
void game_frame_set_palette(byte *palette);
void game_frame_draw_screen(unsigned char *screen);

static const double GAME_DEFAULT_ALPHA = 1;
static const double GAME_DEFAULT_BETA = 0;
static const double GAME_DEFAULT_GAMMA = 1;
#define GAME_DEFAULT_ALPHA 1
#define GAME_DEFAULT_BETA 0
#define GAME_DEFAULT_GAMMA 1
extern double game_alpha;
extern double game_beta;
extern double game_gamma;
Expand Down
13 changes: 0 additions & 13 deletions pbdoom/frames/panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ icontext_menu *main_menu;
enum {
idx_render = 1,
idx_render_dynamic_a2,
idx_render_dither_area_pattern_2_level,
idx_render_dither_area_2,
idx_render_no_dither,

Expand All @@ -24,11 +23,6 @@ imenu render_submenu[] = {
idx_render_dynamic_a2,
"DynamicA2"
},
{
ITEM_ACTIVE,
idx_render_dither_area_pattern_2_level,
"DitherAreaPattern2Level"
},
{
ITEM_ACTIVE,
idx_render_dither_area_2,
Expand Down Expand Up @@ -97,10 +91,6 @@ void main_menu_handler(int i) {
send_render_event(DYNAMIC_A2);
main_menu = NULL;
break;
case idx_render_dither_area_pattern_2_level:
send_render_event(DITHER_AREA_PATTERN_2_LEVEL);
main_menu = NULL;
break;
case idx_render_dither_area_2:
send_render_event(DITHER_MANUAL_2_PATTERN);
main_menu = NULL;
Expand All @@ -126,9 +116,6 @@ void make_main_menu() {
case DYNAMIC_A2:
active_idx = idx_render_dynamic_a2;
break;
case DITHER_AREA_PATTERN_2_LEVEL:
active_idx = idx_render_dither_area_pattern_2_level;
break;
case DITHER_MANUAL_2_PATTERN:
active_idx = idx_render_dither_area_2;
break;
Expand Down

0 comments on commit b3b3b6c

Please sign in to comment.