Commit Graph

178 Commits

Author SHA1 Message Date
Antonio Niño Díaz
b7efd8954b Fix remaining Wextra warning 2023-04-22 01:53:16 +01:00
Antonio Niño Díaz
0c0a9e743e Enable -Wextra
- Fix most new warnings (silence a few of them, though).

- Replace all sprintf() by the safer snprintf().
2023-04-22 01:48:47 +01:00
Antonio Niño Díaz
4a257af310 Improve detection of device that contains the NDS ROM
When accessing the filesystem, what a user normally wants is to access
the same drive that holds the NDS ROM being run.

On the DS it is easy. The only available drive is the one of the DLDI
driver.

On DSi, it isn't so easy. It is possible to run a ROM that is either on
the SD card or in a flashcard (accessed with DLDI).

The easiest way to determine the right drive to use is to use argv[0].
The loader stores the location of the NDS ROM there, including the
drive.

The trivial detection should only be used as a fallback mechanism if
argv[0] isn't present.
2023-04-19 00:47:52 +01:00
Cesar Rincon Nadal
5ef632b409
Merge pull request #8 from lifehackerhansol/master
Do not force libfilesystem or libfat dependency
2023-04-16 12:38:12 +02:00
lifehackerhansol
ef23e0418a
Do not force libfilesystem or libfat dependency
This removes dependency from the (frankly awful) libfilesystem, as well
as libfat.

fatInitDefault() or nitroFSInit() should be initialized outside of
NFlib, if one requires it. Within NFLib, we will only check whether
NitroFS is accessible, and fail otherwise.

This allows a user to still use libfat, libfilesystem or any other
NitroFS / FAT implementation, should one wish to use it, as long as the
implementation of NitroFS mounts to `nitro:/`, or the storage medium is
mounted to `sd:/` or `fat:/`.

This is a breaking change: users will need to update their code to
handle NitroFS and/or FAT inits on their own.

This also removes unnecessary filesystem.h and fat.h includes from all
other files.
2023-04-13 11:30:37 -07:00
Antonio Niño Díaz
61fde2b572 Use UTF-8 across all codebase
This has been done with:

    for f in `ls`; do
        iconv -f ISO-8859-1 -t UTF-8//TRANSLIT "$f" -o "$f".2;
        mv "$f".2 "$f"
    done
2023-04-13 18:51:09 +01:00
Cesar Rincon Nadal
fb2d400e39
Merge pull request #7 from knightfox75/license
license: Fix licenses
2023-04-02 13:10:00 +02:00
Antonio Niño Díaz
151db13cc0 license: Fix licenses
- Creative Commons (except for CC0) shouldn't be used for code:

   https://creativecommons.org/faq/#can-i-apply-a-creative-commons-license-to-software

   MIT has the same spirit as the CC-BY license.

- CC-BY has been retained for the assets included in the repository.

- Also, the years were wrong, this library was started in 2009.

- Make all examples use the CC0 license.
2023-04-01 19:56:45 +01:00
Antonio Niño Díaz
f3e86a56d1 build: docs: Introduce and document build system for BlocksDS
Also, some minor fixes to the examples so that they can build.
2023-04-01 19:06:03 +01:00
Cesar Rincon Nadal
5d1d3cf8e6
Merge pull request #6 from knightfox75/license
license: Change to CC BY 4.0
2023-04-01 18:52:26 +02:00
Antonio Niño Díaz
4711a6512f license: Change to CC BY 4.0
The previous license was CC BY-NC 4.0, which doesn't allow commercial
use of the library. Nowadays this exception isn't really helpful, and
it may discourage people that are thinking about using the library (and
may be thinking about maybe selling the ROM in websites like itch.io).
2023-04-01 12:25:33 +01:00
Cesar Rincon Nadal
566ddc19af
Merge pull request #4 from knightfox75/refactor
Big refactor of the code organization of the library
2023-03-31 21:37:41 +02:00
Antonio Niño Díaz
9aee0b0461 docs: Cleanup license text 2023-03-31 18:54:21 +01:00
Antonio Niño Díaz
358c0cefb8 docs: Replace readme 2023-03-31 18:27:30 +01:00
Antonio Niño Díaz
83d3d6597d build: Update WiFi example to not have a copy of NFlib 2023-03-31 18:27:30 +01:00
Antonio Niño Díaz
daee0a3334 build: Reorganize directories
- Bring the source and include directories in nflib to the root of the
  repository to match the organization of other libraries.

- Expect users to install NFlib in the devkitPro folder.

- Update all Makefiles for modern devkitPro.

- Remove all redundant copies of NFlib in all examples. The only
  remaining copy of the library is in the extras/wifi example, but
  that one includes more files, so I have left it untouched for now.
2023-03-31 18:27:29 +01:00
Antonio Niño Díaz
a8c42cf530 Ignore all build artifacts, even in examples folders 2022-11-08 01:09:28 +00:00
Cesar Rincon Nadal
6dde5d974d
Merge pull request #1 from ngawung/master
small fix when using sprintf
2020-10-08 17:38:19 +02:00
Ferdian
87280634cf Merge branch 'master' of https://github.com/ngawung/nds_nflib 2020-09-04 06:19:29 +07:00
Ferdian
4160b97ea4 add gitignore 2020-09-04 06:18:10 +07:00
Ferdian
8eee79848f add gitignore 2020-09-04 06:15:42 +07:00
Ferdian
c948bbca67 add gitignore 2020-09-04 06:13:29 +07:00
Ferdian
3d856e71ef small fix 2020-09-03 13:25:23 +07:00
Cesar Rincon Nadal
3447f73b1d
Update readme.txt 2019-07-25 20:17:07 +02:00
Cesar Rincon Nadal
7b8dbff9b1 Create readme.txt 2019-07-06 09:59:04 +02:00
Cesar Rincon Nadal
e945927ac8 Licence updated.
Licence updated.
Cleaned unneded files.
2018-06-20 16:59:03 +02:00
Cesar Rincon
ddca460fbd Last stable release
Moved from Source Forge
2018-06-20 08:46:10 +02:00
Cesar Rincon
73719aad4a Initial commit 2018-06-20 08:43:52 +02:00