diff options
author | jacopograndi <jak.sk8@hotmail.it> | 2021-09-05 22:36:13 +0200 |
---|---|---|
committer | jacopograndi <jak.sk8@hotmail.it> | 2021-09-05 22:36:13 +0200 |
commit | 728abda9dc6fc8e65c7c0e0240a2e7d61a43a583 (patch) | |
tree | 545187ed3d634792af1082ce021665d3ef4934fc | |
parent | c298eb988874bc2cf3adb39c2532419ec76a24bc (diff) |
tech tostring, all sprites, heal and convert
37 files changed, 1701 insertions, 79 deletions
diff --git a/CMakeFiles/Progress/1 b/CMakeFiles/Progress/1 new file mode 100644 index 0000000..7b4d68d --- /dev/null +++ b/CMakeFiles/Progress/1 @@ -0,0 +1 @@ +empty
\ No newline at end of file diff --git a/CMakeFiles/Progress/2 b/CMakeFiles/Progress/2 new file mode 100644 index 0000000..7b4d68d --- /dev/null +++ b/CMakeFiles/Progress/2 @@ -0,0 +1 @@ +empty
\ No newline at end of file diff --git a/CMakeFiles/Progress/6 b/CMakeFiles/Progress/6 new file mode 100644 index 0000000..7b4d68d --- /dev/null +++ b/CMakeFiles/Progress/6 @@ -0,0 +1 @@ +empty
\ No newline at end of file diff --git a/CMakeFiles/Progress/7 b/CMakeFiles/Progress/7 new file mode 100644 index 0000000..7b4d68d --- /dev/null +++ b/CMakeFiles/Progress/7 @@ -0,0 +1 @@ +empty
\ No newline at end of file diff --git a/CMakeFiles/Progress/count.txt b/CMakeFiles/Progress/count.txt new file mode 100644 index 0000000..8351c19 --- /dev/null +++ b/CMakeFiles/Progress/count.txt @@ -0,0 +1 @@ +14 diff --git a/CMakeFiles/sdl_test.dir/CXX.includecache b/CMakeFiles/sdl_test.dir/CXX.includecache index 35f1a7b..824f336 100644 --- a/CMakeFiles/sdl_test.dir/CXX.includecache +++ b/CMakeFiles/sdl_test.dir/CXX.includecache @@ -6,6 +6,632 @@ #IncludeRegexTransform: +C:/MinGW_libs/include/SDL2/SDL.h +SDL_main.h +C:/MinGW_libs/include/SDL2/SDL_main.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_assert.h +C:/MinGW_libs/include/SDL2/SDL_assert.h +SDL_atomic.h +C:/MinGW_libs/include/SDL2/SDL_atomic.h +SDL_audio.h +C:/MinGW_libs/include/SDL2/SDL_audio.h +SDL_clipboard.h +C:/MinGW_libs/include/SDL2/SDL_clipboard.h +SDL_cpuinfo.h +C:/MinGW_libs/include/SDL2/SDL_cpuinfo.h +SDL_endian.h +C:/MinGW_libs/include/SDL2/SDL_endian.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +SDL_events.h +C:/MinGW_libs/include/SDL2/SDL_events.h +SDL_filesystem.h +C:/MinGW_libs/include/SDL2/SDL_filesystem.h +SDL_gamecontroller.h +C:/MinGW_libs/include/SDL2/SDL_gamecontroller.h +SDL_haptic.h +C:/MinGW_libs/include/SDL2/SDL_haptic.h +SDL_hints.h +C:/MinGW_libs/include/SDL2/SDL_hints.h +SDL_joystick.h +C:/MinGW_libs/include/SDL2/SDL_joystick.h +SDL_loadso.h +C:/MinGW_libs/include/SDL2/SDL_loadso.h +SDL_log.h +C:/MinGW_libs/include/SDL2/SDL_log.h +SDL_messagebox.h +C:/MinGW_libs/include/SDL2/SDL_messagebox.h +SDL_metal.h +C:/MinGW_libs/include/SDL2/SDL_metal.h +SDL_mutex.h +C:/MinGW_libs/include/SDL2/SDL_mutex.h +SDL_power.h +C:/MinGW_libs/include/SDL2/SDL_power.h +SDL_render.h +C:/MinGW_libs/include/SDL2/SDL_render.h +SDL_rwops.h +C:/MinGW_libs/include/SDL2/SDL_rwops.h +SDL_sensor.h +C:/MinGW_libs/include/SDL2/SDL_sensor.h +SDL_shape.h +C:/MinGW_libs/include/SDL2/SDL_shape.h +SDL_system.h +C:/MinGW_libs/include/SDL2/SDL_system.h +SDL_thread.h +C:/MinGW_libs/include/SDL2/SDL_thread.h +SDL_timer.h +C:/MinGW_libs/include/SDL2/SDL_timer.h +SDL_version.h +C:/MinGW_libs/include/SDL2/SDL_version.h +SDL_video.h +C:/MinGW_libs/include/SDL2/SDL_video.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_assert.h +SDL_config.h +C:/MinGW_libs/include/SDL2/SDL_config.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +signal.h +- +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_atomic.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_platform.h +C:/MinGW_libs/include/SDL2/SDL_platform.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +sys/cpuinline.h +- +mbarrier.h +- +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_audio.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +SDL_endian.h +C:/MinGW_libs/include/SDL2/SDL_endian.h +SDL_mutex.h +C:/MinGW_libs/include/SDL2/SDL_mutex.h +SDL_thread.h +C:/MinGW_libs/include/SDL2/SDL_thread.h +SDL_rwops.h +C:/MinGW_libs/include/SDL2/SDL_rwops.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_blendmode.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_clipboard.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_config.h +SDL_platform.h +C:/MinGW_libs/include/SDL2/SDL_platform.h + +C:/MinGW_libs/include/SDL2/SDL_cpuinfo.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +intrin.h +- +intrin.h +- +altivec.h +- +arm_neon.h +- +armintr.h +- +arm_neon.h +- +arm64intr.h +- +arm64_neon.h +- +mm3dnow.h +- +immintrin.h +- +mmintrin.h +- +xmmintrin.h +- +emmintrin.h +- +pmmintrin.h +- +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_endian.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +endian.h +- +endian.h +- +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_error.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_events.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +SDL_video.h +C:/MinGW_libs/include/SDL2/SDL_video.h +SDL_keyboard.h +C:/MinGW_libs/include/SDL2/SDL_keyboard.h +SDL_mouse.h +C:/MinGW_libs/include/SDL2/SDL_mouse.h +SDL_joystick.h +C:/MinGW_libs/include/SDL2/SDL_joystick.h +SDL_gamecontroller.h +C:/MinGW_libs/include/SDL2/SDL_gamecontroller.h +SDL_quit.h +C:/MinGW_libs/include/SDL2/SDL_quit.h +SDL_gesture.h +C:/MinGW_libs/include/SDL2/SDL_gesture.h +SDL_touch.h +C:/MinGW_libs/include/SDL2/SDL_touch.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_filesystem.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_gamecontroller.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +SDL_rwops.h +C:/MinGW_libs/include/SDL2/SDL_rwops.h +SDL_joystick.h +C:/MinGW_libs/include/SDL2/SDL_joystick.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_gesture.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +SDL_video.h +C:/MinGW_libs/include/SDL2/SDL_video.h +SDL_touch.h +C:/MinGW_libs/include/SDL2/SDL_touch.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_haptic.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +SDL_joystick.h +C:/MinGW_libs/include/SDL2/SDL_joystick.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_hints.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_joystick.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_keyboard.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +SDL_keycode.h +C:/MinGW_libs/include/SDL2/SDL_keycode.h +SDL_video.h +C:/MinGW_libs/include/SDL2/SDL_video.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_keycode.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_scancode.h +C:/MinGW_libs/include/SDL2/SDL_scancode.h + +C:/MinGW_libs/include/SDL2/SDL_loadso.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_log.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_main.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_messagebox.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_video.h +C:/MinGW_libs/include/SDL2/SDL_video.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_metal.h +SDL_video.h +C:/MinGW_libs/include/SDL2/SDL_video.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_mouse.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +SDL_video.h +C:/MinGW_libs/include/SDL2/SDL_video.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_mutex.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_pixels.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_endian.h +C:/MinGW_libs/include/SDL2/SDL_endian.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_platform.h +AvailabilityMacros.h +C:/MinGW_libs/include/SDL2/AvailabilityMacros.h +TargetConditionals.h +C:/MinGW_libs/include/SDL2/TargetConditionals.h +winapifamily.h +- +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_power.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_quit.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h + +C:/MinGW_libs/include/SDL2/SDL_rect.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +SDL_pixels.h +C:/MinGW_libs/include/SDL2/SDL_pixels.h +SDL_rwops.h +C:/MinGW_libs/include/SDL2/SDL_rwops.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_render.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_rect.h +C:/MinGW_libs/include/SDL2/SDL_rect.h +SDL_video.h +C:/MinGW_libs/include/SDL2/SDL_video.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_rwops.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_scancode.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h + +C:/MinGW_libs/include/SDL2/SDL_sensor.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_shape.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_pixels.h +C:/MinGW_libs/include/SDL2/SDL_pixels.h +SDL_rect.h +C:/MinGW_libs/include/SDL2/SDL_rect.h +SDL_surface.h +C:/MinGW_libs/include/SDL2/SDL_surface.h +SDL_video.h +C:/MinGW_libs/include/SDL2/SDL_video.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_config.h +C:/MinGW_libs/include/SDL2/SDL_config.h +sys/types.h +- +stdio.h +- +stdlib.h +- +stddef.h +- +stdarg.h +- +stdlib.h +- +malloc.h +- +stddef.h +- +stdarg.h +- +memory.h +- +string.h +- +strings.h +- +wchar.h +- +inttypes.h +- +stdint.h +- +ctype.h +- +math.h +- +float.h +- +alloca.h +- +malloc.h +- +malloc.h +- +malloc.h +- +stdlib.h +- +sal.h +- +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_surface.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_pixels.h +C:/MinGW_libs/include/SDL2/SDL_pixels.h +SDL_rect.h +C:/MinGW_libs/include/SDL2/SDL_rect.h +SDL_blendmode.h +C:/MinGW_libs/include/SDL2/SDL_blendmode.h +SDL_rwops.h +C:/MinGW_libs/include/SDL2/SDL_rwops.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_system.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_keyboard.h +C:/MinGW_libs/include/SDL2/SDL_keyboard.h +SDL_render.h +C:/MinGW_libs/include/SDL2/SDL_render.h +SDL_video.h +C:/MinGW_libs/include/SDL2/SDL_video.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_thread.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +SDL_atomic.h +C:/MinGW_libs/include/SDL2/SDL_atomic.h +SDL_mutex.h +C:/MinGW_libs/include/SDL2/SDL_mutex.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +process.h +- +process.h +- +stdlib.h +- +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_timer.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_touch.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_error.h +C:/MinGW_libs/include/SDL2/SDL_error.h +SDL_video.h +C:/MinGW_libs/include/SDL2/SDL_video.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_version.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/SDL_video.h +SDL_stdinc.h +C:/MinGW_libs/include/SDL2/SDL_stdinc.h +SDL_pixels.h +C:/MinGW_libs/include/SDL2/SDL_pixels.h +SDL_rect.h +C:/MinGW_libs/include/SDL2/SDL_rect.h +SDL_surface.h +C:/MinGW_libs/include/SDL2/SDL_surface.h +begin_code.h +C:/MinGW_libs/include/SDL2/begin_code.h +close_code.h +C:/MinGW_libs/include/SDL2/close_code.h + +C:/MinGW_libs/include/SDL2/begin_code.h + +C:/MinGW_libs/include/SDL2/close_code.h + +C:/Users/jaksk/Desktop/dev/_cpp/age/commands/commands.h +iostream +- +vector +- +SDL2/SDL.h +- + +C:/Users/jaksk/Desktop/dev/_cpp/age/game/constants.h + C:/Users/jaksk/Desktop/dev/_cpp/age/game/entity.h vector - @@ -16,6 +642,16 @@ iostream ../umath/vec2.h C:/Users/jaksk/Desktop/dev/_cpp/age/umath/vec2.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/ground.cpp +ground.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/ground.h +gst.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/gst.h +iostream +- +algorithm +- + C:/Users/jaksk/Desktop/dev/_cpp/age/game/ground.h entity.h C:/Users/jaksk/Desktop/dev/_cpp/age/game/entity.h @@ -52,12 +688,422 @@ C:/Users/jaksk/Desktop/dev/_cpp/age/game/player.h tech.h C:/Users/jaksk/Desktop/dev/_cpp/age/game/tech.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/load.cpp +iostream +- +fstream +- +vector +- +load.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/load.h +nlohmann/json.hpp +C:/Users/jaksk/Desktop/dev/_cpp/age/game/nlohmann/json.hpp + +C:/Users/jaksk/Desktop/dev/_cpp/age/game/load.h +gst.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/gst.h + +C:/Users/jaksk/Desktop/dev/_cpp/age/game/menu.cpp +iostream +- +menu.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/menu.h + +C:/Users/jaksk/Desktop/dev/_cpp/age/game/menu.h +vector +- +string +- +../umath/vec2.h +C:/Users/jaksk/Desktop/dev/_cpp/age/umath/vec2.h +tech.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/tech.h + +C:/Users/jaksk/Desktop/dev/_cpp/age/game/nlohmann/json.hpp +algorithm +- +cstddef +- +functional +- +initializer_list +- +iosfwd +- +iterator +- +memory +- +numeric +- +string +- +utility +- +vector +- +type_traits +- +utility +- +algorithm +- +array +- +forward_list +- +iterator +- +map +- +string +- +tuple +- +type_traits +- +unordered_map +- +utility +- +valarray +- +exception +- +stdexcept +- +string +- +vector +- +array +- +cstddef +- +cstdint +- +string +- +string +- +utility +- +stdint.h +- +stdint.h +- +cstdlib +- +cassert +- +cstddef +- +cstddef +- +type_traits +- +utility +- +limits +- +type_traits +- +utility +- +tuple +- +iterator +- +type_traits +- +cstdint +- +map +- +memory +- +string +- +vector +- +algorithm +- +iterator +- +string +- +tuple +- +type_traits +- +utility +- +valarray +- +vector +- +cstddef +- +iterator +- +string +- +tuple +- +utility +- +cstdint +- +tuple +- +utility +- +cstdint +- +cstddef +- +functional +- +algorithm +- +array +- +cmath +- +cstddef +- +cstdint +- +cstdio +- +cstring +- +iterator +- +limits +- +string +- +utility +- +vector +- +array +- +cstddef +- +cstring +- +iterator +- +memory +- +numeric +- +string +- +type_traits +- +utility +- +cstdio +- +istream +- +cstddef +- +string +- +utility +- +vector +- +array +- +clocale +- +cstddef +- +cstdio +- +cstdlib +- +initializer_list +- +string +- +utility +- +vector +- +cstdint +- +utility +- +string +- +cmath +- +cstdint +- +functional +- +string +- +utility +- +vector +- +cstddef +- +limits +- +iterator +- +type_traits +- +cstddef +- +iterator +- +utility +- +algorithm +- +cctype +- +limits +- +numeric +- +string +- +utility +- +vector +- +initializer_list +- +utility +- +algorithm +- +array +- +cmath +- +cstdint +- +cstring +- +limits +- +string +- +utility +- +algorithm +- +cstddef +- +iterator +- +memory +- +string +- +vector +- +ios +- +ostream +- +algorithm +- +array +- +clocale +- +cmath +- +cstddef +- +cstdint +- +cstdio +- +limits +- +string +- +type_traits +- +utility +- +array +- +cmath +- +cstdint +- +cstring +- +limits +- +type_traits +- +functional +- +initializer_list +- +iterator +- +memory +- +stdexcept +- +type_traits +- +utility +- +vector +- +string_view +- + C:/Users/jaksk/Desktop/dev/_cpp/age/game/player.h vector - tech.h C:/Users/jaksk/Desktop/dev/_cpp/age/game/tech.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/playercontrol.cpp +iostream +- +string +- +playercontrol.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/playercontrol.h +entity.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/entity.h + +C:/Users/jaksk/Desktop/dev/_cpp/age/game/playercontrol.h +iostream +- +gst.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/gst.h +view.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/view.h +vector +- +functional +- + +C:/Users/jaksk/Desktop/dev/_cpp/age/game/tech.cpp +tech.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/tech.h + C:/Users/jaksk/Desktop/dev/_cpp/age/game/tech.h vector - @@ -65,6 +1111,10 @@ unordered_map - string - +math.h +- +iostream +- ../umath/vec2.h C:/Users/jaksk/Desktop/dev/_cpp/age/umath/vec2.h @@ -76,5 +1126,87 @@ string ../umath/vec2.h C:/Users/jaksk/Desktop/dev/_cpp/age/umath/vec2.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/view.cpp +view.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/view.h + +C:/Users/jaksk/Desktop/dev/_cpp/age/game/view.h +vector +- +functional +- +gst.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/gst.h +menu.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/menu.h + +C:/Users/jaksk/Desktop/dev/_cpp/age/graphics/cam.h +vector +- + +C:/Users/jaksk/Desktop/dev/_cpp/age/graphics/graphics.cpp +algorithm +- +iostream +- +string +- +math.h +- +graphics.h +C:/Users/jaksk/Desktop/dev/_cpp/age/graphics/graphics.h +../game/menu.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/menu.h +../game/tile.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/tile.h +../game/constants.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/constants.h + +C:/Users/jaksk/Desktop/dev/_cpp/age/graphics/graphics.h +vector +- +string +- +SDL2/SDL.h +- +../game/gst.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/gst.h +../game/view.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/view.h +cam.h +C:/Users/jaksk/Desktop/dev/_cpp/age/graphics/cam.h +string +- + +C:/Users/jaksk/Desktop/dev/_cpp/age/main.cpp +iostream +- +vector +- +umath/vec2.h +C:/Users/jaksk/Desktop/dev/_cpp/age/umath/vec2.h +graphics/graphics.h +C:/Users/jaksk/Desktop/dev/_cpp/age/graphics/graphics.h +commands/commands.h +C:/Users/jaksk/Desktop/dev/_cpp/age/commands/commands.h +timing/timing.h +C:/Users/jaksk/Desktop/dev/_cpp/age/timing/timing.h +game/entity.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/entity.h +game/ground.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/ground.h +game/playercontrol.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/playercontrol.h +game/gst.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/gst.h +game/tile.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/tile.h +game/load.h +C:/Users/jaksk/Desktop/dev/_cpp/age/game/load.h + +C:/Users/jaksk/Desktop/dev/_cpp/age/timing/timing.h +SDL2/SDL.h +- + C:/Users/jaksk/Desktop/dev/_cpp/age/umath/vec2.h diff --git a/CMakeFiles/sdl_test.dir/game/ground.cpp.obj b/CMakeFiles/sdl_test.dir/game/ground.cpp.obj Binary files differindex 202faa3..a0f1c78 100644 --- a/CMakeFiles/sdl_test.dir/game/ground.cpp.obj +++ b/CMakeFiles/sdl_test.dir/game/ground.cpp.obj diff --git a/CMakeFiles/sdl_test.dir/game/gst.cpp.obj b/CMakeFiles/sdl_test.dir/game/gst.cpp.obj Binary files differdeleted file mode 100644 index 36785f4..0000000 --- a/CMakeFiles/sdl_test.dir/game/gst.cpp.obj +++ /dev/null diff --git a/CMakeFiles/sdl_test.dir/game/load.cpp.obj b/CMakeFiles/sdl_test.dir/game/load.cpp.obj Binary files differdeleted file mode 100644 index d56f060..0000000 --- a/CMakeFiles/sdl_test.dir/game/load.cpp.obj +++ /dev/null diff --git a/CMakeFiles/sdl_test.dir/game/menu.cpp.obj b/CMakeFiles/sdl_test.dir/game/menu.cpp.obj Binary files differdeleted file mode 100644 index a1d1697..0000000 --- a/CMakeFiles/sdl_test.dir/game/menu.cpp.obj +++ /dev/null diff --git a/CMakeFiles/sdl_test.dir/game/playercontrol.cpp.obj b/CMakeFiles/sdl_test.dir/game/playercontrol.cpp.obj Binary files differdeleted file mode 100644 index 052b295..0000000 --- a/CMakeFiles/sdl_test.dir/game/playercontrol.cpp.obj +++ /dev/null diff --git a/CMakeFiles/sdl_test.dir/game/tech.cpp.obj b/CMakeFiles/sdl_test.dir/game/tech.cpp.obj Binary files differdeleted file mode 100644 index 88191d8..0000000 --- a/CMakeFiles/sdl_test.dir/game/tech.cpp.obj +++ /dev/null diff --git a/CMakeFiles/sdl_test.dir/game/view.cpp.obj b/CMakeFiles/sdl_test.dir/game/view.cpp.obj Binary files differdeleted file mode 100644 index 16d37bd..0000000 --- a/CMakeFiles/sdl_test.dir/game/view.cpp.obj +++ /dev/null diff --git a/CMakeFiles/sdl_test.dir/graphics/graphics.cpp.obj b/CMakeFiles/sdl_test.dir/graphics/graphics.cpp.obj Binary files differindex 897dbd3..835676b 100644 --- a/CMakeFiles/sdl_test.dir/graphics/graphics.cpp.obj +++ b/CMakeFiles/sdl_test.dir/graphics/graphics.cpp.obj diff --git a/CMakeFiles/sdl_test.dir/main.cpp.obj b/CMakeFiles/sdl_test.dir/main.cpp.obj Binary files differindex c12da38..dd0521f 100644 --- a/CMakeFiles/sdl_test.dir/main.cpp.obj +++ b/CMakeFiles/sdl_test.dir/main.cpp.obj diff --git a/CMakeFiles/sdl_test.dir/objects.a b/CMakeFiles/sdl_test.dir/objects.a Binary files differindex 696878e..3cbf252 100644 --- a/CMakeFiles/sdl_test.dir/objects.a +++ b/CMakeFiles/sdl_test.dir/objects.a diff --git a/build/content/entities.json b/build/content/entities.json index 99746a0..45d9b78 100644 --- a/build/content/entities.json +++ b/build/content/entities.json @@ -43,7 +43,7 @@ "move" : 0, "attack": 0, "defence": 300, "range": 0, "sight": 7, "spritebounds": [ 592, 16 ], - "train_class": [ "inf" ], + "train_id": [ 1, 6, 7, 10, 11, 27, 28, 40 ], "prod": [ 0, 0 ], "cost": [ 360, 240 ], "adjacent": [ 100 ], @@ -54,7 +54,7 @@ "move" : 0, "attack": 0, "defence": 300, "range": 0, "sight": 7, "spritebounds": [ 608, 32 ], - "train_class": [ "ran" ], + "train_id": [ 3, 4, 13, 14, 15, 24, 29, 30, 31, 32, 39 ], "prod": [ 0, 0 ], "cost": [ 360, 240 ], "adjacent": [ 100 ], @@ -86,7 +86,7 @@ "move" : 0, "attack": 0, "defence": 300, "range": 0, "sight": 7, "spritebounds": [ 656, 16 ], - "train_class": [ "cav" ], + "train_id": [ 2, 5, 8, 9, 33, 34, 41 ], "prod": [ 0, 0 ], "cost": [ 360, 240 ], "adjacent": [ 100 ], @@ -97,7 +97,7 @@ "move" : 0, "attack": 0, "defence": 300, "range": 0, "sight": 7, "spritebounds": [ 672, 48 ], - "train_class": [ "sie" ], + "train_id": [ 20, 21, 22, 38, 42, 43 ], "prod": [ 0, 0 ], "cost": [ 450, 300 ], "adjacent": [ 100 ], @@ -108,7 +108,7 @@ "move" : 0, "attack": 0, "defence": 300, "range": 0, "sight": 7, "spritebounds": [ 688, 48 ], - "train_id": [ 23 ], + "train_id": [ 23, 44 ], "prod": [ 0, 0 ], "cost": [ 360, 240 ], "adjacent": [ 100 ], @@ -132,17 +132,17 @@ "prod": [ 0, 0 ], "cost": [ 360, 240 ], "diagonal": [ 100 ], - "defence_bonus": 0.4 + "defence_bonus": 0.4, + "defence_bonus_adj": 0.25 },{ "name": "Castle", "id": 113, "unit": 0, "class": "bld", "level": 2, "move" : 0, "attack": 0, "defence": 300, "range": 0, "sight": 7, "spritebounds": [ 720, 48 ], - "train_class": [ "inf" ], + "train_id": [ 10, 27, 37 ], "prod": [ 0, 0 ], "cost": [ 900, 600 ], - "diagonal": [ 100 ], "defence_bonus": 0.4 },{ "name": "Villager", @@ -221,7 +221,8 @@ "range": 1, "sight": 7, "spritebounds": [ 128, 48 ], "cost": [ 190, 45 ], - "abilities": [ "Plains Charge" ] + "abilities": [ "Plains Charge" ], + "upgrade": 33 },{ "name": "Camels", "id": 9, "unit": 1, "class": "cav", "level": 2, @@ -229,14 +230,16 @@ "range": 1, "sight": 7, "spritebounds": [ 192, 48 ], "cost": [ 200, 50 ], - "abilities": [ "Desert Charge", "Scares Horses" ] + "abilities": [ "Desert Charge", "Scares Horses" ], + "upgrade": 34 },{ "name": "Longswordmen", "id": 10, "unit": 1, "class": "inf", "level": 2, "move" : 7, "attack": 200, "defence": 200, "range": 1, "sight": 7, "spritebounds": [ 112, 48 ], - "cost": [ 130, 45 ] + "cost": [ 130, 45 ], + "upgrade": 27 },{ "name": "Pikemen", "id": 11, "unit": 1, "class": "inf", "level": 2, @@ -244,7 +247,8 @@ "range": 1, "sight": 7, "spritebounds": [ 144, 48 ], "cost": [ 160, 55 ], - "abilities": [ "Anti-Cavalry" ] + "abilities": [ "Anti-Cavalry" ], + "upgrade": 28 },{ "name": "Viking Berserkers", "id": 12, "unit": 1, "class": "inf", "level": 2, @@ -252,7 +256,8 @@ "range": 1, "sight": 7, "spritebounds": [ 208, 48 ], "cost": [ 170, 55 ], - "abilities": [ "Frenzy" ] + "abilities": [ "Frenzy" ], + "upgrade": 35 },{ "name": "Crossbowmen", "id": 13, "unit": 1, "class": "ran", "level": 2, @@ -260,7 +265,8 @@ "range": 3, "sight": 7, "spritebounds": [ 224, 48 ], "cost": [ 125, 50 ], - "abilities": [ "No Move & Attack" ] + "abilities": [ "No Move & Attack" ], + "upgrade": 30 },{ "name": "Elite Skirmishers", "id": 14, "unit": 1, "class": "ran", "level": 2, @@ -268,22 +274,25 @@ "range": 2, "sight": 7, "spritebounds": [ 176, 48 ], "cost": [ 125, 50 ], - "abilities": [ "Skirmish" ] + "abilities": [ "Skirmish" ], + "upgrade": 31 },{ "name": "Horse Archers", "id": 15, "unit": 1, "class": "ran", "level": 2, "move" : 10, "attack": 150, "defence": 150, "range": 2, "sight": 7, "spritebounds": [ 240, 48 ], - "cost": [ 125, 50 ] + "cost": [ 125, 50 ], + "upgrade": 32 },{ - "name": "Throwing Axmen", + "name": "Throwing Axemen", "id": 16, "unit": 1, "class": "inf", "level": 2, "move" : 7, "attack": 225, "defence": 250, "range": 1, "sight": 7, "spritebounds": [ 256, 48 ], "cost": [ 125, 50 ], - "abilities": [ "Skirmish", "Woodsman" ] + "abilities": [ "Skirmish", "Woodsman" ], + "upgrade": 49 },{ "name": "Persian War Elephants", "id": 17, "unit": 1, "class": "cav", "level": 2, @@ -291,7 +300,8 @@ "range": 1, "sight": 7, "spritebounds": [ 272, 48 ], "cost": [ 210, 55 ], - "abilities": [ "Causes Fear" ] + "abilities": [ "Causes Fear" ], + "upgrade": 47 },{ "name": "Celtic Woad Raiders", "id": 18, "unit": 1, "class": "inf", "level": 2, @@ -299,7 +309,8 @@ "range": 1, "sight": 7, "spritebounds": [ 288, 48 ], "cost": [ 200, 65 ], - "abilities": [ "Causes Fear" ] + "abilities": [ "Causes Fear" ], + "upgrade": 36 },{ "name": "Knights Templar", "id": 19, "unit": 1, "class": "cav", "level": 2, @@ -307,7 +318,8 @@ "range": 1, "sight": 7, "spritebounds": [ 304, 48 ], "cost": [ 215, 55 ], - "abilities": [ "Plains Charge", "Zeal" ] + "abilities": [ "Plains Charge", "Zeal" ], + "upgrade": 45 },{ "name": "Scorpions", "id": 20, "unit": 1, "class": "sie", "level": 2, @@ -315,7 +327,8 @@ "range": 3, "sight": 7, "spritebounds": [ 320, 48 ], "cost": [ 65, 190 ], - "abilities": [ "Units Only", "No Counter", "No Move & Attack" ] + "abilities": [ "Units Only", "No Counter", "No Move & Attack" ], + "upgrade": 42 },{ "name": "Battering Rams", "id": 21, "unit": 1, "class": "sie", "level": 2, @@ -323,7 +336,8 @@ "range": 1, "sight": 7, "spritebounds": [ 336, 48 ], "cost": [ 50, 155 ], - "abilities": [ "Buildings Only", "No Counter" ] + "abilities": [ "Buildings Only", "No Counter" ], + "upgrade": 43 },{ "name": "Onagers", "id": 22, "unit": 1, "class": "sie", "level": 2, @@ -335,17 +349,223 @@ },{ "name": "Monks", "id": 23, "unit": 1, "class": "inf", "level": 2, - "move" : 7, "attack": 50, "defence": 200, + "move" : 9, "attack": 50, "defence": 150, "range": 1, "sight": 7, "spritebounds": [ 368, 48 ], "cost": [ 50, 155 ], - "abilities": [ "Heal", "Convert" ] + "abilities": [ "Heal", "Convert" ], + "upgrade": 44 },{ "name": "Archers", "id": 24, "unit": 1, "class": "ran", "level": 2, "move" : 7, "attack": 150, "defence": 100, "range": 3, "sight": 7, "spritebounds": [ 160, 32 ], - "cost": [ 125, 50 ] + "cost": [ 105, 45 ], + "upgrade": 29 + },{ + "name": "Turkish Janissaries", + "id": 25, "unit": 1, "class": "ran", "level": 2, + "move" : 7, "attack": 250, "defence": 175, + "range": 3, "sight": 7, + "spritebounds": [ 432, 48 ], + "cost": [ 145, 60 ], + "abilities": [ "No Move & Attack" ], + "upgrade": 46 + },{ + "name": "Chinese Chu Ko Nu", + "id": 26, "unit": 1, "class": "ran", "level": 2, + "move" : 7, "attack": 150, "defence": 150, + "range": 3, "sight": 7, + "spritebounds": [ 384, 48 ], + "cost": [ 125, 55 ], + "abilities": [ "No Move & Attack", "Rapid Fire" ], + "upgrade": 48 + },{ + "name": "Two Handed Swordsman", + "id": 27, "unit": 1, "class": "inf", "level": 3, + "move" : 7, "attack": 250, "defence": 250, + "range": 1, "sight": 7, + "spritebounds": [ 112, 64 ], + "cost": [ 190, 65 ] + },{ + "name": "Halberdier", + "id": 28, "unit": 1, "class": "inf", "level": 3, + "move" : 7, "attack": 200, "defence": 250, + "range": 1, "sight": 7, + "spritebounds": [ 144, 64 ], + "cost": [ 230, 75 ], + "abilities": [ "Anti-Cavalry" ] + },{ + "name": "Elite Archers", + "id": 29, "unit": 1, "class": "ran", "level": 3, + "move" : 7, "attack": 200, "defence": 200, + "range": 3, "sight": 7, + "spritebounds": [ 160, 64 ], + "cost": [ 205, 90 ] + },{ + "name": "Arbalests", + "id": 30, "unit": 1, "class": "ran", "level": 3, + "move" : 7, "attack": 250, "defence": 225, + "range": 3, "sight": 7, + "spritebounds": [ 224, 64 ], + "cost": [ 180, 75 ], + "abilities": [ "No Move & Attack" ] + },{ + "name": "Expert Skirmishers", + "id": 31, "unit": 1, "class": "ran", "level": 3, + "move" : 7, "attack": 190, "defence": 190, + "range": 2, "sight": 7, + "spritebounds": [ 176, 64 ], + "cost": [ 160, 70 ], + "abilities": [ "Skirmish" ] + },{ + "name": "Heavy Horse Archers", + "id": 32, "unit": 1, "class": "ran", "level": 3, + "move" : 10, "attack": 200, "defence": 200, + "range": 2, "sight": 7, + "spritebounds": [ 240, 64 ], + "cost": [ 180, 75 ] + },{ + "name": "Cavaliers", + "id": 33, "unit": 1, "class": "cav", "level": 3, + "move" : 10, "attack": 250, "defence": 250, + "range": 1, "sight": 7, + "spritebounds": [ 128, 64 ], + "cost": [ 260, 65 ] + },{ + "name": "Heavy Camels", + "id": 34, "unit": 1, "class": "cav", "level": 3, + "move" : 10, "attack": 250, "defence": 250, + "range": 1, "sight": 7, + "spritebounds": [ 192, 64 ], + "cost": [ 275, 70 ], + "abilities": [ "Desert Charge", "Scares Horses" ] + },{ + "name": "Elite Berserkers", + "id": 35, "unit": 1, "class": "inf", "level": 3, + "move" : 7, "attack": 250, "defence": 250, + "range": 1, "sight": 7, + "spritebounds": [ 208, 64 ], + "cost": [ 235, 80 ], + "abilities": [ "Frenzy" ] + },{ + "name": "Elite Woad Raiders", + "id": 36, "unit": 1, "class": "inf", "level": 3, + "move" : 7, "attack": 250, "defence": 250, + "range": 1, "sight": 7, + "spritebounds": [ 288, 64 ], + "cost": [ 270, 90 ], + "abilities": [ "Causes Fear" ] + },{ + "name": "Trebuchets", + "id": 37, "unit": 1, "class": "sie", "level": 3, + "move" : 7, "attack": 375, "defence": 350, + "range": 3, "sight": 7, + "spritebounds": [ 400, 64 ], + "cost": [ 90, 270 ], + "abilities": [ "Min Range 2", "No Counter", "No Move & Attack" ], + "req_tech": [ 55 ] + },{ + "name": "Bombard Cannons", + "id": 38, "unit": 1, "class": "sie", "level": 3, + "move" : 7, "attack": 325, "defence": 325, + "range": 3, "sight": 7, + "spritebounds": [ 448, 64 ], + "cost": [ 85, 250 ], + "abilities": [ "No Counter", "No Move & Attack" ], + "req_tech": [ 57 ] + },{ + "name": "Hand Cannoneers", + "id": 39, "unit": 1, "class": "ran", "level": 3, + "move" : 7, "attack": 300, "defence": 225, + "range": 3, "sight": 7, + "spritebounds": [ 416, 64 ], + "cost": [ 205, 90 ], + "abilities": [ "No Move & Attack" ], + "req_tech": [ 57 ] + },{ + "name": "Champions", + "id": 40, "unit": 1, "class": "inf", "level": 3, + "move" : 7, "attack": 300, "defence": 300, + "range": 1, "sight": 7, + "spritebounds": [ 250, 85 ], + "cost": [ 250, 85 ], + "req_tech": [ 43 ] + },{ + "name": "Paladins", + "id": 41, "unit": 1, "class": "cav", "level": 3, + "move" : 7, "attack": 300, "defence": 300, + "range": 1, "sight": 7, + "spritebounds": [ 128, 80 ], + "cost": [ 330, 80 ], + "abilities": [ "Plains Charge" ], + "req_tech": [ 44 ] + },{ + "name": "Heavy Scorpions", + "id": 42, "unit": 1, "class": "sie", "level": 3, + "move" : 7, "attack": 400, "defence": 300, + "range": 3, "sight": 7, + "spritebounds": [ 320, 64 ], + "cost": [ 95, 265 ], + "abilities": [ "Units Only", "No Counter", "No Move & Attack" ], + "req_tech": [ 55 ] + },{ + "name": "Siege Rams", + "id": 43, "unit": 1, "class": "sie", "level": 3, + "move" : 7, "attack": 500, "defence": 375, + "range": 1, "sight": 7, + "spritebounds": [ 336, 64 ], + "cost": [ 85, 245 ], + "abilities": [ "Buildings Only", "No Counter" ], + "req_tech": [ 55 ] + },{ + "name": "Elite Monks", + "id": 44, "unit": 1, "class": "inf", "level": 3, + "move" : 9, "attack": 50, "defence": 200, + "range": 1, "sight": 7, + "spritebounds": [ 368, 64 ], + "cost": [ 75, 220 ], + "abilities": [ "Heal", "Convert" ] + },{ + "name": "Elite Knights Templar", + "id": 45, "unit": 1, "class": "cav", "level": 3, + "move" : 10, "attack": 250, "defence": 250, + "range": 1, "sight": 7, + "spritebounds": [ 304, 64 ], + "cost": [ 300, 75 ], + "abilities": [ "Plains Charge", "Zeal" ] + },{ + "name": "Elite Janissaries", + "id": 46, "unit": 1, "class": "ran", "level": 3, + "move" : 7, "attack": 300, "defence": 225, + "range": 3, "sight": 7, + "spritebounds": [ 432, 64 ], + "cost": [ 205, 90 ], + "abilities": [ "No Move & Attack" ] + },{ + "name": "Elite War Elephants", + "id": 47, "unit": 1, "class": "cav", "level": 3, + "move" : 7, "attack": 250, "defence": 300, + "range": 1, "sight": 7, + "spritebounds": [ 272, 64 ], + "cost": [ 290, 75 ], + "abilities": [ "Causes Fear" ] + },{ + "name": "Elite Chu Ko Nu", + "id": 48, "unit": 1, "class": "ran", "level": 3, + "move" : 7, "attack": 200, "defence": 200, + "range": 3, "sight": 7, + "spritebounds": [ 272, 64 ], + "cost": [ 180, 75 ], + "abilities": [ "No Move & Attack", "Rapid Fire" ] + },{ + "name": "Elite Throwing Axemen", + "id": 49, "unit": 1, "class": "inf", "level": 3, + "move" : 7, "attack": 275, "defence": 300, + "range": 1, "sight": 7, + "spritebounds": [ 256, 64 ], + "cost": [ 295, 95 ], + "abilities": [ "Skirmish", "Woodsman" ] } ]
\ No newline at end of file diff --git a/build/content/raw_ents.json b/build/content/raw_ents.json index c9940c9..9d513ba 100644 --- a/build/content/raw_ents.json +++ b/build/content/raw_ents.json @@ -349,7 +349,7 @@ Unit name: Trebuchets Unit type: Siege Bonuses: 50% vs. Building Move: 7 -Attack: 370 +Attack: 375 Defense: 350 Sight: 7 Range: 3 diff --git a/build/content/sprites.bmp b/build/content/sprites.bmp Binary files differindex ec68561..0dda198 100644 --- a/build/content/sprites.bmp +++ b/build/content/sprites.bmp diff --git a/build/content/techs.json b/build/content/techs.json index 37e066b..871b5e2 100644 --- a/build/content/techs.json +++ b/build/content/techs.json @@ -52,7 +52,6 @@ "name": "Horse Collar", "id": 7, "level": 1, "cost": [ 95, 280 ], "req_id": 101, "bonus": { - "aff_all": 1, "prod": [ 0.15, 0 ] } },{ @@ -106,21 +105,18 @@ "name": "Cartography", "id": 14, "level": 1, "cost": [ 95, 280 ], "req_id": 107, "bonus": { - "aff_all": 1, "sight": 1 } },{ "name": "Trading", "id": 15, "level": 1, "cost": [ 95, 280 ], "req_id": 107, "bonus": { - "aff_all": 1, "trade": 1 } },{ "name": "Coniage", "id": 16, "level": 1, "cost": [ 125, 375 ], "req_id": 107, "bonus": { - "aff_all": 1, "prod": [ 0, 0.1 ] } },{ @@ -148,7 +144,6 @@ "name": "Heavy Plow", "id": 20, "level": 2, "cost": [ 150, 450 ], "req_id": 101, "bonus": { - "aff_all": 1, "prod": [ 0.1, 0 ] } },{ @@ -223,7 +218,6 @@ "name": "Banking", "id": 30, "level": 2, "cost": [ 200, 600 ], "req_id": 107, "bonus": { - "aff_all": 1, "trade": 1, "prod": [ 0, 0.05 ] } @@ -269,7 +263,6 @@ "name": "Crop Rotation", "id": 37, "level": 3, "cost": [ 250, 750 ], "req_id": 101, "bonus": { - "aff_all": 1, "prod": [ 0.1, 0 ] } },{ @@ -338,7 +331,6 @@ "name": "Guilds", "id": 49, "level": 3, "cost": [ 250, 750 ], "req_id": 107, "bonus": { - "aff_all": 1, "trade": 1, "prod": [ 0, 0.05 ] } diff --git a/build/sdl_test.exe b/build/sdl_test.exe Binary files differindex efe1996..937671d 100644 --- a/build/sdl_test.exe +++ b/build/sdl_test.exe diff --git a/game/entity.h b/game/entity.h index 8f61cee..62e352e 100644 --- a/game/entity.h +++ b/game/entity.h @@ -37,6 +37,7 @@ class EntityInfo { std::vector<float> cost { 0, 0 }; std::vector<int> adjacent; + std::vector<int> diagonal; float defence_bonus { 0 }; int upgrade { -1 }; diff --git a/game/ground.cpp b/game/ground.cpp index 4308047..1cadd9b 100644 --- a/game/ground.cpp +++ b/game/ground.cpp @@ -98,9 +98,37 @@ std::vector<int> Ground::attack_targets (Gst &gst, Entity &ent) { for (Entity &e : gst.entities) { if (!units && e.info->unit == 1) continue; if (!builds && e.info->unit == 0) continue; - if (e.owner != ent.owner && abs(e.x-ent.x)+abs(e.y-ent.y) <= range) { + int dist = abs(e.x-ent.x)+abs(e.y-ent.y); + if (dist > 0 && e.owner != ent.owner && dist <= range) { attacks.push_back(at(e.x, e.y)); } } return attacks; +} + +std::vector<int> Ground::heal_targets (Gst &gst, Entity &ent) { + std::vector<int> heals; + int range = gst.get_range(ent); + for (Entity &e : gst.entities) { + if (e.info->unit == 0) continue; + if (e.info->ent_class == EntityInfo::Class::sie) continue; + int dist = abs(e.x-ent.x)+abs(e.y-ent.y); + if (dist > 0 && e.owner == ent.owner && dist <= range) { + heals.push_back(at(e.x, e.y)); + } + } + return heals; +} + +std::vector<int> Ground::convert_targets (Gst &gst, Entity &ent) { + std::vector<int> converts; + int range = gst.get_range(ent); + for (Entity &e : gst.entities) { + if (e.info->unit == 0) continue; + int dist = abs(e.x-ent.x)+abs(e.y-ent.y); + if (dist > 0 && e.owner != ent.owner && dist <= range) { + converts.push_back(at(e.x, e.y)); + } + } + return converts; }
\ No newline at end of file diff --git a/game/ground.h b/game/ground.h index c9f997b..ab8f0e8 100644 --- a/game/ground.h +++ b/game/ground.h @@ -29,6 +29,8 @@ class Ground { std::vector<int> star (int pos); std::vector<int> move_area (Gst &gst, Entity &ent); std::vector<int> attack_targets (Gst &gst, Entity &ent); + std::vector<int> heal_targets (Gst &gst, Entity &ent); + std::vector<int> convert_targets (Gst &gst, Entity &ent); }; #endif
\ No newline at end of file diff --git a/game/gst.cpp b/game/gst.cpp index 3c0c1de..886dcc7 100644 --- a/game/gst.cpp +++ b/game/gst.cpp @@ -43,6 +43,8 @@ Entity& Gst::get_at (int x, int y) { std::vector<float> Gst::get_cost (EntityInfo *info, Player &player) { std::vector<float> cost = info->cost; + + std::cout << "cost : " << player.tech_lookup.id(info->id).cost[0] << " " << player.tech_lookup.id(info->id).cost[1] << "\n"; for (int i=0; i<info->cost.size(); i++) { cost[i] *= 1+player.tech_lookup.id(info->id).cost[i]; cost[i] += player.tech_lookup.id(info->id).cost_abs[i]; @@ -289,6 +291,29 @@ int Gst::get_range (Entity &ent) { return range; } + +void Gst::heal (Entity &atk, Entity &def) { + Player &player = get_player(atk.owner); + float amt = 20; + if (atk.info->level == 3) { amt += 10; } // improved heal + if (player.has_tech(52)) { amt += 10; } // tech illumination + def.hp = clamp_hp(def.hp + amt); +} + +void Gst::convert (Entity &atk, Entity &def) { + Player &player = get_player(atk.owner); + float amt = 0.20f; + if (player.has_tech(53)) { amt += 0.10f; } // tech faith + // caution, randomness + std::uniform_real_distribution<float> odds(0, 1); + float value = odds(engine); + std::cout << value << " / " << amt << " odds\n"; + if (value < amt) { + def.owner = atk.owner; + } +} + + std::vector<int> Gst::get_possible_trains (Entity &ent) { Player &player = get_player(ent.owner); auto &cls = ent.info->train_class; @@ -309,13 +334,14 @@ std::vector<int> Gst::get_possible_trains (Entity &ent) { for (int i=0; i<3; i++) trains.push_back(candidates[i]); return trains; } - + for (int id : ent.info->train_id) { - if (get_info(id)->level > player.level) { - trains.push_back(id); - } + auto info = get_info(id); + if (info->level > player.level) continue; + if (info->level < player.level && info->upgrade != -1) continue; + trains.push_back(id); } - + /* // get all train class ids, highest upgrade level for (EntityInfo &info : infos) { if (info.id == 0) continue; // villager only in train_id @@ -323,12 +349,12 @@ std::vector<int> Gst::get_possible_trains (Entity &ent) { if (info.level < player.level && info.upgrade != -1) continue; if (std::find(cls.begin(), cls.end(), info.ent_class) != cls.end()) { if (std::find(trains.begin(), trains.end(), info.id) - == trains.end()) + != trains.end()) { trains.push_back(info.id); } } - } + }*/ return trains; } @@ -358,6 +384,19 @@ bool Gst::check_req_build(Entity &ent, EntityInfo *info) { } if (!adj) return false; } + for (int id : info->diagonal) { + bool diag = false; + for (Entity &e : entities) { + if (e.info->id == id && ent.owner == e.owner) { + int dx = abs(e.x-ent.x), dy = abs(e.y-ent.y); + int dist = dx + dy; + if (dx == 1 && dy == 1) { + diag = true; + } + } + } + if (!diag) return false; + } if (info->id == 100) { for (Resource &r : ground.resources) { if (r.pos == ground.at(ent.x, ent.y)) { @@ -511,8 +550,10 @@ void Gst::update_tech_lookup (Player &player) { for (int i : player.techs) { Tech *tech = get_tech(i); std::vector<int> ids { }; + bool noaff = true; if (tech->bonus.aff_id.size() > 0) { ids = tech->bonus.aff_id; + noaff = false; } else { if (tech->bonus.aff_level != -1) { for (EntityInfo info : infos) { @@ -520,6 +561,7 @@ void Gst::update_tech_lookup (Player &player) { ids.push_back(info.id); } } + noaff = false; } if (tech->bonus.aff_class.size() > 0) { for (EntityInfo info : infos) { @@ -530,13 +572,10 @@ void Gst::update_tech_lookup (Player &player) { ids.push_back(info.id); } } - } - if (tech->bonus.aff_all == 1) { - for (EntityInfo info : infos) { - ids.push_back(info.id); - } + noaff = false; } } + if (noaff) { for (auto info : infos) ids.push_back(info.id); } for (int id : ids) { player.tech_lookup.map_id[id] = player.tech_lookup.map_id[id] + tech->bonus; @@ -46,20 +46,32 @@ class BattleResult { float atk_hp, def_hp; }; -class Gst { - private: std::default_random_engine engine = std::default_random_engine{}; +class Inv { public: - Gst(int sx, int sy) : ground(sx, sy) { } + Inv () {} std::vector<Tech> techs; std::vector<Ability> abilities; std::vector<EntityInfo> infos; std::vector<Tile> tiles; - std::vector<Entity> entities; Ground ground; + private: + std::default_random_engine engine = std::default_random_engine{}; +} + +class Gst { + public: + Gst() { } + + Inv *inv; + + std::vector<Entity> entities; std::vector<Player> players; + int turn { 0 }; + int day { 0 }; + Player& get_player (int id); Tech* get_tech (int id); EntityInfo* get_info (std::string name); @@ -76,11 +88,15 @@ class Gst { float get_damage (Entity &atk, Entity &def, float atk_hp); bool get_first_strike (Entity &atk, Entity &def); BattleResult battle_res (Entity &atk, Entity &def); - void battle (Entity &atk, Entity &def); void clear_dead(); int get_range(Entity &ent); - std::vector<int> get_possible_trains (Entity &ent); + void battle (Entity &atk, Entity &def); + + void heal (Entity &atk, Entity &def); + void convert (Entity &atk, Entity &def); + + std::vector<int> get_possible_trains (Entity &ent); std::vector<int> get_possible_builds (Entity &ent); bool check_req_build (Entity &ent, EntityInfo *info); @@ -88,9 +104,6 @@ class Gst { bool check_req_level (Player &player); bool check_obstructed (Entity &ent); - int turn { 0 }; - int day { 0 }; - void end_day (); void level_upgrade (Player &player); diff --git a/game/load.cpp b/game/load.cpp index 16f0911..4b58ff0 100644 --- a/game/load.cpp +++ b/game/load.cpp @@ -79,6 +79,9 @@ void load_json (Gst &gst) { for (auto ad : it["adjacent"]) { ent.adjacent.push_back(ad); } + for (auto ad : it["diagonal"]) { + ent.diagonal.push_back(ad); + } ent.ent_class = (EntityInfo::Class) EntityClass::from_string( it["class"].get<std::string>()); for (auto ab : it["abilities"]) { @@ -118,13 +121,16 @@ void load_json (Gst &gst) { tech.bonus.req_range = b["req_range"]; } if (b.contains("improved_heal")) { - tech.bonus.attack = b["improved_heal"]; + tech.bonus.improved_heal = b["improved_heal"]; } if (b.contains("improved_convert")) { - tech.bonus.attack = b["improved_convert"]; + tech.bonus.improved_convert = b["improved_convert"]; } + if (b.contains("cost")) tech.bonus.cost.clear(); for (auto v : b["cost"]) { tech.bonus.cost.push_back(v); } + if (b.contains("cost_abs")) tech.bonus.cost_abs.clear(); for (auto v : b["cost_abs"]) { tech.bonus.cost_abs.push_back(v); } + if (b.contains("prod")) tech.bonus.prod.clear(); for (auto v : b["prod"]) { tech.bonus.prod.push_back(v); } for (auto v : b["aff_id"]) { tech.bonus.aff_id.push_back(v); } @@ -139,6 +145,8 @@ void load_json (Gst &gst) { tech.bonus.aff_all = b["aff_all"]; } } + + std::cout << tech.id << tech.bonus.to_string() << std::endl; gst.techs.push_back(tech); } }
\ No newline at end of file diff --git a/game/menu.h b/game/menu.h index 3da0c46..41348a7 100644 --- a/game/menu.h +++ b/game/menu.h @@ -35,7 +35,7 @@ class Menu_unit : public Menu { Menu_unit () {} enum Opts { - move, attack, done, build, train, trade, age_up + move, attack, done, build, train, trade, age_up, heal, convert }; }; diff --git a/game/playercontrol.cpp b/game/playercontrol.cpp index 23c9f3e..2aa9264 100644 --- a/game/playercontrol.cpp +++ b/game/playercontrol.cpp @@ -28,6 +28,18 @@ void open_unit_menu (Gst &gst, View &view, Fsm &fsm, int p) { view.menu_unit.options.emplace_back("Build", Menu_unit::Opts::build); } + if (gst.ground.heal_targets(gst, ent).size() > 0 + && (gst.info_has_ability(ent.info, "Heal"))) + { + view.menu_unit.options.emplace_back("Heal", + Menu_unit::Opts::heal); + } + if (gst.ground.convert_targets(gst, ent).size() > 0 + && (gst.info_has_ability(ent.info, "Convert"))) + { + view.menu_unit.options.emplace_back("Convert", + Menu_unit::Opts::convert); + } view.menu_unit.options.emplace_back("Done", Menu_unit::Opts::done); } else { @@ -358,6 +370,60 @@ Player_control::Player_control () { } ); fsm.arcs.emplace_back( + menu_unit, opt, Menu_unit::Opts::heal, + [](Gst &gst, View &view, Fsm &fsm, int p) { + Player &player = gst.players[gst.turn]; + view.menu_unit.close(); + Entity &ent = gst.entities[view.selected_entity]; + view.heals = gst.ground.heal_targets(gst, ent); + std::cout << "heal targeting " << p << "\n"; + return target_heal; + } + ); + fsm.arcs.emplace_back( + target_heal, sel_ground, -1, + [](Gst &gst, View &view, Fsm &fsm, int p) { + std::cout << "healed " << p << "\n"; + Entity &atk = gst.entities[view.selected_entity]; + int x = view.cursor_ground % gst.ground.sizex; + int y = view.cursor_ground / gst.ground.sizex; + std::cout << "selg " << x << " " << y << "\n"; + Entity &def = gst.get_at(x, y); + atk.done = true; + gst.heal(atk, def); + view.heals.clear(); + view.selected_entity = -1; + return select; + } + ); + fsm.arcs.emplace_back( + menu_unit, opt, Menu_unit::Opts::convert, + [](Gst &gst, View &view, Fsm &fsm, int p) { + Player &player = gst.players[gst.turn]; + view.menu_unit.close(); + Entity &ent = gst.entities[view.selected_entity]; + view.converts = gst.ground.convert_targets(gst, ent); + std::cout << "convert targeting " << p << "\n"; + return target_convert; + } + ); + fsm.arcs.emplace_back( + target_convert, sel_ground, -1, + [](Gst &gst, View &view, Fsm &fsm, int p) { + std::cout << "converted " << p << "\n"; + Entity &atk = gst.entities[view.selected_entity]; + int x = view.cursor_ground % gst.ground.sizex; + int y = view.cursor_ground / gst.ground.sizex; + std::cout << "selg " << x << " " << y << "\n"; + Entity &def = gst.get_at(x, y); + atk.done = true; + gst.convert(atk, def); + view.converts.clear(); + view.selected_entity = -1; + return select; + } + ); + fsm.arcs.emplace_back( menu_unit, opt, Menu_unit::Opts::done, [](Gst &gst, View &view, Fsm &fsm, int p) { view.menu_unit.close(); diff --git a/game/playercontrol.h b/game/playercontrol.h index 6d12026..c0075d4 100644 --- a/game/playercontrol.h +++ b/game/playercontrol.h @@ -27,6 +27,7 @@ enum pc_state { target_build, merge_target, target_heal, + target_convert, menu_power, target_power, menu_unit, diff --git a/game/tech.cpp b/game/tech.cpp index c556dfe..848b211 100644 --- a/game/tech.cpp +++ b/game/tech.cpp @@ -1 +1 @@ -#include "tech.h"
\ No newline at end of file +#include "tech.h" diff --git a/game/tech.h b/game/tech.h index cb5e769..b22b173 100644 --- a/game/tech.h +++ b/game/tech.h @@ -5,6 +5,10 @@ #include <unordered_map> #include <string> +#include <math.h> + +#include <iostream> + #include "../umath/vec2.h" class TechBonus { @@ -17,14 +21,14 @@ class TechBonus { std::vector<float> cost { 0, 0 }; std::vector<float> cost_abs { 0, 0 }; std::vector<float> prod { 0, 0 }; - int trade; - int improved_heal; - int improved_convert; + int trade { 0 } ; + int improved_heal { 0 }; + int improved_convert { 0 }; int req_range { 999 }; std::vector<int> aff_id; std::vector<int> aff_class; - int aff_level; + int aff_level { -1 }; int aff_all { 0 }; TechBonus operator+(const TechBonus &rhs) { @@ -33,7 +37,7 @@ class TechBonus { b.defence = defence + rhs.defence; b.sight = sight + rhs.sight; b.move = move + rhs.move; - for (int i=0; i<b.cost.size(); i++) { + for (int i=0; i<cost.size(); i++) { b.cost[i] = cost[i] + rhs.cost[i]; b.cost_abs[i] = cost_abs[i] + rhs.cost_abs[i]; b.prod[i] = prod[i] + rhs.prod[i]; @@ -42,8 +46,63 @@ class TechBonus { b.improved_heal = improved_heal + rhs.improved_heal; b.improved_convert = improved_convert + rhs.improved_convert; return b; - } + } + std::string to_string () { + std::string str = ""; + if (attack != 0) { + int value = (int)roundf(attack*100); + str += "Attack: " + std::to_string(value) + "%\n"; + } + if (defence != 0) { + int value = (int)roundf(defence*100); + str += "Defence: " + std::to_string(value) + "%\n"; + } + if (sight != 0) { + str += "Sight: " + std::to_string(sight) + "\n"; + } + if (range != 0) { + str += "Range: " + std::to_string(range) + "\n"; + } + if (move != 0) { + str += "Range: " + std::to_string(range) + "\n"; + } + if (cost[0] != 0 || cost[1] != 0) { + int vf = (int)roundf(cost[0]*100); + int vg = (int)roundf(cost[1]*100); + str += "Cost f: " + std::to_string(vf); + str += "%, g: " + std::to_string(vg) + "%\n"; + } + if (cost_abs[0] != 0 || cost_abs[1] != 0) { + int vf = (int)roundf(cost_abs[0]); + int vg = (int)roundf(cost_abs[1]); + str += "Cost f: " + std::to_string(vf); + str += ", g: " + std::to_string(vg) + "\n"; + } + if (prod[0] != 0 || prod[1] != 0) { + int vf = (int)roundf(prod[0]*100); + int vg = (int)roundf(prod[1]*100); + str += "Production f: " + std::to_string(vf); + str += "%, g: " + std::to_string(vg) + "%\n"; + } + if (trade != 0) { str += "Improves Trade Rate\n"; } + if (improved_heal != 0) { str += "Improves Heal Ability\n"; } + if (improved_convert != 0) { str += "Improves Convert Ability\n"; } + if (aff_id.size() > 0) { + str += "of entitiy "; + for (int id : aff_id) str += std::to_string(id) + " "; + str += "\n"; + } + if (aff_class.size() > 0) { + str += "of class "; + for (int c : aff_class) str += std::to_string(c) + " "; + str += "\n"; + } + if (aff_level != -1) { + str += "of level " + std::to_string(aff_level) + "\n"; + } + return str; + } }; class TechLookup { diff --git a/game/view.cpp b/game/view.cpp index 7fddcd5..78a9932 100644 --- a/game/view.cpp +++ b/game/view.cpp @@ -85,6 +85,34 @@ void View::process (Gst &gst, vec2 cam, vec2 mouse, int *mheld) { } found = true; } + + if (heals.size() > 0 && !found) { + for (int i=0; i<heals.size() && !found; i++) { + int x = heals[i] % gr.sizex; + int y = heals[i] / gr.sizex; + vec2 pos { (float)x*32, (float)y*32 }; + if (pos.x < absmouse.x && absmouse.x <= pos.x+32 + && pos.y < absmouse.y && absmouse.y <= pos.y+32) + { + cursor_ground = heals[i]; + } + } + found = true; + } + + if (converts.size() > 0 && !found) { + for (int i=0; i<converts.size() && !found; i++) { + int x = converts[i] % gr.sizex; + int y = converts[i] / gr.sizex; + vec2 pos { (float)x*32, (float)y*32 }; + if (pos.x < absmouse.x && absmouse.x <= pos.x+32 + && pos.y < absmouse.y && absmouse.y <= pos.y+32) + { + cursor_ground = converts[i]; + } + } + found = true; + } if (menu_train.active && !found) { int selected = menu_train.mouse_option(mouse); diff --git a/game/view.h b/game/view.h index 61301ac..6a316de 100644 --- a/game/view.h +++ b/game/view.h @@ -23,6 +23,8 @@ class View { std::vector<int> moves; std::vector<int> attacks; std::vector<int> builds; + std::vector<int> heals; + std::vector<int> converts; Menu_unit menu_unit; Menu_day menu_day; diff --git a/graphics/graphics.cpp b/graphics/graphics.cpp index e485fb4..f14a328 100644 --- a/graphics/graphics.cpp +++ b/graphics/graphics.cpp @@ -529,8 +529,7 @@ void Graphics::render (Gst &gst, View &view) if (view.moves.size() > 0) { for (int m : view.moves) { - int x = m % gr.sizex; - int y = m / gr.sizex; + int x = m % gr.sizex; int y = m / gr.sizex; backend.render_rect( 0, 120, 255, 100, (int)cam.pos.x + x*32, (int)cam.pos.y + y*32, 32, 32 @@ -540,8 +539,7 @@ void Graphics::render (Gst &gst, View &view) if (view.attacks.size() > 0) { for (int m : view.attacks) { - int x = m % gr.sizex; - int y = m / gr.sizex; + int x = m % gr.sizex; int y = m / gr.sizex; backend.render_rect( 255, 120, 0, 100, (int)cam.pos.x + x*32, (int)cam.pos.y + y*32, 32, 32 @@ -549,6 +547,26 @@ void Graphics::render (Gst &gst, View &view) } } + if (view.heals.size() > 0) { + for (int m : view.heals) { + int x = m % gr.sizex; int y = m / gr.sizex; + backend.render_rect( + 0, 200, 0, 100, + (int)cam.pos.x + x*32, (int)cam.pos.y + y*32, 32, 32 + ); + } + } + + if (view.converts.size() > 0) { + for (int m : view.converts) { + int x = m % gr.sizex; int y = m / gr.sizex; + backend.render_rect( + 200, 0, 200, 100, + (int)cam.pos.x + x*32, (int)cam.pos.y + y*32, 32, 32 + ); + } + } + // top bar vec2 pos { 0,0 }; backend.render_rect ( @@ -54,7 +54,8 @@ int main () { Player_control control; float ts = 16; - Gst gst (15,15); + Gst gst; + gst.inv.ground { 15,15 }; load_json(gst); @@ -95,6 +96,7 @@ int main () { gst.entities.emplace_back(1, 0, gst.get_info("Persian War Elephants"), 0); gst.entities.emplace_back(0, 1, gst.get_info("Scorpions"), 1); gst.entities.emplace_back(1, 2, gst.get_info("Archers"), 1); + gst.entities.emplace_back(4, 3, gst.get_info("Monks"), 0); View view (vec2 { (float)graphics.resx, (float)graphics.resy }); @@ -9,16 +9,18 @@ DEV [x] end day heal when on bld [x] bld ages upgrades (just graphical) [x] train problem -[x] market (+50g mercs) +[x] more train problems (normal blds train mercs & monks in barracks) +[x] market (+50g mercs & discount tech) [x] tech effects [x] veterancy ranks -[ ] heal -[ ] convert +[x] heal +[x] convert [ ] relics -[ ] tower diagonal constraint +[x] tower diagonal constraint [ ] tower defence effect -> new bonus type [ ] castle [ ] frenzy special case +[ ] gui tech [ ] gui production [ ] gui train build [ ] unit tech requirement (paladin, champion, imp siege) @@ -26,13 +28,17 @@ DEV [ ] undo [x] bld defence bonus [ ] demolish -[ ] imp entities +[x] imp entities +[ ] gst state / invariant +[ ] map saveload +[ ] map editor [ ] use maps to speed up lookups (even in ground.pos -> ent) ART -[ ] imp unit sprites -[x] sprites stable, castle, uni, market, church, tower and bld upgrade +[x] imp unit sprites +[x] sprites stable, uni, market, church, tower and bld upgrade +[ ] castle BUGS [ ] wheelbarrow doesn't work |