From e57a720439bfd8e511bb4e844315f7a3d9851999 Mon Sep 17 00:00:00 2001 From: Ulysse Cura Date: Sat, 11 Apr 2026 10:47:00 +0200 Subject: [PATCH] First commit --- .gitignore | 2 + .vscode/c_cpp_properties.json | 12 + .vscode/tasks.json | 77 ++ LICENSE | 674 ++++++++++++++++++ Makefile | 56 ++ README.md | 9 + assets/Makefile | 26 + assets/enemy-sheets/enemy_death_sheet.png | Bin 0 -> 3430 bytes assets/enemy-sheets/enemy_idle_sheet.png | Bin 0 -> 1614 bytes assets/enemy-sheets/enemy_run_sheet.png | Bin 0 -> 2197 bytes assets/maps/map_test.json | 35 + assets/player-sheets/player_death_sheet.png | Bin 0 -> 1943 bytes assets/player-sheets/player_idle_sheet.png | Bin 0 -> 1042 bytes assets/player-sheets/player_run_sheet.png | Bin 0 -> 1672 bytes assets/tileset.png | Bin 0 -> 70083 bytes core/Makefile | 0 core/src/headers/display.h | 14 + core/src/headers/event.h | 13 + core/src/headers/image.h | 8 + core/src/headers/keycodes.h | 11 + core/src/headers/memory_alloc.h | 6 + src/Makefile | 49 ++ src/ecs/components/animation_system.c | 111 +++ src/ecs/components/headers/animation_system.h | 34 + src/ecs/components/headers/components.h | 10 + src/ecs/components/headers/player_system.h | 35 + src/ecs/components/headers/sprite_component.h | 29 + .../components/headers/transform_component.h | 19 + src/ecs/components/player_system.c | 88 +++ src/ecs/components/sprite_component.c | 41 ++ src/ecs/components/transform_component.c | 32 + src/ecs/ecs.c | 197 +++++ src/ecs/headers/ecs.h | 85 +++ src/game.c | 72 ++ src/headers/game.h | 57 ++ src/headers/linked_list.h | 287 ++++++++ src/headers/map_manager.h | 8 + src/headers/maps.h | 15 + src/headers/texture_manager.h | 92 +++ src/headers/textures.h | 22 + src/headers/vector2d.h | 86 +++ src/linked_list.c | 377 ++++++++++ src/main.c | 281 ++++++++ src/map_manager.c | 0 src/texture_manager.c | 92 +++ src/vector2d.c | 97 +++ 46 files changed, 3159 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/tasks.json create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 README.md create mode 100644 assets/Makefile create mode 100644 assets/enemy-sheets/enemy_death_sheet.png create mode 100644 assets/enemy-sheets/enemy_idle_sheet.png create mode 100644 assets/enemy-sheets/enemy_run_sheet.png create mode 100644 assets/maps/map_test.json create mode 100644 assets/player-sheets/player_death_sheet.png create mode 100644 assets/player-sheets/player_idle_sheet.png create mode 100644 assets/player-sheets/player_run_sheet.png create mode 100644 assets/tileset.png create mode 100644 core/Makefile create mode 100644 core/src/headers/display.h create mode 100644 core/src/headers/event.h create mode 100644 core/src/headers/image.h create mode 100644 core/src/headers/keycodes.h create mode 100644 core/src/headers/memory_alloc.h create mode 100644 src/Makefile create mode 100644 src/ecs/components/animation_system.c create mode 100644 src/ecs/components/headers/animation_system.h create mode 100644 src/ecs/components/headers/components.h create mode 100644 src/ecs/components/headers/player_system.h create mode 100644 src/ecs/components/headers/sprite_component.h create mode 100644 src/ecs/components/headers/transform_component.h create mode 100644 src/ecs/components/player_system.c create mode 100644 src/ecs/components/sprite_component.c create mode 100644 src/ecs/components/transform_component.c create mode 100644 src/ecs/ecs.c create mode 100644 src/ecs/headers/ecs.h create mode 100644 src/game.c create mode 100644 src/headers/game.h create mode 100644 src/headers/linked_list.h create mode 100644 src/headers/map_manager.h create mode 100644 src/headers/maps.h create mode 100644 src/headers/texture_manager.h create mode 100644 src/headers/textures.h create mode 100644 src/headers/vector2d.h create mode 100644 src/linked_list.c create mode 100644 src/main.c create mode 100644 src/map_manager.c create mode 100644 src/texture_manager.c create mode 100644 src/vector2d.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9ef9604 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build + diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..6e85a26 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,12 @@ +{ + "configurations": [ + { + "name": "Default", + "includePath": [ + "src/**/headers", + "core/**/headers" + ] + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..dc4aebd --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,77 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Build", + "detail": "Build project", + "type": "shell", + "command": "make", + "args": [ + "-j$(nproc)" + ], + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": true, + "panel": "shared", + "showReuseMessage": true, + "clear": true + } + }, + { + "label": "Clean", + "detail": "Clean build directory and executable", + "type": "shell", + "command": "make", + "args": [ + "clean" + ], + "group": "build", + "presentation": { + "echo": false, + "reveal": "never", + "focus": false, + "panel": "shared", + "showReuseMessage": false, + "clear": true + } + }, + { + "label": "Build Verbose", + "detail": "Build project with verbosity on", + "type": "shell", + "command": "make", + "args": [ + "VERBOSE=1" + ], + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": true, + "panel": "shared", + "showReuseMessage": true, + "clear": true + } + }, + { + "label": "Run", + "detail": "Run executable", + "type": "shell", + "command": "make", + "args": [ + "run" + ], + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": true, + "panel": "shared", + "showReuseMessage": true, + "clear": true + } + } + ] +} \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f0059fa --- /dev/null +++ b/Makefile @@ -0,0 +1,56 @@ +SHELL = /bin/bash + +# Build folder +BUILD_DIR = build + +# Source output target name +SOURCE_OUTPUT := 2D_Engine + +# Assets output +ASSETS_OUTPUT := game.data + +# Verbosity +Q := @ +ifeq ($(VERBOSE), 1) +Q := +endif + +# Colors +GREEN := \033[0;32m +YELLOW := \033[1;33m +RESET := \033[0m + +# Default targets +#all: build_core build_src compress_assets end +all: build_src + +# Current file nb to process +CURRENT_FILE := 0 + +# Sub-Makefiles +SOURCE_DIR = src +CORE_DIR = core +ASSETS_DIR = assets + +include $(CORE_DIR)/Makefile +include $(SOURCE_DIR)/Makefile +include $(ASSETS_DIR)/Makefile + +count_build: + $(eval export TOTAL_FILES := $(shell echo $$(($$(make -n $(OBJECTS) 2>/dev/null | grep -c "Building") + 1)))) + +# Print ending message +end: + @echo "Built target $(OUTPUT)" + +# Clean +.PHONY: clean +clean: + $(Q)rm -rf $(BUILD_DIR) + @echo "Build dir cleaned" + +# Run executable +.PHONY: run +run: + $(Q)./$(OUTPUT) + diff --git a/README.md b/README.md new file mode 100644 index 0000000..2de9d8b --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +# 2D_Engine_C + +## Description +A multi-platform 2D_Engine made in C. + +## Licences +- This program is open-source : you can redistribute and/or modify it under the term of the **GNU GPLv3**. + Copyright (C) 2025 Ulysse Cura. See [LICENSE](LICENSE) or [gnu.org/licenses/gpl-3.0.html](https://www.gnu.org/licenses/gpl-3.0.html). diff --git a/assets/Makefile b/assets/Makefile new file mode 100644 index 0000000..398dc20 --- /dev/null +++ b/assets/Makefile @@ -0,0 +1,26 @@ +# Assets files +ASSETS := \ + assets/tileset/tileset.png \ + assets/player-sheets/player_idle_sheet.png \ + assets/player-sheets/player_walk_sheet.png \ + assets/player-sheets/player_run_sheet.png \ + assets/props-sheets/barred_door_sheet.png \ + assets/props-sheets/lever_sheet.png \ + assets/props-sheets/small_chest_sheet.png \ + assets/props-sheets/big_chest_sheet.png \ + assets/maps/map_test.json + +# Deduce assets lz4 +ASSETS_COMPRESSED = $(ASSETS:%=$(BUILD_DIR)/%.lz4) + +# Compress assets into tar file +$(BUILD_DIR)/$(ASSETS_OUTPUT): $(ASSETS_COMPRESSED) + @echo "[100%] $(YELLOW)Compressing $(ASSETS_OUTPUT)$(RESET)" + $(Q)tar -cvf $@ $() + +# Compress individual assets +$(BUILD_DIR)/%.lz4: % + $(eval CURRENT_FILE := $(shell echo $$(($(CURRENT_FILE) + 1)))) + $(eval PERCENTAGE := $(shell echo $$(($(CURRENT_FILE) * 100 / $(TOTAL_FILES))))) + @echo "[$(PERCENTAGE)%] $(GREEN)Compressing asset $@$(RESET)" + $(Q)lz4 $< $@ diff --git a/assets/enemy-sheets/enemy_death_sheet.png b/assets/enemy-sheets/enemy_death_sheet.png new file mode 100644 index 0000000000000000000000000000000000000000..2a10b986179ef7027c9c32e82634c9b0b58ac29a GIT binary patch literal 3430 zcmcIn_cz<^8~!AM#Hbx=w29GpZMD^iT{V(YtF@__qDG0Cw)S{Yqh?-Sl-gRQ)E-T# z*;2F=trn$1s2P0o{t@4Eu5&%l5BIsxeV%(=PZHMLh?R+-2><|Awtrx_uP^>uEA75y&u#|iupB6Sl%4N3f2d+oZ$sqHs%G9{<~ z(z_MK@l~H^vY-p}y!u0EmU6btNOVoaw9!GW+1d1$Vh)ZXD*XMLaq0_w!{!fMB&ywnwrDI`?^&Yz+ z4k%=K)6t-ZETT#^P8%7EQ_7>O5(!jYn>zWYfRttr>I8JJJCuTFo%Ihr)#9~I<|7?O zayFVob)om;kR|GY$`Jx|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!FXpW?e)U=Qj z)v)dM`9>z|^-2pOLFO7?rgQd* zXRlDTL5~_^dRXvY=#cpj6ew>l&!cEIMkYz^$(LL+3cJ8&pHEv<3MuY*l){_Hv28Ba zI1O1cEEAuOfN%blgG+yGw)sI5$UL`*IpK{A+VZCEq@{1SengGzEK*+HiluPjAJe+m zgxr-DHvU}c)KG&AfoGxb+W6B{f`^CS`jc@i&_|cC&};jGr~hgE&&zvMZx%-dUYwKR0pVN`5NDroVd&_AbC&1XiT)$q|`O*IX;_^ij literal 0 HcmV?d00001 diff --git a/assets/enemy-sheets/enemy_idle_sheet.png b/assets/enemy-sheets/enemy_idle_sheet.png new file mode 100644 index 0000000000000000000000000000000000000000..6902aa41a3f75925080265e87b10b0cf942ce616 GIT binary patch literal 1614 zcmV-U2C?~xP)Px*2uVaiRCt{2TTN&iM;Lvo8!L^lWhs-ob)_w7!8pheB`u`%;9iQTpzfuCQ0j9+ z4+S5ZHtNr*X`IqRdMdP#TYP9K6f74PkxO$hNvRzfywns@@X9|p+E|u_1ac#`ht-T$ z(rSOCS*>aHPS(!szHi^W@7tN#HPAy3J^X*+v3mj`LB*&&OnjdEYnk>V>Y=N!WdK5g z%1msi?$`_GVgP`@@1+0$iPT=t1P+3C0$MfzAwgy8^f5$+`(i zb+HofV!PtJo{{u%O?YUbtH|@6N0A! z+^#@w@;jM;Pqu0}e{H<(cloP78Bt`oABof+{DPOYPwvbE0Ft?i8K-S%1<*rexF6!q z0gG)WHiSe93a>%1%1_ZLzg_~GVe+jv0n`%EDs&C-V0qi~)5lQGUmM4kSO5TwTs{Rr zH3GfaP-GC|LKXm!gldMoRA$#XGZqE_*e!?M6o4nF0eOH|0-hNQ8|vS(0%%QecUFRw z&OwL$Er%38ijBe+?Cj11Unka-%AcLExrr2%LlH>b) zox|enI!=~K)mC**K-+|903(qBY>4|!f!KxH6$ofHAO+>WwNm1efvwQ31bo7*gDmfQ z7H0lp1KTaA0<2;rG5{%^!`)d4TVes;su2KH0E$p#kcq&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&r|=F2GDMT(7kXW8eltO+3X|T^Jt$?WDwQ!+7hA1-yQyc0q81(rVdb$a{vGU M07*qoM6N<$g5MD5U;qFB literal 0 HcmV?d00001 diff --git a/assets/enemy-sheets/enemy_run_sheet.png b/assets/enemy-sheets/enemy_run_sheet.png new file mode 100644 index 0000000000000000000000000000000000000000..837bc47239263d454c0fd6627ae1154e1df5316d GIT binary patch literal 2197 zcmV;G2x|9{5*f(c%E(9=_gf9 zW+w0V^Y?wf-@KVOV+B11#^Q$G{sbFR{(pV3Q|W9w^c(+5w-X2h#^T1z)Sjkoe?2+{ z0Qm9SIRHRzZndo<^qT>~pda}UT>#xO0Aq3EWO^4;`*%3@Y0H}cVC~DztwPr;(u=zv z4G<=7Kk^?c$!-~d$Oqsm0MLFB`qcoUar>2j;RHKrfcuZ!?dWpHV*^bw>~J%JECKr2 z0B+b${NE8a0XL-f?|`ct|8 z>I#yX7!I61WaW~~#4G_0rtSm)tQE^rWB0oOys%yP|BH753jlzdS`|07Dh5vv z%*1f)=_H1egH6VW68n=g3pkM4jiS1Os~3wF4+P2!Fu5QT$chcz=D*$iyB0tv69|H? zSCstB4g9R#l0J42wu1qJ(C_?v7C@&G5XF7#>$q=y-Ld`rp9!08#WS|ABXb>IoR_AXOB)UQtvu7J!D6gUIIYwa5pWyCJ__7TmJ@`1m>@N1;Ff% z7P##)(9Z@Cg|1f=UWapi!oN@fbjtvT#}Zi7YeqIVipu~d3niR5vKQman^;(?;^=cP zSjWhv~7M)*UItc41+u+H?GS7C=zW+LR}ABo)`fDOrzA+0;GHBqB@WUy~e+50SI;9dm6_tEL8!9 zmJ;y8T5-c#fC0=q4Q_aI`jmBNWc;&Bp3jSf0o_9nBR(Lv00~}tOrzBH4h)FtKpONK z|E>klYWHm=0Y4<)5oHc+$D&>{=mN~G2njofq8ore z1NiB|YjOOE$1VP4n2^tbu{giWp#y2qYyA5bfLCAup25Q=APN#7!?uj^dv*h8em4A@ z2j9TM|9f5P3n63xQSkw}2Cx?ZVNtIcC)2w;P0(rniF-iq3pt(O-*XCN3#{bkR_lSA z3Fm`15~v6#Ac_PVlCrcO1|*`cS9k-!uK-njz#s!e`Ru&;T}*&4ZmfgXqPYX#=3kV5 z*8<=J6Bvst`tRNyn37;;Uyxz|FR1zeRNb6nWte$3y6f2w0GR6(83w4PP*UgM-7o;) z?BaI*`R)rqS^;{&&Ogt+xvjVO7k(6?TLvI3>NO+78fP0a0RZ4XuK)m8eH#fR0}nj% zck_p(>-Dj>R{;_{`L}To^cMe~1zgen041e}4hxl!b2 zZgivwcw9dB9N0s03ZOJ!Fi3ct*!IsPb$+hv6-CR#;7vzAtNC)60+hmkHaF_I7-~n| zuu?SV&2IxgzF}{IqGw;v0-&c4{r20p)#t2D$)vLTpydn3NP0qg5%4*RiW3Hm#hVOB zQxVk3A4yO62^1OjBH$l+*79YC2E@O8oYK6>f0SvN7rz`Q(&6Jj`V0opXbi1*z_kE~ zB(EX}AW_lsWyk4T%NLAnZWM*jclXryktQ=Si&!mRMmq}G4^#w{3+3UXfdY>rh>}M# z6BC~1wCfsx#-^W3^99G5DS#UXgkFi{i@n?R*)*<5eqnhElS`Pf-OLgtuQ0J?^6$5QBt2p2lgz|g`h0%^ XmfyK}Mk}FN00000NkvXXu0mjfQh^oJ literal 0 HcmV?d00001 diff --git a/assets/maps/map_test.json b/assets/maps/map_test.json new file mode 100644 index 0000000..0c30ebc --- /dev/null +++ b/assets/maps/map_test.json @@ -0,0 +1,35 @@ +{ + "map_width": 10, + "map_height": 10, + + "background": [ + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0] + ], + + "hitboxes": [ + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0] + ], + + "player_init_pos": { + "x": 2, + "y": 2 + } +} \ No newline at end of file diff --git a/assets/player-sheets/player_death_sheet.png b/assets/player-sheets/player_death_sheet.png new file mode 100644 index 0000000000000000000000000000000000000000..1f6103a40ed25c8e973e39d03d42783a409aaf92 GIT binary patch literal 1943 zcmV;I2Wa?-P)Px+QAtEWRCt{2ojqt9NfgKbG8a{WI7Y~*F(fiX@_`IdBTx~DW0E4oTocmy3Ugho z!rT=uQn*l&kU~xu)VR8E&EZ3ZO%j6&fjH2C1h#CjV@M;sCyWEG6!2cLdaKcB_Cwak zj&$>DB(FBh+ueC@-uutn4WLjc6bgkxp-?CkiXq_>ZJb+J?AX?*ebcQDa-kiY--Gk< zwqqWA{&;=s6bi*y^Mjk6DEK5+Qivsz=JxHkuW%>%7^j6@oK+8Tp&dgjmvlY|DHIBY zhzX}1DER!6{i7}Th?oq{0sypf$ue6~C=?39HUP1ik6Tm_QYaK|vDJVYwQo8bd}4_t z-mg3t9*EU}*yGph=RF&#P$!J(iIB%aST8tFayAJG=e+H$F2_^oR6a}iSsHUU7?T<*BMYZI*@FzLb?-^!C4iA z6pA6?Dgb33Hh?d0@cZ3gaa!25Ew6U^W?Fx^u8=Nc5Sm+9Y%2%ZGV?m+r7A5IUgJ6g z0t_AKLOV7c)ap|@#S7_FVv20n%B8^@*dwaERE#Q)0q7{7L#ny7PE1E5mY?Lr zG7fSQ(#Hu^UMfZz+W_Pb-SR<$PT9?LG-A671^`&w!0TuC`)y}W@IpEO*DHB43F$n& zmY1+-!%!%Og<}R3oR9moa!IGmW;z-%Q+pAoh28#I*hfZLNVlSw@=~Gj8pi;1dorZ| z{MSDKj6q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me8( z2?VBe%7ppJi>|jZ`0bCwzhTpA1|CFNCc6Hm`i-`UEM1G?Y{HLLbznI0(%MGbnj{-3z~@h9_dHccc4ZaK2IBD<9XvylB~ z)kCCV1Rs(8!`86Kb}PF9=6XMBogX`cQVGVx&cJ+mKs249r*UU>{rS>yJygNw{t1Av dvj3X){|7|$3&Ac$LaqP+002ovPDHLkV1mv_r#t`v literal 0 HcmV?d00001 diff --git a/assets/player-sheets/player_idle_sheet.png b/assets/player-sheets/player_idle_sheet.png new file mode 100644 index 0000000000000000000000000000000000000000..7d078c2c05fe81ed9e788506800d001e62fc0503 GIT binary patch literal 1042 zcmV+t1nv8YP)Y;{W@E9lsjUF=V5tMhhtGW< ztl!7o@OtlipGVc7R)NIN@849$PzVYKIu-sp1gNwI004hFfj$-K(gD*j zA;7`{cyW2rfh*!rlLBLK0yY|g`86xK|j;f$`AZmWo0<5$PIK<($NcYVHv<^hg zUxxt8PXbdXaP#p9fj@_HJBPBP z!fzt~FI0jy>t%RIP64|=h)&~JvgNWEgX`GI)nZUxubd0N$^0ujfXI0BMec`3K{vh% z5gm}|bb(_M@GtSFId$j1v;a2iWq5aO1K93bYz${XZhRDr!k8*Z_>;MI=tq5LC1B#L zO2>Gf{ATiB_@6Q``@iZc1P*Bl}J{>&v`HZ)cMn{AYt+OS>1oG1LTos*@}rd z_Z;|tKi=oY*1?~SJ(ef40214YF!6$1atYV5_kJGEj-LY?{`&a;0^^nHwGBu?rbT}wIJl<3?l~78#A%nRoqsL4~h8s#+O2*L1 zqe&@b$RKJC9EyVx8MKs|V1x^vg0VWheDbp*Sx@#;{csQ#h3Wzjg{u4~Ccr8Pfb9PG+wY0jJ}Z@_2Z8rN zH35h~W&VYGfV>32+ZBcEAgC;WG4jkSpaFEBL6}? zK%N2s5OnVVBY)#XP59pDTiX~&nuMw-01>Fnf2viWyaYfFMO zGc<7gsw&L~l?9Ll)%h1nfV>4z+T78+ZrdMuPGEyJfTGa5kXHj$7k~&<=07n3RzU!t ze)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KKhU&8lm{wHsyD%m zA7~mP6N5P4{XsJlC}xOr%ir!9mXbhhcVQ^LspB7ZKhTuK;P@DR)!v7JYh|A8?Om5q zSu)#0qF=T5;as0HL66i-d)H-r{gLIKV|N}t?WwCo?Se4l2byL$*EfuTYyKkVqK)!z z2M1%ZTW0(~QxH_;%|t=~lWN95#mLU5o7tOfKhO+;Vuq}g-?^Uiwo8^vY65uLA-MEl zK46AGF+#OCt!bSBS-YUccxk~sKGMsEA85zM3ZNPG41r>XSjsPs<(5(wCl*Ee{{`ESi4S_Z`)Y;3b z=1$(o+)JTsB9~HXS`f%fp7geSAW^1e0+VtI#)WA?AQAViEHPfiFll65=`FwrKi=1u x)0bpg5Xg}PQvi86snmL7}){~uB#p&+zHriTCk002ovPDHLkV1hu9v5f!# literal 0 HcmV?d00001 diff --git a/core/Makefile b/core/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/core/src/headers/display.h b/core/src/headers/display.h new file mode 100644 index 0000000..53ab34f --- /dev/null +++ b/core/src/headers/display.h @@ -0,0 +1,14 @@ +#ifndef DISPLAY_H +#define DISPLAY_H + +#include "SDL2/SDL_render.h" + +#define C_WHITE 255, 255, 255, 255 + +void dclear(void) +{ + SDL_SetRenderDrawColor(renderer, C_WHITE); + SDL_RenderClear(renderer); +} + +#endif // DISPLAY_H \ No newline at end of file diff --git a/core/src/headers/event.h b/core/src/headers/event.h new file mode 100644 index 0000000..42c0da3 --- /dev/null +++ b/core/src/headers/event.h @@ -0,0 +1,13 @@ +#ifndef KEYBOARD_H +#define KEYBOARD_H + +#include + +typedef SDL_Event event_t; + +inline int pollevent(event_t *event) +{ + return SDL_PollEvent(event); +} + +#endif // KEYBOARD_H \ No newline at end of file diff --git a/core/src/headers/image.h b/core/src/headers/image.h new file mode 100644 index 0000000..72fbaae --- /dev/null +++ b/core/src/headers/image.h @@ -0,0 +1,8 @@ +#ifndef IMAGE_H +#define IMAGE_H + +#include + +typedef SDL_Texture image_t; + +#endif // IMAGE_H \ No newline at end of file diff --git a/core/src/headers/keycodes.h b/core/src/headers/keycodes.h new file mode 100644 index 0000000..e2185c5 --- /dev/null +++ b/core/src/headers/keycodes.h @@ -0,0 +1,11 @@ +#ifndef KEYCODES_H +#define KEYCODES_H + +#include + +#define MAX_KEYCODES SDL_NUM_SCANCODES + +#define KEYEV_UP SDL_KEYUP +#define KEYEV_DOWN SDL_KEYDOWN + +#endif // KEYCODES_H \ No newline at end of file diff --git a/core/src/headers/memory_alloc.h b/core/src/headers/memory_alloc.h new file mode 100644 index 0000000..9a0a8b5 --- /dev/null +++ b/core/src/headers/memory_alloc.h @@ -0,0 +1,6 @@ +#ifndef MALLOC_H +#define MALLOC_H + +#include + +#endif // MALLOC_H \ No newline at end of file diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..c20cea2 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,49 @@ +# Source files +SOURCES := \ + main.c \ + game.c \ + vector2d.c \ + linked_list.c \ + texture_manager.c \ + map_manager.c \ + ecs/ecs.c \ + ecs/components/transform_component.c \ + ecs/components/sprite_component.c \ + ecs/components/animation_system.c \ + ecs/components/player_system.c + +# Compiler and flags +CC = ccache gcc +CFLAGS = -Wall -Wextra -std=c17 +INCLUDE_DIRS = $(SOURCE_DIR)/headers $(SOURCE_DIR)/ecs/headers $(SOURCE_DIR)/ecs/components/headers $(CORE_DIR)/src/headers +LDFLAGS = + +# Deduce objects +SOURCE_OBJECTS = $(SOURCES:%.c=$(BUILD_DIR)/$(SOURCE_DIR)/%.o) + +# Build src target +build_src: src_build_dir count_src_build $(BUILD_DIR)/$(SOURCE_OUTPUT) + +# Source build directories +src_build_dir: + echo $(INCLUDE_DIRS) + $(Q)mkdir -p $(dir $(SOURCE_OBJECTS)) + +# Count +count_src_build: + $(eval export TOTAL_FILES := $(shell echo $$(($$(make -n $(SOURCE_OBJECTS) 2>/dev/null | grep -c "Building") + 1)))) + +# Link game target +$(BUILD_DIR)/$(SOURCE_OUTPUT): $(SOURCE_OBJECTS) + @echo -e "[100%] $(YELLOW)Linking $(OUTPUT)$(RESET)" + $(Q)$(CC) -Wl,-r $(LDFLAGS) -o $@ $(SOURCE_OBJECTS) + +# Build .o files +$(BUILD_DIR)/$(SOURCE_DIR)/%.o: $(SOURCE_DIR)/%.c + $(eval CURRENT_FILE := $(shell echo $$(($(CURRENT_FILE)+1)))) + $(eval PERCENTAGE := $(shell echo $$(($(CURRENT_FILE)*100/$(TOTAL_FILES))))) + @echo -e "[$(PERCENTAGE)%] $(GREEN)Building C object $@$(RESET)" + $(Q)$(CC) $(CFLAGS) $(INCLUDE_DIRS:%=-I%) -MMD -MP -c $< -o $@ + +# Source files dependencies +-include $(SOURCE_OBJECTS:.o=.d) diff --git a/src/ecs/components/animation_system.c b/src/ecs/components/animation_system.c new file mode 100644 index 0000000..76e12d7 --- /dev/null +++ b/src/ecs/components/animation_system.c @@ -0,0 +1,111 @@ +#include "memory_alloc.h" +#include "animation_system.h" +#include "game.h" + +// Args : size_t nb_frames, size_t actual_frame, float frame_delay_ms, bool play, bool loop, bool reverse +void animation_system_init(component_t *component, va_list args) +{ + animation_system_data_t *system_data = component->component_data.animation_system_data; + + system_data->sprite_component_data = get_component(component->entity, SPRITE_COMPONENT)->component_data.sprite_component_data; + + system_data->nb_frames = va_arg(args, size_t); + system_data->actual_frame_nb= va_arg(args, size_t); + system_data->frame_delay_ms = (float)va_arg(args, double); + system_data->play = (bool)va_arg(args, int); + system_data->loop = (bool)va_arg(args, int); + system_data->reverse = (bool)va_arg(args, int); + + system_data->frame_timer_ms = 0; + + linked_list_init(&system_data->frames, sizeof(rect_t), NULL); + + animation_system_create_frames_clips(system_data); +} + +void animation_system_update(component_t *component) +{ + animation_system_data_t *system_data = component->component_data.animation_system_data; + + if(system_data->play) + { + system_data->frame_timer_ms += (float)game.delta_time_ms; + + if(system_data->frame_timer_ms >= system_data->frame_delay_ms) + { + system_data->frame_timer_ms = 0; + + if(system_data->reverse) + { + if(system_data->actual_frame->prev) + { + system_data->actual_frame = system_data->actual_frame->prev; + system_data->actual_frame_nb--; + } + else if(!system_data->loop) + { + system_data->play = false; + } + else + { + system_data->actual_frame = system_data->frames.last; + system_data->actual_frame_nb = system_data->frames.size - 1; + } + } + else + { + if(system_data->actual_frame->next) + { + system_data->actual_frame = system_data->actual_frame->next; + system_data->actual_frame_nb++; + } + else if(!system_data->loop) + { + system_data->play = false; + } + else + { + system_data->actual_frame = system_data->frames.first; + system_data->actual_frame_nb = 0; + } + } + } + + system_data->sprite_component_data->src_rect = *(rect_t *)system_data->actual_frame->data; + } +} + +inline void animation_system_destroy(component_t *component) +{ + linked_list_clear(&component->component_data.animation_system_data->frames); + free(component->component_data.animation_system_data); +} + +void animation_system_create_frames_clips(animation_system_data_t *system_data) +{ + linked_list_clear(&system_data->frames); + + rect_t *sprite_srcR = &system_data->sprite_component_data->src_rect; + + for(size_t actual_frame_nb = 0; actual_frame_nb < system_data->nb_frames; actual_frame_nb++) + { + elem_t *frame = elem_create(&system_data->frames); + + ((rect_t *)frame->data)->x = sprite_srcR->w * (float)actual_frame_nb; + ((rect_t *)frame->data)->y = 0; + ((rect_t *)frame->data)->w = sprite_srcR->w; + ((rect_t *)frame->data)->h = sprite_srcR->h; + + linked_list_push_back_elem(&system_data->frames, frame); + } + + system_data->actual_frame = linked_list_get_elem(&system_data->frames, system_data->actual_frame_nb); +} + +inline void animation_system_change_animation(animation_system_data_t *system_data, const char *name, size_t nb_frames) +{ + system_data->nb_frames = nb_frames; + sprite_component_set_texture(system_data->sprite_component_data, name); + animation_system_create_frames_clips(system_data); + system_data->sprite_component_data->src_rect = *(rect_t *)system_data->actual_frame->data; +} diff --git a/src/ecs/components/headers/animation_system.h b/src/ecs/components/headers/animation_system.h new file mode 100644 index 0000000..18e4dc7 --- /dev/null +++ b/src/ecs/components/headers/animation_system.h @@ -0,0 +1,34 @@ +#ifndef ANIMATION_SYSTEM_H +#define ANIMATION_SYSTEM_H + +#include "ecs.h" +#include "sprite_component.h" + +typedef struct animation_system_data_t { + sprite_component_data_t *sprite_component_data; + + bool play :1; + bool loop :1; + bool reverse :1; + + float frame_delay_ms; + float frame_timer_ms; + + elem_t *actual_frame; + size_t actual_frame_nb; + + size_t nb_frames; + linked_list_t frames; +} animation_system_data_t; + +void animation_system_init(component_t *component, va_list args); + +void animation_system_update(component_t *component); + +void animation_system_destroy(component_t *component); + +void animation_system_create_frames_clips(animation_system_data_t *system_data); + +void animation_system_change_animation(animation_system_data_t *system_data, const char *name, size_t nb_frames); + +#endif // SPRITE_COMPONENT_H \ No newline at end of file diff --git a/src/ecs/components/headers/components.h b/src/ecs/components/headers/components.h new file mode 100644 index 0000000..e842d7d --- /dev/null +++ b/src/ecs/components/headers/components.h @@ -0,0 +1,10 @@ +#ifndef COMPONENTS_H +#define COMPONENTS_H + +#include "transform_component.h" +#include "sprite_component.h" +#include "animation_system.h" +#include "player_system.h" +// Add new components header file here + +#endif // COMPONENTS_H \ No newline at end of file diff --git a/src/ecs/components/headers/player_system.h b/src/ecs/components/headers/player_system.h new file mode 100644 index 0000000..320f936 --- /dev/null +++ b/src/ecs/components/headers/player_system.h @@ -0,0 +1,35 @@ +#ifndef PLAYER_SYSTEM_H +#define PLAYER_SYSTEM_H + +#include "ecs.h" + +#define PLAYER_DEFAULT_SPEED 80.0f // px / s +#define PLAYER_DEFAULT_IDLE_ANIMATION_SPEED 250.0f // ms / frame +#define PLAYER_DEFAULT_RUN_ANIMATION_SPEED 160.0f // ms / frame + +typedef enum player_state_t { + PLAYER_IDLE = 0x00, // 00000000 + PLAYER_RUNNING_UP = 0x01, // 00000001 + PLAYER_RUNNING_DOWN = 0x02, // 00000010 + PLAYER_RUNNING_LEFT = 0x04, // 00000100 + PLAYER_RUNNING_RIGHT = 0x08, // 00001000 + PLAYER_RUNNING = 0x0F, // 00001111 + PLAYER_DEATH = 0x80 // 10000000 +} player_state_t; + +typedef struct player_system_data_t { + transform_component_data_t *transform_component_data; + sprite_component_data_t *sprite_component_data; + animation_system_data_t *animation_system_data; + + player_state_t state; + player_state_t last_state; +} player_system_data_t; + +void player_system_init(component_t *, va_list); + +void player_system_update(component_t *); + +void player_system_destroy(component_t *); + +#endif // PLAYER_SYSTEM_H \ No newline at end of file diff --git a/src/ecs/components/headers/sprite_component.h b/src/ecs/components/headers/sprite_component.h new file mode 100644 index 0000000..3c8b33e --- /dev/null +++ b/src/ecs/components/headers/sprite_component.h @@ -0,0 +1,29 @@ +#ifndef SPRITE_COMPONENT_H +#define SPRITE_COMPONENT_H + +#include "ecs.h" +#include "transform_component.h" +#include "texture_manager.h" + +typedef struct sprite_component_data_t { + transform_component_data_t *transform_component_data; + + texture_t *texture; + + rect_t src_rect; + rect_t dst_rect; + + bool flip; +} sprite_component_data_t; + +void sprite_component_init(component_t *, va_list); + +void sprite_component_update(component_t *); + +void sprite_component_draw(component_t *); + +void sprite_component_destroy(component_t *); + +void sprite_component_set_texture(sprite_component_data_t *, const char *); + +#endif // SPRITE_COMPONENT_H \ No newline at end of file diff --git a/src/ecs/components/headers/transform_component.h b/src/ecs/components/headers/transform_component.h new file mode 100644 index 0000000..078cbc6 --- /dev/null +++ b/src/ecs/components/headers/transform_component.h @@ -0,0 +1,19 @@ +#ifndef TRANSFORM_COMPONENT_H +#define TRANSFORM_COMPONENT_H + +#include "ecs.h" +#include "vector2d.h" + +typedef struct transform_component_data_t { + rect_t bounds; + vector2d_t velocity; + float speed; +} transform_component_data_t; + +void transform_component_init(component_t *, va_list); + +void transform_component_update(component_t *); + +void transform_component_destroy(component_t *); + +#endif // TRANSFORM_COMPONENT_H \ No newline at end of file diff --git a/src/ecs/components/player_system.c b/src/ecs/components/player_system.c new file mode 100644 index 0000000..ad528ea --- /dev/null +++ b/src/ecs/components/player_system.c @@ -0,0 +1,88 @@ +#include "memory_alloc.h" +#include "player_system.h" +#include "animation_system.h" +#include "sprite_component.h" +#include "transform_component.h" +#include "game.h" + +// No args +void player_system_init(component_t *component, va_list args __attribute__((unused))) +{ + player_system_data_t *system_data = component->component_data.player_system_data; + + system_data->animation_system_data = get_component(component->entity, ANIMATION_SYSTEM)->component_data.animation_system_data; + system_data->sprite_component_data = system_data->animation_system_data->sprite_component_data; + system_data->transform_component_data = system_data->sprite_component_data->transform_component_data; + + system_data->state = PLAYER_IDLE; +} + +// Only for this file +static void player_system_get_inputs(player_system_data_t *system_data) +{ + system_data->last_state = system_data->state; + + system_data->state &= 0xF0; // 11110000 + + system_data->state |= game.keys[KEY_UP] * PLAYER_RUNNING_UP; + system_data->state |= game.keys[KEY_DOWN] * PLAYER_RUNNING_DOWN; + system_data->state |= game.keys[KEY_LEFT] * PLAYER_RUNNING_LEFT; + system_data->state |= game.keys[KEY_RIGHT] * PLAYER_RUNNING_RIGHT; + + // Special cases + if(system_data->state & PLAYER_RUNNING_UP && system_data->state & PLAYER_RUNNING_DOWN) system_data->state &= 0xFC; // 11111100 + if(system_data->state & PLAYER_RUNNING_LEFT && system_data->state & PLAYER_RUNNING_RIGHT) system_data->state &= 0xF3; // 11110011 +} + +// Only for this file +static void player_system_set_velocity(player_system_data_t *system_data) +{ + transform_component_data_t *transform_component_data = system_data->transform_component_data; + + transform_component_data->velocity.x = + (float)((system_data->state & PLAYER_RUNNING_RIGHT) >> 3) - (float)((system_data->state & PLAYER_RUNNING_LEFT) >> 2); + transform_component_data->velocity.y = + (float)((system_data->state & PLAYER_RUNNING_DOWN) >> 1) - (float)(system_data->state & PLAYER_RUNNING_UP); + + if(is_not_zero(transform_component_data->velocity.x) && is_not_zero(transform_component_data->velocity.y)) + { + transform_component_data->velocity.x *= 0.707106781186548f; + transform_component_data->velocity.y *= 0.707106781186548f; + } +} + +// Only for this file +static void player_system_set_animation(player_system_data_t *system_data) +{ + sprite_component_data_t *sprite_component_data = system_data->sprite_component_data; + animation_system_data_t *animation_system_data = system_data->animation_system_data; + + if(system_data->state & PLAYER_RUNNING_LEFT) sprite_component_data->flip = true; + if(system_data->state & PLAYER_RUNNING_RIGHT) sprite_component_data->flip = false; + + if((system_data->state & PLAYER_RUNNING) && !(system_data->last_state & PLAYER_RUNNING)) + { + animation_system_data->frame_delay_ms = PLAYER_DEFAULT_RUN_ANIMATION_SPEED; + animation_system_change_animation(animation_system_data, "player_run_sheet", 6); + } + else if(!(system_data->state & PLAYER_RUNNING) && (system_data->last_state & PLAYER_RUNNING)) + { + animation_system_data->actual_frame_nb = 0; + animation_system_data->frame_delay_ms = PLAYER_DEFAULT_IDLE_ANIMATION_SPEED; + animation_system_change_animation(animation_system_data, "player_idle_sheet", 4); + } +} + +void player_system_update(component_t *component) +{ + player_system_data_t *system_data = component->component_data.player_system_data; + + player_system_get_inputs(system_data); + player_system_set_velocity(system_data); + player_system_set_animation(system_data); +} + +void player_system_destroy(component_t *component) +{ + free(component->component_data.player_system_data); +} diff --git a/src/ecs/components/sprite_component.c b/src/ecs/components/sprite_component.c new file mode 100644 index 0000000..efb02d0 --- /dev/null +++ b/src/ecs/components/sprite_component.c @@ -0,0 +1,41 @@ +#include "memory_alloc.h" +#include "sprite_component.h" +#include "game.h" + +// Arg : const char *name +void sprite_component_init(component_t *component, va_list args) +{ + sprite_component_data_t *component_data = component->component_data.sprite_component_data; + + component_data->transform_component_data = get_component(component->entity, TRANSFORM_COMPONENT)->component_data.transform_component_data; + + component_data->src_rect = component_data->transform_component_data->bounds; + component_data->src_rect.x = 0; + component_data->src_rect.y = 0; + + component_data->flip = false; + + sprite_component_set_texture(component_data, va_arg(args, const char *)); +} + +inline void sprite_component_update(component_t *component) +{ + sprite_component_data_t *component_data = component->component_data.sprite_component_data; + component_data->dst_rect = component_data->transform_component_data->bounds; +} + +inline void sprite_component_draw(component_t *component) +{ + sprite_component_data_t *component_data = component->component_data.sprite_component_data; + draw_texture(component_data->texture, &component_data->src_rect, &component_data->dst_rect, component_data->flip); +} + +inline void sprite_component_destroy(component_t *component) +{ + free(component->component_data.sprite_component_data); +} + +inline void sprite_component_set_texture(sprite_component_data_t *component_data, const char *name) +{ + component_data->texture = texture_manager_get_texture(&game.texture_manager, name); +} diff --git a/src/ecs/components/transform_component.c b/src/ecs/components/transform_component.c new file mode 100644 index 0000000..3475cfc --- /dev/null +++ b/src/ecs/components/transform_component.c @@ -0,0 +1,32 @@ +#include "memory_alloc.h" +#include "transform_component.h" +#include "game.h" + +// Args : rect_t bounds, double speed +void transform_component_init(component_t *component, va_list args) +{ + transform_component_data_t *const component_data = component->component_data.transform_component_data; + + rect_t bounds = va_arg(args, rect_t); + float speed = (float)va_arg(args, double); + + component_data->bounds = bounds; + + component_data->velocity.x = 0; + component_data->velocity.y = 0; + + component_data->speed = speed; +} + +void transform_component_update(component_t *component) +{ + transform_component_data_t *component_data = component->component_data.transform_component_data; + + component_data->bounds.x += component_data->velocity.x * component_data->speed * (float)game.delta_time_ms / 1000.0f; + component_data->bounds.y += component_data->velocity.y * component_data->speed * (float)game.delta_time_ms / 1000.0f; +} + +inline void transform_component_destroy(component_t *component) +{ + free(component->component_data.transform_component_data); +} diff --git a/src/ecs/ecs.c b/src/ecs/ecs.c new file mode 100644 index 0000000..3658d05 --- /dev/null +++ b/src/ecs/ecs.c @@ -0,0 +1,197 @@ +#include +#include "memory_alloc.h" +#include "ecs.h" +#include "components.h" + +component_t *create_component(component_type_t component_type) +{ + component_t *component = malloc(sizeof(component_t)); + component->component_type = component_type; + + switch(component_type) + { + case TRANSFORM_COMPONENT: + component->component_init = transform_component_init; + component->component_update = transform_component_update; + component->component_draw = NULL; + + component->component_data.transform_component_data = malloc(sizeof(transform_component_data_t)); + if(!component->component_data.transform_component_data) return NULL; + + component->component_deleter = transform_component_destroy; + break; + + case SPRITE_COMPONENT: + component->component_init = sprite_component_init; + component->component_update = sprite_component_update; + component->component_draw = sprite_component_draw; + + component->component_data.sprite_component_data = malloc(sizeof(sprite_component_data_t)); + if(!component->component_data.sprite_component_data) return NULL; + + component->component_deleter = sprite_component_destroy; + break; + + case ANIMATION_SYSTEM: + component->component_init = animation_system_init; + component->component_update = animation_system_update; + component->component_draw = NULL; + + component->component_data.animation_system_data = malloc(sizeof(animation_system_data_t)); + if(!component->component_data.animation_system_data) return NULL; + + component->component_deleter = animation_system_destroy; + break; + + case PLAYER_SYSTEM: + component->component_init = player_system_init; + component->component_update = player_system_update; + component->component_draw = NULL; + + component->component_data.player_system_data = malloc(sizeof(player_system_data_t)); + if(!component->component_data.player_system_data) return NULL; + + component->component_deleter = player_system_destroy; + break; + + // Add new components attributions here + + default: + return NULL; + } + + return component; +} + +inline void destroy_component(component_t *component) +{ + component->component_deleter(component); + free(component); +} + +entity_t *create_entity(const unsigned int id) +{ + entity_t *entity = malloc(sizeof(entity_t)); + if(!entity) return NULL; + + entity->id = id; + entity->draw_priority = 0; + + linked_list_init(&entity->components, sizeof(component_t), (deleter_t)destroy_component); + + return entity; +} + +void add_component(entity_t *entity, component_t *component, ...) +{ + if(!component) return; + + component->entity = entity; + + va_list args, args_copy; + + va_start(args, component); + va_copy(args_copy, args); + + component->component_init(component, args_copy); + + va_end(args_copy); + va_end(args); + + linked_list_push_back(&entity->components, component); +} + +// Only for this file +// Arg : component_type_t component_type +static inline bool condition_is_component_type(elem_t *elem, va_list args) +{ + return ((component_t *)elem->data)->component_type == va_arg(args, component_type_t); +} + +inline component_t *get_component(entity_t *entity, component_type_t component_type) +{ + return linked_list_get_if(&entity->components, condition_is_component_type, component_type); +} + +// Only for this file +// No args +static inline void action_update_component(elem_t *elem, va_list args __attribute__((unused))) +{ + component_t *component = elem->data; + component->component_update(component); +} + +inline void update_entity(entity_t *entity) +{ + linked_list_for_each(&entity->components, action_update_component); +} + +// Only for this file +// No args +static inline void action_draw_component(elem_t *elem, va_list args __attribute__((unused))) +{ + component_t *component = elem->data; + if(component->component_draw) component->component_draw(component); +} + +inline void draw_entity(entity_t *entity) +{ + linked_list_for_each(&entity->components, action_draw_component); +} + +inline void destroy_entity(entity_t *entity) +{ + linked_list_clear(&entity->components); + free(entity); +} + +inline void entity_manager_init(entity_manager_t *entity_manager) +{ + linked_list_init(&entity_manager->entities, sizeof(entity_t), (deleter_t)destroy_entity); +} + +inline void entity_manager_add_entity(entity_manager_t *entity_manager, entity_t *entity) +{ + linked_list_push_back(&entity_manager->entities, entity); +} + +// Only for this file +// No args +static inline void action_update_entity(elem_t *elem, va_list args __attribute__((unused))) +{ + update_entity(elem->data); +} + +inline void entity_manager_update(entity_manager_t *entity_manager) +{ + linked_list_for_each(&entity_manager->entities, action_update_entity); +} + +// Only for this file +// No args +static inline void action_draw_entity(elem_t *elem, va_list args __attribute__((unused))) +{ + draw_entity(elem->data); +} + +inline void entity_manager_draw(entity_manager_t *entity_manager) +{ + linked_list_for_each(&entity_manager->entities, action_draw_entity); +} + +// Only for this file +// Arg : unsigned int id +static inline bool condition_is_entity_name(elem_t *elem, va_list args) +{ + return ((entity_t *)elem->data)->id == va_arg(args, unsigned int); +} + +inline void entity_manager_remove_entity(entity_manager_t *entity_manager, unsigned int id) +{ + linked_list_remove_if(&entity_manager->entities, condition_is_entity_name, id); +} + +inline void entity_manager_clear(entity_manager_t *entity_manager) +{ + linked_list_clear(&entity_manager->entities); +} diff --git a/src/ecs/headers/ecs.h b/src/ecs/headers/ecs.h new file mode 100644 index 0000000..90669dd --- /dev/null +++ b/src/ecs/headers/ecs.h @@ -0,0 +1,85 @@ +#ifndef ECS_H +#define ECS_H + +#include +#include +#include "linked_list.h" + +typedef enum component_type_t { + TRANSFORM_COMPONENT, + SPRITE_COMPONENT, + ANIMATION_SYSTEM, + PLAYER_SYSTEM +} component_type_t; + +typedef struct transform_component_data_t transform_component_data_t; +typedef struct sprite_component_data_t sprite_component_data_t; +typedef struct animation_system_data_t animation_system_data_t; +typedef struct player_system_data_t player_system_data_t; + +typedef struct component_t component_t; + +typedef void (*component_init_t)(component_t *component, va_list args); +typedef void (*component_update_t)(component_t *component); +typedef void (*component_draw_t)(component_t *component); + +typedef void (*component_deleter_t)(component_t *component); + +typedef struct component_t { + component_type_t component_type; + + component_init_t component_init; + component_update_t component_update; + component_draw_t component_draw; + + union { + transform_component_data_t *transform_component_data; + sprite_component_data_t *sprite_component_data; + animation_system_data_t *animation_system_data; + player_system_data_t *player_system_data; + } component_data; + + component_deleter_t component_deleter; + + struct entity_t *entity; +} component_t; + +component_t *create_component(component_type_t component_type); + +void destroy_component(component_t *component); + +typedef struct entity_t { + unsigned int id; + size_t draw_priority; + linked_list_t components; +} entity_t; + +entity_t *create_entity(const unsigned int id); + +void add_component(entity_t *entity, component_t *component, ...); + +component_t *get_component(entity_t *entity, component_type_t component_type); + +void update_entity(entity_t *entity); + +void draw_entity(entity_t *entity); + +void destroy_entity(entity_t *entity); + +typedef struct entity_manager_t { + linked_list_t entities; +} entity_manager_t; + +void entity_manager_init(entity_manager_t *entity_manager); + +void entity_manager_add_entity(entity_manager_t *entity_manager, entity_t *entity); + +void entity_manager_update(entity_manager_t *entity_manager); + +void entity_manager_draw(entity_manager_t *entity_manager); + +void entity_manager_remove_entity(entity_manager_t *entity_manager, const unsigned int id); + +void entity_manager_clear(entity_manager_t *entity_manager); + +#endif // ECS_H \ No newline at end of file diff --git a/src/game.c b/src/game.c new file mode 100644 index 0000000..7544498 --- /dev/null +++ b/src/game.c @@ -0,0 +1,72 @@ +#include +#include +#include +#include "game.h" +#include "components.h" + +void game_init(void) +{ + texture_manager_init(&game.texture_manager); + texture_manager_load_builtin_textures(&game.texture_manager); + + entity_manager_init(&game.entity_manager); + + entity_t *player = create_entity(0); + + entity_manager_add_entity(&game.entity_manager, player); + + rect_t player_bounds = {10.0f, 10.0f, 32.0f, 32.0f}; + + add_component(player, create_component(TRANSFORM_COMPONENT), player_bounds, PLAYER_DEFAULT_SPEED); + add_component(player, create_component(SPRITE_COMPONENT), "player_idle_sheet"); + add_component(player, create_component(ANIMATION_SYSTEM), 4, 0, PLAYER_DEFAULT_IDLE_ANIMATION_SPEED, true, true, false); + add_component(player, create_component(PLAYER_SYSTEM)); + + game.is_running = true; +} + +void game_handle_event(void) +{ + event_t event; + + while(pollevent(&event)) + { + if(event.type == KEYEV_DOWN) + game.keys[event.key.keysym.scancode] = true; + else if(event.type == KEYEV_UP) + game.keys[event.key.keysym.scancode] = false; + + if(event.type == SDL_QUIT) + game.is_running = false; + } +} + +static inline void update_time(void) +{ + clock_t last_clock_state = clock(); + clock_t start_clock = clock(); + game.delta_time_ms = (double)(start_clock - last_clock_state) * 1000.0f / CLOCKS_PER_SEC; + last_clock_state = start_clock; +} + +void game_update(void) +{ + update_time(); + + entity_manager_update(&game.entity_manager); +} + +void game_render(void) +{ + dclear(); + + entity_manager_draw(&game.entity_manager); + + dupdate(); +} + +void game_exit(void) +{ + entity_manager_clear(&game.entity_manager); + texture_manager_clear(&game.texture_manager); +} diff --git a/src/headers/game.h b/src/headers/game.h new file mode 100644 index 0000000..a9c8dc6 --- /dev/null +++ b/src/headers/game.h @@ -0,0 +1,57 @@ +#ifndef GAME_H +#define GAME_H + +#include +#include "texture_manager.h" +#include "ecs.h" + +/** + * @brief Game data. + * There should be only one instance of this struct. + * + * @param event Events data + * @param texture_manager Texture manager instance + * @param entity_manager Entity manager instance + * @param is_running Game running state + * @param delta_time_ms Frame time +*/ +typedef struct game_t { + bool keys[MAX_KEYCODES]; + texture_manager_t texture_manager; + entity_manager_t entity_manager; + + bool is_running; + double delta_time_ms; +} game_t; + +/** + * @brief Global game instance +*/ +extern game_t game; + +/** + * @brief Initialise game +*/ +void game_init(void); + +/** + * @brief Handle event like inputs +*/ +void game_handle_event(void); + +/** + * @brief Update game +*/ +void game_update(void); + +/** + * @brief Render game +*/ +void game_render(void); + +/** + * @brief Free game instance +*/ +void game_exit(void); + +#endif // GAME_H \ No newline at end of file diff --git a/src/headers/linked_list.h b/src/headers/linked_list.h new file mode 100644 index 0000000..be76812 --- /dev/null +++ b/src/headers/linked_list.h @@ -0,0 +1,287 @@ +#ifndef LINKED_LIST_H +#define LINKED_LIST_H + +#include +#include +#include + +/** + * @brief Element struct for linked lists. + * This struct is the base for storing data in a linked list. + * + * @param data Raw pointer to any type of data + * @param prev Pointer to the prev element in the linked list + * @param next Pointer to the next element in the linked list +*/ +typedef struct elem_t { + void *data; + struct elem_t *prev; + struct elem_t *next; +} elem_t; + +/** + * @brief A type for deleters used during the destruction of data stored in elements. + * + * During the initialisation of linked lists you can pass in argument a deleter. + * It is used during the destruction of an element. + * You can pass NULL to the initialisation to use the default deleter (kfree(elem->data)). + * Your deleter_t function declaration must look like this : + * + * void name_of_your_deleter(void *data); + * + * Then do what you need to destroy your data (don't forget to free the data itself...) but not the elements. + * You should always define your function with "inline" if it's no too long. +*/ +typedef void (*deleter_t)(void *data); + +/** + * @brief A type for condition used for function like linked_list_remove_if + * + * For function like linked_list_remove_if you need a condition. + * It have two argument which are "elem_t *" and "va_list", that is because it passes the element on the actual index + * and the args passed to the function. + * Your condition_t function declaration must look like this : + * + * bool name_of_your_condition(elem_t *elem, va_list); + * + * Then return true if you want the element to be removed from the list or false if not. + * You should always define your function with "static", and "inline" if the condition is not too long. +*/ +typedef bool (*condition_t)(elem_t *elem, va_list args); + +/** + * @brief A type for action used for function like linked_list_for_each + * + * For function like linked_list_for_each you need an action to do. + * It have two argument which are "elem_t *" and "va_list", that is because it passes the element on the actual index + * and the args passed to the function. + * Your condition_t function declaration must look like this : + * + * void name_of_your_condition(elem_t *elem, va_list); + * + * Then do whatever you want with the element data, just don't remove it. + * You should always define your function with "static", and "inline" if the action is short. +*/ +typedef void (*action_t)(elem_t *elem, va_list args); + +/** + * @brief Base of linked lists. + * This struct is the base for creating linked lists. + * + * @param data_size Size of the data stored in elements of the linked list (used while creating new elements) + * @param first Pointer to the first element in the linked list + * @param last Pointer to the last element in the linked list + * @param size Size of the linked list + * @param deleter Deleter of the data when removing an element +*/ +typedef struct linked_list_t { + size_t data_size; + elem_t *first; + elem_t *last; + size_t size; + deleter_t elem_deleter; +} linked_list_t; + +/** + * @brief Init a linked list + * This function is necessary if you create a linked list. + * + * WARNING : It doesn't allocate the memory for you ! + * + * @param linked_list Pointer to an linked list + * @param data_size Data size for elements in the linked list + * @param deleter The deleter used during destroyement of an elem +*/ +void linked_list_init(linked_list_t *linked_list, const size_t data_size, deleter_t deleter); + +/** + * @brief Create an elem to fill with data to insert in a linked list. + * This function is usefull when you want to initialise an elem with the proper data_size strored in the linked list. + * + * WARNING : Don't change the "data" ptr after calling this function or it will lead to memory leaks ! + * Instead do something like this : *(int *)elem->data = 42; + * + * @param linked_list Pointer to an linked list + * + * @return Address of initialised elem, NULL on error. +*/ +elem_t *elem_create(const linked_list_t *linked_list); + +/** + * @brief Destroy the given element and its data. + * This function is usefull when you want to free an element. + * The deleter is used for the data only and you can pass NULL to use the default deleter. + * + * @param elem Pointer to an element + * @param elem_deleter Function to use to free the data +*/ +void destroy_elem(elem_t *elem, const deleter_t elem_deleter); + +/** + * @brief Insert an element from the back in a linked list, do nothing on error. + * + * @param linked_list Pointer to a linked list + * @param elem Pointer to an element +*/ +void linked_list_push_back_elem(linked_list_t *linked_list, elem_t *elem); + +/** + * @brief Insert an element from the front in a linked list, do nothing on error. + * + * @param linked_list Pointer to a linked list + * @param elem Pointer to an element +*/ +void linked_list_push_front_elem(linked_list_t *linked_list, elem_t *elem); + +/** + * @brief Insert an element initialised and filled with data from the back in a linked list, do nothing on error. + * + * @param linked_list Pointer to a linked list + * @param data Pointer to any data +*/ +void linked_list_push_back(linked_list_t *linked_list, void *data); + +/** + * @brief Insert an element filled with data from the front in a linked list. + * + * @param linked_list Pointer to a linked list + * @param data Pointer to any data +*/ +void linked_list_push_front(linked_list_t *linked_list, void *data); + +/** + * @brief Delete the last element in the given linked list, do nothing on error. + * + * @param linked_list Pointer to a linked list +*/ +void linked_list_pop_back(linked_list_t *linked_list); + +/** + * @brief Delete the first element in the given linked list, do nothing on error. + * + * @param linked_list Pointer to a linked list +*/ +void linked_list_pop_front(linked_list_t *linked_list); + +/** + * @brief Clear the given linked list, do nothing on error. + * + * @brief linked_list Pointer to a linked list +*/ +void linked_list_clear(linked_list_t *linked_list); + +/** + * @brief Check if the given linked list is empty. + * + * @param linked_list Pointer to a linked list + * + * @return True if the given linked list is empty else false. +*/ +bool linked_list_is_empty(const linked_list_t *linked_list); + +/** + * @brief Check if the given index is whithin the range of the linked list. + * + * @param linked_list Pointer to an linked_list_t + * + * @return True if index in within the range of the linked list else false. +*/ +bool linked_list_is_in_bound(const linked_list_t *linked_list, const size_t index); + +/** + * @brief Get element at the given index in the linked list. + * + * @param linked_list Pointer to a linked list + * @param index Index of the element + * + * @return Element, NULL on error. +*/ +elem_t *linked_list_get_elem(const linked_list_t *linked_list, const size_t index); + +/** + * @brief Get data in the element at the given index in the linked list. + * + * @param linked_list Pointer to an linked list + * @param index Index of the wanted element + * + * @return Data, NULL on error. +*/ +void *linked_list_get(const linked_list_t *linked_list, const size_t index); + +/** + * @brief Insert element at the given index in the linked list, do nothing on error. + * + * @param linked_list Pointer to a linked list + * @param elem Pointer to an element + * @param index Index to insert element +*/ +void linked_list_insert_elem(linked_list_t *linked_list, elem_t *elem, const size_t index); + +/** + * @brief Insert element with data at the given index in the linked list, do nothing on error. + * + * @param linked_list Pointer to a linked list + * @param data Data to put in the new element + * @param index Index to insert the element +*/ +void linked_list_insert(linked_list_t *linked_list, void *data, const size_t index); + +/** + * @brief Remove the given elem in the linked list, do nothing on error. + * + * @param linked_list Pointer to a linked list + * @param elem Element to remove +*/ +void linked_list_remove_elem(linked_list_t *linked_list, elem_t *elem); + +/** + * @brief Remove element at the given index in the linked list, do nothing on error. + * + * @param linked_list Pointer to a linked list + * @param index Index of the element +*/ +void linked_list_remove(linked_list_t *linked_list, const size_t index); + +/** + * @brief Return first element that the condition verify + * + * @param linked_list Pointer to a linked list + * @param condition Condition to verify + * @param ... Argument to pass to the condition + * + * @return Element, NULL if no element verify the condition or if an error ocurred. +*/ +elem_t *linked_list_get_elem_if(const linked_list_t *linked_list, const condition_t condition, ...); + +/** + * @brief Return data in the first element that the condition verify + * + * @param linked_list Pointer to a linked list + * @param condition Condition to verify + * @param ... Argument to pass to the condition + * + * @return Element data, NULL if no element verify the condition or if an error ocurred. +*/ +void *linked_list_get_if(const linked_list_t *linked_list, const condition_t condition, ...); + +/** + * @brief Remove element(s) that the condition verify, do nothing on error. + * + * @param linked_list Pointer to an linked list + * @param condition Condition to verify + * @param ... Argument to pass to the condition +*/ +void linked_list_remove_if(linked_list_t *linked_list, const condition_t condition, ...); + +/** + * @brief Apply an action to every elements in the list. + * Useful for changing a value in every single element data. + * The action can be anything that dont destroy the element. + * + * @param linked_list Pointer to an linked list + * @param action action to apply + * @param ... Argument to pass to the action +*/ +void linked_list_for_each(const linked_list_t *linked_list, const action_t action, ...); + +#endif // LINKED_LIST_H diff --git a/src/headers/map_manager.h b/src/headers/map_manager.h new file mode 100644 index 0000000..802d1e9 --- /dev/null +++ b/src/headers/map_manager.h @@ -0,0 +1,8 @@ +#ifndef MAP_MANAGER_H +#define MAP_MANAGER_H + +typedef struct map_t { + +} map_t; + +#endif // MAP_MANAGER_H \ No newline at end of file diff --git a/src/headers/maps.h b/src/headers/maps.h new file mode 100644 index 0000000..5b2a3a6 --- /dev/null +++ b/src/headers/maps.h @@ -0,0 +1,15 @@ +#ifndef MAPS_H +#define MAPS_H + +#include "vector2d.h" + +typedef unsigned int tile_t; + +typedef struct builtin_map_t { + char *entities; + size_t width; + size_t height; + tile_t *tiles; +} builtin_map_t; + +#endif // MAPS_H \ No newline at end of file diff --git a/src/headers/texture_manager.h b/src/headers/texture_manager.h new file mode 100644 index 0000000..0bb540d --- /dev/null +++ b/src/headers/texture_manager.h @@ -0,0 +1,92 @@ +#ifndef TEXTURE_MANAGER_H +#define TEXTURE_MANAGER_H + +#include +#include "vector2d.h" +#include "linked_list.h" + +/* texture_t: Texture definition + This struct is the base for textures + + @name Name of the texture + @image Texture of type bopti_image_t */ +typedef struct texture_t { + const char *name; + image_t *image; +} texture_t; + +/* create_texture(): Create a texture with the given image and name + + @name Name of the texture + @image Texture of type bopti_image_t + Return the created texture, NULL on error. */ +texture_t *create_texture(image_t *, const char *); + +/* destroy_texture(): Destroy the given texture + + @texture Texture to destroy */ +void destroy_texture(texture_t *); + +/* draw_texture(): Draw the given texture from given src rect to dst rect + + @texture Texture to draw + @src Source rectangle of the texture to draw + @dst Destination of the drawing */ +void draw_texture(const texture_t *, const rect_t *, const rect_t *, bool); + +/* texture_manager_t: Texture manager + + @textures Textures loaded in memory */ +typedef struct texture_manager_t { + linked_list_t textures; +} texture_manager_t; + +/* texture_manager_init(): Initialise the given texture_manager + + @texture_manager Pointer to a texture manager */ +void texture_manager_init(texture_manager_t *); + +/* texture_manager_load_builtin_textures(): Load textures declared in "textures.h" + + @texture_manager Pointer to a texture manager */ +void texture_manager_load_builtin_textures(texture_manager_t *); + +/* texture_manager_load_builtin_texture(): Load texture declared in "textures.h" wich have "name" + + @texture_manager Pointer to a texture manager + @name Name of the texture to load */ +texture_t *texture_manager_load_builtin_texture(texture_manager_t *, const char*); + +/* texture_manager_add_texture(): Add a texture in the texture manager + + @texture_manager Pointer to a texture manager + @texture Texture to add in the texture manager */ +void texture_manager_add_texture(texture_manager_t *, texture_t *); + +/* texture_manager_get_texture(): Get a texture in the texture manager + + @texture_manager Pointer to a texture manager + @name Name of the texture to get + Return the texture, NULL on error or if the texture is not found. */ +texture_t *texture_manager_get_texture(texture_manager_t *, const char *); + +/* texture_manager_remove_texture(): Remove a texture in the texture manager + + @texture_manager Pointer to a texture manager + @name Name of the texture to remove + Do nothing if the texture is not found. */ +void texture_manager_remove_texture(texture_manager_t *, const char *); + +/* texture_manager_clear(): Clear the texture manager + + @texture_manager Pointer to a texture manager */ +void texture_manager_clear(texture_manager_t *); + +/* texture_manager_draw_texture(): Draw a texture in the texture manager + + @texture_manager Pointer to a texture manager + @name Name of the texture to draw + Do nothing if the texture is not found. */ +void texture_manager_draw_texture(texture_manager_t *, const char *, const rect_t *, const rect_t *, bool); + +#endif // TEXTURE_MANAGER_H \ No newline at end of file diff --git a/src/headers/textures.h b/src/headers/textures.h new file mode 100644 index 0000000..f52b20b --- /dev/null +++ b/src/headers/textures.h @@ -0,0 +1,22 @@ +#ifndef TEXTURES_H +#define TEXTURES_H + +#include +#include "texture_manager.h" + +typedef struct builtin_texture_t { + const char *name; + bopti_image_t *image; +} builtin_texture_t; + +extern bopti_image_t img_player_idle_sheet; +extern bopti_image_t img_player_run_sheet; + +static struct builtin_texture_t builtin_textures[] = { + {"player_idle_sheet", &img_player_idle_sheet}, + {"player_run_sheet", &img_player_run_sheet} +}; + +#define BUILTIN_TEXTURE_COUNT (sizeof(builtin_textures) / sizeof(builtin_texture_t)) + +#endif // TEXTURES_H \ No newline at end of file diff --git a/src/headers/vector2d.h b/src/headers/vector2d.h new file mode 100644 index 0000000..ec2a184 --- /dev/null +++ b/src/headers/vector2d.h @@ -0,0 +1,86 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ +* All of the functions declared in this file and * +* defined in vector2d.c are from the SDL2 source code. * +* They are just renamed. * +* => https://github.com/libsdl-org/SDL * +\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef VECTOR2D_H +#define VECTOR2D_H + +#include +#include + +/** + * @brief Point struct. + * + * @param x X pos + * @param y Y pos +*/ +typedef struct vector2d_t { + float x, y; +} vector2d_t; + +/** + * @brief Rectangle struct. + * + * @param x X pos + * @param y Y pos + * @param w Width + * @param h Height +*/ +typedef struct rect_t { + float x, y; + float w, h; +} rect_t; + +#define EPSILON 0.000001f + +__attribute__((const)) float fabsf(float x); + +#define is_equal_to_zero(X) (fabsf(X) <= EPSILON) + +#define is_not_zero(X) (fabsf(X) > EPSILON) + +/** + * @brief Verify if a point is in a rectangle + * + * @param P Vector2d + * @param R Rectangle + * + * @return True if the point is in the rectangle, else false. +*/ +#define point_in_rect(P, R) (((P)->x >= (R)->x) && ((P)->x < ((R)->x + (R)->w)) && \ + ((P)->y >= (R)->y) && ((P)->y < ((R)->y + (R)->h))) + +/** + * @brief Verify if a rectangle is empty + * + * @param R Rectangle + * + * @return True if the rectangle is empty, else false. +*/ +#define rect_empty(R) ((!(R)) || (is_equal_to_zero((R)->w)) || (is_equal_to_zero((R)->h))) + +/** + * @brief Verify if there is a intersction between two rectangles + * + * @param A Rectangle A + * @param B Rectangle B + * + * @return True if there is an intersection, else false. +*/ +bool has_intersection(const rect_t *A, const rect_t *B); + +/** + * @brief Verify if there is an intersection between two rectangles and get the intersection rectangle. + * + * @param A Rectangle A + * @param B Rectangle B + * @param result The intersection rectangle + * + * @return True if there is an intersection, else false. +*/ +bool intersect_rect(const rect_t *A, const rect_t *B, rect_t *result); + +#endif // VECTOR2D_H \ No newline at end of file diff --git a/src/linked_list.c b/src/linked_list.c new file mode 100644 index 0000000..6d7cf42 --- /dev/null +++ b/src/linked_list.c @@ -0,0 +1,377 @@ +#include +#include "memory_alloc.h" +#include "linked_list.h" + +elem_t *elem_create(const linked_list_t *linked_list) +{ + elem_t *tmp; + tmp = malloc(sizeof(elem_t)); + if(!tmp) return NULL; + + tmp->data = malloc(linked_list->data_size); + if(!tmp->data) + { + free(tmp); + return NULL; + } + + return tmp; +} + +inline void destroy_elem(elem_t *elem, const deleter_t elem_deleter) +{ + if(!elem) return; + + if(elem_deleter) + elem_deleter(elem->data); + else + free(elem->data); + + free(elem); +} + +void linked_list_init(linked_list_t *linked_list, const size_t data_size, const deleter_t elem_deleter) +{ + linked_list->first = NULL; + linked_list->last = NULL; + linked_list->size = 0; + + linked_list->data_size = data_size; + linked_list->elem_deleter = elem_deleter; +} + +void linked_list_push_back_elem(linked_list_t *linked_list, elem_t *elem) +{ + if(!elem) return; + + elem->prev = linked_list->last; + elem->next = NULL; + + if(linked_list->last) + linked_list->last->next = elem; + else + linked_list->first = elem; + + linked_list->last = elem; + + linked_list->size++; +} + +void linked_list_push_front_elem(linked_list_t *linked_list, elem_t *elem) +{ + if(!elem) return; + + elem->next = linked_list->first; + elem->prev = NULL; + + if(linked_list->first) + linked_list->first->prev = elem; + else + linked_list->last = elem; + + linked_list->first = elem; + + linked_list->size++; +} + +void linked_list_push_back(linked_list_t *linked_list, void *data) +{ + elem_t *tmp = malloc(sizeof(elem_t)); + if(!tmp) return; + tmp->data = data; + + linked_list_push_back_elem(linked_list, tmp); +} + +void linked_list_push_front(linked_list_t *linked_list, void *data) +{ + elem_t *tmp = malloc(sizeof(elem_t)); + if(!tmp) return; + tmp->data = data; + + linked_list_push_front_elem(linked_list, tmp); +} + +void linked_list_pop_back(linked_list_t *linked_list) +{ + elem_t *tmp = linked_list->last; + if(!tmp) return; + + linked_list->last = tmp->prev; + + if(linked_list->last) + linked_list->last->next = NULL; + else + linked_list->first = NULL; + + destroy_elem(tmp, linked_list->elem_deleter); + + linked_list->size--; +} + +void linked_list_pop_front(linked_list_t *linked_list) +{ + elem_t *tmp = linked_list->first; + if(!tmp) return; + + linked_list->first = tmp->next; + + if(linked_list->first) + linked_list->first->prev = NULL; + else + linked_list->last = NULL; + + destroy_elem(tmp, linked_list->elem_deleter); + + linked_list->size--; +} + +void linked_list_clear(linked_list_t *linked_list) +{ + elem_t *actual_elem = linked_list->first; + elem_t *tmp; + + while(actual_elem) + { + tmp = actual_elem; + + actual_elem = actual_elem->next; + + destroy_elem(tmp, linked_list->elem_deleter); + } + + linked_list->first = NULL; + linked_list->last = NULL; + + linked_list->size = 0; +} + +inline bool linked_list_is_empty(const linked_list_t *linked_list) +{ + return !linked_list->first; +} + +inline bool linked_list_is_in_bound(const linked_list_t *linked_list, size_t index) +{ + return index < linked_list->size; +} + +elem_t *linked_list_get_elem(const linked_list_t *linked_list, size_t index) +{ + if(!linked_list_is_in_bound(linked_list, index)) return NULL; + + if(index == 0) + return linked_list->first; + if(index == linked_list->size - 1) + return linked_list->last; + + elem_t *actual_elem = linked_list->first; + if(!actual_elem) return NULL; + + for (size_t i = 0; i < index; i++) + { + actual_elem = actual_elem->next; + } + + return actual_elem; +} + +void *linked_list_get(const linked_list_t *linked_list, size_t index) +{ + elem_t *tmp = linked_list_get_elem(linked_list, index); + if(!tmp) return NULL; + return tmp->data; +} + +void linked_list_insert_elem(linked_list_t *linked_list, elem_t *elem, size_t index) +{ + if(!elem) return; + if(!linked_list_is_in_bound(linked_list, index)) return; + + if(index == 0) + { + linked_list_push_front_elem(linked_list, elem); + } + else if(index == (linked_list->size - 1)) + { + linked_list_push_back_elem(linked_list, elem); + } + else + { + elem_t *next_insert_elem = linked_list_get_elem(linked_list, index); + elem_t *prev_insert_elem = next_insert_elem->prev; + + elem->prev = prev_insert_elem; + elem->next = next_insert_elem; + + prev_insert_elem->next = elem; + next_insert_elem->prev = elem; + + linked_list->size++; + } +} + +void linked_list_insert(linked_list_t *linked_list, void *data, size_t index) +{ + elem_t *tmp = malloc(sizeof(elem_t)); + if(!tmp) return; + tmp->data = data; + + linked_list_insert_elem(linked_list, tmp, index); +} + +void linked_list_remove_elem(linked_list_t *linked_list, elem_t *elem) +{ + if(!elem) return; + + if(elem == linked_list->first) + { + linked_list_pop_front(linked_list); + } + else if(elem == linked_list->last) + { + linked_list_pop_back(linked_list); + } + else + { + elem_t *prev_insert_elem = elem->prev; + elem_t *next_insert_elem = elem->next; + + prev_insert_elem->next = next_insert_elem; + next_insert_elem->prev = prev_insert_elem; + + destroy_elem(elem, linked_list->elem_deleter); + + linked_list->size--; + } +} + +void linked_list_remove(linked_list_t *linked_list, size_t index) +{ + elem_t *tmp = linked_list_get_elem(linked_list, index); + if(tmp) linked_list_remove_elem(linked_list, tmp); +} + +elem_t *linked_list_get_elem_if(const linked_list_t *linked_list, const condition_t condition, ...) +{ + if(!condition) return NULL; + + va_list args; + va_start(args, condition); + + elem_t *actual_elem = linked_list->first; + elem_t *next_elem; + + while(actual_elem) + { + next_elem = actual_elem->next; + + va_list args_copy; + va_copy(args_copy, args); + + if(condition(actual_elem, args_copy)) + { + va_end(args_copy); + va_end(args); + + return actual_elem; + } + + va_end(args_copy); + + actual_elem = next_elem; + } + + va_end(args); + + return NULL; +} + +void *linked_list_get_if(const linked_list_t *linked_list, const condition_t condition, ...) +{ + if(!condition) return NULL; + + va_list args; + va_start(args, condition); + + elem_t *actual_elem = linked_list->first; + elem_t *next_elem; + + while(actual_elem) + { + next_elem = actual_elem->next; + + va_list args_copy; + va_copy(args_copy, args); + + if(condition(actual_elem, args_copy)) + { + va_end(args_copy); + va_end(args); + + return actual_elem->data; + } + + va_end(args_copy); + + actual_elem = next_elem; + } + + va_end(args); + + return NULL; +} + +void linked_list_remove_if(linked_list_t *linked_list, const condition_t condition, ...) +{ + if(!condition) return; + + va_list args; + va_start(args, condition); + + elem_t *actual_elem = linked_list->first; + elem_t *next_elem; + + while(actual_elem) + { + next_elem = actual_elem->next; + + va_list args_copy; + va_copy(args_copy, args); + + if(condition(actual_elem, args_copy)) + { + linked_list_remove_elem(linked_list, actual_elem); + } + + va_end(args_copy); + + actual_elem = next_elem; + } + + va_end(args); +} + +void linked_list_for_each(const linked_list_t *linked_list, const action_t action, ...) +{ + if(!action) return; + + va_list args; + va_start(args, action); + + elem_t *actual_elem = linked_list->first; + + while(actual_elem) + { + va_list args_copy; + va_copy(args_copy, args); + + action(actual_elem, args_copy); + + va_end(args_copy); + + actual_elem = actual_elem->next; + } + + va_end(args); +} diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..0ab29f0 --- /dev/null +++ b/src/main.c @@ -0,0 +1,281 @@ +#include "game.h" + +//#define TEXTURE_TEST +//#define LINKED_LIST_TEST + +game_t game; + +int main(void) +{ + game_init(); + + while(game.is_running) + { + game_handle_event(); + game_update(); + game_render(); + } + + game_exit(); + + return 0; +} + + +// Texture Unit Tests +#ifdef TEXTURE_TEST + +#include "texture_manager.h" + +int main(void) +{ + dclear(C_WHITE); + + texture_manager_t texture_manager; + texture_manager_init(&texture_manager); + texture_manager_load_builtin_textures(&texture_manager); + + texture_t *texture = texture_manager_get_texture(&texture_manager, "player_run_sheet"); + + rect_t srcR = {0,0,32,32}; + rect_t dstR = srcR; + + draw_texture(texture, &src, &dst); + + src.x = 33; + dst.x = 33; + + draw_texture(texture, &src, &dst); + + texture_manager_remove_texture(&texture_manager, "player_run_sheet"); + + src.w = 128; + dst.x = 0; + dst.y = 33; + + texture_manager_draw_texture(&texture_manager, "player_idle_sheet", &src, &dst); + + texture_manager_clear(&texture_manager); + + dupdate(); + getkey(); + + return 1; +} + +#endif // TEXTURE_TEST + +// Linked List Unit Tests +#ifdef LINKED_LIST_TEST + +#include "linked_list.h" + +int main(void) +{ + dclear(C_WHITE); + + linked_list_t linked_list; + linked_list_init(&linked_list, sizeof(int), NULL); + if(linked_list.first == linked_list.last && + linked_list.first == NULL) + { + dtext(1, 0, C_BLACK, "linked_list is initialised correctly"); + } + else + { + goto Exit; + } + + elem_t *elem1 = NULL; + elem_t *elem2 = NULL; + elem_t *elem3 = NULL; + elem_t *elem4 = NULL; + + elem1 = elem_create(&linked_list); + if(elem1 && elem1->data) + { + dtext(1, 10, C_BLACK, "elem1 is initalised correctly"); + } + else + { + goto Exit; + } + + linked_list_push_back_elem(&linked_list, elem1); + if(linked_list.first == linked_list.last && + linked_list.first == elem1 && + !linked_list.first->prev && + !linked_list.first->next && + !linked_list.last->prev && + !linked_list.last->next) + { + dtext(1, 20, C_BLACK, "elem1 is correctly pushed back"); + } + else + { + goto Exit; + } + + linked_list_pop_back(&linked_list); + if(linked_list.first == linked_list.last && + linked_list.first == NULL) + { + dtext(1, 30, C_BLACK, "elem1 is correctly poped back"); + } + else + { + goto Exit; + } + + elem1 = elem_create(&linked_list); + elem2 = elem_create(&linked_list); + elem3 = elem_create(&linked_list); + elem4 = elem_create(&linked_list); + + linked_list_push_back_elem(&linked_list, elem1); + linked_list_push_back_elem(&linked_list, elem2); + if(linked_list.first == elem1 && + linked_list.last == elem2 && + !linked_list.first->prev && + linked_list.first->next && + linked_list.last->prev && + !linked_list.last->next && + linked_list.first->next == elem2 && + linked_list.last->prev == elem1) + { + dtext(1, 40, C_BLACK, "elem1 and elem2 are correctly pushed back"); + } + else + { + goto Exit; + } + + linked_list_push_front_elem(&linked_list, elem3); + linked_list_push_front_elem(&linked_list, elem4); + if(!linked_list.first->prev && + !linked_list.last->next && + linked_list.first == elem4 && + linked_list.first->next == elem3 && + linked_list.first->next->next == elem1 && + linked_list.first->next->next->next == elem2 && + linked_list.last == elem2 && + linked_list.last->prev == elem1 && + linked_list.last->prev->prev == elem3 && + linked_list.last->prev->prev->prev == elem4) + { + dtext(1, 50, C_BLACK, "elem3 and elem4 are correctly pushed front"); + } + else + { + goto Exit; + } + + if(linked_list_get_elem(&linked_list, 2) == elem1) + { + dtext(1, 60, C_BLACK, "elem4 is got correctly"); + } + else + { + goto Exit; + } + + linked_list_pop_back(&linked_list); + if(!linked_list.first->prev && + !linked_list.last->next && + linked_list.first == elem4 && + linked_list.first->next == elem3 && + linked_list.first->next->next == elem1 && + linked_list.last == elem1 && + linked_list.last->prev == elem3 && + linked_list.last->prev->prev == elem4) + { + dtext(1, 70, C_BLACK, "elem2 is correctly poped back"); + } + else + { + goto Exit; + } + + linked_list_remove(&linked_list, 1); + if(!linked_list.first->prev && + !linked_list.last->next && + linked_list.first == elem4 && + linked_list.first->next == elem1 && + linked_list.last == elem1 && + linked_list.last->prev == elem4) + { + dtext(1, 80, C_BLACK, "elem3 is correctly removed"); + } + else + { + goto Exit; + } + + linked_list_clear(&linked_list); + if(linked_list.first == linked_list.last && + linked_list.first == NULL) + { + dtext(1, 90, C_BLACK, "linked list is correctly cleared"); + } + else + { + goto Exit; + } + + elem1 = elem_create(&linked_list); + elem2 = elem_create(&linked_list); + elem3 = elem_create(&linked_list); + elem4 = elem_create(&linked_list); + + linked_list_push_back_elem(&linked_list, elem1); + linked_list_push_back_elem(&linked_list, elem2); + linked_list_push_front_elem(&linked_list, elem3); + if(linked_list.first == elem3 && + linked_list.last == elem2 && + !linked_list.first->prev && + linked_list.first->next && + linked_list.last->prev && + !linked_list.last->next && + linked_list.first->next == elem1 && + linked_list.first->next->next == elem2 && + linked_list.last->prev == elem1 && + linked_list.last->prev->prev == elem3) + { + dtext(1, 100, C_BLACK, "elem1, elem2 and elem3 are correctly pushed"); + } + else + { + goto Exit; + } + + linked_list_insert_elem(&linked_list, elem4, 1); + if(linked_list.first == elem3 && + linked_list.last == elem2 && + !linked_list.first->prev && + linked_list.first->next && + linked_list.last->prev && + !linked_list.last->next && + linked_list.first->next == elem4 && + linked_list.first->next->next == elem1 && + linked_list.first->next->next->next == elem2 && + linked_list.last->prev == elem1 && + linked_list.last->prev->prev == elem4 && + linked_list.last->prev->prev->prev == elem3) + { + dtext(1, 110, C_BLACK, "elem3 is correctly inserted"); + } + else + { + goto Exit; + } + + linked_list_clear(&linked_list); + + Exit: + dupdate(); + getkey(); + + return 1; +} + +#endif // LINKED_LIST_TEST diff --git a/src/map_manager.c b/src/map_manager.c new file mode 100644 index 0000000..e69de29 diff --git a/src/texture_manager.c b/src/texture_manager.c new file mode 100644 index 0000000..a710620 --- /dev/null +++ b/src/texture_manager.c @@ -0,0 +1,92 @@ +#include +#include +#include "texture_manager.h" +//#include "textures.h" + +texture_t *create_texture(image_t *image, const char *name) +{ + if(!image) return NULL; + + texture_t *texture = kmalloc(sizeof(texture_t), NULL); + if (!texture) return NULL; + + texture->name = name; + texture->image = image; + + return texture; +} + +inline void destroy_texture(texture_t *texture) +{ + kfree(texture); +} + +inline void draw_texture(const texture_t *texture, const rect_t *src, const rect_t *dst, bool flip) +{ + dsubimage_rgb16_effect((int)dst->x, (int)dst->y, texture->image, (int)src->x, (int)src->y, (int)src->w, (int)src->h, flip ? IMAGE_HFLIP : DIMAGE_NONE); +} + +inline void texture_manager_init(texture_manager_t *texture_manager) +{ + linked_list_init(&texture_manager->textures, sizeof(texture_t), NULL); +} + +void texture_manager_load_builtin_textures(texture_manager_t *texture_manager) +{ + for(size_t i = 0; i < BUILTIN_TEXTURE_COUNT; i++) + { + texture_t *texture = create_texture((image_t *)builtin_textures[i].image, builtin_textures[i].name); + texture_manager_add_texture(texture_manager, texture); + } +} + +texture_t *texture_manager_load_builtin_texture(texture_manager_t *texture_manager, const char *name) +{ + for(size_t i = 0; i < BUILTIN_TEXTURE_COUNT; i++) + { + if(!strcmp(builtin_textures[i].name, name)) + { + texture_t *texture = create_texture((image_t *)builtin_textures[i].image, builtin_textures[i].name); + texture_manager_add_texture(texture_manager, texture); + return texture; + } + } + + return NULL; +} + +inline void texture_manager_add_texture(texture_manager_t *texture_manager, texture_t *texture) +{ + linked_list_push_back(&texture_manager->textures, texture); +} + +// Only for this file +// Arg : const char *name +static inline bool is_texture_name(elem_t *elem, va_list args) +{ + return !strcmp(((texture_t *)elem->data)->name, va_arg(args, const char*)); +} + +texture_t *texture_manager_get_texture(texture_manager_t *texture_manager, const char *name) +{ + texture_t *texture = linked_list_get_if(&texture_manager->textures, is_texture_name, name); + if(texture) return texture; + + texture = texture_manager_load_builtin_texture(texture_manager, name); + return texture; +} + +inline void texture_manager_remove_texture(texture_manager_t *texture_manager, const char *name) +{ + linked_list_remove_if(&texture_manager->textures, is_texture_name, name); +} + +inline void texture_manager_clear(texture_manager_t *texture_manager) +{ + linked_list_clear(&texture_manager->textures); +} + +inline void texture_manager_draw_texture(texture_manager_t *texture_manager, const char *name, const rect_t *src, const rect_t *dst, bool flip) +{ + draw_texture(texture_manager_get_texture(texture_manager, name), src, dst, flip); +} diff --git a/src/vector2d.c b/src/vector2d.c new file mode 100644 index 0000000..5844d31 --- /dev/null +++ b/src/vector2d.c @@ -0,0 +1,97 @@ +#include "vector2d.h" + +__attribute__((const)) float fabsf(float x) +{ + union { + float f; + uint32_t i; + } u = {x}; + + u.i &= 0x7FFFFFFF; + return u.f; +} + +bool has_intersection(const rect_t * A, const rect_t * B) +{ + float Amin, Amax, Bmin, Bmax; + + if (!A || !B) + { + return false; + } + + /* Special cases for empty rects */ + if (rect_empty(A) || rect_empty(B)) + { + return false; + } + + /* Horizontal intersection */ + Amin = A->x; + Amax = Amin + A->w; + Bmin = B->x; + Bmax = Bmin + B->w; + if (Bmin > Amin) + Amin = Bmin; + if (Bmax < Amax) + Amax = Bmax; + if (Amax <= Amin) + return false; + + /* Vertical intersection */ + Amin = A->y; + Amax = Amin + A->h; + Bmin = B->y; + Bmax = Bmin + B->h; + if (Bmin > Amin) + Amin = Bmin; + if (Bmax < Amax) + Amax = Bmax; + if (Amax <= Amin) + return false; + + return true; +} + +bool intersect_rect(const rect_t * A, const rect_t * B, rect_t * result) +{ + if (!A || !B || !result) + { + // TODO error message + return false; + } + + /* Special cases for empty rects */ + if (rect_empty(A) || rect_empty(B)) + { + return false; + } + + float Amin, Amax, Bmin, Bmax; + + /* Horizontal intersection */ + Amin = A->x; + Amax = Amin + A->w; + Bmin = B->x; + Bmax = Bmin + B->w; + if (Bmin > Amin) + Amin = Bmin; + result->x = Amin; + if (Bmax < Amax) + Amax = Bmax; + result->w = Amax - Amin; + + /* Vertical intersection */ + Amin = A->y; + Amax = Amin + A->h; + Bmin = B->y; + Bmax = Bmin + B->h; + if (Bmin > Amin) + Amin = Bmin; + result->y = Amin; + if (Bmax < Amax) + Amax = Bmax; + result->h = Amax - Amin; + + return !rect_empty(result); +} \ No newline at end of file