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

VC and SA Mobile modes update #11

Merged
merged 14 commits into from
Jan 7, 2021
Merged
Show file tree
Hide file tree
Changes from 10 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
14 changes: 14 additions & 0 deletions modes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@
<copy-directory type="scm">@game:\data</copy-directory>
<copy-directory type="cleo">@game:\CLEO</copy-directory>
</mode>
<mode extends="vc" id="vc_mobile" title="VC Mobile" game="vc" type="">
<data>@sb:\data\vc_mobile\</data>
<opcodes>@sb:\data\vc_mobile\VCSCM.ini</opcodes>
<examples>@sb:\data\vc_mobile\opcodes.txt</examples>
<classes>@sb:\data\vc_mobile\classes.db</classes>
<variables>@sb:\data\vc_mobile\CustomVariables.ini</variables>
<keywords>@sb:\data\vc_mobile\keywords.txt</keywords>
<missions>@sb:\data\vc_mobile\missions.txt</missions>
<constants>@sb:\data\vc_mobile\constants.txt</constants>
<templates>@sb:\data\vc_mobile\templates.txt</templates>
XMDS marked this conversation as resolved.
Show resolved Hide resolved
<text format="vc">@sb:\data\vc_mobile\american.gxt</text>
<ide>@sb:\data\vc_mobile\data\default.ide</ide>
<ide base="@sb:\data\vc_mobile\">@sb:\data\vc_mobile\data\gta_vc.dat</ide>
</mode>
<mode id="sa" title="GTA SA v1.0" game="sa" type="default">
<data>@sb:\data\sa\</data>
<opcodes>@sb:\data\sa\SASCM.ini</opcodes>
Expand Down
120 changes: 70 additions & 50 deletions sa_mobile/SASCM.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
; x% = external script
; k% = 128-byte null-terminated string

DATE=2020-11-11
DATE=2020-12-29

[OPCODES]
0000=0,NOP
Expand Down Expand Up @@ -1968,70 +1968,90 @@ DATE=2020-11-11
0A4B=0, controls_set_to_joystick
0A4C=0, mouse_not_inverted_vertically
0A4D=0, NOP_false
0A4E=0,increment_useless_flag
0A4E=0, NOP_false

; Mobile opcodes
0242=2,arm_car_with_bomb %1d% %2d%
0A4F=0, NOP_false
0A50=0,increment_useless_flag
0a51=1, is_widget_pressed %1d%
0a52=1, is_widget_released %1d%
0a53=1, is_widget_doubletapped %1d%
0a54=1, is_widget_swiped %1d%
0A55=1, is_widget_swiped_left %1d%
0A56=1, is_widget_swiped_right %1d%
0a57=2, do_mission_skip %1d% %2d%
0a57=2, do_mission_skip_get_current_mission_page %1d% get_current_skip_to_mission_number %2d%
0a58=1, skip_to_mission_num %1d%
0a59=1, skip_to_mission_page %1d%
0a5A=2,get_widget_value %1d% %2d%
0A5B=3,get_widget_value2 %1d% %2d% %3d%
0A5C=3,display_text_widget %1d% %2d% %3g%
0A5D=5,get_widget_position %1d% %2d% %3d% %4d% %5d%
0A5E=2,set_widget_value %1d% %2d%
0A5F=3,set_widget %1d% range %2d% %3d%
0a60=2,add_widget_flag %1d% %2d%
0a61=2,remove_widget_flag %1d% %2d%
0a62=2,add_button_flag %1d% %2d%
0a63=2,remove_button_flag %1d% %2d%
0a5A=2,get_widget %1d% value_to %2d% ; float
0A5B=3,get_widget %1d% value2_to %2d% %3d% ; float
0A5C=3,display_missions_text_position %1d% %2d% GXT %3g%
0A5D=5,get_widget %1d% position_to %2d% %3d% scale_to %4d% %5d%
0A5E=2,set_widget %1d% value %2d% ; float
0A5F=3,set_widget %1d% slider_range %2d% %3d% ; float
0a60=2,widget %1d% add_flag %2d%
0a61=2,widget %1d% remove_flag %2d%
0a62=2,widget %1d% add_button_flag %2d%
0a63=2,widget %1d% remove_button_flag %2d%
0a64=0, is_touch_enabled
0a65=0, skip_intro_cutscene
0a66=1,write_log %1k%
0a67=4,write_log_int %1d% %2d% %3d% %4k%
0a68=4,write_log_float %1d% %2d% %3d% %4k%
0a69=1,create_shop_widget %1g%
0a6a=2,add_shop_item %1g% %2d%
0a66=1,write_log %1k% ; 128-byte null-terminated string
0a67=4,write_log_int %1d% %2d% %3d% %4k% ; 128-byte null-terminated string
0a68=4,write_log_float %1d% %2d% %3d% %4k% ; 128-byte null-terminated string
0a69=1,create_shop_widget_menu %1g%
0a6a=2,add_shop_widget_menu_item %1g% price %2d%
0a6b=1,delete_widget %1d%
0a6c=2,set_equipped_item %1d% %2d%
0a6d=2,print_help_forever_conditional %1g% %2d%
0a6e=2,set_widget_texture %1d% %2k%
0a6c=2,set_widget %1d% equipped_item %2d%
0a6d=2,print_help_forever_conditional %1g% hid_type %2d%
0a6e=2,set_widget %1d% texture %2k% ; 128-byte null-terminated string
0a6f=1,checkpoint_save %1d%
0a70=4,display_text_clamped %1d% %2d% %3d% %4d%
0a71=5,display_text_with_number_clamped %1d% %2d% %3g% %4d% %5d%
0a73=4,set_widget_value3 %1d% %2d% %3d% %4d%
0a74=1, is_checkpoint_resuming %1d%
0a75=2,set_active_menu_item_car_mods %1d% %2d%
0a70=4,display_text_clamped_position %1d% %2d% GXT %3g% scale %4d% ;text_draw
0a71=5,display_text_clamped_position %1d% %2d% GXT %3g% with_number %4d% scale %5d% ;text_draw
0A72=0,auto_save_checkpoint
0a73=4,set_widget %1d% value3 %2d% %3d% %4d% ; float
0a74=1, is_checkpoint_resuming %1d% ; IsGameResuming //bool
0a75=2, set_active_square_color_panel %1d% find_car_colour %2d%
0a76=1, hid_implements %1d%
0a77=1,checkpoint_save_oddjob %1d%
0a78=2,print_help_conditional %1g% %2d%
0a79=2,print_help_conditional_touch %1g% %2d%
0a7a=2,print_help_conditional_hid %1g% %2d%
0a7b=2,print_help_conditional_touch_classic %1g% %2d%
0a7c=2,print_help_conditional_touch_adapted %1g% %2d%
0a7d=2,print_help_conditional_hid_joypad %1g% %2d%
0a7e=2,print_help_conditional_hid_keyboard %1g% %2d%
0a7f=2,print_help_conditional_touch_analog %1g% %2d%
0a80=2,print_help_conditional_unknown %1g% %2d%
0a81=2,set_widget_info2 %1g% %2d%
0a82=2,set_widget_info2 %1g% %2d%
0a83=2,set_widget_info2 %1g% %2d%
0a84=2,set_widget_info2 %1g% %2d%
0a85=2,set_widget_info2 %1g% %2d%
0a86=2,set_widget_info2 %1g% %2d%
0a87=2,set_widget_info2 %1g% %2d%
0a88=2,set_widget_info2 %1g% %2d%
0a89=3,set_widget_value %1d% %2d% %3d%
0a8a=8,set_widget_info %1d% %2d% %3d% %4d% %5d% %6d% %7d% %8g%
0a8b=7,set_widget_info %1d% %2d% %3d% %4d% %5d% %6g% %7g%
0a8c=0,load_all_streaming_models
0A78=2,print_help_forever_conditional_touch %1g% hid_type %2d%
0A79=2,print_help_forever_conditional_hid %1g% hid_type %2d%
0A7A=2,print_help_forever_conditional_touch_classic %1g% hid_type %2d%
0A7B=2,print_help_forever_conditional_touch_adapted %1g% hid_type %2d%
0A7C=2,print_help_forever_conditional_hid_joypad %1g% hid_type %2d%
0A7D=2,print_help_forever_conditional_hid_keyboard %1g% hid_type %2d%
0A7E=2,print_help_forever_conditional_touch_analog %1g% hid_type %2d%
0A7F=2,print_help_forever_conditional_touch_digital %1g% hid_type %2d%
0A80=2,print_help_forever_conditional_touch_flick %1g% hid_type %2d%
0A81=2,print_help_conditional %1g% hid_type %2d%
0A82=2,print_help_conditional_touch %1g% hid_type %2d%
0A83=2,print_help_conditional_hid %1g% hid_type %2d%
0A84=2,print_help_conditional_touch_classic %1g% hid_type %2d%
0A85=2,print_help_conditional_touch_adapted %1g% hid_type %2d%
0A86=2,print_help_conditional_hid_joypad %1g% hid_type %2d%
0A87=2,print_help_conditional_hid_keyboard %1g% hid_type %2d%
0A88=2,print_help_conditional_touch_analog %1g% hid_type %2d%
0a89=3,set_widget %1d% value2 %2d% %3d% ; float
0a8a=8,set_widget %1d% info %2d% %3d% %4d% %5d% %6d% %7d% %8g%
0a8b=7,set_widget %1d% info2 %2d% %3d% %4d% %5d% %6g% %7g%
0a8c=0,load_all_requested_models ; No time to pause. load faster than 038B
0a8d=1, is_hid_released %1d%
0A8E=1,award_achievement %1d%
0A8F=0,
0A90=1, %1d%
0A8E=1,NOP %1d%
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this is a no-operation? I remember there was a discussion somewhere on GTAForums about this opcode and somehow it was figured this grants new achievements to the player. I haven't tested it myself though

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@XMDS ☝️

0A8F=0,set_player_weapon_lock_on_target
0A90=1, is_hid_pressed %1d%

; Android CLEO opcodes
0DD0=2,%1d% = get_label_addr %2p% ; android
0DD1=2,%1d% = get_func_addr_by_cstr_name %2d% ; android
0DD2=1,context_call_func %1d% ; android
0DD3=2,context_set_reg %1d% value %2d% ; android
0DD4=2,%1d% = context_get_reg %2d% ; android
0DD6=1,%1d% = get_game_version ; android
0DD7=1,%1d% = get_image_base ; android
0DD8=4,%1d% = read_mem_addr %2d% size %3d% add_ib %4d% ; android
0DD9=5,write_mem_addr %1d% value %2d% size %3d% add_ib %4d% protect %5d% ; android
0DDC=2,set_mutex_var %1d% to %2d% ; android
0DDD=2,%1d% = get_mutex_var %2d% ; android
0DE0=3,%1d% = get_touch_point_state %2d% mintime %3d% ; android
0DE1=5,%1d% = get_touch_slide_state from %2d% to %3d% mintime %4d% maxtime %5d% ; android
0DE2=1,%1d% = get_menu_button_state ; read opcode info before using ; android
0DE3=2,%1d% = get_menu_button_pressed mintime %2d% ; read opcode info before using ; android
20 changes: 19 additions & 1 deletion sa_mobile/extensions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1951,6 +1951,8 @@
0A4C=default
0A4D=default
0A4E=default
0A4F=default
0A50=default
0242=default
0a51=default
0a52=default
Expand Down Expand Up @@ -1985,6 +1987,7 @@
0a6f=default
0a70=default
0a71=default
0a72=default
0a73=default
0a74=default
0a75=default
Expand Down Expand Up @@ -2014,4 +2017,19 @@
0a8d=default
0A8E=default
0A8F=default
0A90=default
0A90=default
0DD0=CLEO
0DD1=CLEO
0DD2=CLEO
0DD3=CLEO
0DD4=CLEO
0DD6=CLEO
0DD7=CLEO
0DD8=CLEO
0DD9=CLEO
0DDC=CLEO
0DDD=CLEO
0DE0=CLEO
0DE1=CLEO
0DE2=CLEO
0DE3=CLEO
19 changes: 18 additions & 1 deletion sa_mobile/keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,21 @@
0317=increment_mission_attempts
0111=set_wb_check_to
0459=end_thread_named
0459=terminate_all_scripts_with_this_name
0459=terminate_all_scripts_with_this_name

; Android CLEO opcodes
0DD0=get_label_addr
0DD1=get_func_addr_by_cstr_name
0DD2=context_call_func
0DD3=context_set_reg_value
0DD4=context_get_reg_value
0DD6=get_game_version
0DD7=get_image_base
0DD8=read_mem_addr
0DD9=write_mem_addr
0DDC=set_mutex_var
0DDD=get_mutex_var
0DE0=get_touch_point_state
0DE1=get_touch_slide_state
0DE2=get_menu_button_state
0DE3=get_menu_button_pressed_mintime
Loading