Skip to content

Commit

Permalink
fix for broken adfExplorer dependencies; updates for CRAN policies
Browse files Browse the repository at this point in the history
  • Loading branch information
pepijn-devries committed Dec 26, 2024
1 parent 6b2a3ad commit 85f7d36
Show file tree
Hide file tree
Showing 70 changed files with 670 additions and 910 deletions.
17 changes: 12 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Package: AmigaFFH
Type: Package
Title: Commodore Amiga File Format Handler
Version: 0.4.5
Date: 2024-02-28
Version: 0.4.6
Authors@R: c(person("Pepijn", "de Vries", role = c("aut", "cre", "dtc"),
email = "[email protected]"))
Author: Pepijn de Vries [aut, cre, dtc]
Expand All @@ -12,9 +11,17 @@ Description: Modern software often poorly support older file formats. This
antiquated Commodore Amiga machine. This package focuses on file types from
the older Amiga operating systems (<= 3.0). It will read and write specific
file formats and coerces them into more contemporary data.
Depends: tuneR (>= 1.0), R (>= 2.10)
Imports: grDevices, methods, utils, vctrs
Suggests: ProTrackR (>= 0.3.4), adfExplorer (>= 0.1.4)
Depends:
R (>= 2.10),
tuneR (>= 1.0)
Imports:
grDevices,
methods,
utils,
vctrs
Suggests:
adfExplorer (>= 2.0.0),
ProTrackR (>= 0.3.4)
License: GPL-3
LazyData: True
Encoding: UTF-8
Expand Down
44 changes: 16 additions & 28 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,98 +1,86 @@
AmigaFFH v0.4.5 (Release date: 2024-02-28)
AmigaFFH v0.4.6
=============

* Fixed broken `adfExplorer` dependency
* Manual and examples updated conform CRAN policies

AmigaFFH v0.4.5
=============

* Added README
* Switched to markdown documentation with `roxygen2`
* Added `pkgdown` website

AmigaFFH v0.4.3 (Release date: 2023-08-26)
AmigaFFH v0.4.3
=============

* Fixed link in documentation in order to pass CRAN
checks

AmigaFFH v0.4.2 (Release date: 2023-08-22)
AmigaFFH v0.4.2
=============

* Updates in order to compy with latest CRAN policies
and `roxygen2` standards

AmigaFFH v0.4.1 (Release date: 2021-09-03)
AmigaFFH v0.4.1
=============

* Updated URLs in manual conform CRAN policy

AmigaFFH v0.4.0 (Release date: 2021-09-01)
AmigaFFH v0.4.0
=============

* Fixed bug in Amiga Icon implementation

* Added support for Amiga Basic files

* Minor corrections and updates to the manual.

AmigaFFH v0.3.1 (Release date: 2019-04-31)
AmigaFFH v0.3.1
=============

* Resubmission to CRAN due to offline URL references in documentation

AmigaFFH v0.3.0 (Release date: 2019-03-30)
AmigaFFH v0.3.0
=============

* Added support for Amiga Bitmap fonts

* Added support for interpretation and creation of
HAM6 and HAM8 mode (special modes on the Amiga) bitmap images.

* Added support for directly reading files from and writing files to
amigaDisk class objects (from the adfExplorer package).

* Modified 'simpleSysConfig' such that specific settings can be
passed as arguments

* Fixed bug in viewportmode checks

* Corrected replace functions for SysConfig objects

* Suppressed unnecessary warnings in the as.raw.AmigaIcon function

* Minor corrections to the manual

AmigaFFH v0.2.0 (Release date: 2019-01-27)
AmigaFFH v0.2.0
=============

* Added support for Amiga Workbench Icons (*.info)

* Added support for the Amiga's system-configuration file

* Added rasterToHWSprite function

* Changed 'as.raster' from S4 method to S3 function
for more flexibility.

* 'rasterToBitmap' did not decode continuous bitmaps
correctly. This has been fixed. Fortunately the Amiga
mostly uses interleaved bitmaps anyway.

* Added constrains to error distribution in dither method
of 'index.colours'. Without these constrains errors could
accumulate for certain images and cause undesirable results.

* Fixed transparency detection in 'index.colour' function

* Bug-fix in the interpretation of IFF ANIM frames

* Moved ProTrackR and adfExplorer from 'Depends' to 'Suggests'
to avoid circular dependancy

* Several minor corrections to the manual

AmigaFFH v0.1.2 (Release date: 2018-03-13)
AmigaFFH v0.1.2
=============

* A minor fix in the examples to pass CRAN checks.

AmigaFFH v0.1.1 (Release date: 2018-03-10)
AmigaFFH v0.1.1
=============

First release:
Expand Down
10 changes: 5 additions & 5 deletions R/adfExplorer.clone.r
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.amigaIntToRaw <- function(x, bits = 8, signed = F) {
.amigaIntToRaw <- function(x, bits = 8, signed = FALSE) {
x <- round(x)
if (!signed && any(x < 0)) stop("negative values not allowed for unsigned values.")
val.range <- c(0, 2^bits - 1)
Expand All @@ -10,7 +10,7 @@
}
if (signed) x[x < 0] <- (2^bits) + x[x < 0]
## used later on to reorder bits for the little-endian bytes
idx <- sort(rep(((1:(bits/8)) - 1)*8, 8), T) + rep(1:8, bits/8)
idx <- sort(rep(((1:(bits/8)) - 1)*8, 8), TRUE) + rep(1:8, bits/8)
result <- unlist(lapply(x, function(y) {
bitlist <- NULL
while (y > 0) {
Expand All @@ -24,7 +24,7 @@
return(result)
}

.bitmapToRaw <- function(x, invert.bytes = T, invert.longs = T) {
.bitmapToRaw <- function(x, invert.bytes = TRUE, invert.longs = TRUE) {
# 'x' should be anything that is accepted by packBits
if (!all("logical" %in% c(typeof(invert.bytes), typeof(invert.longs)))) stop ("Both 'invert.bytes' and 'invert.longs' should be a logical value.")
if (length(invert.bytes) != 1 || length(invert.longs) != 1) stop("Both 'invert.bytes' and 'invert.longs' should have a length of 1.")
Expand All @@ -48,7 +48,7 @@
return(x)
}

.rawToAmigaInt <- function(x, bits = 8, signed = F) {
.rawToAmigaInt <- function(x, bits = 8, signed = FALSE) {
# Convert raw values into Amiga integers (BYTE (8 bit signed), UBYTE (8 bit unsigned),
# WORD (16 bit signed), UWORD (16 bit unsigned), LONG (32 bit signed), ULONG (32 bit unsigned))
if ((bits %% 8) != 0 || bits < 8) stop("Bits should be positive, it should also be a multitude of 8 (or 8 itself).")
Expand All @@ -71,7 +71,7 @@
}
}

.rawToBitmap <- function(x, invert.bytes = F, invert.longs = T) {
.rawToBitmap <- function(x, invert.bytes = FALSE, invert.longs = TRUE) {
if (typeof(x) != "raw") stop("Argument 'x' should be a vector of raw data.")
if (!all("logical" %in% c(typeof(invert.bytes), typeof(invert.longs)))) stop ("Both 'invert.bytes' and 'invert.longs' should be a logical value.")
if (length(invert.bytes) != 1 || length(invert.longs) != 1) stop("Both 'invert.bytes' and 'invert.longs' should have a length of 1.")
Expand Down
Loading

0 comments on commit 85f7d36

Please sign in to comment.