• R/O
  • SSH

silny-kombat: Commit

Mercurial repo for silny-kombat project


Commit MetaInfo

Revisionc60f8646d4ad085bfd2220a5a3768bdce2c9c06b (tree)
Time2022-04-06 04:19:21
AuthorPiotr Kozka <piotoor@gmai...>
CommiterPiotr Kozka

Log Message

Mergefix. Characters can now be moved

Change Summary

Incremental Difference

diff -r 4894f8e433a7 -r c60f8646d4ad src/controller.rs
--- a/src/controller.rs Tue Apr 05 21:07:15 2022 +0200
+++ b/src/controller.rs Tue Apr 05 21:19:21 2022 +0200
@@ -93,6 +93,7 @@
9393 while let Some(event) = window.poll_event() {
9494 let mut key_result = key_processor.match_key(event);
9595
96+
9697 match key_result {
9798 KeyEvents::Escape => return,
9899 KeyEvents::KeyTesting => {
@@ -100,20 +101,20 @@
100101 println!("Testing: dump values to check");
101102 save_test_data_to_file(groundLevel, &character_A.char_sprite, &character_B.char_sprite);
102103 }
103- KeyEvents::Char_Left => { process_key_result_for_character(&key_processor, &mut character_A, key_result); }
104- KeyEvents::Char_Right => { process_key_result_for_character(&key_processor, &mut character_A, key_result); }
105- KeyEvents::Char_Key_Release => { process_key_result_for_character(&key_processor, &mut character_A, key_result); }
104+ KeyEvents::Char_Left => { output_A = process_key_result_for_character(&key_processor, &mut character_A, key_result); }
105+ KeyEvents::Char_Right => { output_A = process_key_result_for_character(&key_processor, &mut character_A, key_result); }
106+ KeyEvents::Char_Key_Release => { output_A = process_key_result_for_character(&key_processor, &mut character_A, key_result); }
106107 KeyEvents::Char_B_Left => {
107108 //second char
108- process_key_result_for_character(&key_processor, &mut character_B, KeyEvents::Char_Left);
109+ output_B = process_key_result_for_character(&key_processor, &mut character_B, KeyEvents::Char_Left);
109110 }
110111 KeyEvents::Char_B_Right => {
111112 //second char
112- process_key_result_for_character(&key_processor, &mut character_B, KeyEvents::Char_Right);
113+ output_B = process_key_result_for_character(&key_processor, &mut character_B, KeyEvents::Char_Right);
113114 }
114115 KeyEvents::Char_B_Key_Release => {
115116 //second char
116- process_key_result_for_character(&key_processor, &mut character_B, KeyEvents::Char_Key_Release);
117+ output_B = process_key_result_for_character(&key_processor, &mut character_B, KeyEvents::Char_Key_Release);
117118 }
118119 KeyEvents::None => {}
119120 }
Show on old repository browser