394 Commits

Author SHA1 Message Date
c6804dfc03 Codebase of 0.9.5 26.06.2024 found on my OneDrive 2025-02-18 10:26:51 +01:00
a671631dde Replace Toasts
Replace Toasts with ToastsV2
(MessageHandler)
2023-08-28 18:43:59 +02:00
566485ccd6 More Cleanup
Remove unused code as well as useless debug printf's
2023-08-28 17:11:07 +02:00
267f9ce5c3 FILE to fstream
Lets move away from  the c standart FILE and use c++ fstream as well as c++17 filesystem!!!
2023-08-28 17:03:00 +02:00
5cca34ede4 The beginning of 0.9.5
- Remove unused stuff
- Start Moving from c stuff to c++ stuff Like mkdir to filesystem
- Remove usless stuff from config
- Begin with Project Li7
2023-08-28 16:33:16 +02:00
5695110739 Simplify lang System 2023-05-28 22:30:39 +02:00
476bd93aa7 Update link 2023-03-24 19:55:24 +01:00
9a7078b067 Release 0.9.4 2023-03-24 19:53:01 +01:00
44ef9f2aad Clean Env 2023-03-24 19:50:37 +01:00
1ef946570d __MISSTAKE__ 2023-03-24 19:47:58 +01:00
ae8181a6e5 RenderD7 0.9.4 (New Stuff, Lot Fixes, Envtools) 2023-03-24 19:46:41 +01:00
7c190e3cfa Fix LLVM 2023-03-13 21:36:37 +01:00
805512fbea Fix Makefile and Better Document Setup in README 2023-03-13 21:34:18 +01:00
780025bb74 Add Some Tools and Assets to create cpp's for 0.9+ 2023-03-13 21:19:07 +01:00
f6e3c50814 Fix Crash and Fade Stuff 2023-03-12 21:37:22 +01:00
0399808eb2 Document_Fix_And0.9.3 2023-03-12 21:06:13 +01:00
cd677cf3e8 0.9.2 (NVID, SPLASH_IMG_VID, CHANGELOG_IMPL) 2023-03-11 15:56:40 +01:00
67edfa4245 Remove nsmbp and fix a critical bug 2023-03-09 21:19:17 +01:00
66a35f28e6 FastColor/RemoveFPSCheat/LLVM-Style 2023-03-07 18:09:48 +01:00
2f7a266dc5 - 2022-12-13 20:58:21 +01:00
8a0fd07275 Alpha 0.9.0 2022-12-09 14:55:19 +01:00
89299bf91e Minimalistic for hax 2.x 2022-12-07 15:29:19 +01:00
af88277680 __FixDeltatime 2022-11-30 18:28:03 +01:00
dd17a70551 Prepere 2022-11-28 20:01:56 +01:00
ec0411373b 0.8.4 2022-11-25 01:07:11 +01:00
222a13387d 0.8.4 2022-11-25 01:05:50 +01:00
c1e471f23a The ResultDecoder Update 2022-11-22 23:00:01 +01:00
6b48ba070c RenderD7 0.8.2 2022-11-18 20:57:05 +01:00
bbbfd60bb7 Fix To Prevent from Crash 2022-11-14 18:25:24 +01:00
62fa5ede9d Standarts of LLVM 2022-11-14 16:27:04 +01:00
20c3a525c8 Version 0.8.1 (StealConsole) 2022-11-14 15:25:26 +01:00
8b70d0e9b7 Format to LLVL 2022-11-12 23:19:41 +01:00
36e5676d9f Ehh 2022-08-22 17:18:26 +01:00
f706193945 Offset 2022-08-22 17:14:19 +01:00
e24b704809 __ 2022-08-22 17:03:51 +01:00
91bbcdb7a7 Some DBG Stuff 2022-08-04 02:50:37 +02:00
2cb54dd570 __ 2022-08-04 01:47:07 +02:00
90dde05b79 __ 2022-08-04 01:13:26 +02:00
1ae4ff72d3 __ 2022-07-31 10:02:29 +02:00
9213a1d5dd Implement Experiment of NFontApi 2022-07-31 01:23:39 +02:00
ca52e6dae6 __ 2022-07-30 15:49:44 +02:00
83946b1e66 Fix A Lot of Stuff 2022-07-30 14:42:02 +02:00
61cb41ae29 Big CleanUp 2022-07-29 13:19:31 +02:00
bca1c36f75 A Lot of Bugfixes 2022-07-28 14:30:09 +02:00
3270842a1b __ 2022-07-27 11:00:57 +02:00
bd7d21d489 __ 2022-07-27 10:55:52 +02:00
cc5d669ab4 Add Logo to Readme 2022-07-25 16:53:29 +02:00
2c38997b4c Add Logo 2022-07-25 16:50:41 +02:00
a49bcd8712 awd 2022-07-25 14:42:58 +02:00
dbaa4d912a D 2022-07-25 12:12:12 +02:00
8f2c877197 Implement Benchm,arking System for BitmapPrinter 2022-07-25 11:31:41 +02:00
1ee4f6849e Update to use releases 2022-07-25 09:06:40 +02:00
3d89e94823 Litle Fix 2022-07-24 01:17:22 +02:00
228d0088fb sef 2022-07-24 01:04:11 +02:00
86465b5f76 we 2022-07-24 01:03:51 +02:00
6af08275e9 RenderD7 is now LibRenderD7 2022-07-24 00:55:18 +02:00
3c7c12ef39 Add gitignore 2022-07-24 00:15:13 +02:00
404761d712 Add New Info Section to RSettings 2022-07-22 18:05:39 +02:00
83d948ef24 Calculate MT CPU/GPU Persentage by Framerate 2022-07-22 14:55:16 +02:00
946deb210d Implement libnsbmp for bmp decoding 2022-07-22 13:11:39 +02:00
c2cdf256ba Upda 2022-07-21 20:59:51 +02:00
f0f4a64dfc Update 2022-07-20 15:08:04 +02:00
25ced38cba Implement BitmapEngine to RenderD7 2022-07-19 19:07:23 +02:00
86166f87eb Add Tex unloader 2022-07-19 14:22:52 +02:00
54cce27a34 Merge branch 'main' of https://github.com/NPI-D7/RenderD7 2022-05-17 01:26:30 +02:00
4d6a24f51f _ 2022-05-17 01:26:27 +02:00
2e6d2c3cd5 __ 2022-05-15 00:09:14 +02:00
7f62666017 __ 2022-05-14 23:59:56 +02:00
8b3173811a __ 2022-05-14 00:28:27 +02:00
b40f6d738e Implement OverLayHandler 2022-05-13 21:36:03 +02:00
d4f12cb9b0 Fix for Touch 2022-05-08 05:00:11 +02:00
690dd1d6ca ReImplement Fade System 2022-05-06 19:32:18 +02:00
c21e8192d4 __ 2022-04-30 14:23:55 +02:00
d4878d4e3d Update renderd7.hpp 2022-04-26 13:35:27 +02:00
0503fe7e5b Update renderd7.hpp 2022-04-26 13:21:33 +02:00
cd20f32acb LOL 2022-04-25 19:29:57 +02:00
c0fe7eaab5 __ 2022-04-25 19:24:24 +02:00
f1b712af4a _ 2022-04-25 18:30:33 +02:00
3231bc8240 Big Settings Update 2022-04-25 17:29:40 +02:00
8f80a99fc6 Big Settings Update 2022-04-25 17:14:47 +02:00
2cc908b043 RenderD7 Settings Fix 2022-04-25 17:06:35 +02:00
d07d2a246a Fix the logging Sys 2022-04-25 16:43:52 +02:00
bf51ecda77 __ 2022-04-23 14:56:48 +02:00
d87235c4b5 __ 2022-04-23 14:56:32 +02:00
6c22b58487 __ 2022-04-23 14:54:10 +02:00
05835a5c07 __ 2022-04-23 14:49:49 +02:00
fa948a7beb __ 2022-04-23 14:46:07 +02:00
04741198e2 __ 2022-04-23 13:58:48 +02:00
5fb7ca78a9 __ 2022-04-23 13:55:01 +02:00
ce0d83912e __ 2022-04-23 01:47:51 +02:00
26eb9b4970 I HATE :. 2022-04-23 01:14:49 +02:00
02ea4c6b4b __ 2022-04-23 01:00:19 +02:00
0d35167c90 __ 2022-04-22 21:03:58 +02:00
51ab42a9b0 __ 2022-04-22 20:54:06 +02:00
4ca9e96276 __ 2022-04-22 20:37:59 +02:00
b71b359502 ->;->:( 2022-04-22 20:27:27 +02:00
a75f37c2d4 :( 2022-04-22 20:24:36 +02:00
a7a44b39dc __ 2022-04-22 20:20:11 +02:00
f6eb34ed78 __ 2022-04-22 19:26:33 +02:00
099f21345f __ 2022-04-22 19:03:44 +02:00
c1876482f7 ___ 2022-04-22 17:41:48 +02:00
a70f243421 ___ 2022-04-22 17:27:35 +02:00
b100891c34 __ 2022-04-22 17:21:37 +02:00
2f4e78b138 __ 2022-04-22 17:11:30 +02:00
5163f19796 __ 2022-04-22 17:04:37 +02:00
c3f737de14 Update log.cpp 2022-04-22 15:07:21 +02:00
809b0cfad6 __ 2022-04-22 14:51:29 +02:00
cacf83d434 __ 2022-04-22 14:48:20 +02:00
ca1e242997 __ 2022-04-22 14:27:10 +02:00
165b3b347f __ 2022-04-22 10:43:34 +02:00
2965c3945a __ 2022-04-22 10:24:41 +02:00
8d28ae3754 __ 2022-04-18 14:41:51 +02:00
7d327f22aa __ 2022-04-17 23:00:37 +02:00
d0c2123996 Update RenderD7 2022-04-17 22:49:54 +02:00
6081c4d310 Update the Overlay 2022-04-17 22:23:47 +02:00
0dfb37cc1c Test 2022-04-17 17:34:48 +02:00
f15e457947 Update OvlHandler 2022-04-16 23:11:12 +02:00
5d3db56ee4 Add Citra CHeck 2022-04-16 22:15:15 +02:00
8bec3356e5 __ 2022-04-16 17:45:20 +02:00
3b4e541d0e Remove and forget this idea 2022-04-16 17:40:58 +02:00
b03633e010 ___IMPLEMENT_FS2__INSPIERED_BY_3DSHELL__ 2022-04-16 16:02:44 +02:00
651a43574f TestUpdate 2022-04-16 11:24:15 +02:00
8e7bee4ea2 __ 2022-04-16 01:35:15 +02:00
db66485432 ___ 2022-04-15 22:05:21 +02:00
12d47e5482 __ 2022-04-15 22:02:00 +02:00
39c1a0f991 __ 2022-04-15 13:19:24 +02:00
3f548f2d09 __ 2022-04-15 13:16:54 +02:00
6587d22d2c Update 2022-04-15 13:13:38 +02:00
76da1a033f Add Bmp writer 2022-04-14 17:41:18 +02:00
6c530c44bd Fix 2022-04-14 10:37:12 +02:00
85fa45201e Fixed 2022-04-14 10:34:32 +02:00
10d4ad6fd5 Update Theme 2022-04-13 20:06:50 +02:00
d5a3da2c35 Fix the Text Error after 1 1/2 years 2022-04-13 12:50:22 +02:00
a8b0540ecc Update renderd7.hpp 2022-04-13 02:43:17 +02:00
cc5579971d RD7SR Gets Interesting 2022-04-13 01:38:39 +02:00
6123bd3307 Update Some files 2022-04-12 11:19:37 +02:00
ed0d9998ff _______ 2022-04-12 11:12:12 +02:00
483efd280a CLEAN PAGE 2022-04-12 11:11:12 +02:00
1e2b4c0476 ___ 2022-04-12 11:07:32 +02:00
3992096df3 Fix 2022-04-12 11:05:53 +02:00
7165d1edc4 FIX 2022-04-12 11:03:30 +02:00
27653c2350 Fix 2022-04-12 11:01:10 +02:00
67ecd0ceff Fix DOCS 2022-04-12 11:00:32 +02:00
de74aac8af ___ 2022-04-12 10:57:59 +02:00
e1e0d1cbd5 Simple Update 2022-04-12 10:53:23 +02:00
b6051242a2 Not Required 2022-04-12 10:48:48 +02:00
ea778c004b Add Footer 2022-04-12 10:41:22 +02:00
b5dbe5ce78 Remove module 2022-04-12 10:35:22 +02:00
7645b45992 Remove module 2022-04-12 10:34:55 +02:00
c0bf1c7bf1 Remove 2022-04-12 10:32:39 +02:00
49805784b0 Some Changes 2022-04-12 10:28:42 +02:00
8b7b12007b LOL 2022-04-12 10:22:36 +02:00
88b329f1d0 NextGen 2022-04-12 10:21:42 +02:00
5fbbae9f99 Update 2022-04-12 10:15:58 +02:00
520eec7c9c Document the Sprite Class 2022-04-12 10:00:49 +02:00
f75078b42b Update README.md 2022-04-12 09:54:29 +02:00
16ef0ff65a Fix? 2022-04-12 09:52:59 +02:00
fed723aa48 Push 2022-04-12 09:47:41 +02:00
6813c50c12 Update 2022-04-12 09:46:32 +02:00
3c18129f94 Update README.md 2022-04-12 09:42:55 +02:00
409161efe7 __ 2022-04-12 09:39:00 +02:00
8e7958be76 Fix 2022-04-12 09:31:31 +02:00
9e5ce455ca Update README.md 2022-04-12 09:28:33 +02:00
94e90a3cd8 Generate DOCS 2022-04-12 09:27:49 +02:00
58b4667ec7 Generate DOCS 2022-04-12 09:27:42 +02:00
97aff8615a Test 2022-04-11 17:58:37 +02:00
e57c15bddb ___ 2022-04-11 17:48:16 +02:00
82d8005529 __ 2022-04-11 17:08:50 +02:00
acc0bdfd87 RenderD7 Add SuperReselutiion 2022-04-11 17:00:10 +02:00
a7accb0bf5 ...? 2022-04-11 09:59:25 +02:00
c5c83a9c17 __ 2022-04-11 09:53:36 +02:00
aed653f0c8 Fix the Exit Crash?? 2022-04-11 09:50:47 +02:00
b5995e2f93 RLY 2022-04-10 15:27:43 +02:00
0977e0a80f RN STuff 2022-04-10 15:24:08 +02:00
54a9b80523 Uhh 2022-04-10 15:12:04 +02:00
72adb90757 ;;;;;;;;;;;;;; 2022-04-10 15:03:10 +02:00
f2549997ba Why Not 2022-04-10 15:00:06 +02:00
063a342ad5 Fix Error Message 2022-04-10 13:13:45 +02:00
20f7730448 ???? 2022-04-10 13:06:49 +02:00
aa5ca1a3f0 __ 2022-04-10 10:19:58 +02:00
0dab5c6599 Loader 2022-04-10 10:13:22 +02:00
3f0f8f351c Add a loader 2022-04-10 10:09:43 +02:00
e150265bc4 _ 2022-04-10 10:08:06 +02:00
6fd37ffd3d Implement the new Settings Screen 2022-04-10 09:55:05 +02:00
f7bd625610 ADD % 2022-04-10 01:34:47 +02:00
20cec2442c Add CMDBUF 2022-04-10 01:28:27 +02:00
dcf6d77979 Render D7 Update 2022-04-10 01:17:34 +02:00
0cfd1a0e42 OK 2022-04-10 01:13:16 +02:00
303e4105cb Too much problems 2022-04-10 01:09:46 +02:00
8c8613aca6 FIX 2022-04-10 01:05:26 +02:00
ead304d698 Fix 2022-04-10 01:02:06 +02:00
edb634b79d Add Overlays Engine 2022-04-10 00:59:30 +02:00
d0e4d2296c Add FrameEnd() for overlays 2022-04-10 00:41:16 +02:00
078e0d0d8b Remove The Flyppy Bird String From Setup Log 2022-04-09 19:15:29 +02:00
855e312ad4 MAIN 2022-04-08 13:45:10 +02:00
ffb313971d Update renderd7.cpp 2021-12-29 11:12:07 +01:00
ef8e4a379c Update renderd7.hpp 2021-12-26 13:16:45 +01:00
945038042a Update renderd7.cpp 2021-12-26 13:15:33 +01:00
d59cf0f9e0 Update renderd7.cpp 2021-12-26 10:51:04 +01:00
12d5b48632 Update renderd7.hpp 2021-12-26 10:49:17 +01:00
489d4f54a1 Update renderd7.hpp 2021-12-25 13:34:28 +01:00
80f53cb013 Update renderd7.hpp 2021-12-24 15:40:47 +01:00
ab71f5c84f Update renderd7.cpp 2021-12-24 03:42:13 +01:00
f3c8482c6d Update renderd7.hpp 2021-12-24 03:33:51 +01:00
4bdc38b7d9 Update renderd7.hpp 2021-12-09 20:06:22 +01:00
1f8c0fa06e Update thread.cpp 2021-12-08 16:02:10 +01:00
4ec44b0f89 Update thread.hpp 2021-12-08 16:01:47 +01:00
d82ec589bd Update renderd7.cpp 2021-12-08 16:01:09 +01:00
51276fd171 Update renderd7.cpp 2021-12-06 13:20:40 +01:00
1c5cd37a4f Update renderd7.cpp 2021-12-06 13:15:24 +01:00
f3111623c1 Update renderd7.cpp 2021-12-05 23:46:00 +01:00
4bacf86367 Update renderd7.cpp 2021-12-04 12:33:04 +01:00
f1e6109fa5 Update renderd7.cpp 2021-12-04 02:23:45 +01:00
fe2e9f0dcf Update renderd7.cpp 2021-12-04 01:05:41 +01:00
9a2525e9e5 Update renderd7.hpp 2021-12-04 00:56:49 +01:00
abef666256 Update renderd7.hpp 2021-12-03 22:52:49 +01:00
d31f63a47e d 2021-12-02 16:49:30 +01:00
d4e4dbc565 Update renderd7.hpp 2021-12-02 15:33:27 +01:00
b8cefcc12d Update renderd7.hpp 2021-12-01 21:00:41 +01:00
ca4de52619 Create tween.hpp 2021-12-01 20:52:35 +01:00
22b6f477ba Create Clock.cpp 2021-12-01 20:39:59 +01:00
fe13f3d6b4 Create Time.cpp 2021-12-01 20:38:44 +01:00
c697ae9bd1 Create Clock.hpp 2021-12-01 20:33:46 +01:00
d22b7b718c Create Time.hpp 2021-12-01 20:29:22 +01:00
61285be23e Update main.cpp 2021-11-29 12:10:36 +01:00
eb0ccc8b25 Update main.cpp 2021-11-29 12:06:23 +01:00
ca8db2564d Create main.cpp 2021-11-29 11:59:17 +01:00
c4a8c54da2 Update renderd7.cpp 2021-11-28 17:42:37 +01:00
9d4f94dba2 Update renderd7.cpp 2021-11-28 15:03:00 +01:00
4adf59193c Update renderd7.cpp 2021-11-28 12:09:07 +01:00
7766b4071c Update renderd7.cpp 2021-11-28 08:53:44 +01:00
3d0f3a3ab6 Update renderd7.cpp 2021-11-28 05:45:33 +01:00
0e7ac54ef7 Update renderd7.hpp 2021-11-28 05:44:46 +01:00
6c03dde215 Update renderd7.cpp 2021-11-28 05:37:58 +01:00
aa6c96c9a3 Update renderd7.cpp 2021-11-28 05:19:20 +01:00
28abaa62ff Update renderd7.cpp 2021-11-27 12:11:05 +01:00
c8e65e39c3 Update renderd7.cpp 2021-11-27 12:05:43 +01:00
4fe4232796 Update renderd7.cpp 2021-11-27 12:05:03 +01:00
81fa120cb7 Update renderd7.cpp 2021-11-27 11:57:40 +01:00
92fdc24a49 Update renderd7.hpp 2021-11-27 11:51:56 +01:00
237c9108bf Update renderd7.hpp 2021-11-27 11:50:44 +01:00
069cfba51b Update renderd7.cpp 2021-11-27 11:50:25 +01:00
e4ef5b55fe Update renderd7.cpp 2021-11-27 11:34:32 +01:00
a10e2aaab9 Update renderd7.hpp 2021-11-27 11:26:53 +01:00
b35ed87573 Update renderd7.cpp 2021-11-27 11:23:44 +01:00
ab867588d3 Update renderd7.hpp 2021-11-27 11:22:47 +01:00
087b2a2bb0 Update renderd7.cpp 2021-11-23 16:50:52 +01:00
c8fcce1de3 Update sound.cpp 2021-11-23 16:39:20 +01:00
a5f3e60e3a Update renderd7.cpp 2021-11-23 16:34:26 +01:00
fbc54e0065 Update renderd7.hpp 2021-11-23 16:33:36 +01:00
1bbefb259a Update renderd7.cpp 2021-11-21 21:40:08 +01:00
569e82f476 Update renderd7.hpp 2021-11-21 21:37:24 +01:00
51822aef23 Create renderd7.hpp 2021-11-21 21:25:22 +01:00
f0ae9c238c Update renderd7.hpp 2021-11-19 07:02:30 +01:00
b9578e151d Update renderd7.hpp 2021-11-18 20:51:28 +01:00
ad655021a4 Update renderd7.hpp 2021-11-15 07:02:19 +01:00
9c66052878 Update renderd7.hpp 2021-09-21 16:31:45 +02:00
d98707aa8f Update engine.hpp 2021-08-16 23:00:02 +02:00
95dc698349 Update engine.hpp 2021-08-15 22:51:56 +02:00
13916e3dff Update engine.hpp 2021-08-15 22:47:48 +02:00
44f618e9d8 Create engine.hpp 2021-08-15 22:46:41 +02:00
235c2c2d7e Update renderd7.cpp 2021-08-14 10:51:20 +02:00
dfce1b2adb Update renderd7.cpp 2021-08-14 10:08:54 +02:00
b68c7d29ae Update renderd7.hpp 2021-08-14 10:01:53 +02:00
7737cba060 Update renderd7.hpp 2021-08-14 08:15:22 +02:00
4cd82f2e25 Update renderd7.hpp 2021-08-12 22:19:15 +02:00
a15b0bdb2d Create stringtool.hpp 2021-08-12 22:17:46 +02:00
f7f0d26896 Update renderd7.hpp 2021-08-08 11:28:11 +02:00
e73ee7c6db Update renderd7.hpp 2021-08-08 11:22:42 +02:00
0d4cc6f30f Update renderd7.hpp 2021-08-07 17:07:57 +02:00
d7c02bab33 Update renderd7.cpp 2021-08-01 12:58:56 +02:00
4750ba5a6c Update renderd7.hpp 2021-08-01 12:55:26 +02:00
8dabfd58ab Update Update extlibs.yml 2021-07-30 15:09:52 +02:00
16510f5261 Update Docs.yml 2021-07-30 13:15:02 +02:00
60d85b2a5e Delete main/doc/html directory 2021-07-30 13:13:22 +02:00
69fe7d4cb4 Update Docs.yml 2021-07-30 13:11:14 +02:00
0e772b1394 Update Update extlibs.yml 2021-07-25 23:32:29 +02:00
596d2a8611 Create external.md 2021-07-25 23:27:35 +02:00
f1f71b93e2 Create Update extlibs.yml 2021-07-25 23:22:52 +02:00
b0a74a0bf6 Documentation1 2021-07-25 16:36:05 +00:00
00ec77e6a3 Delete external/tween-engine directory 2021-07-25 18:35:41 +02:00
d2145977c5 Documentation1 2021-07-25 16:35:20 +00:00
c733394277 Update log.hpp 2021-07-25 18:34:47 +02:00
43ea66236c Documentation1 2021-07-25 14:44:45 +00:00
0cd8eaa423 Update renderd7.hpp 2021-07-25 16:44:12 +02:00
af296546ff Documentation1 2021-07-25 14:36:11 +00:00
26db113a09 Update renderd7.hpp 2021-07-25 16:35:50 +02:00
e2ca5f27b6 Documentation1 2021-07-25 14:30:56 +00:00
ed2b2c4ed8 Update renderd7.hpp 2021-07-25 16:30:35 +02:00
7c3e17e820 Delete header.html 2021-07-25 16:26:02 +02:00
64045ebddf Delete d.html 2021-07-25 16:25:52 +02:00
14800862be Documentation1 2021-07-25 10:55:12 +00:00
c640a2ec38 Update log.hpp 2021-07-25 12:54:49 +02:00
1a87a2519f Update doxygen.css 2021-07-25 12:53:21 +02:00
52d7433385 Documentation1 2021-07-25 10:41:21 +00:00
03247039d3 Update Doxyfile 2021-07-25 12:40:59 +02:00
9dc3feb1f3 Documentation1 2021-07-25 10:38:19 +00:00
a64f16e371 Update renderd7.hpp 2021-07-25 12:37:58 +02:00
2327fcb284 Update doxygen.css 2021-07-25 12:36:01 +02:00
0e56aa0905 Documentation1 2021-07-25 10:33:20 +00:00
d568126176 Update Doxyfile 2021-07-25 12:32:56 +02:00
f11b74ba85 Update Docs.yml 2021-07-25 12:31:00 +02:00
a4eac5221d Update Doxyfile 2021-07-25 12:30:21 +02:00
31360d90f3 Update Docs.yml 2021-07-25 12:25:01 +02:00
d3c1a8aaa6 Update Docs.yml 2021-07-25 12:22:13 +02:00
e944cd8f55 Create d.html 2021-07-25 12:21:29 +02:00
5af0535d74 Create header.html 2021-07-25 11:53:13 +02:00
6548670e59 Update Docs.yml 2021-07-25 11:44:40 +02:00
69f8a7fd51 Rename docs/doxygen.css to doxygen.css 2021-07-25 11:39:25 +02:00
8ba4bcdc1b Update Docs.yml 2021-07-25 11:38:41 +02:00
0d104edab3 Update Docs.yml 2021-07-25 11:32:39 +02:00
2c17269f84 Create doxygen.css 2021-07-25 11:31:37 +02:00
8cf2c798e6 Documentation1 2021-07-25 09:20:48 +00:00
48cb6d4034 Update sound.hpp 2021-07-25 11:20:23 +02:00
78b3ff7f68 Documentation1 2021-07-25 09:05:33 +00:00
e304bdf00f Update renderd7.hpp 2021-07-25 11:05:06 +02:00
ad169b01cb Documentation1 2021-07-25 08:29:59 +00:00
dc7034db91 Update renderd7.hpp 2021-07-25 10:29:36 +02:00
b01393cd33 Update sound.hpp 2021-07-25 10:28:01 +02:00
54579d1f18 Documentation1 2021-07-24 22:47:54 +00:00
96dbdf3309 Update renderd7.hpp 2021-07-25 00:47:28 +02:00
b690ea5822 Documentation1 2021-07-24 22:28:17 +00:00
fbe59355ce Update renderd7.hpp 2021-07-25 00:27:55 +02:00
809ddbad47 Documentation1 2021-07-24 22:23:41 +00:00
9be2bb672a Update lang.hpp 2021-07-25 00:23:20 +02:00
469896be32 Documentation1 2021-07-24 22:13:43 +00:00
6f8ec89373 Update log.hpp 2021-07-25 00:13:11 +02:00
4368d6d7ee Update sound.hpp 2021-07-25 00:07:17 +02:00
3af5da9d3e Documentation1 2021-07-24 22:02:52 +00:00
560ee65932 Update sound.hpp 2021-07-25 00:02:30 +02:00
e42d1ec20a Documentation1 2021-07-24 21:59:50 +00:00
bfa3b0a1c6 Update sound.hpp 2021-07-24 23:59:29 +02:00
c2484c1892 Documentation1 2021-07-24 21:48:15 +00:00
fe15309b77 Update Doxyfile 2021-07-24 23:47:54 +02:00
cadb23f9e2 Documentation1 2021-07-24 21:37:33 +00:00
c401c3f2e3 Create Doxyfile 2021-07-24 23:37:10 +02:00
b2eccd5ebb Update renderd7.hpp 2021-07-24 23:32:04 +02:00
48de80fe13 Update renderd7.hpp 2021-07-24 23:31:05 +02:00
ba97c9ed70 Update Docs.yml 2021-07-24 19:21:05 +02:00
e717a52491 Delete doc/doc/html directory 2021-07-24 19:19:33 +02:00
006f16f32f Delete doc/main/doc/html directory 2021-07-24 19:19:23 +02:00
184a97b2d7 Delete Doxyfile 2021-07-24 19:19:13 +02:00
b72caa1ba0 Update renderd7.hpp 2021-07-24 19:17:20 +02:00
b81160bbd3 Update Docs.yml 2021-07-24 19:14:57 +02:00
ae4212e5a6 Update README.md 2021-07-24 19:13:40 +02:00
6821dd2bca Documentation1 2021-07-24 17:12:30 +00:00
c5a3910ccf Update Docs.yml 2021-07-24 19:12:10 +02:00
12ea3dc60f Update Docs.yml 2021-07-24 19:09:55 +02:00
3d3f26bf57 Update Docs.yml 2021-07-24 19:08:17 +02:00
66b8f6b921 Update Docs.yml 2021-07-24 19:03:41 +02:00
cc5a011a89 Update Docs.yml 2021-07-24 18:52:38 +02:00
83e0b11f8f Update Docs.yml 2021-07-24 18:51:34 +02:00
165552b439 Update Docs.yml 2021-07-24 18:49:48 +02:00
5eefebee43 Update Docs.yml 2021-07-24 18:49:23 +02:00
762b08eb08 Update Docs.yml 2021-07-24 18:46:57 +02:00
0032d26010 Update Docs.yml 2021-07-24 18:45:10 +02:00
ee4fe4f131 Update Docs.yml 2021-07-24 18:42:59 +02:00
5b926a7317 Update Docs.yml 2021-07-24 18:39:13 +02:00
f0b02d64ef Update renderd7.hpp 2021-07-24 18:16:51 +02:00
3e2af92e7e Update Docs.yml 2021-07-24 18:04:18 +02:00
7384ba6f4f Update Docs.yml 2021-07-24 17:58:12 +02:00
a1d9b4344a Update Docs.yml 2021-07-24 17:48:52 +02:00
3fc36d5b14 Update README.md 2021-07-24 17:42:49 +02:00
87f9b915e2 Update README.md 2021-07-24 17:42:29 +02:00
fa1980d47c Update README.md 2021-07-24 17:36:59 +02:00
d80017fcb5 Update Docs.yml 2021-07-24 17:22:38 +02:00
db27c91ec9 Documentation 2021-07-24 15:18:51 +00:00
9036726e92 Update Docs.yml 2021-07-24 17:18:20 +02:00
a0350b7814 Update Docs.yml 2021-07-24 17:16:53 +02:00
0cd2f330ad Update Docs.yml 2021-07-24 17:14:31 +02:00
9a5479d68b Update Docs.yml 2021-07-24 17:00:45 +02:00
595828fe84 Update Docs.yml 2021-07-24 16:52:25 +02:00
788d8f81a5 Documentation 2021-07-24 14:31:15 +00:00
d8a6a9e45c Update Docs.yml 2021-07-24 16:30:49 +02:00
113af5fabb Update Docs.yml 2021-07-24 13:19:20 +02:00
c6b7099df2 Update Docs.yml 2021-07-24 13:14:47 +02:00
db778f462a Update Docs.yml 2021-07-24 13:12:07 +02:00
5d02c2c6f2 Update Docs.yml 2021-07-24 13:07:59 +02:00
83eeee453e Update Docs.yml 2021-07-24 11:00:39 +02:00
2d05d1e7a9 Update Docs.yml 2021-07-24 10:58:57 +02:00
4d11cb9e91 Update Docs.yml 2021-07-24 10:57:25 +02:00
cbbc4d54d9 Update Docs.yml 2021-07-24 10:15:39 +02:00
22ae99f915 Update Docs.yml 2021-07-24 10:09:48 +02:00
b7a544eadd Update Docs.yml 2021-07-24 09:36:48 +02:00
328ff9d23b Update Docs.yml 2021-07-23 19:30:37 +02:00
624b59db9d Update Docs.yml 2021-07-23 19:15:31 +02:00
adf783c2a1 Update Docs.yml 2021-07-23 16:37:00 +02:00
db89d5c60f Update Docs.yml 2021-07-23 16:26:50 +02:00
9623606229 Update Docs.yml 2021-07-23 16:21:33 +02:00
5200f27182 Update Docs.yml 2021-07-23 16:17:18 +02:00
36f545855d Update Docs.yml 2021-07-23 16:14:39 +02:00
c2b35fdf83 Update Docs.yml 2021-07-23 16:12:56 +02:00
59fcc8c159 Update Docs.yml 2021-07-23 16:08:55 +02:00
8431119ff5 Create Doxyfile 2021-07-23 16:07:38 +02:00
233 changed files with 85879 additions and 40688 deletions

259
.clang-format Normal file
View File

@ -0,0 +1,259 @@
---
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: true
AlignConsecutiveBitFields:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveMacros:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterExternBlock: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakAfterAttributes: Never
BreakAfterJavaFieldAnnotations: false
BreakArrays: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Attach
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: true
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^<.*\.h>'
Priority: 1
SortPriority: 0
CaseSensitive: false
- Regex: '^<.*'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 3
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '([-_](test|unittest))?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentRequiresClause: true
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertBraces: false
InsertNewlineAtEOF: false
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
BinaryMinDigits: 0
Decimal: 0
DecimalMinDigits: 0
Hex: 0
HexMinDigits: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: NextLine
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
PPIndentWidth: -1
QualifierAlignment: Leave
RawStringFormats:
- Language: Cpp
Delimiters:
- cc
- CC
- cpp
- Cpp
- CPP
- 'c++'
- 'C++'
CanonicalDelimiter: ''
BasedOnStyle: google
- Language: TextProto
Delimiters:
- pb
- PB
- proto
- PROTO
EnclosingFunctions:
- EqualsProto
- EquivToProto
- PARSE_PARTIAL_TEXT_PROTO
- PARSE_TEST_PROTO
- PARSE_TEXT_PROTO
- ParseTextOrDie
- ParseTextProtoOrDie
- ParseTestProto
- ParsePartialTestProto
CanonicalDelimiter: pb
BasedOnStyle: google
ReferenceAlignment: Pointer
ReflowComments: true
RemoveBracesLLVM: false
RemoveSemicolon: false
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: LexicographicNumeric
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseTab: Never
WhitespaceSensitiveMacros:
- BOOST_PP_STRINGIZE
- CF_SWIFT_NAME
- NS_SWIFT_NAME
- PP_STRINGIZE
- STRINGIZE
...

View File

@ -2,7 +2,7 @@ name: 📄
on:
push:
branches: [ "**" ]
branches: [ "!*" ]
pull_request:
branches: [ "*" ]
@ -16,17 +16,35 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: branch
- name: Display branch name
shell: bash
run: echo ${{ steps.branch.outputs.branch }}
# Runs a single command using the runners shell
- name: Run a one-line script
run: |
cd ..
git clone https://github.com/NPI-D7/BCSTM-Player.git
cp -r BCSTM-Player/RenderD7-alpha0-6-0/* RenderD7/
cd RenderD7
git config --global user.email "tobid7@outlook.de"
git config --global user.name "Tobi-D7"
sudo apt-get install doxygen cmake -y
doxygen
echo done
ls -r
cd ..
git clone --depth 1 https://${{ secrets.TOKEN }}@github.com/NPI-D7/RenderD7.git RD7 -b gh-pages
mv -v RenderD7/doc/html/* RD7/
#rm -r doc
cd RD7
echo tobid7
git stage *
git commit -m "BCSTM-Player | $COMMIT_HASH"
git tag v$CURRENT_DATE
git push origin main v$CURRENT_DATE
echo staged
git commit -m "Documentation1"
git tag doc
echo commited
git push origin gh-pages
echo pushed

50
.github/workflows/Update extlibs.yml vendored Normal file
View File

@ -0,0 +1,50 @@
name: Extlibs
on:
push:
branches: [ '!*' ]
pull_request:
branches: [ '!*' ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: update
run: |
#gl
cd ..
git clone https://github.com/lua/lua.git
cd RenderD7
mkdir -p extlibs/
mkdir -p extlibs/lua/
cp -r ../lua/*.c extlibs/lua/
cp -r ../lua/*.h extlibs/lua/
cp -r ../lua/*.md extlibs/lua/
#RenderD7
cd ..
git clone https://github.com/NPI-D7/RenderD7.git
cd lp-next-ctr
mkdir -p extlibs/
rm -r extlibs/RenderD7
mkdir -p extlibs/RenderD7/
cp -r ../RenderD7/*.c* extlibs/RenderD7/
cp -r ../RenderD7/*.h* extlibs/RenderD7/
cp -r ../RenderD7/*.md extlibs/RenderD7/
#config
git config --global user.email "tobid7@outlook.de"
git config --global user.name "Tobi-D7"
#commit
git stage *
git commit -m "update extlibs"
git push origin main

6
.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
release/
debug/
lib/
*.bz2
rd7le/
*.DS_Store*

18
.vscode/c_cpp_properties.json vendored Normal file
View File

@ -0,0 +1,18 @@
{
"configurations": [
{
"name": "3DS | Windows",
"includePath": [
"${workspaceFolder}/**",
"C:/devkitpro/libctru/include/**",
"C:/devkitpro/devkitARM/include/**",
"C:/devkitpro/devkitARM/arm-none-eabi/include/**",
"C:/devkitpro/portlibs/3ds/include/**",
"/opt/devkitpro/libctru/include/**",
"/opt/devkitpro/portlibs/**"
]
}
],
"version": 4
}

115
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,115 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/rd7tf/rd7tf.elf",
"targetArchitecture": "arm",
"serverLaunchTimeout": 10000,
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "/opt/devkitPro/devkitARM/bin/arm-none-eabi-gdb",
"miDebuggerServerAddress": "192.168.2.220:4003",
"setupCommands": [
{
"description": "Enable pretty-printing",
"text": "file ${workspaceFolder}/rd7tf/rd7tf.elf -enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(gdb-emu) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/rd7tf/rd7tf.elf",
"targetArchitecture": "arm",
"serverLaunchTimeout": 10000,
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "/opt/devkitPro/devkitARM/bin/arm-none-eabi-gdb",
"miDebuggerServerAddress": "localhost:4003",
"setupCommands": [
{
"description": "Enable pretty-printing",
"text": "file ${workspaceFolder}/rd7tf/rd7tf.elf -enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(gdb-emu) lua",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/rd7le/rd7le.elf",
"targetArchitecture": "arm",
"serverLaunchTimeout": 10000,
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "C:\\devkitPro\\devkitARM\\bin\\arm-none-eabi-gdb.exe",
"miDebuggerServerAddress": "localhost:4003",
"setupCommands": [
{
"description": "Enable pretty-printing",
"text": "file ${workspaceFolder}/rd7le/rd7le.elf -enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(gdb) lua",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/rd7le/rd7le.elf",
"targetArchitecture": "arm",
"serverLaunchTimeout": 10000,
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "C:\\devkitPro\\devkitARM\\bin\\arm-none-eabi-gdb.exe",
"miDebuggerServerAddress": "192.168.2.220:4003",
"setupCommands": [
{
"description": "Enable pretty-printing",
"text": "file ${workspaceFolder}/rd7le/rd7le.elf -enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(gdb) testgame",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/testgame/testgame.elf",
"targetArchitecture": "arm",
"serverLaunchTimeout": 10000,
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "C:\\devkitPro\\devkitARM\\bin\\arm-none-eabi-gdb.exe",
"miDebuggerServerAddress": "localhost:4003",
"setupCommands": [
{
"description": "Enable pretty-printing",
"text": "file ${workspaceFolder}/testgame/testgame.elf -enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}

118
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,118 @@
{
"files.associations": {
"array": "cpp",
"*.tcc": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"numeric": "cpp",
"type_traits": "cpp",
"fstream": "cpp",
"initializer_list": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"new": "cpp",
"optional": "cpp",
"ostream": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"typeinfo": "cpp",
"utility": "cpp",
"atomic": "cpp",
"bit": "cpp",
"bitset": "cpp",
"chrono": "cpp",
"codecvt": "cpp",
"condition_variable": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"map": "cpp",
"iomanip": "cpp",
"memory_resource": "cpp",
"ratio": "cpp",
"regex": "cpp",
"shared_mutex": "cpp",
"valarray": "cpp",
"random": "cpp",
"cuchar": "cpp",
"compare": "cpp",
"concepts": "cpp",
"numbers": "cpp",
"filesystem": "cpp",
"xstring": "cpp",
"charconv": "cpp",
"format": "cpp",
"ios": "cpp",
"list": "cpp",
"locale": "cpp",
"mutex": "cpp",
"stack": "cpp",
"stop_token": "cpp",
"thread": "cpp",
"xfacet": "cpp",
"xhash": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocbuf": "cpp",
"xlocinfo": "cpp",
"xlocmes": "cpp",
"xlocmon": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"xmemory": "cpp",
"xstddef": "cpp",
"xtr1common": "cpp",
"xtree": "cpp",
"xutility": "cpp",
"queue": "cpp",
"semaphore": "cpp",
"hash_map": "cpp",
"set": "cpp",
"unordered_set": "cpp",
"source_location": "cpp",
"future": "cpp",
"cfenv": "cpp",
"cinttypes": "cpp",
"typeindex": "cpp",
"variant": "cpp",
"ranges": "cpp",
"span": "cpp",
"coroutine": "cpp",
"__bit_reference": "cpp",
"__config": "cpp",
"__debug": "cpp",
"__errc": "cpp",
"__hash_table": "cpp",
"__locale": "cpp",
"__mutex_base": "cpp",
"__node_handle": "cpp",
"__split_buffer": "cpp",
"__threading_support": "cpp",
"__tree": "cpp",
"__verbose_abort": "cpp",
"complex": "cpp"
}
}

98
CHANGELOG.md Normal file
View File

@ -0,0 +1,98 @@
# RenderD7 Changelog
## 0.9.5
- Remove Npi Intro and NVID Api
- Replace Toasts System with Message
- Lots of Optimisations
- Added GetTime
- Implement Draw2 Api
- Implement RD7Color and R7Vec2
- Add new Features to Color::RGBA
- Cleanup Code
- Added RenderD7 Keyboard (Overlay)
- Added Ftrace Overlay
- Moved MetrikOVL into an Overlay
- Removed Old Font/Text Handlers
- Added UI7 (New UI Api)
- Remove Old UI Api
- Added Music Player (MP3, Vorbis)
- Rewrite of RenderD7::Image
- Internal Debugger/Database (IDB)
- Removed BitmapPrinter
- Added nimg and nimg_engine
- Removed Old Error/Message Handler
- GetTextSize (extra buffer) + New TextShorter
## 0.9.4
- Implement new Security System To prevent from crashes
- Implement Functiontrace for better Timing Tests
- Implement MemAlloc Tracker (only size)
- Add some new Overlays (not functional yet)
- Complete Rewrite of Overlay System
- Fixed the FrameEnd Crash
- New System to get Hardware Info
- Removed RenderD7 Super Reselution (800px mode)
## 0.9.3
- Completly Documented Everything
- Fix typo in Sprite::getHeight
- Remove Deprecated/Useless Stuff
## 0.9.2
- Add Nvid Support(v0.0.1)
- Add Basic RenderD7 Splash
- Faster Graphics Init
- Fade Effects
- Fix Changelog Screen
## 0.9.1
- Fix Critical bug in Spritesheet animations
- Fix RenderD7::Color::Hex (Major performance tweak)
## 0.9.0
- Remove Stupid try of Console
- Add Services list
- Clean up Code
- Added Minimal Init for hax2.x
## 0.8.5
- Fix Deltatime
## 0.8.4
- A lot of Fixes
- New Features for BitmapPrinter
## 0.8.3
- Added Overlaycount to Info
- Addet ResultDecoder for errors
## 0.8.2
- Fix a lot of Stuff
- Use c++17 std::filesystem for RenderD7::Filesystem
## 0.8.1
- Add abillity to Get Stdout as string to render it to the screen.
## 0.8.0
- Implement BitmapPrinter
## 0.7.3
- Implement Over Render Overlay Framework
## 0.7.2
- Implement MT to csv file saving
- Add RGB2HEX
## 0.7.1
- Add the New Overlay Handler. Its Just in code and does nothing yet
## 0.7.0
- Made Big Progress In the MT Ovl but it still crashes On a 2nd C3D_FrameEnd \
- Implement 800px but doesn't work that good
## 0.6.2
- Fix Crash when exiting through Home Menu.
## 0.6.10
- Rewrite Threadsystem
- Improve framerate
## 0.6.02
- Fix Code in lang.hpp
- Add Draw Text Left Function (Right since 0.7.0)
- Add changelog
## 0.6.01
- Add Threading system
## 0.6.0
- Better Scene Management
## 0.5.0
- Fixed some Bugs!
## 0.4.0
- Trying to fix Filesystem and Bugs
## 0.3.0
- Recreate D7-Core into RenderD7
## 0.2.0
- Trying to create Animations of Images instead of Sheets
## 0.1.0
- Inital Release of D7-Core sprite animation plugin

2566
Doxyfile Normal file

File diff suppressed because it is too large Load Diff

201
Makefile Normal file
View File

@ -0,0 +1,201 @@
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITARM)),)
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
endif
include $(DEVKITARM)/3ds_rules
export renderd7_MAJOR := 0
export renderd7_MINOR := 9
export renderd7_PATCH := 4
VERSION := $(renderd7_MAJOR).$(renderd7_MINOR).$(renderd7_PATCH)
# If on a tagged commit, use the tag instead of the commit
ifneq ($(shell echo $(shell git tag -l --points-at HEAD) | head -c 1),)
GIT_VER := $(shell git tag -l --points-at HEAD)
else
GIT_VER := $(shell git rev-parse --short HEAD)
endif
TIME_TIME := $(shell date --iso=seconds)
#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# DATA is a list of directories containing data files
# INCLUDES is a list of directories containing header files
#---------------------------------------------------------------------------------
TARGET := renderd7
SOURCES := source source/external source/music
DATA := data
INCLUDES := include
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft
CFLAGS := -g -Wall -mword-relocations -save-temps\
-DV_RD7CSTRING=\"$(GIT_VER)\" \
-DV_RD7BTIME=\"$(TIME_TIME)\" \
-ffunction-sections -fdata-sections \
$(ARCH) $(BUILD_CFLAGS)
CFLAGS += $(INCLUDE) -D__3DS__ -D_GNU_SOURCE=1
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++20
ASFLAGS := -g $(ARCH) $(DEFINES)
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := $(PORTLIBS) $(CTRULIB)
#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
PICAFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.v.pica)))
SHLISTFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.shlist)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
#---------------------------------------------------------------------------------
export LD := $(CC)
#---------------------------------------------------------------------------------
else
#---------------------------------------------------------------------------------
export LD := $(CXX)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------
export OFILES_SOURCES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
export OFILES_BIN := $(addsuffix .o,$(BINFILES)) \
$(PICAFILES:.v.pica=.shbin.o) $(SHLISTFILES:.shlist=.shbin.o)
export OFILES := $(OFILES_BIN) $(OFILES_SOURCES)
export HFILES := $(PICAFILES:.v.pica=_shbin.h) $(addsuffix .h,$(subst .,_,$(BINFILES)))
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I.
.PHONY: clean all doc
#---------------------------------------------------------------------------------
all: lib/librenderd7.a lib/librenderd7d.a
doc:
@doxygen Doxyfile
dist-bin: all
@tar --exclude=*~ -cjf $(TARGET).tar.bz2 include lib
dist-src:
@tar --exclude=*~ -cjf $(TARGET)-src.tar.bz2 include $(SOURCES) Makefile
dist: dist-src dist-bin
lib:
@[ -d $@ ] || mkdir -p $@
release:
@[ -d $@ ] || mkdir -p $@
debug:
@[ -d $@ ] || mkdir -p $@
lib/librenderd7.a : lib release $(SOURCES) $(INCLUDES)
@$(MAKE) BUILD=release OUTPUT=$(CURDIR)/$@ \
BUILD_CFLAGS="-DNDEBUG=1 -O2 -fomit-frame-pointer" \
DEPSDIR=$(CURDIR)/release \
--no-print-directory -C release \
-f $(CURDIR)/Makefile
lib/librenderd7d.a : lib debug $(SOURCES) $(INCLUDES)
@$(MAKE) BUILD=debug OUTPUT=$(CURDIR)/$@ \
BUILD_CFLAGS="-DDEBUG=1 -Og" \
DEPSDIR=$(CURDIR)/debug \
--no-print-directory -C debug \
-f $(CURDIR)/Makefile
#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr release debug lib includes
#---------------------------------------------------------------------------------
else
DEPENDS := $(OFILES:.o=.d)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT) : $(OFILES)
$(OFILES_SOURCES) : $(HFILES)
#---------------------------------------------------------------------------------
# you need a rule like this for each extension you use as binary data
#---------------------------------------------------------------------------------
%.bin.o %_bin.h : %.bin
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)
#---------------------------------------------------------------------------------
# rules for assembling GPU shaders
#---------------------------------------------------------------------------------
define shader-as
$(eval CURBIN := $*.shbin)
$(eval DEPSFILE := $(DEPSDIR)/$*.shbin.d)
echo "$(CURBIN).o: $< $1" > $(DEPSFILE)
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(CURBIN) | tr . _)`.h
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(CURBIN) | tr . _)`.h
echo "extern const u32" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(CURBIN) | tr . _)`.h
picasso -o $(CURBIN) $1
bin2s $(CURBIN) | $(AS) -o $*.shbin.o
endef
%.shbin.o %_shbin.h : %.v.pica %.g.pica
@echo $(notdir $^)
@$(call shader-as,$^)
%.shbin.o %_shbin.h : %.v.pica
@echo $(notdir $<)
@$(call shader-as,$<)
%.shbin.o %_shbin.h : %.shlist
@echo $(notdir $<)
@$(call shader-as,$(foreach file,$(shell cat $<),$(dir $<)$(file)))
-include $(DEPENDS)
#---------------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------------

View File

@ -1,2 +1,58 @@
# RenderD7
Simple and Easey to use UI and Graphics helper.
# <img alt="LOGO" src="https://github.com/NPI-D7/RenderD7/raw/main/logo.png" height="90">
RenderD7 is now LibRenderD7.
### Installation
Download a Package From Releses Page
`https://github.com/NPI-D7/RenderD7/releases/download/v0.9.4/renderd7.tar.bz2 -o renderd7.tar.bz2`
Then Extract it to your Libraries Path
`bzip2 -cd renderd7.tar.bz2 | tar -xf - -C path_to_your_libs`
Finally put `-lrenderd7` to the First Place and add the path_to_your_libs
```
LIBS := -lrenderd7 -lcurl -lstdc++ -lm -lcitro2d -lcitro3d -lctru
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := $(PORTLIBS) $(CTRULIB) ../path_to_your_libs
```
Make sure that `-lrenderd7` is before `-lcitro2d`, `-lcitro3d`, `-lctru`.
Here an example tree
```
Example-App
├── gfx
├── libs
│ ├── include
│ │ ├── rd7.hpp
│ │ └── renderd7
│ └── lib
│ ├── librenderd7.a
│ └── librenderd7d.a
├── Makefile
├── romfs
│ └── gfx
└── src
└── main.cpp
```
# Back to Old Usage aka Submodule (0.9.5+)
If you want to use RenderD7 as Submodule run
`git submodule add https://github.com/NPI-D7/RenderD7`
And to Use Add this to make file
```
# Make Sure to Change this paths if your Submodule
# is located somewhere else
RENDERD7_SRC := RenderD7/source RenderD7/external
RENDERD7_INC := RenderD7/include
```
Now you need to add it to your sources and includes
```
SOURCES := source $(RENDERD7_SRC)
INCLUDES := source $(RENDERD7_INC)
```
Example from rd7tf
# Credits
- NPI-D7
- Tobi-D7 Main Dev
Some Icons are From
https://icons8.de/
See Subfolder Readmes

31
assets/build_assets.sh Executable file
View File

@ -0,0 +1,31 @@
#!/bin/bash
echo "Create Directorys"
mkdir -p build
mkdir -p code
echo "Generating Spritesheets"
cd resources
for file in *.t3s
do
filename=$(basename "$file" .t3s).t3x
tex3ds -o "../build/$filename" -i "${file}"
done
echo "Converting Spritesheets into C++ Code"
cd ../code
for file in ../build/*.t3x
do
name="${file##*/}"
name="${name%.*}"
../../tools/bin/file2array "${file}" "${name}"
done
echo "Fix The Output of file2array"
for file in ./*.cpp
do
../../tools/bin/rd7f2afix "${file}" "renderd7"
done
echo "Finished!"

7
assets/clear_assets.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
echo "Deleting Directorys"
rm -rf build
rm -rf code
echo "Finished!"

View File

@ -0,0 +1,3 @@
--atlas -f rgba -z auto
renderd7_logo/renderd7_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

8
cformat.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
find . -type f \( -name '*.h' -o -name '*.hpp' -o -name '*.hh' -o -name '*.ino' -o -name '*.cpp' -o -name '*.c' -o -name '*.cxx' -o -name '*.inl' \) -and -not -path './build/*' -not -path './base/external/*' -not -path './DPP/*' | while read file; do
if [[ "$file" != *"json.hpp" ]]; then
echo "Formatting $file..."
clang-format -i --style=LLVM $file
fi
done

638
docsn.css Normal file
View File

@ -0,0 +1,638 @@
/* This doxygen theme is free to use. If you like this, please Star https://github.com/kcwongjoe/doxygen_theme_flat_design */
/* Color Pattern. You can change this pattern to design your theme. */
:root {
/* Content */
--bgcolor: #ffffff;
--bgfont: #303030;
--bgfont2: #f3c60a;
--bgfont-hover: #f3c60a;
--bgfont-hover-text-decoration: none;
--bgborder: #7d7d7d;
--bgborder2: #f6f6f6;
/* Main Header */
--bg1color: #303030;
--bg1font: #ffffff;
--bg1font2: #f3c60a;
/* Second header */
--bg2color: #E2E2E2;
--bg2font: #7D7D7D;
--bg2-hover-bg: #ffffff;
--bg2-hover-font: #303030;
--bg2-hover-topborder: #f3c60a;
/* Third header */
--bg3color: #f6f6f6;
--bg3font: #303030;
--bg3font2: #7D7D7D;
/* Code */
--code-bg: #f6f6f6;
--code-comment: #7D7D7D;
--code-keyword: #d73a49;
--code-preprocessor: #d73a49;
--code-keywordtype: #d73a49;
--code-text: #303030;
--code-code: #6f42c1;
--code-line: #7D7D7D;
--code-line-bg: #D8D8D8;
/* Namespace List, Class List icon */
--icon-bg: #303030;
--icon-font: #f3c60a;
/* Class Index */
--qindex-menu-bg: #303030;
--qindex-menu-font: #ffffff;
--qindex-menu-font-hover: #f3c60a;
--qindex-icon-bg: #f3c60a;
--qindex-icon-font: #303030;
/* Member table */
--mem-title-bg: #303030;
--mem-title-font: #ffffff;
--mem-subtitle-bg: #f3c60a;
--mem-subtitle-font: #303030;
--mem-subtitle-font-hover: #303030;
--mem-content-bg: #ffffff;
--mem-content-font: #303030;
--mem-content-border: #f6f6f6;
/* Nav Tree */
--nav-tree-bg: #E2E2E2;
--nav-tree-bg-hover: #ffffff;
--nav-tree-font: #7D7D7D;
--nav-tree-font-hover: #303030;
--nav-tree-bg-selected: #f3c60a;
--nav-tree-font-selected: #303030;
}
body, table, div, p, dl {
color: var(--bgfont);
background-color: var(--bgcolor);
line-height: 150%;
font: 14px/22px, Roboto, Arial;
}
div.contents {
margin: 20px 40px;
}
div.contents ul {
line-height: 200%;
}
/***********************************/
/********** Project header *********/
/***********************************/
#titlearea {
border-bottom: none;
padding-bottom: 20px;
padding-top: 20px;
}
#titlearea, #titlearea * {
color: var(--bg1font);
background-color: var(--bg1color);
}
#projectname {
padding: 0px 40px !important;
}
#projectbrief {
padding: 0px 40px !important;
}
#projectalign {
padding: 0px !important;
}
/***********************************/
/************ Main Menu ************/
/***********************************/
/* Margin */
#main-menu {
padding: 0px 30px;
}
#main-menu a, #main-menu a:hover {
padding-top: 10px;
padding-bottom: 10px;
}
/* Menu button */
#main-menu li a {
background-image: none;
font-family: Arial;
text-transform: uppercase;
text-shadow: none;
font-size: 14px;
font-weight: 700;
}
#main-menu, #main-menu>li>a {
background-image: none;
background-color: var(--bg2color);
color: var(--bg2font);
transition: 0.2s;
}
/* hover Effect */
#main-menu>li {
border-top: 5px solid var(--bg2color);
}
#main-menu>li:hover {
color: var(--bg2-hover-font);
background-color: var(--bg2-hover-bg);
border-top: 5px solid var(--bg2-hover-topborder);
}
#main-menu>li:hover, #main-menu>li>a:hover, #main-menu>li>a.highlighted {
color: var(--bg2-hover-font);
background-color: var(--bg2-hover-bg);
}
/* Search Bar */
#MSearchBox {
border-radius: 0;
box-shadow: none;
}
#MSearchBox>span {
margin: 10px;
}
#main-menu>li:last-child {
padding: 25px 0px;
}
/* Reset search hover color*/
#main-menu>li:last-child:hover {
color: var(--bg2font);
background-color: var(--bg2color);
border-top: 5px solid var(--bg2color);
}
#MSearchResultsWindow {
border: 1px solid var(--bg3font2);
background-color: var(--bg3color);
padding: 10px;
}
body.SRPage, body.SRPage * {
font-family: Arial;
}
/* Sub Menu */
#main-menu>li ul {
transition: max-height 0.2s ease-in-out;
padding: 0px;
border-radius: 0px !important;
}
#main-menu>li ul:before, #main-menu>li ul:after {
border-width: 0px;
}
#main-menu>li>ul li a, #main-menu>li>ul li {
background-color: var(--bgcolor);
color: var(--bgfont);
background-image: none;
}
#main-menu>li>ul li a:hover, #main-menu>li>ul li:hover {
background-color: var(--bgfont2);
color: var(--bgfont);
}
/***********************************/
/************** Header *************/
/***********************************/
div.headertitle {
padding: 5px 40px;
}
div.header, div.header * {
color: var(--bg3font);
background-color: var(--bg3color);
border-bottom: none;
}
div.summary {
padding-right: 40px;
}
/***********************************/
/************** Link *************/
/***********************************/
a, a:visited, a:active, .contents a:visited, body.SRPage a, body.SRPage a:visited, body.SRPage a:active {
color: var(--bgfont);
text-decoration: none;
}
a:hover, .contents a:hover, body.SRPage a:hover {
color: var(--bgfont-hover);
text-decoration: var(--bgfont-hover-text-decoration);
}
/***********************************/
/************ Nav-path ************/
/***********************************/
#nav-path, #nav-path ul {
background-image: none;
}
#nav-path ul {
padding: 5px 30px;
}
#nav-path, #nav-path * {
color: var(--bg3font2);
background-color: var(--bg3color);
border: none;
font-family: Arial;
}
li.navelem {
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbG5zOnN2Z2pzPSJodHRwOi8vc3ZnanMuY29tL3N2Z2pzIiB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgeD0iMCIgeT0iMCIgdmlld0JveD0iMCAwIDI5Mi4zNTkgMjkyLjM1OSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTEyIDUxMiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgY2xhc3M9IiI+PGc+CjxnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+Cgk8cGF0aCBkPSJNMjIyLjk3OSwxMzMuMzMxTDk1LjA3Myw1LjQyNEM5MS40NTYsMS44MDcsODcuMTc4LDAsODIuMjI2LDBjLTQuOTUyLDAtOS4yMzMsMS44MDctMTIuODUsNS40MjQgICBjLTMuNjE3LDMuNjE3LTUuNDI0LDcuODk4LTUuNDI0LDEyLjg0N3YyNTUuODEzYzAsNC45NDgsMS44MDcsOS4yMzIsNS40MjQsMTIuODQ3YzMuNjIxLDMuNjE3LDcuOTAyLDUuNDI4LDEyLjg1LDUuNDI4ICAgYzQuOTQ5LDAsOS4yMy0xLjgxMSwxMi44NDctNS40MjhsMTI3LjkwNi0xMjcuOTA3YzMuNjE0LTMuNjEzLDUuNDI4LTcuODk3LDUuNDI4LTEyLjg0NyAgIEMyMjguNDA3LDE0MS4yMjksMjI2LjU5NCwxMzYuOTQ4LDIyMi45NzksMTMzLjMzMXoiIGZpbGw9IiM3ZDdkN2QiIGRhdGEtb3JpZ2luYWw9IiMwMDAwMDAiIHN0eWxlPSIiIGNsYXNzPSIiPjwvcGF0aD4KPC9nPgo8ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8L2c+CjxnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjwvZz4KPGcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPC9nPgo8ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8L2c+CjxnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjwvZz4KPGcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPC9nPgo8ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8L2c+CjxnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjwvZz4KPGcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPC9nPgo8ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8L2c+CjxnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjwvZz4KPGcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPC9nPgo8ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8L2c+CjxnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjwvZz4KPGcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPC9nPgo8L2c+PC9zdmc+);
background-size: 9px;
}
li.navelem a {
margin-right: 20px;
}
/***********************************/
/*************** mem ***************/
/***********************************/
.memtitle {
padding: 15px;
margin-top: 30px;
border-top-left-radius: 0px;
border-top-right-radius: 0px;
}
.memtitle, .memtitle *, .memtitle a:visited {
border: none;
background-image: none;
color: var(--mem-title-font);
background-color: var(--mem-title-bg);
}
.memproto {
padding: 10px;
text-shadow: none;
padding: 20px;
border-top-right-radius: 0px;
-moz-border-radius-topright: 0px;
-webkit-border-top-right-radius: 0px;
}
.memproto, .memproto *, .memproto a:visited {
border: none;
background-image: none;
background-color: var(--mem-subtitle-bg);
color: var(--mem-subtitle-font);
font-size: inherit;
line-height: 100%
}
.memproto a:hover {
color: var(--mem-subtitle-font-hover);
}
.memdoc {
border-bottom: 1px solid var(--mem-content-border);
border-left: 1px solid var(--mem-content-border);
border-right: 1px solid var(--mem-content-border);
background-color: var(--mem-content-bg);
color: var(--mem-content-font);
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
-moz-border-radius-bottomleft: 0px;
-moz-border-radius-bottomright: 0px;
-webkit-border-bottom-left-radius: 0px;
-webkit-border-bottom-right-radius: 0px;
}
.memdoc p, .memdoc dt {
padding: 0px 20px;
}
/***********************************/
/************* Contents ************/
/***********************************/
a.anchor {
padding-top: 20px;
}
/***********************************/
/************* fragment ************/
/***********************************/
h2.groupheader {
color: #303030;
font-size: 200%;
font-weight: bold;
border-bottom: none;
padding-top: 20px;
padding-bottom: 20px;
}
div.fragment, pre.fragment {
border: none;
padding: 20px;
margin: none;
background-color: var(--code-bg);
}
div.line {
background-color: var(--code-bg);
}
span.comment {
color: var(--code-comment);
}
span.keyword {
color: var(--code-keyword);
}
span.preprocessor {
color: var(--code-preprocessor);
}
span.keywordtype {
color: var(--code-keywordtype);
}
span.mlabel {
background-color: var(--code-text);
color: var(--code-bg);
border-top: none;
border-left: none;
border-right: none;
border-bottom: none;
padding: 10px;
border-radius: 0px;
}
a.code {
color: var(--code-code);
}
span.lineno, span.lineno>* {
color: var(--code-line);
border-right: none;
background-color: var(--code-bg);
}
span.lineno a {
background-color: var(--code-line-bg);
}
span.lineno a:hover {
color: var(--bg3font);
background-color: var(--code-line-bg);
}
/***********************************/
/************* directory ***********/
/***********************************/
.directory tr.even {
background-color: inherit;
}
.iconfclosed {
background-image: url(closed-folder.png);
margin-right: 10px;
}
.iconfopen {
background-image: url(opened-folder.png);
margin-right: 10px;
}
.icondoc {
background-image: url(document.png);
margin-right: 10px;
}
.arrow {
color: #7d7d7d;
}
.icona {
vertical-align: middle;
margin-right: 5px;
}
.icon {
background-color: var(--icon-bg);
color: var(--icon-font);
display: table-cell;
vertical-align: middle;
height: 20px;
width: 20px;
}
div.ah {
background-color: var(--qindex-icon-bg);
color: var(--qindex-icon-font);
text-align: center;
background-image: none;
-webkit-box-shadow: none;
box-shadow: none;
-webkit-border-radius: 0px;
border-radius: 0px;
border: none;
}
div.qindex {
background-color: var(--qindex-menu-bg);
border: none;
padding: 20px;
}
a.qindex {
color: var(--qindex-menu-font);
font-weight: normal;
font-size: 20px;
}
a:hover.qindex {
color: var(--qindex-menu-font-hover);
}
a:visited.qindex {
color: var(--qindex-menu-font);
}
table.classindex {
margin-top: 30px;
margin-bottom: 30px;
}
table.classindex a.el {
font-weight: normal;
}
/***********************************/
/************** footer *************/
/***********************************/
div.directory {
border-top: 1px solid var(--bgborder);
border-bottom: none;
margin: 20px 0px;
}
div.directory a.el {
font-weight: normal;
}
div.directory>table {
margin: 20px 0px;
}
hr.footer {
border: none;
}
.contents>hr {
border-top: 0px;
}
/***********************************/
/*********** memberdecls ***********/
/***********************************/
.memItemLeft, .memItemRight {
padding: 15px 30px;
background-color: inherit;
}
.mdescRight {
padding: 0px 30px 10px 30px;
}
.memberdecls * {
background-color: inherit;
}
.memSeparator {
border-bottom: 1px solid var(--bgborder2);
}
.memTemplParams {
color: var(--bgfont);
}
/***********************************/
/*********** nav-tree ***********/
/***********************************/
#nav-tree-contents {
background-color: var(--nav-tree-bg);
margin: 0px;
}
#side-nav, #nav-tree {
background-image: none;
background-color: var(--nav-tree-bg);
}
#nav-tree .item {
background-color: var(--nav-tree-bg);
font-family: Arial;
text-transform: uppercase;
text-shadow: none;
font-size: 14px;
font-weight: 700;
padding: 10px;
color: var(--nav-tree-font);
}
#nav-tree .arrow {
color: var(--nav-tree-font);
}
#nav-tree .selected {
background-image: none;
background-color: var(--nav-tree-bg-selected);
}
#nav-tree .selected a {
color: var(--nav-tree-font-selected);
}
#nav-tree .item:hover {
background-color: var(--nav-tree-bg-hover);
color: var(--nav-tree-font-hover);
}
#nav-tree .item a:hover {
color: var(--nav-tree-font-hover);
}
#side-nav .ui-resizable-e {
background-image: none;
background-color: var(--nav-tree-bg);
}
#nav-sync {
background-color: transparent;
}
#nav-sync>img {
content: url(off_sync.png);
}
#nav-sync.sync>img {
content: url(on_sync.png);
}
/***********************************/
/*********** Plant UML ***********/
/***********************************/
.plantumlgraph > img {
width: 80%;
}

23
envsetup.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
#Build Tools
echo "Build Tools..."
cd tools
./build_tools.sh
cd ..
#Setup asset-arrays
echo "Generate Asset-Arrays..."
cd assets
./build_assets.sh
echo "Update Files in RenderD7..."
cp -rf code/*.cpp ../source/
cp -rf code/*.hpp ../include/renderd7/
echo "Clean Assets..."
./clear_assets.sh
cd ..
#Clear Tools
echo "Clean Tools..."
cd tools
./clear_tools.sh
cd ..
#Finished
echo "Done!"

320
external/fs.c vendored
View File

@ -1,320 +0,0 @@
#include "external/fs.h"
#include <stdio.h>
#include <string.h>
void Utils_U8_To_U16(u16 *buf, const u8 *input, size_t bufsize) {
ssize_t units = utf8_to_utf16(buf, input, bufsize);
if (units < 0)
units = 0;
buf[units] = 0;
}
FS_Archive archive, sdmc_archive, nand_archive;
Result FS_OpenArchive(FS_Archive *archive, FS_ArchiveID archiveID) {
Result ret = 0;
if (R_FAILED(ret = FSUSER_OpenArchive(archive, archiveID, fsMakePath(PATH_EMPTY, ""))))
return ret;
return 0;
}
Result FS_CloseArchive(FS_Archive archive) {
Result ret = 0;
if (R_FAILED(ret = FSUSER_CloseArchive(archive)))
return ret;
return 0;
}
Result FS_OpenDir(Handle *handle, FS_Archive archive, const char *path) {
Result ret = 0;
u16 path_u16[strlen(path) + 1];
Utils_U8_To_U16(path_u16, (const u8 *)path, strlen(path) + 1);
if (R_FAILED(ret = FSUSER_OpenDirectory(handle, archive, fsMakePath(PATH_UTF16, path_u16))))
return ret;
return 0;
}
Result FS_OpenFile(Handle *handle, FS_Archive archive, const char *path, u32 flags, u32 attributes) {
Result ret = 0;
u16 path_u16[strlen(path) + 1];
Utils_U8_To_U16(path_u16, (const u8 *)path, strlen(path) + 1);
if (R_FAILED(ret = FSUSER_OpenFile(handle, archive, fsMakePath(PATH_UTF16, path_u16), flags, attributes)))
return ret;
return 0;
}
Result FS_MakeDir(FS_Archive archive, const char *path) {
Result ret = 0;
u16 path_u16[strlen(path) + 1];
Utils_U8_To_U16(path_u16, (const u8 *)path, strlen(path) + 1);
if (R_FAILED(ret = FSUSER_CreateDirectory(archive, fsMakePath(PATH_UTF16, path_u16), 0)))
return ret;
return 0;
}
Result FS_CreateFile(FS_Archive archive, const char *path, u64 size) {
Result ret = 0;
u16 path_u16[strlen(path) + 1];
Utils_U8_To_U16(path_u16, (const u8 *)path, strlen(path) + 1);
if (R_FAILED(ret = FSUSER_CreateFile(archive, fsMakePath(PATH_UTF16, path_u16), 0, size)))
return ret;
return 0;
}
Result FS_RecursiveMakeDir(FS_Archive archive, const char *path) {
Result ret = 0;
char buf[256];
char *p = NULL;
size_t len;
snprintf(buf, sizeof(buf), "%s", path);
len = strlen(buf);
if (buf[len - 1] == '/')
buf[len - 1] = 0;
for (p = buf + 1; *p; p++) {
if (*p == '/') {
*p = 0;
if (!FS_DirExists(archive, buf))
ret = FS_MakeDir(archive, buf);
*p = '/';
}
if (!FS_DirExists(archive, buf))
ret = FS_MakeDir(archive, buf);
}
return ret;
}
bool FS_FileExists(FS_Archive archive, const char *path) {
Handle handle;
u16 path_u16[strlen(path) + 1];
Utils_U8_To_U16(path_u16, (const u8 *)path, strlen(path) + 1);
if (R_FAILED(FSUSER_OpenFile(&handle, archive, fsMakePath(PATH_UTF16, path_u16), FS_OPEN_READ, 0)))
return false;
if (R_FAILED(FSFILE_Close(handle)))
return false;
return true;
}
bool FS_DirExists(FS_Archive archive, const char *path) {
Handle handle;
u16 path_u16[strlen(path) + 1];
Utils_U8_To_U16(path_u16, (const u8 *)path, strlen(path) + 1);
if (R_FAILED(FSUSER_OpenDirectory(&handle, archive, fsMakePath(PATH_UTF16, path_u16))))
return false;
if (R_FAILED(FSDIR_Close(handle)))
return false;
return true;
}
Result FS_GetFileSize(FS_Archive archive, const char *path, u64 *size) {
Result ret = 0;
Handle handle;
u16 path_u16[strlen(path) + 1];
Utils_U8_To_U16(path_u16, (const u8 *)path, strlen(path) + 1);
if (R_FAILED(ret = FSUSER_OpenFile(&handle, archive, fsMakePath(PATH_UTF16, path_u16), FS_OPEN_READ, 0)))
return ret;
if (R_FAILED(ret = FSFILE_GetSize(handle, size))) {
FSFILE_Close(handle);
return ret;
}
if (R_FAILED(ret = FSFILE_Close(handle)))
return ret;
return 0;
}
u64 FS_GetFreeStorage(FS_SystemMediaType media_type) {
FS_ArchiveResource resource = {0};
if (R_SUCCEEDED(FSUSER_GetArchiveResource(&resource, media_type)))
return (((u64)resource.freeClusters * (u64)resource.clusterSize));
return 0;
}
u64 FS_GetTotalStorage(FS_SystemMediaType media_type) {
FS_ArchiveResource resource = {0};
if (R_SUCCEEDED(FSUSER_GetArchiveResource(&resource, media_type)))
return (((u64)resource.totalClusters * (u64)resource.clusterSize));
return 0;
}
u64 FS_GetUsedStorage(FS_SystemMediaType media_type) {
return (FS_GetTotalStorage(media_type) - FS_GetUsedStorage(media_type));
}
Result FS_RemoveFile(FS_Archive archive, const char *path) {
Result ret = 0;
u16 path_u16[strlen(path) + 1];
Utils_U8_To_U16(path_u16, (const u8 *)path, strlen(path) + 1);
if (R_FAILED(ret = FSUSER_DeleteFile(archive, fsMakePath(PATH_UTF16, path_u16))))
return ret;
return 0;
}
Result FS_RemoveDir(FS_Archive archive, const char *path) {
Result ret = 0;
u16 path_u16[strlen(path) + 1];
Utils_U8_To_U16(path_u16, (const u8 *)path, strlen(path) + 1);
if (R_FAILED(ret = FSUSER_DeleteDirectory(archive, fsMakePath(PATH_UTF16, path_u16))))
return ret;
return 0;
}
Result FS_RemoveDirRecursive(FS_Archive archive, const char *path) {
Result ret = 0;
u16 path_u16[strlen(path) + 1];
Utils_U8_To_U16(path_u16, (const u8 *)path, strlen(path) + 1);
if (R_FAILED(ret = FSUSER_DeleteDirectoryRecursively(archive, fsMakePath(PATH_UTF16, path_u16))))
return ret;
return 0;
}
Result FS_RenameFile(FS_Archive archive, const char *old_filename, const char *new_filename) {
Result ret = 0;
u16 old_filename_u16[strlen(old_filename) + 1];
Utils_U8_To_U16(old_filename_u16, (const u8 *)old_filename, strlen(old_filename) + 1);
u16 new_filename_u16[strlen(new_filename) + 1];
Utils_U8_To_U16(new_filename_u16, (const u8 *)new_filename, strlen(new_filename) + 1);
if (R_FAILED(ret = FSUSER_RenameFile(archive, fsMakePath(PATH_UTF16, old_filename_u16), archive, fsMakePath(PATH_UTF16, new_filename_u16))))
return ret;
return 0;
}
Result FS_RenameDir(FS_Archive archive, const char *old_dirname, const char *new_dirname) {
Result ret = 0;
u16 old_dirname_u16[strlen(old_dirname) + 1];
Utils_U8_To_U16(old_dirname_u16, (const u8 *)old_dirname, strlen(old_dirname) + 1);
u16 new_dirname_u16[strlen(new_dirname) + 1];
Utils_U8_To_U16(new_dirname_u16, (const u8 *)new_dirname, strlen(new_dirname) + 1);
if (R_FAILED(ret = FSUSER_RenameDirectory(archive, fsMakePath(PATH_UTF16, old_dirname_u16), archive, fsMakePath(PATH_UTF16, new_dirname_u16))))
return ret;
return 0;
}
Result FS_Read(FS_Archive archive, const char *path, u64 size, void *buf) {
Result ret = 0;
Handle handle;
u32 bytes_read = 0;
if (R_FAILED(ret = FS_OpenFile(&handle, archive, path, FS_OPEN_READ, 0)))
return ret;
if (R_FAILED(ret = FSFILE_Read(handle, &bytes_read, 0, buf, size))) {
FSFILE_Close(handle);
return ret;
}
if (R_FAILED(ret = FSFILE_Close(handle)))
return ret;
return 0;
}
Result FS_Write(FS_Archive archive, const char *path, const void *buf, u32 size) {
Result ret = 0;
Handle handle;
u32 bytes_written = 0;
if (FS_FileExists(archive, path))
FS_RemoveFile(archive, path);
u16 path_u16[strlen(path) + 1];
Utils_U8_To_U16(path_u16, (const u8 *)path, strlen(path) + 1);
if (R_FAILED(ret = FSUSER_CreateFile(archive, fsMakePath(PATH_UTF16, path_u16), 0, size)))
return ret;
if (R_FAILED(ret = FSUSER_OpenFile(&handle, archive, fsMakePath(PATH_UTF16, path_u16), FS_OPEN_WRITE, 0)))
return ret;
if (R_FAILED(ret = FSFILE_Write(handle, &bytes_written, 0, buf, size, FS_WRITE_FLUSH))) {
FSFILE_Close(handle);
return ret;
}
if (R_FAILED(ret = FSFILE_Close(handle)))
return ret;
return 0;
}
char *FS_GetFileTimestamp(const char *path) {
static char timeStr[60];
u64 mtime = 0;
if (R_SUCCEEDED(archive_getmtime(path, &mtime))) {
time_t mt = mtime;
struct tm *timeStruct = gmtime(&mt);
int hours = timeStruct->tm_hour;
int minutes = timeStruct->tm_min;
int day = timeStruct->tm_mday;
int month = timeStruct->tm_mon + 1; // January being 0
int year = timeStruct->tm_year + 1900;
snprintf(timeStr, 60, "%d/%d/%d %2i:%02i", year, month, day, hours, minutes);
}
else
return NULL;
return timeStr;
}

30
external/fs.h vendored
View File

@ -1,30 +0,0 @@
#ifndef _3D_SHELL_FS_H
#define _3D_SHELL_FS_H
#include <3ds.h>
extern FS_Archive archive, sdmc_archive, nand_archive;
Result FS_OpenArchive(FS_Archive *archive, FS_ArchiveID id);
Result FS_CloseArchive(FS_Archive archive);
Result FS_OpenDir(Handle *handle, FS_Archive archive, const char *path);
Result FS_OpenFile(Handle *handle, FS_Archive archive, const char *path, u32 flags, u32 attributes);
Result FS_MakeDir(FS_Archive archive, const char *path);
Result FS_CreateFile(FS_Archive archive, const char *path, u64 size);
Result FS_RecursiveMakeDir(FS_Archive archive, const char *path);
bool FS_FileExists(FS_Archive archive, const char *path);
bool FS_DirExists(FS_Archive archive, const char *path);
Result FS_GetFileSize(FS_Archive archive, const char *path, u64 *size);
u64 FS_GetFreeStorage(FS_SystemMediaType media_type);
u64 FS_GetTotalStorage(FS_SystemMediaType media_type);
u64 FS_GetUsedStorage(FS_SystemMediaType media_type);
Result FS_RemoveFile(FS_Archive archive, const char *path);
Result FS_RemoveDir(FS_Archive archive, const char *path);
Result FS_RemoveDirRecursive(FS_Archive archive, const char *path);
Result FS_RenameFile(FS_Archive archive, const char *old_filename, const char *new_filename);
Result FS_RenameDir(FS_Archive archive, const char *old_dirname, const char *new_dirname);
Result FS_Read(FS_Archive archive, const char *path, u64 size, void *buf);
Result FS_Write(FS_Archive archive, const char *path, const void *buf, u32 size);
char *FS_GetFileTimestamp(const char *path);
#endif

6464
external/lodepng.cpp vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,44 +0,0 @@
PROJECT = libtween
CXX = arm-none-eabi-g++
AR = arm-none-eabi-ar
CXXFLAGS = -g -Wall -pedantic -std=c++11 -fno-rtti -fno-exceptions
INCLUDES = -Iinclude/
SOURCES = $(wildcard src/*.cpp) $(wildcard src/*/*.cpp)
OBJECTS = $(SOURCES:src/%.cpp=build/arm/%.o)
TEST_CXX = g++
TEST_AR = ar
TEST_CXXFLAGS = -g -Wall -pedantic -std=c++11 -fno-rtti -fno-exceptions -DTESTING
TEST_OBJECTS = $(SOURCES:src/%.cpp=build/test/%.o)
.PHONY: all dir clean test
all: dir $(PROJECT).a
test: dir $(PROJECT)-test.a
dir:
@mkdir -p build/arm/equations
@mkdir -p build/arm/paths
@mkdir -p build/test/equations
@mkdir -p build/test/paths
@mkdir -p lib
$(PROJECT).a: $(OBJECTS)
$(AR) rvs lib/$@ $^
$(PROJECT)-test.a: $(TEST_OBJECTS)
$(TEST_AR) rvs lib/$@ $^
clean:
@rm -rf build
@rm -rf lib
@echo "Successfully cleaned."
build/arm/%.o: src/%.cpp
$(CXX) $(INCLUDES) $(CXXFLAGS) -c $< -o $@
$(CXX) -MM $< > build/arm/$*.d
build/test/%.o: src/%.cpp
$(TEST_CXX) $(INCLUDES) $(TEST_CXXFLAGS) -c $< -o $@
$(TEST_CXX) -MM $< > build/test/$*.d

View File

@ -1 +0,0 @@
BaseTween.o: src/BaseTween.cpp

Binary file not shown.

View File

@ -1 +0,0 @@
Tween.o: src/Tween.cpp

Binary file not shown.

View File

@ -1 +0,0 @@
TweenEquations.o: src/TweenEquations.cpp

Binary file not shown.

View File

@ -1 +0,0 @@
TweenManager.o: src/TweenManager.cpp

Binary file not shown.

View File

@ -1 +0,0 @@
TweenPaths.o: src/TweenPaths.cpp

Binary file not shown.

View File

@ -1 +0,0 @@
TweenPool.o: src/TweenPool.cpp

Binary file not shown.

View File

@ -1 +0,0 @@
Back.o: src/equations/Back.cpp

Binary file not shown.

View File

@ -1 +0,0 @@
Bounce.o: src/equations/Bounce.cpp

View File

@ -1 +0,0 @@
Circ.o: src/equations/Circ.cpp

Binary file not shown.

View File

@ -1 +0,0 @@
Cubic.o: src/equations/Cubic.cpp

Binary file not shown.

View File

@ -1 +0,0 @@
Elastic.o: src/equations/Elastic.cpp

View File

@ -1 +0,0 @@
Expo.o: src/equations/Expo.cpp

Binary file not shown.

View File

@ -1 +0,0 @@
Linear.o: src/equations/Linear.cpp

View File

@ -1 +0,0 @@
Quad.o: src/equations/Quad.cpp

Binary file not shown.

View File

@ -1 +0,0 @@
Quart.o: src/equations/Quart.cpp

Binary file not shown.

View File

@ -1 +0,0 @@
Quint.o: src/equations/Quint.cpp

Binary file not shown.

View File

@ -1 +0,0 @@
Sine.o: src/equations/Sine.cpp

Binary file not shown.

View File

@ -1 +0,0 @@
CatmullRom.o: src/paths/CatmullRom.cpp

View File

@ -1 +0,0 @@
LinearPath.o: src/paths/LinearPath.cpp

View File

@ -1,172 +0,0 @@
//
// BaseTween.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
/**
* BaseTween is the base class of Tween and Timeline. It defines the
* iteration engine used to play animations for any number of times, and in
* any direction, at any speed.
* <p/>
*
* It is responsible for calling the different callbacks at the right moments,
* and for making sure that every callbacks are triggered, even if the update
* engine gets a big delta time at once.
*
* @see Tween
* @see Timeline
* @author Aurelien Ribon | http://www.aurelienribon.com/
*/
#ifndef __BaseTween__
#define __BaseTween__
#include <functional>
#include <map>
#include <TweenEngine/TweenCallback.h>
namespace TweenEngine
{
class TweenManager;
typedef std::function<void(BaseTween* source)> TweenCallbackFunction;
class BaseTween
{
private:
// General
int step;
int repeatCnt;
bool isIterationStep;
bool isYoyoFlag;
// Timings
float repeatDelay;
float currentTime;
float deltaTime;
bool isStartedFlag; // true when the object is started
bool isInitializedFlag; // true after the delay
bool isFinishedFlag; // true when all repetitions are done
bool isKilledFlag; // true if kill() was called
bool isPausedFlag; // true if pause() was called
// Misc
TweenCallback *callback;
int callbackTriggers;
void *userData;
std::map<int, TweenCallbackFunction> callbacks;
// Update
void initialize();
void testRelaunch();
void updateStep();
void testCompletion();
protected:
// Timings
float delayStart;
float duration;
virtual void reset();
virtual void forceStartValues() = 0;
virtual void forceEndValues() = 0;
virtual void initializeOverride();
virtual void updateOverride(int step, int lastStep, bool isIterationStep, float delta);
virtual void forceToStart();
virtual void forceToEnd(float time);
void callCallback(int type);
bool isReverse(int step);
bool isValid(int step);
public:
virtual ~BaseTween() {}
virtual int getTweenCount() = 0;
virtual int getTimelineCount() = 0;
// Package access
bool isAutoRemoveEnabled;
bool isAutoStartEnabled;
virtual BaseTween &build();
BaseTween &start();
BaseTween &start(TweenManager &manager);
BaseTween &delay(float delay);
void kill();
virtual void free();
void pause();
void resume();
BaseTween &repeat(int count, float delay);
BaseTween &repeatYoyo(int count, float delay);
BaseTween &setCallback(TweenCallback *callback);
BaseTween &setCallback(int type, const TweenCallbackFunction& callback);
BaseTween &setCallbackTriggers(int flags);
BaseTween &setUserData(void *data);
// Getters
float getDelay();
float getDuration();
int getRepeatCount();
float getRepeatDelay();
float getFullDuration();
void *getUserData();
int getStep();
float getCurrentTime();
bool isStarted();
bool isInitialized();
bool isFinished();
bool isYoyo();
bool isPaused();
// Update
void update(float delta);
};
}
#endif /* defined(__BaseTween__) */

View File

@ -1,100 +0,0 @@
//
// Pool.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
/**
* A light pool of objects that can be resused to avoid allocation.
* Based on Nathan Sweet pool implementation
*/
#ifndef __Pool__
#define __Pool__
#include <vector>
#include <algorithm>
namespace TweenEngine
{
template<typename T>
class PoolCallback
{
public:
virtual void onPool(T *obj) = 0;
virtual void onUnPool(T *obj) = 0;
};
template<typename T>
class Pool
{
private:
std::vector<T *> objects;
PoolCallback<T> *callback;
protected:
virtual ~Pool() {}
virtual T *create()=0;
public:
Pool(int initCapacity, PoolCallback<T> *callback);
T *get();
void free(T *obj);
void clear();
int size();
void ensureCapacity(int minCapacity);
};
// Implementation
template <typename T>
Pool<T>::Pool(int initCapacity, PoolCallback<T> *cb) : objects(initCapacity), callback(cb)
{
}
template <typename T>
T *Pool<T>::get()
{
T *obj = nullptr;
if (objects.empty())
{
obj = create();
}
else
{
obj = objects.back();
objects.pop_back();
if (obj == nullptr) obj = create();
}
if (callback != nullptr) callback->onUnPool(obj);
return obj;
}
template <typename T>
void Pool<T>::free(T *obj)
{
if (obj == nullptr) return;
bool contains = (std::find(objects.begin(), objects.end(), obj) != objects.end());
if (!contains)
{
if (callback != nullptr) callback->onPool(obj);
objects.push_back(obj);
}
}
template <typename T>
void Pool<T>::clear() { objects.clear(); }
template <typename T>
int Pool<T>::size() { return objects.size(); }
template <typename T>
void Pool<T>::ensureCapacity(int minCapacity) { objects.reserve(minCapacity); }
}
#endif /* defined(__Pool__) */

View File

@ -1,116 +0,0 @@
//
// Tween.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __Tween__
#define __Tween__
#include <TweenEngine/Tweenable.h>
#include <TweenEngine/BaseTween.h>
#include <TweenEngine/Pool.h>
#include <TweenEngine/TweenEquation.h>
#include <TweenEngine/TweenPath.h>
#include <TweenEngine/TweenEquations.h>
#include <TweenEngine/TweenPaths.h>
namespace TweenEngine
{
class TweenPool;
class TweenPoolCallback;
class Tween : public BaseTween
{
friend class TweenPoolCallback;
private:
static int combinedAttrsLimit;
static int waypointsLimit;
// Main
Tweenable *targetObj;
int type;
TweenEquation *equation;
TweenPath *pathAlgorithm;
// General
bool isFrom;
bool isRelative;
int combinedAttrsCnt;
int waypointsCnt;
// Values
float* startValues;
float* targetValues;
float* waypoints;
// Buffers
float *accessorBuffer;
int accessorBufferSize;
float *pathBuffer;
int pathBufferSize;
//static TweenPoolCallback *poolCallback;
static TweenPool &pool;
void setup(Tweenable *target, int tweenType, float duration);
protected:
virtual void reset();
virtual void forceStartValues();
virtual void forceEndValues();
virtual void initializeOverride();
virtual void updateOverride(int step, int lastStep, bool isIterationStep, float delta);
public:
static const int ACCESSOR_READ = 0;
static const int ACCESSOR_WRITE = 1;
static void setCombinedAttributesLimit(int limit);
static void setWaypointsLimit(int limit);
static const char *getVersion();
static int getPoolSize();
static void ensurePoolCapacity(int minCapacity);
static Tween &to(Tweenable& target, int tweenType, float duration);
static Tween &from(Tweenable& target, int tweenType, float duration);
static Tween &set(Tweenable& target, int tweenType);
static Tween &call(TweenCallback &callback);
static Tween &mark();
Tween();
~Tween();
virtual int getTweenCount();
virtual int getTimelineCount();
virtual Tween &build();
virtual void free();
Tween &ease(TweenEquation &easeEquation);
Tween &target(float targetValue);
Tween &target(float targetValue1, float targetValue2);
Tween &target(float targetValue1, float targetValue2, float targetValue3);
Tween &target(float *targetValues, int len);
Tween &targetRelative(float targetValue);
Tween &targetRelative(float targetValue1, float targetValue2);
Tween &targetRelative(float targetValue1, float targetValue2, float targetValue3);
Tween &targetRelative(float *targetValues, int len);
Tween &waypoint(float targetValue);
Tween &waypoint(float targetValue1, float targetValue2);
Tween &waypoint(float targetValue1, float targetValue2, float targetValue3);
Tween &waypoint(float *targetValues, int len);
Tween &path(TweenPath &path);
int getType();
TweenEquation *getEasing();
float *getTargetValues();
int getCombinedAttributesCount();
};
}
#endif /* defined(__Tween__) */

View File

@ -1,103 +0,0 @@
//
// TweenAccessor.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
/**
* The TweenAccessor interface lets you interpolate any attribute from any
* object. Just implement it as you want and register it to the engine by
* calling {@link Tween#registerAccessor}.
* <p/>
*
* <h2>Example</h2>
*
* The following code snippet presents an example of implementation for tweening
* a Particle class. This Particle class is supposed to only define a position
* with an "x" and an "y" fields, and their associated getters and setters.
* <p/>
*
* <pre> {@code
* public class ParticleAccessor implements TweenAccessor<Particle> {
* public static final int X = 1;
* public static final int Y = 2;
* public static final int XY = 3;
*
* public int getValues(Particle target, int tweenType, float[] returnValues) {
* switch (tweenType) {
* case X: returnValues[0] = target.getX(); return 1;
* case Y: returnValues[0] = target.getY(); return 1;
* case XY:
* returnValues[0] = target.getX();
* returnValues[1] = target.getY();
* return 2;
* default: assert false; return 0;
* }
* }
*
* public void setValues(Particle target, int tweenType, float[] newValues) {
* switch (tweenType) {
* case X: target.setX(newValues[0]); break;
* case Y: target.setY(newValues[1]); break;
* case XY:
* target.setX(newValues[0]);
* target.setY(newValues[1]);
* break;
* default: assert false; break;
* }
* }
* }
* }</pre>
*
* Once done, you only need to register this TweenAccessor once to be able to
* use it for every Particle objects in your application:
* <p/>
*
* <pre> {@code
* Tween.registerAccessor(Particle.class, new ParticleAccessor());
* }</pre>
*
* And that's all, the Tween Engine can no work with all your particles!
*
* @author Aurelien Ribon | http://www.aurelienribon.com/
*/
#ifndef __TweenAccessor__
#define __TweenAccessor__
namespace TweenEngine
{
template<class T>
class TweenAccessor
{
public:
virtual ~TweenAccessor() {}
/**
* Gets one or many values from the target object associated to the
* given tween type. It is used by the Tween Engine to determine starting
* values.
*
* @param target The target object of the tween.
* @param tweenType An integer representing the tween type.
* @param returnValues An array which should be modified by this method.
* @return The count of modified slots from the returnValues array.
*/
virtual int getValues(T& target, int tweenType, float *returnValues) = 0;
/**
* This method is called by the Tween Engine each time a running tween
* associated with the current target object has been updated.
*
* @param target The target object of the tween.
* @param tweenType An integer representing the tween type.
* @param newValues The new values determined by the Tween Engine.
*/
virtual void setValues(T& target, int tweenType, float *newValues) = 0;
};
}
#endif /* defined(__TweenAccessor__) */

View File

@ -1,65 +0,0 @@
//
// TweenCallback.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
/**
* TweenCallbacks are used to trigger actions at some specific times. They are
* used in both Tweens and Timelines. The moment when the callback is
* triggered depends on its registered triggers:
* <p/>
*
* <b>BEGIN</b>: right after the delay (if any)<br/>
* <b>START</b>: at each iteration beginning<br/>
* <b>END</b>: at each iteration ending, before the repeat delay<br/>
* <b>COMPLETE</b>: at last END event<br/>
* <b>BACK_BEGIN</b>: at the beginning of the first backward iteration<br/>
* <b>BACK_START</b>: at each backward iteration beginning, after the repeat delay<br/>
* <b>BACK_END</b>: at each backward iteration ending<br/>
* <b>BACK_COMPLETE</b>: at last BACK_END event
* <p/>
*
* <pre> {@code
* forward : BEGIN COMPLETE
* forward : START END START END START END
* |--------------[XXXXXXXXXX]------[XXXXXXXXXX]------[XXXXXXXXXX]
* backward: bEND bSTART bEND bSTART bEND bSTART
* backward: bCOMPLETE bBEGIN
* }</pre>
*
* @see Tween
* @see Timeline
* @author Aurelien Ribon | http://www.aurelienribon.com/
*/
#ifndef __TweenCallback__
#define __TweenCallback__
namespace TweenEngine
{
class BaseTween;
class TweenCallback
{
public:
static const int BEGIN = 0x01;
static const int START = 0x02;
static const int END = 0x04;
static const int COMPLETE = 0x08;
static const int BACK_BEGIN = 0x10;
static const int BACK_START = 0x20;
static const int BACK_END = 0x40;
static const int BACK_COMPLETE = 0x80;
static const int ANY_FORWARD = 0x0F;
static const int ANY_BACKWARD = 0xF0;
static const int ANY = 0xFF;
virtual ~TweenCallback() {}
virtual void onEvent(int type, BaseTween *source) = 0;
};
}
#endif /* defined(__TweenCallback__) */

View File

@ -1,46 +0,0 @@
//
// TweenEquation.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
/**
* Base class for every easing equation. You can create your own equations
* and directly use them in the Tween engine by inheriting from this class.
*
* @see Tween
* @author Aurelien Ribon | http://www.aurelienribon.com/
*/
#ifndef __TweenEquation__
#define __TweenEquation__
//#include <string.h>
namespace TweenEngine
{
class TweenEquation
{
public:
/**
* Computes the next value of the interpolation.
*
* @param t The current time, between 0 and 1.
* @return The current value.
*/
virtual float compute(float t) = 0;
virtual const char *toString() = 0;
/**
* Returns true if the given string is the name of this equation (the name
* is returned in the toString() method, don't forget to override it).
* This method is usually used to save/load a tween to/from a text file.
*/
//bool isValueOf(const char *str) { return !strcmp(str, toString()); };
};
}
#endif /* defined(__TweenEquation__) */

View File

@ -1,63 +0,0 @@
//
// TweenEquations.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __TweenEquations__
#define __TweenEquations__
#include <TweenEngine/equations/Quad.h>
#include <TweenEngine/equations/Linear.h>
#include <TweenEngine/equations/Back.h>
#include <TweenEngine/equations/Bounce.h>
#include <TweenEngine/equations/Circ.h>
#include <TweenEngine/equations/Cubic.h>
#include <TweenEngine/equations/Elastic.h>
#include <TweenEngine/equations/Expo.h>
#include <TweenEngine/equations/Quart.h>
#include <TweenEngine/equations/Quint.h>
#include <TweenEngine/equations/Sine.h>
namespace TweenEngine
{
class TweenEquations
{
public:
static TweenEquation &easeInQuad;
static TweenEquation &easeOutQuad;
static TweenEquation &easeInOutQuad;
static TweenEquation &easeInOutLinear;
static TweenEquation &easeInBack;
static TweenEquation &easeOutBack;
static TweenEquation &easeInOutBack;
static TweenEquation &easeInBounce;
static TweenEquation &easeOutBounce;
static TweenEquation &easeInOutBounce;
static TweenEquation &easeInCirc;
static TweenEquation &easeOutCirc;
static TweenEquation &easeInOutCirc;
static TweenEquation &easeInCubic;
static TweenEquation &easeOutCubic;
static TweenEquation &easeInOutCubic;
static TweenEquation &easeInElastic;
static TweenEquation &easeOutElastic;
static TweenEquation &easeInOutElastic;
static TweenEquation &easeInExpo;
static TweenEquation &easeOutExpo;
static TweenEquation &easeInOutExpo;
static TweenEquation &easeInQuart;
static TweenEquation &easeOutQuart;
static TweenEquation &easeInOutQuart;
static TweenEquation &easeInQuint;
static TweenEquation &easeOutQuint;
static TweenEquation &easeInOutQuint;
static TweenEquation &easeInSine;
static TweenEquation &easeOutSine;
static TweenEquation &easeInOutSine;
};
}
#endif /* defined(__TweenEquations__) */

View File

@ -1,61 +0,0 @@
//
// TweenManager.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
/**
* A TweenManager updates all your tweens and timelines at once.
* Its main interest is that it handles the tween/timeline life-cycles for you,
* as well as the pooling constraints (if object pooling is enabled).
* <p/>
*
* Just give it a bunch of tweens or timelines and call update() periodically,
* you don't need to care for anything else! Relax and enjoy your animations.
*
* @see Tween
* @see Timeline
* @author Aurelien Ribon | http://www.aurelienribon.com/
*/
#ifndef __TweenManager__
#define __TweenManager__
#include <algorithm>
#include <vector>
#include <TweenEngine/BaseTween.h>
namespace TweenEngine
{
class TweenManager
{
private:
std::vector<BaseTween *>objects;
bool isPaused = false;
public:
TweenManager();
static void setAutoRemove(BaseTween &object, bool value);
static void setAutoStart(BaseTween &object, bool value);
TweenManager &add(BaseTween &object);
void killAll();
void ensureCapacity(int minCapacity);
void pause();
void resume();
void update(float delta);
int size();
// Debug Helpers
int getRunningTweensCount();
int getRunningTimelinesCount();
std::vector<BaseTween *> &getObjects();
};
}
#endif /* defined(__TweenManager__) */

View File

@ -1,37 +0,0 @@
//
// TweenPath.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
/**
* Base class for every paths. You can create your own paths and directly use
* them in the Tween engine by inheriting from this class.
*
* @author Aurelien Ribon | http://www.aurelienribon.com/
*/
#ifndef __TweenPath__
#define __TweenPath__
namespace TweenEngine
{
class TweenPath
{
public:
/**
* Computes the next value of the interpolation, based on its waypoints and
* the current progress.
*
* @param t The progress of the interpolation, between 0 and 1. May be out
* of these bounds if the easing equation involves some kind of rebounds.
* @param points The waypoints of the tween, from start to target values.
* @param pointsCnt The number of valid points in the array.
* @return The next value of the interpolation.
*/
virtual float compute(float t, float *points, int pointsCnt) = 0;
};
}
#endif /* defined(__TweenPath__) */

View File

@ -1,23 +0,0 @@
//
// TweenPaths.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __TweenPaths__
#define __TweenPaths__
#include <TweenEngine/TweenPath.h>
namespace TweenEngine
{
class TweenPaths
{
public:
static TweenPath &linear;
static TweenPath &catmullRom;
};
}
#endif /* defined(__TweenPaths__) */

View File

@ -1,32 +0,0 @@
//
// TweenPool.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __TweenPool__
#define __TweenPool__
#include <TweenEngine/Pool.h>
#include <TweenEngine/Tween.h>
namespace TweenEngine
{
class TweenPoolCallback : public PoolCallback<Tween>
{
public:
void onPool(Tween *obj);
void onUnPool(Tween *obj);
};
class TweenPool : public Pool<Tween>
{
protected:
Tween *create();
public:
TweenPool();
};
}
#endif /* defined(__TweenPool__) */

View File

@ -1,12 +0,0 @@
#ifndef __Tweenable__
#define __Tweenable__
namespace TweenEngine {
class Tweenable {
public:
virtual int getValues(int tweenType, float *returnValues) = 0;
virtual void setValues(int tweenType, float *newValues) = 0;
};
}
#endif

View File

@ -1,37 +0,0 @@
//
// Back.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __Back__
#define __Back__
#include <TweenEngine/TweenEquation.h>
namespace TweenEngine
{
class BackIn : public TweenEquation
{
~BackIn();
float compute(float t);
const char *toString();
};
class BackOut : public TweenEquation
{
~BackOut();
float compute(float t);
const char *toString();
};
class BackInOut : public TweenEquation
{
~BackInOut();
float compute(float t);
const char *toString();
};
}
#endif /* defined(__Back__) */

View File

@ -1,38 +0,0 @@
//
// Bounce.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __Bounce__
#define __Bounce__
#include <TweenEngine/TweenEquation.h>
namespace TweenEngine
{
class BounceIn : public TweenEquation
{
~BounceIn();
float compute(float t);
const char *toString();
};
class BounceOut : public TweenEquation
{
~BounceOut();
float compute(float t);
const char *toString();
};
class BounceInOut : public TweenEquation
{
~BounceInOut();
float compute(float t);
const char *toString();
};
}
#endif /* defined(__Bounce__) */

View File

@ -1,37 +0,0 @@
//
// Circ.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __Circ__
#define __Circ__
#include <TweenEngine/TweenEquation.h>
namespace TweenEngine
{
class CircIn : public TweenEquation
{
~CircIn();
float compute(float t);
const char *toString();
};
class CircOut : public TweenEquation
{
~CircOut();
float compute(float t);
const char *toString();
};
class CircInOut : public TweenEquation
{
~CircInOut();
float compute(float t);
const char *toString();
};
}
#endif /* defined(__Circ__) */

View File

@ -1,37 +0,0 @@
//
// Cubic.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __Cubic__
#define __Cubic__
#include <TweenEngine/TweenEquation.h>
namespace TweenEngine
{
class CubicIn : public TweenEquation
{
~CubicIn();
float compute(float t);
const char *toString();
};
class CubicOut : public TweenEquation
{
~CubicOut();
float compute(float t);
const char *toString();
};
class CubicInOut : public TweenEquation
{
~CubicInOut();
float compute(float t);
const char *toString();
};
}
#endif /* defined(__Cubic__) */

View File

@ -1,61 +0,0 @@
//
// Elastic.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __Elastic__
#define __Elastic__
#include <TweenEngine/TweenEquation.h>
namespace TweenEngine
{
class ElasticIn : public TweenEquation
{
private:
float amplitude;
float period;
bool isAmplitudeSet;
bool isPeriodSet;
public:
~ElasticIn();
float compute(float t);
const char *toString();
void setAmplitude(float a);
void setPeriod(float p);
};
class ElasticOut : public TweenEquation
{
private:
float amplitude;
float period;
bool isAmplitudeSet;
bool isPeriodSet;
public:
~ElasticOut();
float compute(float t);
const char *toString();
void setAmplitude(float a);
void setPeriod(float p);
};
class ElasticInOut : public TweenEquation
{
private:
float amplitude;
float period;
bool isAmplitudeSet;
bool isPeriodSet;
public:
~ElasticInOut();
float compute(float t);
const char *toString();
void setAmplitude(float a);
void setPeriod(float p);
};
}
#endif /* defined(__Elastic__) */

View File

@ -1,37 +0,0 @@
//
// Expo.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __Expo__
#define __Expo__
#include <TweenEngine/TweenEquation.h>
namespace TweenEngine
{
class ExpoIn : public TweenEquation
{
~ExpoIn();
float compute(float t);
const char *toString();
};
class ExpoOut : public TweenEquation
{
~ExpoOut();
float compute(float t);
const char *toString();
};
class ExpoInOut : public TweenEquation
{
~ExpoInOut();
float compute(float t);
const char *toString();
};
}
#endif /* defined(__Expo__) */

View File

@ -1,24 +0,0 @@
//
// Linear.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __Linear__
#define __Linear__
#include <TweenEngine/TweenEquation.h>
namespace TweenEngine
{
class LinearInOut : public TweenEquation
{
~LinearInOut();
float compute(float t);
const char *toString();
};
}
#endif /* defined(__Linear__) */

View File

@ -1,37 +0,0 @@
//
// Quad.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __Quad__
#define __Quad__
#include <TweenEngine/TweenEquation.h>
namespace TweenEngine
{
class QuadIn : public TweenEquation
{
~QuadIn();
float compute(float t);
const char *toString();
};
class QuadOut : public TweenEquation
{
~QuadOut();
float compute(float t);
const char *toString();
};
class QuadInOut : public TweenEquation
{
~QuadInOut();
float compute(float t);
const char *toString();
};
}
#endif /* defined(__Quad__) */

View File

@ -1,37 +0,0 @@
//
// Quart.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __Quart__
#define __Quart__
#include <TweenEngine/TweenEquation.h>
namespace TweenEngine
{
class QuartIn : public TweenEquation
{
~QuartIn();
float compute(float t);
const char *toString();
};
class QuartOut : public TweenEquation
{
~QuartOut();
float compute(float t);
const char *toString();
};
class QuartInOut : public TweenEquation
{
~QuartInOut();
float compute(float t);
const char *toString();
};
}
#endif /* defined(__Quart__) */

View File

@ -1,37 +0,0 @@
//
// Quint.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __Quint__
#define __Quint__
#include <TweenEngine/TweenEquation.h>
namespace TweenEngine
{
class QuintIn : public TweenEquation
{
~QuintIn();
float compute(float t);
const char *toString();
};
class QuintOut : public TweenEquation
{
~QuintOut();
float compute(float t);
const char *toString();
};
class QuintInOut : public TweenEquation
{
~QuintInOut();
float compute(float t);
const char *toString();
};
}
#endif /* defined(__Quint__) */

View File

@ -1,37 +0,0 @@
//
// Sine.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __Sine__
#define __Sine__
#include <TweenEngine/TweenEquation.h>
namespace TweenEngine
{
class SineIn : public TweenEquation
{
~SineIn();
float compute(float t);
const char *toString();
};
class SineOut : public TweenEquation
{
~SineOut();
float compute(float t);
const char *toString();
};
class SineInOut : public TweenEquation
{
~SineInOut();
float compute(float t);
const char *toString();
};
}
#endif /* defined(__Sine__) */

View File

@ -1,22 +0,0 @@
//
// CatmullRom.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __CatmullRom__
#define __CatmullRom__
#include <TweenEngine/TweenPath.h>
namespace TweenEngine
{
class CatmullRom : public TweenPath
{
float compute(float t, float *points, int pointsCnt);
float catmullRomSpline(float a, float b, float c, float d, float t);
};
}
#endif /* defined(__CatmullRom__) */

View File

@ -1,21 +0,0 @@
//
// Linear.h
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#ifndef __LinearPath__
#define __LinearPath__
#include <TweenEngine/TweenPath.h>
namespace TweenEngine
{
class LinearPath : public TweenPath
{
float compute(float t, float *points, int pointsCnt);
};
}
#endif /* defined(__LinearPath__) */

Binary file not shown.

View File

@ -1,525 +0,0 @@
//
// BaseTween.cpp
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
//#define NDEBUG
#include <TweenEngine/BaseTween.h>
#include <TweenEngine/TweenManager.h>
namespace TweenEngine
{
void BaseTween::reset()
{
step = -2;
repeatCnt = 0;
isIterationStep = isYoyoFlag = false;
delayStart = duration = repeatDelay = currentTime = deltaTime = 0;
isStartedFlag = isInitializedFlag = isFinishedFlag = isKilledFlag = isPausedFlag = false;
callback = nullptr;
callbackTriggers = TweenCallback::COMPLETE;
userData = nullptr;
callbacks.clear();
isAutoRemoveEnabled = isAutoStartEnabled = true;
}
// API
/**
* Builds and validates the object. Only needed if you want to finalize a
* tween or timeline without starting it, since a call to ".start()" also
* calls this method.
*
* @return The current object, for chaining instructions.
*/
BaseTween &BaseTween::build()
{
return *this;
}
/**
* Starts or restarts the object unmanaged. You will need to take care of
* its life-cycle. If you want the tween to be managed for you, use a
* {@link TweenManager}.
*
* @return The current object, for chaining instructions.
*/
BaseTween &BaseTween::start()
{
build();
currentTime = 0;
isStartedFlag = true;
return *this;
}
/**
* Convenience method to add an object to a manager. Its life-cycle will be
* handled for you. Relax and enjoy the animation.
*
* @return The current object, for chaining instructions.
*/
BaseTween &BaseTween::start(TweenManager &manager) {
manager.add(*this);
return *this;
}
/**
* Adds a delay to the tween or timeline.
*
* @param delay A duration.
* @return The current object, for chaining instructions.
*/
BaseTween &BaseTween::delay(float delay)
{
this->delayStart += delay;
return *this;
}
/**
* Kills the tween or timeline. If you are using a TweenManager, this object
* will be removed automatically.
*/
void BaseTween::kill()
{
isKilledFlag = true;
}
/**
* Stops and resets the tween or timeline, and sends it to its pool, for
+ * later reuse. Note that if you use a {@link TweenManager}, this method
+ * is automatically called once the animation is finished.
*/
void BaseTween::free()
{
}
/**
* Pauses the tween or timeline. Further update calls won't have any effect.
*/
void BaseTween::pause()
{
isPausedFlag = true;
}
/**
* Resumes the tween or timeline. Has no effect is it was no already paused.
*/
void BaseTween::resume()
{
isPausedFlag = false;
}
/**
* Repeats the tween or timeline for a given number of times.
* @param count The number of repetitions. For infinite repetition,
* use Tween.INFINITY, or a negative number.
*
* @param delay A delay between each iteration.
* @return The current tween or timeline, for chaining instructions.
*/
BaseTween &BaseTween::repeat(int count, float delay)
{
if (isStartedFlag)
{
//throw new RuntimeException("You can't change the repetitions of a tween or timeline once it is started");
}
else
{
repeatCnt = count;
repeatDelay = delay >= 0 ? delay : 0;
isYoyoFlag = false;
}
return *this;
}
/**
* Repeats the tween or timeline for a given number of times.
* Every two iterations, it will be played backwards.
*
* @param count The number of repetitions. For infinite repetition,
* use Tween.INFINITY, or '-1'.
* @param delay A delay before each repetition.
* @return The current tween or timeline, for chaining instructions.
*/
BaseTween &BaseTween::repeatYoyo(int count, float delay)
{
if (isStartedFlag)
{
//throw new RuntimeException("You can't change the repetitions of a tween or timeline once it is started");
}
else
{
repeatCnt = count;
repeatDelay = delay >= 0 ? delay : 0;
isYoyoFlag = true;
}
return *this;
}
/**
* Sets the callback. By default, it will be fired at the completion of the
* tween or timeline (event COMPLETE). If you want to change this behavior
* and add more triggers, use the {@link setCallbackTriggers()} method.
*
* @see TweenCallback
*/
BaseTween &BaseTween::setCallback(TweenCallback *callback)
{
this->callback = callback;
return *this;
}
BaseTween &BaseTween::setCallback(int type, const TweenCallbackFunction& callback)
{
callbacks[type] = callback;
return *this;
}
/**
* Changes the triggers of the callback. The available triggers, listed as
* members of the {@link TweenCallback} interface, are:
* <p/>
*
* <b>BEGIN</b>: right after the delay (if any)<br/>
* <b>START</b>: at each iteration beginning<br/>
* <b>END</b>: at each iteration ending, before the repeat delay<br/>
* <b>COMPLETE</b>: at last END event<br/>
* <b>BACK_BEGIN</b>: at the beginning of the first backward iteration<br/>
* <b>BACK_START</b>: at each backward iteration beginning, after the repeat delay<br/>
* <b>BACK_END</b>: at each backward iteration ending<br/>
* <b>BACK_COMPLETE</b>: at last BACK_END event
* <p/>
*
* <pre> {@code
* forward : BEGIN COMPLETE
* forward : START END START END START END
* |--------------[XXXXXXXXXX]------[XXXXXXXXXX]------[XXXXXXXXXX]
* backward: bEND bSTART bEND bSTART bEND bSTART
* backward: bCOMPLETE bBEGIN
* }</pre>
*
* @param flags one or more triggers, separated by the '|' operator.
* @see TweenCallback
*/
BaseTween &BaseTween::setCallbackTriggers(int flags)
{
this->callbackTriggers = flags;
return *this;
}
/**
* Attaches an object to this tween or timeline. It can be useful in order
* to retrieve some data from a TweenCallback.
*
* @param data Any kind of object.
* @return The current tween or timeline, for chaining instructions.
*/
BaseTween &BaseTween::setUserData(void *data)
{
userData = data;
return *this;
}
// -------------------------------------------------------------------------
// Getters
// -------------------------------------------------------------------------
/**
* Gets the delay of the tween or timeline. Nothing will happen before
* this delay.
*/
float BaseTween::getDelay() { return delayStart; }
/**
* Gets the duration of a single iteration.
*/
float BaseTween::getDuration() { return duration; }
/**
* Gets the number of iterations that will be played.
*/
int BaseTween::getRepeatCount() { return repeatCnt; }
/**
* Gets the delay occuring between two iterations.
*/
float BaseTween::getRepeatDelay() { return repeatDelay; }
/**
* Returns the complete duration, including initial delay and repetitions.
* The formula is as follows:
* <pre>
* fullDuration = delay + duration + (repeatDelay + duration) * repeatCnt
* </pre>
*/
float BaseTween::getFullDuration()
{
if (repeatCnt < 0) return -1;
return delayStart + duration + (repeatDelay + duration) * repeatCnt;
}
/**
* Gets the attached data, or null if none.
*/
void *BaseTween::getUserData() { return userData; }
/**
* Gets the id of the current step. Values are as follows:<br/>
* <ul>
* <li>even numbers mean that an iteration is playing,<br/>
* <li>odd numbers mean that we are between two iterations,<br/>
* <li>-2 means that the initial delay has not ended,<br/>
* <li>-1 means that we are before the first iteration,<br/>
* <li>repeatCount*2 + 1 means that we are after the last iteration
*/
int BaseTween::getStep() { return step; }
/**
* Gets the local time.
*/
float BaseTween::getCurrentTime() { return currentTime; }
/**
* Returns true if the tween or timeline has been started.
*/
bool BaseTween::isStarted() { return isStartedFlag; }
/**
* Returns true if the tween or timeline has been initialized. Starting
* values for tweens are stored at initialization time. This initialization
* takes place right after the initial delay, if any.
*/
bool BaseTween::isInitialized() { return isInitializedFlag; }
/**
* Returns true if the tween is finished (i.e. if the tween has reached
* its end or has been killed). If you don't use a TweenManager, you may
* want to call {@link free()} to reuse the object later.
*/
bool BaseTween::isFinished() { return isFinishedFlag || isKilledFlag; }
/**
* Returns true if the iterations are played as yoyo. Yoyo means that
* every two iterations, the animation will be played backwards.
*/
bool BaseTween::isYoyo() { return isYoyoFlag; }
/**
* Returns true if the tween or timeline is currently paused.
*/
bool BaseTween::isPaused() { return isPausedFlag; }
void BaseTween::initializeOverride() {}
void BaseTween::updateOverride(int step, int lastStep, bool isIterationStep, float delta) {}
void BaseTween::forceToStart()
{
currentTime = -delayStart;
step = -1;
isIterationStep = false;
if (isReverse(0)) forceEndValues();
else forceStartValues();
}
void BaseTween::forceToEnd(float time)
{
currentTime = time - getFullDuration();
step = repeatCnt*2 + 1;
isIterationStep = false;
if (isReverse(repeatCnt*2)) forceStartValues();
else forceEndValues();
}
void BaseTween::callCallback(int type)
{
auto callback = callbacks.find(type);
if (callback != callbacks.end()) {
callback->second(this);
}
// if (callback != nullptr && (callbackTriggers & type) > 0) callback->onEvent(type, this);
}
bool BaseTween::isReverse(int step)
{
return isYoyoFlag && abs(step%4) == 2;
}
bool BaseTween::isValid(int step)
{
return (step >= 0 && step <= repeatCnt*2) || repeatCnt < 0;
}
// -------------------------------------------------------------------------
// Update engine
// -------------------------------------------------------------------------
/**
* Updates the tween or timeline state. <b>You may want to use a
* TweenManager to update objects for you.</b>
*
* Slow motion, fast motion and backward play can be easily achieved by
* tweaking this delta time. Multiply it by -1 to play the animation
* backward, or by 0.5 to play it twice slower than its normal speed.
*
* @param delta A delta time between now and the last call.
*/
void BaseTween::update(float delta)
{
if (!isStartedFlag || isPausedFlag || isKilledFlag) return;
deltaTime = delta;
if (!isInitializedFlag) initialize();
if (isInitializedFlag)
{
testRelaunch();
updateStep();
testCompletion();
}
currentTime += deltaTime;
deltaTime = 0;
}
void BaseTween::initialize() {
if (currentTime+deltaTime >= delayStart)
{
initializeOverride();
isInitializedFlag = true;
isIterationStep = true;
step = 0;
deltaTime -= delayStart-currentTime;
currentTime = 0;
callCallback(TweenCallback::BEGIN);
callCallback(TweenCallback::START);
}
}
void BaseTween::testRelaunch()
{
if (!isIterationStep && repeatCnt >= 0 && step < 0 && currentTime+deltaTime >= 0)
{
// assert(step == -1);
isIterationStep = true;
step = 0;
float delta = 0-currentTime;
deltaTime -= delta;
currentTime = 0;
callCallback(TweenCallback::BEGIN);
callCallback(TweenCallback::START);
updateOverride(step, step-1, isIterationStep, delta);
}
else if (!isIterationStep && repeatCnt >= 0 && step > repeatCnt*2 && currentTime+deltaTime < 0)
{
// assert(step == repeatCnt*2 + 1);
isIterationStep = true;
step = repeatCnt*2;
float delta = 0-currentTime;
deltaTime -= delta;
currentTime = duration;
callCallback(TweenCallback::BACK_BEGIN);
callCallback(TweenCallback::BACK_START);
updateOverride(step, step+1, isIterationStep, delta);
}
}
void BaseTween::updateStep()
{
while (isValid(step))
{
if (!isIterationStep && currentTime+deltaTime <= 0)
{
isIterationStep = true;
step -= 1;
float delta = 0-currentTime;
deltaTime -= delta;
currentTime = duration;
if (isReverse(step)) forceStartValues();
else forceEndValues();
callCallback(TweenCallback::BACK_START);
updateOverride(step, step+1, isIterationStep, delta);
}
else if (!isIterationStep && currentTime+deltaTime >= repeatDelay)
{
isIterationStep = true;
step += 1;
float delta = repeatDelay-currentTime;
deltaTime -= delta;
currentTime = 0;
if (isReverse(step)) forceEndValues(); else forceStartValues();
callCallback(TweenCallback::START);
updateOverride(step, step-1, isIterationStep, delta);
}
else if (isIterationStep && currentTime+deltaTime < 0)
{
isIterationStep = false;
step -= 1;
float delta = 0-currentTime;
deltaTime -= delta;
currentTime = 0;
updateOverride(step, step+1, isIterationStep, delta);
callCallback(TweenCallback::BACK_END);
if (step < 0 && repeatCnt >= 0) callCallback(TweenCallback::BACK_COMPLETE);
else currentTime = repeatDelay;
}
else if (isIterationStep && currentTime+deltaTime > duration)
{
isIterationStep = false;
step += 1;
float delta = duration-currentTime;
deltaTime -= delta;
currentTime = duration;
updateOverride(step, step-1, isIterationStep, delta);
callCallback(TweenCallback::END);
if (step > repeatCnt*2 && repeatCnt >= 0) callCallback(TweenCallback::COMPLETE);
currentTime = 0;
}
else if (isIterationStep)
{
float delta = deltaTime;
deltaTime -= delta;
currentTime += delta;
updateOverride(step, step, isIterationStep, delta);
break;
}
else
{
float delta = deltaTime;
deltaTime -= delta;
currentTime += delta;
break;
}
}
}
void BaseTween::testCompletion()
{
isFinishedFlag = repeatCnt >= 0 && (step > repeatCnt*2 || step < 0);
}
}

View File

@ -1,796 +0,0 @@
//
// Tween.cpp
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
/**
* Core class of the Tween Engine. A Tween is basically an interpolation
* between two values of an object attribute. However, the main interest of a
* Tween is that you can apply an easing formula on this interpolation, in
* order to smooth the transitions or to achieve cool effects like springs or
* bounces.
* <p/>
*
* The Universal Tween Engine is called "universal" because it is able to apply
* interpolations on every attribute from every possible object. Therefore,
* every object in your application can be animated with cool effects: it does
* not matter if your application is a game, a desktop interface or even a
* console program! If it makes sense to animate something, then it can be
* animated through this engine.
* <p/>
*
* This class contains many static factory methods to create and instantiate
* new interpolations easily. The common way to create a Tween is by using one
* of these factories:
* <p/>
*
* - Tween.to(...)<br/>
* - Tween.from(...)<br/>
* - Tween.set(...)<br/>
* - Tween.call(...)
* <p/>
*
* <h2>Example - firing a Tween</h2>
*
* The following example will move the target horizontal position from its
* current value to x=200 and y=300, during 500ms, but only after a delay of
* 1000ms. The animation will also be repeated 2 times (the starting position
* is registered at the end of the delay, so the animation will automatically
* restart from this registered position).
* <p/>
*
* <pre> {@code
* Tween.to(myObject, POSITION_XY, 0.5f)
* .target(200, 300)
* .ease(Quad.INOUT)
* .delay(1.0f)
* .repeat(2, 0.2f)
* .start(myManager);
* }</pre>
*
* Tween life-cycles can be automatically managed for you, thanks to the
* {@link TweenManager} class. If you choose to manage your tween when you start
* it, then you don't need to care about it anymore. <b>Tweens are
* <i>fire-and-forget</i>: don't think about them anymore once you started
* them (if they are managed of course).</b>
* <p/>
*
* You need to periodicaly update the tween engine, in order to compute the new
* values. If your tweens are managed, only update the manager; else you need
* to call {@link #update()} on your tweens periodically.
* <p/>
*
* <h2>Example - setting up the engine</h2>
*
* The engine cannot directly change your objects attributes, since it doesn't
* know them. Therefore, you need to tell him how to get and set the different
* attributes of your objects: <b>you need to implement the {@link
* TweenAccessor} interface for each object class you will animate</b>. Once
* done, don't forget to register these implementations, using the static method
* {@link registerAccessor()}, when you start your application.
*
* @see TweenAccessor
* @see TweenManager
* @see TweenEquation
* @see Timeline
* @author Aurelien Ribon | http://www.aurelienribon.com/
*/
//#define NDEBUG
#include <TweenEngine/Tween.h>
#include <TweenEngine/TweenPool.h>
namespace TweenEngine
{
int Tween::combinedAttrsLimit = 3;
int Tween::waypointsLimit = 0;
/**
* Changes the limit for combined attributes. Defaults to 3 to reduce
* memory footprint.
*/
void Tween::setCombinedAttributesLimit(int limit) { Tween::combinedAttrsLimit = limit; }
/**
* Changes the limit of allowed waypoints for each tween. Defaults to 0 to
* reduce memory footprint.
*/
void Tween::setWaypointsLimit(int limit) { Tween::waypointsLimit = limit; }
/**
* Gets the version number of the library.
*/
const char *Tween::getVersion() { return "6.3.3"; }
/**
* Used for debug purpose. Gets the current number of objects that are
* waiting in the Tween pool.
*/
int Tween::getPoolSize() { return pool.size(); }
/**
* Increases the minimum capacity of the pool. Capacity defaults to 20.
*/
void Tween::ensurePoolCapacity(int minCapacity) { pool.ensureCapacity(minCapacity); }
TweenPool &Tween::pool = *(new TweenPool());
// -------------------------------------------------------------------------
// Static -- factories
// -------------------------------------------------------------------------
/**
* Factory creating a new standard interpolation. This is the most common
* type of interpolation. The starting values are retrieved automatically
* after the delay (if any).
* <br/><br/>
*
* <b>You need to set the target values of the interpolation by using one
* of the target() methods</b>. The interpolation will run from the
* starting values to these target values.
* <br/><br/>
*
* The common use of Tweens is "fire-and-forget": you do not need to care
* for tweens once you added them to a TweenManager, they will be updated
* automatically, and cleaned once finished. Common call:
* <br/><br/>
*
* <pre> {@code
* Tween.to(myObject, POSITION, 1.0f)
* .target(50, 70)
* .ease(Quad.INOUT)
* .start(myManager);
* }</pre>
*
* Several options such as delay, repetitions and callbacks can be added to
* the tween.
*
* @param target The target object of the interpolation.
* @param tweenType The desired type of interpolation.
* @param duration The duration of the interpolation, in milliseconds.
* @return The generated Tween.
*/
Tween &Tween::to(Tweenable& target, int tweenType, float duration)
{
Tween &tween = *(pool.get());
tween.setup(&target, tweenType, duration);
tween.ease(TweenEquations::easeInOutQuad);
tween.path(TweenPaths::catmullRom);
return tween;
}
/**
* Factory creating a new reversed interpolation. The ending values are
* retrieved automatically after the delay (if any).
* <br/><br/>
*
* <b>You need to set the starting values of the interpolation by using one
* of the target() methods</b>. The interpolation will run from the
* starting values to these target values.
* <br/><br/>
*
* The common use of Tweens is "fire-and-forget": you do not need to care
* for tweens once you added them to a TweenManager, they will be updated
* automatically, and cleaned once finished. Common call:
* <br/><br/>
*
* <pre> {@code
* Tween.from(myObject, POSITION, 1.0f)
* .target(0, 0)
* .ease(Quad.INOUT)
* .start(myManager);
* }</pre>
*
* Several options such as delay, repetitions and callbacks can be added to
* the tween.
*
* @param target The target object of the interpolation.
* @param tweenType The desired type of interpolation.
* @param duration The duration of the interpolation, in milliseconds.
* @return The generated Tween.
*/
Tween &Tween::from(Tweenable& target, int tweenType, float duration)
{
Tween &tween = *(pool.get());
tween.setup(&target, tweenType, duration);
tween.ease(TweenEquations::easeInOutQuad);
tween.path(TweenPaths::catmullRom);
tween.isFrom = true;
return tween;
}
/**
* Factory creating a new instantaneous interpolation (thus this is not
* really an interpolation).
* <br/><br/>
*
* <b>You need to set the target values of the interpolation by using one
* of the target() methods</b>. The interpolation will set the target
* attribute to these values after the delay (if any).
* <br/><br/>
*
* The common use of Tweens is "fire-and-forget": you do not need to care
* for tweens once you added them to a TweenManager, they will be updated
* automatically, and cleaned once finished. Common call:
* <br/><br/>
*
* <pre> {@code
* Tween.set(myObject, POSITION)
* .target(50, 70)
* .delay(1.0f)
* .start(myManager);
* }</pre>
*
* Several options such as delay, repetitions and callbacks can be added to
* the tween.
*
* @param target The target object of the interpolation.
* @param tweenType The desired type of interpolation.
* @return The generated Tween.
*/
Tween &Tween::set(Tweenable& target, int tweenType)
{
Tween &tween = *(pool.get());
tween.setup(&target, tweenType, 0);
tween.ease(TweenEquations::easeInOutQuad);
return tween;
}
/**
* Factory creating a new timer. The given callback will be triggered on
* each iteration start, after the delay.
* <br/><br/>
*
* The common use of Tweens is "fire-and-forget": you do not need to care
* for tweens once you added them to a TweenManager, they will be updated
* automatically, and cleaned once finished. Common call:
* <br/><br/>
*
* <pre> {@code
* Tween.call(myCallback)
* .delay(1.0f)
* .repeat(10, 1000)
* .start(myManager);
* }</pre>
*
* @param callback The callback that will be triggered on each iteration
* start.
* @return The generated Tween.
* @see TweenCallback
*/
Tween &Tween::call(TweenCallback &callback)
{
Tween &tween = *(pool.get());
tween.setup(nullptr, -1, 0);
tween.setCallback(&callback);
tween.setCallbackTriggers(TweenCallback::START);
return tween;
}
/**
* Convenience method to create an empty tween. Such object is only useful
* when placed inside animation sequences (see {@link Timeline}), in which
* it may act as a beacon, so you can set a callback on it in order to
* trigger some action at the right moment.
*
* @return The generated Tween.
* @see Timeline
*/
Tween &Tween::mark()
{
Tween &tween = *(pool.get());
tween.setup(nullptr, -1, 0);
return tween;
}
// -------------------------------------------------------------------------
// Setup
// -------------------------------------------------------------------------
Tween::Tween()
{
startValues = new float[combinedAttrsLimit];
targetValues = new float[combinedAttrsLimit];
waypoints = new float[waypointsLimit*combinedAttrsLimit];
accessorBuffer = new float[combinedAttrsLimit];
accessorBufferSize = combinedAttrsLimit;
pathBuffer = new float[(2+waypointsLimit)*combinedAttrsLimit];
pathBufferSize = (2+waypointsLimit)*combinedAttrsLimit;
targetObj = nullptr;
}
Tween::~Tween()
{
delete startValues;
delete targetValues;
delete waypoints;
delete accessorBuffer;
delete pathBuffer;
// if (accessor != nullptr) Block_release(accessor);
}
void Tween::reset()
{
BaseTween::reset();
equation = nullptr;
pathAlgorithm = nullptr;
isFrom = isRelative = false;
combinedAttrsCnt = waypointsCnt = 0;
if (accessorBufferSize != combinedAttrsLimit) {
accessorBuffer = new float[combinedAttrsLimit];
}
if (pathBufferSize != (2+waypointsLimit)*combinedAttrsLimit) {
pathBuffer = new float[(2+waypointsLimit)*combinedAttrsLimit];
}
// if (accessor != nullptr)
// {
// Block_release(accessor);
targetObj = nullptr;
// }
type = -1;
}
void Tween::setup(Tweenable *target, int tweenType, float duration)
{
// assert(duration >= 0);
this->targetObj = target;
this->type = tweenType;
this->duration = duration;
}
// -------------------------------------------------------------------------
// Public API
// -------------------------------------------------------------------------
/**
* Sets the easing equation of the tween. Existing equations are located in
* <i>aurelienribon.tweenengine.equations</i> package, but you can of course
* implement your owns, see {@link TweenEquation}. You can also use the
* {@link TweenEquations} static instances to quickly access all the
* equations. Default equation is Quad.INOUT.
* <p/>
*
* <b>Proposed equations are:</b><br/>
* - Linear.INOUT,<br/>
* - Quad.IN | OUT | INOUT,<br/>
* - Cubic.IN | OUT | INOUT,<br/>
* - Quart.IN | OUT | INOUT,<br/>
* - Quint.IN | OUT | INOUT,<br/>
* - Circ.IN | OUT | INOUT,<br/>
* - Sine.IN | OUT | INOUT,<br/>
* - Expo.IN | OUT | INOUT,<br/>
* - Back.IN | OUT | INOUT,<br/>
* - Bounce.IN | OUT | INOUT,<br/>
* - Elastic.IN | OUT | INOUT
*
* @return The current tween, for chaining instructions.
* @see TweenEquation
* @see TweenEquations
*/
Tween &Tween::ease(TweenEquation &easeEquation)
{
this->equation = &easeEquation;
return *this;
}
/**
* Sets the target value of the interpolation. The interpolation will run
* from the <b>value at start time (after the delay, if any)</b> to this
* target value.
* <p/>
*
* To sum-up:<br/>
* - start value: value at start time, after delay<br/>
* - end value: param
*
* @param targetValue The target value of the interpolation.
* @return The current tween, for chaining instructions.
*/
Tween &Tween::target(float targetValue)
{
targetValues[0] = targetValue;
return *this;
}
/**
* Sets the target values of the interpolation. The interpolation will run
* from the <b>values at start time (after the delay, if any)</b> to these
* target values.
* <p/>
*
* To sum-up:<br/>
* - start values: values at start time, after delay<br/>
* - end values: params
*
* @param targetValue1 The 1st target value of the interpolation.
* @param targetValue2 The 2nd target value of the interpolation.
* @return The current tween, for chaining instructions.
*/
Tween &Tween::target(float targetValue1, float targetValue2)
{
targetValues[0] = targetValue1;
targetValues[1] = targetValue2;
return *this;
}
/**
* Sets the target values of the interpolation. The interpolation will run
* from the <b>values at start time (after the delay, if any)</b> to these
* target values.
* <p/>
*
* To sum-up:<br/>
* - start values: values at start time, after delay<br/>
* - end values: params
*
* @param targetValue1 The 1st target value of the interpolation.
* @param targetValue2 The 2nd target value of the interpolation.
* @param targetValue3 The 3rd target value of the interpolation.
* @return The current tween, for chaining instructions.
*/
Tween &Tween::target(float targetValue1, float targetValue2, float targetValue3)
{
targetValues[0] = targetValue1;
targetValues[1] = targetValue2;
targetValues[2] = targetValue3;
return *this;
}
Tween &Tween::target(float *targetValues, int len)
{
if (len <= combinedAttrsLimit)
{
for (int i=0; i<len; i++)
this->targetValues[i] = targetValues[i];
}
return *this;
}
/**
* Sets the target value of the interpolation, relatively to the <b>value
* at start time (after the delay, if any)</b>.
* <p/>
*
* To sum-up:<br/>
* - start value: value at start time, after delay<br/>
* - end value: param + value at start time, after delay
*
* @param targetValue The relative target value of the interpolation.
* @return The current tween, for chaining instructions.
*/
Tween &Tween::targetRelative(float targetValue)
{
isRelative = true;
targetValues[0] = isInitialized() ? targetValue + startValues[0] : targetValue;
return *this;
}
/**
* Sets the target values of the interpolation, relatively to the <b>values
* at start time (after the delay, if any)</b>.
* <p/>
*
* To sum-up:<br/>
* - start values: values at start time, after delay<br/>
* - end values: params + values at start time, after delay
*
* @param targetValue1 The 1st relative target value of the interpolation.
* @param targetValue2 The 2nd relative target value of the interpolation.
* @return The current tween, for chaining instructions.
*/
Tween &Tween::targetRelative(float targetValue1, float targetValue2)
{
isRelative = true;
targetValues[0] = isInitialized() ? targetValue1 + startValues[0] : targetValue1;
targetValues[1] = isInitialized() ? targetValue2 + startValues[1] : targetValue2;
return *this;
}
/**
* Sets the target values of the interpolation, relatively to the <b>values
* at start time (after the delay, if any)</b>.
* <p/>
*
* To sum-up:<br/>
* - start values: values at start time, after delay<br/>
* - end values: params + values at start time, after delay
*
* @param targetValue1 The 1st relative target value of the interpolation.
* @param targetValue2 The 2nd relative target value of the interpolation.
* @param targetValue3 The 3rd relative target value of the interpolation.
* @return The current tween, for chaining instructions.
*/
Tween &Tween::targetRelative(float targetValue1, float targetValue2, float targetValue3)
{
isRelative = true;
targetValues[0] = isInitialized() ? targetValue1 + startValues[0] : targetValue1;
targetValues[1] = isInitialized() ? targetValue2 + startValues[1] : targetValue2;
targetValues[2] = isInitialized() ? targetValue3 + startValues[2] : targetValue3;
return *this;
}
/**
* Sets the target values of the interpolation, relatively to the <b>values
* at start time (after the delay, if any)</b>.
* <p/>
*
* To sum-up:<br/>
* - start values: values at start time, after delay<br/>
* - end values: params + values at start time, after delay
*
* @param targetValues The relative target values of the interpolation.
* @return The current tween, for chaining instructions.
*/
Tween &Tween::targetRelative(float *targetValues, int len)
{
if (len <= combinedAttrsLimit)
{
for (int i=0; i<len; i++)
this->targetValues[i] = isInitialized() ? targetValues[i] + startValues[i] : targetValues[i];
}
isRelative = true;
return *this;
}
/**
* Adds a waypoint to the path. The default path runs from the start values
* to the end values linearly. If you add waypoints, the default path will
* use a smooth catmull-rom spline to navigate between the waypoints, but
* you can change this behavior by using the {@link #path(TweenPath)}
* method.
* <p/>
* Note that if you want waypoints relative to the start values, use one of
* the .targetRelative() methods to define your target.
*
* @param targetValue The target of this waypoint.
* @return The current tween, for chaining instructions.
*/
Tween &Tween::waypoint(float targetValue)
{
if (waypointsCnt < waypointsLimit)
{
waypoints[waypointsCnt] = targetValue;
waypointsCnt += 1;
}
return *this;
}
/**
* Adds a waypoint to the path. The default path runs from the start values
* to the end values linearly. If you add waypoints, the default path will
* use a smooth catmull-rom spline to navigate between the waypoints, but
* you can change this behavior by using the {@link #path(TweenPath)}
* method.
* <p/>
* Note that if you want waypoints relative to the start values, use one of
* the .targetRelative() methods to define your target.
*
* @param targetValue1 The 1st target of this waypoint.
* @param targetValue2 The 2nd target of this waypoint.
* @return The current tween, for chaining instructions.
*/
Tween &Tween::waypoint(float targetValue1, float targetValue2)
{
if (waypointsCnt < waypointsLimit)
{
waypoints[waypointsCnt*2] = targetValue1;
waypoints[waypointsCnt*2+1] = targetValue2;
waypointsCnt += 1;
}
return *this;
}
/**
* Adds a waypoint to the path. The default path runs from the start values
* to the end values linearly. If you add waypoints, the default path will
* use a smooth catmull-rom spline to navigate between the waypoints, but
* you can change this behavior by using the {@link #path(TweenPath)}
* method.
* <p/>
* Note that if you want waypoints relative to the start values, use one of
* the .targetRelative() methods to define your target.
*
* @param targetValue1 The 1st target of this waypoint.
* @param targetValue2 The 2nd target of this waypoint.
* @param targetValue3 The 3rd target of this waypoint.
* @return The current tween, for chaining instructions.
*/
Tween &Tween::waypoint(float targetValue1, float targetValue2, float targetValue3)
{
if (waypointsCnt < waypointsLimit)
{
waypoints[waypointsCnt*3] = targetValue1;
waypoints[waypointsCnt*3+1] = targetValue2;
waypoints[waypointsCnt*3+2] = targetValue3;
waypointsCnt += 1;
}
return *this;
}
/**
* Adds a waypoint to the path. The default path runs from the start values
* to the end values linearly. If you add waypoints, the default path will
* use a smooth catmull-rom spline to navigate between the waypoints, but
* you can change this behavior by using the {@link #path(TweenPath)}
* method.
* <p/>
* Note that if you want waypoints relative to the start values, use one of
* the .targetRelative() methods to define your target.
*
* @param targetValues The targets of this waypoint.
* @return The current tween, for chaining instructions.
*/
Tween &Tween::waypoint(float *targetValues, int len)
{
if (waypointsCnt < waypointsLimit)
{
for (int i=0; i<len; i++)
this->waypoints[waypointsCnt*len+i] = targetValues[i];
waypointsCnt += 1;
}
return *this;
}
/**
* Sets the algorithm that will be used to navigate through the waypoints,
* from the start values to the end values. Default is a catmull-rom spline,
* but you can find other paths in the {@link TweenPaths} class.
*
* @param path A TweenPath implementation.
* @return The current tween, for chaining instructions.
* @see TweenPath
* @see TweenPaths
*/
Tween &Tween::path(TweenPath &path)
{
this->pathAlgorithm = &path;
return *this;
}
// -------------------------------------------------------------------------
// Getters
// -------------------------------------------------------------------------
/**
* Gets the easing equation.
*/
TweenEquation *Tween::getEasing() { return equation; }
/**
* Gets the target values. The returned buffer is as long as the maximum
* allowed combined values. Therefore, you're surely not interested in all
* its content. Use {@link #getCombinedTweenCount()} to get the number of
* interesting slots.
*/
float *Tween::getTargetValues() { return targetValues; }
/**
* Gets the number of combined animations.
*/
int Tween::getCombinedAttributesCount() { return combinedAttrsCnt; }
// -------------------------------------------------------------------------
// Base Class
// -------------------------------------------------------------------------
Tween &Tween::build()
{
if (targetObj != nullptr) {
combinedAttrsCnt = targetObj->getValues(type, accessorBuffer);
}
// assert(combinedAttrsCnt <= combinedAttrsLimit);
return *this;
}
void Tween::free() { pool.free(this); }
void Tween::initializeOverride()
{
targetObj->getValues(type, startValues);
for (int i=0; i<combinedAttrsCnt; i++) {
targetValues[i] += isRelative ? startValues[i] : 0;
for (int ii=0; ii<waypointsCnt; ii++) {
waypoints[ii*combinedAttrsCnt+i] += isRelative ? startValues[i] : 0;
}
if (isFrom) {
float tmp = startValues[i];
startValues[i] = targetValues[i];
targetValues[i] = tmp;
}
}
}
void Tween::updateOverride(int step, int lastStep, bool isIterationStep, float delta)
{
if (equation == nullptr) return;
// Case iteration end has been reached
if (!isIterationStep && step > lastStep)
{
targetObj->setValues(type, isReverse(lastStep) ? startValues : targetValues);
return;
}
if (!isIterationStep && step < lastStep)
{
targetObj->setValues(type, isReverse(lastStep) ? targetValues : startValues);
return;
}
// Validation
// assert(isIterationStep);
// assert(getCurrentTime() >= 0);
// assert(getCurrentTime() <= duration);
// Case duration equals zero
if (duration < 0.00000000001f && delta > -0.00000000001f)
{
targetObj->setValues(type, isReverse(step) ? targetValues : startValues);
return;
}
if (duration < 0.00000000001f && delta < 0.00000000001f) {
targetObj->setValues(type, isReverse(step) ? startValues : targetValues);
return;
}
// Normal behavior
float time = isReverse(step) ? duration - getCurrentTime() : getCurrentTime();
float t = equation->compute(time/duration);
if (waypointsCnt == 0 || pathAlgorithm == nullptr)
{
for (int i=0; i<combinedAttrsCnt; i++)
{
accessorBuffer[i] = startValues[i] + t * (targetValues[i] - startValues[i]);
}
}
else
{
for (int i=0; i<combinedAttrsCnt; i++)
{
pathBuffer[0] = startValues[i];
pathBuffer[1+waypointsCnt] = targetValues[i];
for (int ii=0; ii<waypointsCnt; ii++)
{
pathBuffer[ii+1] = waypoints[ii*combinedAttrsCnt+i];
}
accessorBuffer[i] = pathAlgorithm->compute(t, pathBuffer, waypointsCnt+2);
}
}
targetObj->setValues(type, accessorBuffer);
}
void Tween::forceStartValues(){
targetObj->setValues(type, startValues);
}
void Tween::forceEndValues(){
targetObj->setValues(type, targetValues);
}
int Tween::getTweenCount() { return 1; }
int Tween::getTimelineCount() { return 0; }
}

View File

@ -1,53 +0,0 @@
//
// Equations.cpp
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#include <TweenEngine/TweenEquations.h>
namespace TweenEngine
{
TweenEquation &TweenEquations::easeInQuad = *(new QuadIn());
TweenEquation &TweenEquations::easeOutQuad = *(new QuadOut());
TweenEquation &TweenEquations::easeInOutQuad = *(new QuadInOut());
TweenEquation &TweenEquations::easeInOutLinear = *(new LinearInOut());
TweenEquation &TweenEquations::easeInBack = *(new BackIn());
TweenEquation &TweenEquations::easeOutBack = *(new BackOut());
TweenEquation &TweenEquations::easeInOutBack = *(new BackInOut());
TweenEquation &TweenEquations::easeInBounce = *(new BounceIn());
TweenEquation &TweenEquations::easeOutBounce = *(new BounceOut());
TweenEquation &TweenEquations::easeInOutBounce = *(new BounceInOut());
TweenEquation &TweenEquations::easeInCirc = *(new CircIn());
TweenEquation &TweenEquations::easeOutCirc = *(new CircOut());
TweenEquation &TweenEquations::easeInOutCirc = *(new CircInOut());
TweenEquation &TweenEquations::easeInCubic = *(new CubicIn());
TweenEquation &TweenEquations::easeOutCubic = *(new CubicOut());
TweenEquation &TweenEquations::easeInOutCubic = *(new CubicInOut());
TweenEquation &TweenEquations::easeInElastic = *(new ElasticIn());
TweenEquation &TweenEquations::easeOutElastic = *(new ElasticOut());
TweenEquation &TweenEquations::easeInOutElastic = *(new ElasticInOut());
TweenEquation &TweenEquations::easeInExpo = *(new ExpoIn());
TweenEquation &TweenEquations::easeOutExpo = *(new ExpoOut());
TweenEquation &TweenEquations::easeInOutExpo = *(new ExpoInOut());
TweenEquation &TweenEquations::easeInQuart = *(new QuartIn());
TweenEquation &TweenEquations::easeOutQuart = *(new QuartOut());
TweenEquation &TweenEquations::easeInOutQuart = *(new QuartInOut());
TweenEquation &TweenEquations::easeInQuint = *(new QuintIn());
TweenEquation &TweenEquations::easeOutQuint = *(new QuintOut());
TweenEquation &TweenEquations::easeInOutQuint = *(new QuintInOut());
TweenEquation &TweenEquations::easeInSine = *(new SineIn());
TweenEquation &TweenEquations::easeOutSine = *(new SineOut());
TweenEquation &TweenEquations::easeInOutSine = *(new SineInOut());
}

View File

@ -1,186 +0,0 @@
//
// TweenManager.cpp
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#include <TweenEngine/TweenManager.h>
#include <TweenEngine/BaseTween.h>
namespace TweenEngine
{
// -------------------------------------------------------------------------
// Static API
// -------------------------------------------------------------------------
/**
* Disables or enables the "auto remove" mode of any tween manager for a
* particular tween or timeline. This mode is activated by default. The
* interest of desactivating it is to prevent some tweens or timelines from
* being automatically removed from a manager once they are finished.
* Therefore, if you update a manager backwards, the tweens or timelines
* will be played again, even if they were finished.
*/
void TweenManager::setAutoRemove(BaseTween &object, bool value)
{
object.isAutoRemoveEnabled = value;
}
/**
* Disables or enables the "auto start" mode of any tween manager for a
* particular tween or timeline. This mode is activated by default. If it
* is not enabled, add a tween or timeline to any manager won't start it
* automatically, and you'll need to call .start() manually on your object.
*/
void TweenManager::setAutoStart(BaseTween &object, bool value)
{
object.isAutoStartEnabled = value;
}
int getTweensCount(std::vector<BaseTween *> objs)
{
int cnt = 0;
for (int i=0, n=objs.size(); i<n; i++)
{
cnt += objs[i]->getTweenCount();
}
return cnt;
}
int getTimelinesCount(std::vector<BaseTween *> objs)
{
int cnt = 0;
for (int i=0, n=objs.size(); i<n; i++)
{
cnt += objs[i]->getTimelineCount();
}
return cnt;
}
bool isTweenFinished(BaseTween *obj)
{
if (obj->isFinished() && obj->isAutoRemoveEnabled)
{
obj->free();
return true;
}
return false;
}
// -------------------------------------------------------------------------
// API
// -------------------------------------------------------------------------
TweenManager::TweenManager() : objects()
{
objects.reserve(20);
}
/**
* Adds a tween or timeline to the manager and starts or restarts it.
*
* @return The manager, for instruction chaining.
*/
TweenManager &TweenManager::add(BaseTween &object)
{
bool isPresent = (std::find(objects.begin(), objects.end(), &object) != objects.end());
if (!isPresent) objects.push_back(&object);
if (object.isAutoStartEnabled) object.start();
return *this;
}
/**
* Kills every managed tweens and timelines.
*/
void TweenManager::killAll()
{
for (int i=0, n=objects.size(); i<n; i++)
{
BaseTween *obj = objects[i];
obj->kill();
}
}
/**
* Increases the minimum capacity of the manager. Defaults to 20.
*/
void TweenManager::ensureCapacity(int minCapacity) { objects.reserve(minCapacity); }
/**
* Pauses the manager. Further update calls won't have any effect.
*/
void TweenManager::pause() { isPaused = true; }
/**
* Resumes the manager, if paused.
*/
void TweenManager::resume() { isPaused = false; }
/**
* Updates every tweens with a delta time ang handles the tween life-cycles
* automatically. If a tween is finished, it will be removed from the
* manager. The delta time represents the elapsed time between now and the
* last update call. Each tween or timeline manages its local time, and adds
* this delta to its local time to update itself.
* <p/>
*
* Slow motion, fast motion and backward play can be easily achieved by
* tweaking this delta time. Multiply it by -1 to play the animation
* backward, or by 0.5 to play it twice slower than its normal speed.
*/
void TweenManager::update(float delta)
{
// Remove tweens that are finished
objects.erase(std::remove_if(objects.begin(),objects.end(),isTweenFinished), objects.end());
if (!isPaused)
{
if (delta >= 0)
{
for (int i=0, n=objects.size(); i<n; i++) objects[i]->update(delta);
}
else
{
for (int i=objects.size()-1; i>=0; i--) objects[i]->update(delta);
}
}
}
/**
* Gets the number of managed objects. An object may be a tween or a
* timeline. Note that a timeline only counts for 1 object, since it
* manages its children itself.
* <p/>
* To get the count of running tweens, see {@link #getRunningTweensCount()}.
*/
int TweenManager::size() { return objects.size(); }
/**
* Gets the number of running tweens. This number includes the tweens
* located inside timelines (and nested timelines).
* <p/>
* <b>Provided for debug purpose only.</b>
*/
int TweenManager::getRunningTweensCount() { return getTweensCount(objects); }
/**
* Gets the number of running timelines. This number includes the timelines
* nested inside other timelines.
* <p/>
* <b>Provided for debug purpose only.</b>
*/
int TweenManager::getRunningTimelinesCount() { return getTimelinesCount(objects); }
/**
* Gets a list of every managed object.
* <p/>
* <b>Provided for debug purpose only.</b>
*/
std::vector<BaseTween *> &TweenManager::getObjects()
{
return objects;
}
}

View File

@ -1,17 +0,0 @@
//
// TweenPaths.cpp
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#include <TweenEngine/TweenPaths.h>
#include <TweenEngine/paths/LinearPath.h>
#include <TweenEngine/paths/CatmullRom.h>
namespace TweenEngine
{
TweenPath &TweenPaths::linear = *(new LinearPath());
TweenPath &TweenPaths::catmullRom = *(new CatmullRom());
}

View File

@ -1,39 +0,0 @@
//
// TweenPool.cpp
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#include <TweenEngine/TweenPool.h>
#include <TweenEngine/Tween.h>
namespace TweenEngine
{
void TweenPoolCallback::onPool(Tween *obj)
{
obj->reset();
}
void TweenPoolCallback::onUnPool(Tween *obj)
{
obj->reset();
}
TweenPool::TweenPool() : Pool<TweenEngine::Tween>(20, new TweenPoolCallback())
{
}
Tween *TweenPool::create() { return new Tween(); }
//TweenPoolCallback *Tween::poolCallback = new TweenPoolCallback();
//TweenPool *Tween::pool = new TweenPool(20, Tween::poolCallback);
/*
private static final Pool<Tween> pool = new Pool<Tween>(20, poolCallback) {
@Override protected Tween create() {return new Tween();}
};
*/
}

View File

@ -1,34 +0,0 @@
//
// Back.cpp
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#include <TweenEngine/equations/Back.h>
#define S (1.70158f)
namespace TweenEngine
{
float BackIn::compute(float t) { return t*t*((S+1)*t - S); }
const char *BackIn::toString() { return "Back.IN"; }
float BackOut::compute(float t) {
t -= 1;
return (t*t*((S+1)*t + S) + 1);
}
const char *BackOut::toString() { return "Back.OUT"; }
float BackInOut::compute(float t) {
float s=S*1.525;
t*=2;
if (t < 1) {
return 0.5f*(t*t*((s+1)*t - s));
} else {
t -= 2;
return 0.5f*(t*t*((s+1)*t + s) + 2);
}
}
const char *BackInOut::toString() { return "Back.INOUT"; }
}

View File

@ -1,42 +0,0 @@
//
// Bounce.cpp
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#include <TweenEngine/equations/Bounce.h>
namespace TweenEngine
{
inline float outBounce(float t) {
if (t < (1/2.75)) {
return 7.5625f*t*t;
} else if (t < (2/2.75)) {
t = t - (1.5 / 2.75);
return (7.5625 * t * t + 0.75);
} else if (t < (2.5/2.75)) {
t = t - (2.25 / 2.75);
return (7.5625 * t * t + 0.9375);
} else {
t = t - (2.625 / 2.75);
return (7.5625 * t * t + 0.984375);
}
}
inline float inBounce(float t) {
return 1 - outBounce(1-t);
}
float BounceIn::compute(float t) { return inBounce(t); }
const char *BounceIn::toString() { return "Bounce.IN"; }
float BounceOut::compute(float t) { return outBounce(t); }
const char *BounceOut::toString() { return "Bounce.OUT"; }
float BounceInOut::compute(float t) {
if (t < 0.5f) return (inBounce(t*2) * 0.5f);
else return (outBounce(t*2-1) * 0.5f + 0.5f);
}
const char *BounceInOut::toString() { return "Bounce.INOUT"; }
}

View File

@ -1,30 +0,0 @@
//
// Circ.cpp
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#include <math.h>
#include <TweenEngine/equations/Circ.h>
namespace TweenEngine
{
float CircIn::compute(float t) { return (float) -sqrt(1 - t*t) - 1; }
const char *CircIn::toString() { return "Circ.IN"; }
float CircOut::compute(float t) { return (float) sqrt(1 - (t-1)*(t-1)); }
const char *CircOut::toString() { return "Circ.OUT"; }
float CircInOut::compute(float t) {
t *= 2;
if (t < 1) {
return (-0.5 * (sqrt(1 - t*t) - 1));
} else {
t -= 2;
return (0.5 * (sqrt(1 - t*t) + 1));
}
}
const char *CircInOut::toString() { return "Circ.INOUT"; }
}

View File

@ -1,31 +0,0 @@
//
// Cubic.cpp
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#include <TweenEngine/equations/Cubic.h>
namespace TweenEngine
{
float CubicIn::compute(float t) { return t*t*t; }
const char *CubicIn::toString() { return "Cubic.IN"; }
float CubicOut::compute(float t) {
t -= 1;
return t*t*t + 1;
}
const char *CubicOut::toString() { return "Cubic.OUT"; }
float CubicInOut::compute(float t) {
t *= 2;
if (t < 1) {
return 0.5f * t*t*t;
} else {
t -= 2;
return 0.5f * (t*t*t + 2);
}
}
const char *CubicInOut::toString() { return "Cubic.INOUT"; }
}

View File

@ -1,80 +0,0 @@
//
// Elastic.cpp
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#include <math.h>
#include <TweenEngine/equations/Elastic.h>
#define M_PI 3.14159265358979323846
#define M_TWOPI (M_PI * 2.0)
namespace TweenEngine
{
float ElasticIn::compute(float t) {
float a = amplitude;
float p = period;
if (t == 0) return 0;
if (t == 1) return 1;
if (!isPeriodSet) p = 0.3;
float s;
if (!isAmplitudeSet || a < 1) {
a = 1;
s = p/4.0;
} else {
s = p/(M_TWOPI) * (float)asin(1/a);
}
t -= 1;
return -(a*(float)pow(2,10*t) * (float)sin((t-s)*(M_TWOPI)/p ));
}
const char *ElasticIn::toString() { return "Elastic.IN"; }
void ElasticIn::setAmplitude(float a) { this->amplitude = a; this->isAmplitudeSet = true; }
void ElasticIn::setPeriod(float p) { this->period = p; this->isPeriodSet = true; }
float ElasticOut::compute(float t) {
float a = amplitude;
float p = period;
if (t==0) return 0;
if (t==1) return 1;
if (!isPeriodSet) p = 0.3f;
float s;
if (!isAmplitudeSet || a < 1) {
a = 1;
s = p/4.0;
} else {
s = p/(M_TWOPI) * (float)asin(1/a);
}
return a*(float)pow(2,-10*t) * (float)sin((t-s)*(M_TWOPI)/p ) + 1;
}
const char *ElasticOut::toString() { return "Elastic.OUT"; }
void ElasticOut::setAmplitude(float a) { this->amplitude = a; this->isAmplitudeSet = true; }
void ElasticOut::setPeriod(float p) { this->period = p; this->isPeriodSet = true; }
float ElasticInOut::compute(float t) {
float a = amplitude;
float p = period;
if (t==0) return 0;
t *= 2;
if (t==2) return 1;
if (!isPeriodSet) p = 0.3f*1.5f;
float s;
if (!isAmplitudeSet || a < 1) {
a = 1;
s = p/4.0;
} else {
s = p/(M_TWOPI) * (float)asin(1/a);
}
if (t < 1) {
t -= 1;
return -0.5f*(a*(float)pow(2,10*t) * (float)sin((t-s)*(M_TWOPI)/p));
} else {
t -= 1;
return a*(float)pow(2,-10*t) * (float)sin((t-s)*(M_TWOPI)/p)*0.5f + 1;
}
}
const char *ElasticInOut::toString() { return "Elastic.INOUT"; }
void ElasticInOut::setAmplitude(float a) { this->amplitude = a; this->isAmplitudeSet = true; }
void ElasticInOut::setPeriod(float p) { this->period = p; this->isPeriodSet = true; }
}

View File

@ -1,35 +0,0 @@
//
// Expo.cpp
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
#include <math.h>
#include <TweenEngine/equations/Expo.h>
namespace TweenEngine
{
float ExpoIn::compute(float t) {
return (t==0) ? 0 : (float)pow(2,10*(t-1));
}
const char *ExpoIn::toString() { return "Expo.IN"; }
float ExpoOut::compute(float t) {
return (t==1) ? 1 : -(float)pow(2,-10*t) + 1;
}
const char *ExpoOut::toString() { return "Expo.OUT"; }
float ExpoInOut::compute(float t) {
if (t==0) return 0;
if (t==1) return 1;
t *= 2;
if (t < 1) {
return 0.5f * (float)pow(2,10*(t-1));
} else {
t -= 1;
return 0.5f * (-(float)pow(2,-10*t) + 2);
}
}
const char *ExpoInOut::toString() { return "Expo.INOUT"; }
}

View File

@ -1,20 +0,0 @@
//
// Linear.cpp
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
/**
* Easing equation based on Robert Penner's work:
* http://robertpenner.com/easing/
* @author Aurelien Ribon | http://www.aurelienribon.com/
*/
#include <TweenEngine/equations/Linear.h>
namespace TweenEngine
{
float LinearInOut::compute(float t) { return t; }
const char *LinearInOut::toString() { return "Linear.INOUT"; }
}

View File

@ -1,31 +0,0 @@
//
// Quad.cpp
//
// This code is derived from Universal Tween Engine
// Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
//
/**
* Easing equation based on Robert Penner's work:
* http://robertpenner.com/easing/
* @author Aurelien Ribon | http://www.aurelienribon.com/
*/
#include <TweenEngine/equations/Quad.h>
namespace TweenEngine
{
float QuadIn::compute(float t) { return t*t; }
const char *QuadIn::toString() { return "Quad.IN"; }
float QuadOut::compute(float t) { return -t*(t-2); }
const char *QuadOut::toString() { return "Quad.OUT"; }
float QuadInOut::compute(float t)
{
t*=2;
if (t < 1) return 0.5f*t*t;
return -0.5f * ((t-1)*(t-3) - 1);
}
const char *QuadInOut::toString() { return "Quad.INOUT"; }
}

Some files were not shown because too many files have changed in this diff Show More