Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update pocketpy to v1.0 #2212

Merged
merged 6 commits into from
Jun 4, 2023
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
19 changes: 18 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,15 @@ target_include_directories(squirrel PRIVATE ${SQUIRREL_DIR}/sqstdlib)
################################

set(POCKETPY_DIR ${THIRDPARTY_DIR}/pocketpy)

if (${CMAKE_VERSION} VERSION_LESS "3.12.0")
set(Python3_EXECUTABLE "python3")
else()
find_package(Python3 COMPONENTS Interpreter)
endif()

execute_process(
COMMAND python3 preprocess.py
COMMAND ${Python3_EXECUTABLE} preprocess.py
WORKING_DIRECTORY ${POCKETPY_DIR}
RESULT_VARIABLE EXIT_CODE
)
Expand All @@ -426,6 +433,16 @@ else()
target_compile_features(python PRIVATE cxx_std_17)
endif()

# the export.h normally lives in the src subdirecty file, but needs to be seen
# by the c bindings
add_custom_command(
TARGET python PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${POCKETPY_DIR}/src/export.h
${POCKETPY_DIR}/c_bindings/export.h
)


################################
# GIFLIB
################################
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,4 @@ You can find iOS/tvOS version here
* Thorben Krüger - [Mastodon @benthor@chaos.social](https://chaos.social/@benthor)
* David St-Hilaire - [GitHub @sthilaid](https://github.com/sthilaid)
* Alec Troemel - [Github @alectroemel](https://github.com/AlecTroemel)
* Kolten Pearson - [Github @koltenpearson](https://github.com/koltenpearson)
2 changes: 1 addition & 1 deletion build/assets/pythonmark.tic.dat
Original file line number Diff line number Diff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6, 0xc1, 0x13, 0xa4, 0x52, 0xaf, 0x91, 0xe3, 0x28, 0xb6, 0x25, 0x9e, 0x40, 0x38, 0x95, 0xa3, 0x1d, 0x51, 0xca, 0xb6, 0x08, 0x5b, 0xa9, 0xec, 0x17, 0x53, 0x46, 0x55, 0x31, 0x09, 0x13, 0x7b, 0x70, 0xe0, 0xdc, 0xe8, 0x24, 0xc7, 0x9d, 0x72, 0x61, 0x64, 0x22, 0x87, 0x74, 0x6b, 0xbe, 0xf7, 0x5a, 0xef, 0x3d, 0x1a, 0xa0, 0x3d, 0x4e, 0x43, 0x9c, 0x7d, 0x77, 0x1f, 0x28, 0xc0, 0x11, 0xdc, 0x15, 0x83, 0x80, 0x33, 0x5b, 0xaf, 0xc5, 0x29, 0x07, 0xe2, 0x00, 0x7f, 0x1e, 0x7a, 0xf8, 0x02, 0x49, 0x85, 0xdc, 0xd5, 0x10, 0x48, 0x73, 0xed, 0x8e, 0xcc, 0xf7, 0xeb, 0xf7, 0x58, 0x20, 0xe8, 0xa9, 0xec, 0xec, 0xec, 0xae, 0xc1, 0xfb, 0x1d, 0xbb, 0x21, 0x27, 0x1d,
Binary file modified demos/bunny/pythonmark.py
Binary file not shown.
108 changes: 54 additions & 54 deletions src/api/python.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ static int py_key(pkpy_vm* vm)
return 0;

if (key_id >= tic_keys_count) {
pkpy_error(vm, "unknown keyboard code\n");
pkpy_error(vm, "tic80-panic!", "unknown keyboard code\n");
return 0;
}

Expand All @@ -361,7 +361,7 @@ static int py_keyp(pkpy_vm* vm)
return 0;

if (key_id >= tic_keys_count) {
pkpy_error(vm, "unknown keyboard code\n");
pkpy_error(vm, "tic80-panic!", "unknown keyboard code\n");
return 0;
}

Expand Down Expand Up @@ -570,7 +570,7 @@ static int py_music(pkpy_vm* vm) {
return 0;

if (track > MUSIC_TRACKS - 1 )
pkpy_error(vm, "invalid music track index\n");
pkpy_error(vm, "tic80-panic!", "invalid music track index\n");

//stop the music first I guess
tic_api_music(tic, -1, 0, 0, false, false, -1, -1);
Expand Down Expand Up @@ -687,7 +687,7 @@ static int py_pmem(pkpy_vm* vm) {
return 0;

if (index >= TIC_PERSISTENT_SIZE) {
pkpy_error(vm, "invalid persistent tic index\n");
pkpy_error(vm, "tic80-panic!", "invalid persistent tic index\n");
return 0;
}

Expand Down Expand Up @@ -882,7 +882,7 @@ static int py_sfx(pkpy_vm* vm)

if (parse_note) {
if(!tic_tool_parse_note(string_note, &note, &octave)) {
pkpy_error(vm, "invalid note, should like C#4\n");
pkpy_error(vm, "tic80-panic!", "invalid note, should like C#4\n");
goto cleanup; //error in future;
}

Expand All @@ -892,12 +892,12 @@ static int py_sfx(pkpy_vm* vm)
}

if (channel < 0 || channel >= TIC_SOUND_CHANNELS) {
pkpy_error(vm, "unknown channel\n");
pkpy_error(vm, "tic80-panic!", "unknown channel\n");
goto cleanup;
}

if (sfx_id >= SFX_COUNT) {
pkpy_error(vm, "unknown sfx index\n");
pkpy_error(vm, "tic80-panic!", "unknown sfx index\n");
goto cleanup;
}

Expand Down Expand Up @@ -969,7 +969,7 @@ static int py_sync(pkpy_vm* vm)
return 0;

if (bank < 0 || bank >= TIC_BANKS) {
pkpy_error(vm, "sync() error, invalid bank\n");
pkpy_error(vm, "tic80-panic!", "sync() error, invalid bank\n");
return 0;
}

Expand Down Expand Up @@ -1139,142 +1139,142 @@ static int py_vbank(pkpy_vm* vm) {

static bool setup_c_bindings(pkpy_vm* vm) {

pkpy_push_function(vm, py_trace);
pkpy_push_function(vm, py_trace, 2);
pkpy_set_global(vm, "_trace");

pkpy_push_function(vm, py_cls);
pkpy_push_function(vm, py_cls, 1);
pkpy_set_global(vm, "_cls");

pkpy_push_function(vm, py_btn);
pkpy_push_function(vm, py_btn, 1);
pkpy_set_global(vm, "_btn");

pkpy_push_function(vm, py_btnp);
pkpy_push_function(vm, py_btnp, 3);
pkpy_set_global(vm, "_btnp");

pkpy_push_function(vm, py_circ);
pkpy_push_function(vm, py_circ, 4);
pkpy_set_global(vm, "_circ");

pkpy_push_function(vm, py_circb);
pkpy_push_function(vm, py_circb, 4);
pkpy_set_global(vm, "_circb");

pkpy_push_function(vm, py_clip);
pkpy_push_function(vm, py_clip, 4);
pkpy_set_global(vm, "_clip");

pkpy_push_function(vm, py_elli);
pkpy_push_function(vm, py_elli, 5);
pkpy_set_global(vm, "_elli");

pkpy_push_function(vm, py_ellib);
pkpy_push_function(vm, py_ellib, 5);
pkpy_set_global(vm, "_ellib");

pkpy_push_function(vm, py_exit);
pkpy_push_function(vm, py_exit, 0);
pkpy_set_global(vm, "_exit");

pkpy_push_function(vm, py_fget);
pkpy_push_function(vm, py_fget, 2);
pkpy_set_global(vm, "_fget");

pkpy_push_function(vm, py_fget);
pkpy_push_function(vm, py_fset, 3);
pkpy_set_global(vm, "_fset");

pkpy_push_function(vm, py_font);
pkpy_push_function(vm, py_font, 9);
pkpy_set_global(vm, "_font");

pkpy_push_function(vm, py_key);
pkpy_push_function(vm, py_key, 1);
pkpy_set_global(vm, "_key");

pkpy_push_function(vm, py_keyp);
pkpy_push_function(vm, py_keyp, 3);
pkpy_set_global(vm, "_keyp");

pkpy_push_function(vm, py_line);
pkpy_push_function(vm, py_line, 5);
pkpy_set_global(vm, "_line");

pkpy_push_function(vm, py_map);
pkpy_push_function(vm, py_map, 9);
pkpy_set_global(vm, "_map");

pkpy_push_function(vm, py_memcpy);
pkpy_push_function(vm, py_memcpy, 3);
pkpy_set_global(vm, "_memcpy");

pkpy_push_function(vm, py_memset);
pkpy_push_function(vm, py_memset, 3);
pkpy_set_global(vm, "_memset");

pkpy_push_function(vm, py_mget);
pkpy_push_function(vm, py_mget, 2);
pkpy_set_global(vm, "_mget");

pkpy_push_function(vm, py_mouse);
pkpy_push_function(vm, py_mouse, 0);
pkpy_set_global(vm, "_mouse");

pkpy_push_function(vm, py_mset);
pkpy_push_function(vm, py_mset, 3);
pkpy_set_global(vm, "_mset");

pkpy_push_function(vm, py_music);
pkpy_push_function(vm, py_music, 7);
pkpy_set_global(vm, "_music");

pkpy_push_function(vm, py_peek);
pkpy_push_function(vm, py_peek, 2);
pkpy_set_global(vm, "_peek");

pkpy_push_function(vm, py_peek1);
pkpy_push_function(vm, py_peek1, 1);
pkpy_set_global(vm, "_peek1");

pkpy_push_function(vm, py_peek1);
pkpy_push_function(vm, py_peek2, 1);
pkpy_set_global(vm, "_peek2");

pkpy_push_function(vm, py_peek1);
pkpy_push_function(vm, py_peek4, 1);
pkpy_set_global(vm, "_peek4");

pkpy_push_function(vm, py_pix);
pkpy_push_function(vm, py_pix, 3);
pkpy_set_global(vm, "_pix");

pkpy_push_function(vm, py_pmem);
pkpy_push_function(vm, py_pmem, 2);
pkpy_set_global(vm, "_pmem");

pkpy_push_function(vm, py_poke);
pkpy_push_function(vm, py_poke, 3);
pkpy_set_global(vm, "_poke");

pkpy_push_function(vm, py_poke1);
pkpy_push_function(vm, py_poke1, 2);
pkpy_set_global(vm, "_poke1");

pkpy_push_function(vm, py_poke1);
pkpy_push_function(vm, py_poke2, 2);
pkpy_set_global(vm, "_poke2");

pkpy_push_function(vm, py_poke1);
pkpy_push_function(vm, py_poke4, 2);
pkpy_set_global(vm, "_poke4");

pkpy_push_function(vm, py_print);
pkpy_push_function(vm, py_print, 8);
pkpy_set_global(vm, "_print");

pkpy_push_function(vm, py_rect);
pkpy_push_function(vm, py_rect, 5);
pkpy_set_global(vm, "_rect");

pkpy_push_function(vm, py_rectb);
pkpy_push_function(vm, py_rectb, 5);
pkpy_set_global(vm, "_rectb");

pkpy_push_function(vm, py_reset);
pkpy_push_function(vm, py_reset, 0);
pkpy_set_global(vm, "_reset");

pkpy_push_function(vm, py_sfx);
pkpy_push_function(vm, py_sfx, 6);
pkpy_set_global(vm, "_sfx");

pkpy_push_function(vm, py_spr);
pkpy_push_function(vm, py_spr, 9);
pkpy_set_global(vm, "_spr");

pkpy_push_function(vm, py_sync);
pkpy_push_function(vm, py_sync, 3);
pkpy_set_global(vm, "_sync");

pkpy_push_function(vm, py_time);
pkpy_push_function(vm, py_time, 0);
pkpy_set_global(vm, "_time");

pkpy_push_function(vm, py_tri);
pkpy_push_function(vm, py_tri, 7);
pkpy_set_global(vm, "_tri");

pkpy_push_function(vm, py_trib);
pkpy_push_function(vm, py_trib, 7);
pkpy_set_global(vm, "_trib");

pkpy_push_function(vm, py_tstamp);
pkpy_push_function(vm, py_tstamp, 0);
pkpy_set_global(vm, "_tstamp");

pkpy_push_function(vm, py_ttri);
pkpy_push_function(vm, py_ttri, 17);
pkpy_set_global(vm, "_ttri");

pkpy_push_function(vm, py_vbank);
pkpy_push_function(vm, py_vbank, 1);
pkpy_set_global(vm, "_vbank");

if(pkpy_check_error(vm))
Expand Down
2 changes: 1 addition & 1 deletion vendor/pocketpy