diff --git a/TODO.md b/TODO.md index 53f2b8e..70f75d7 100644 --- a/TODO.md +++ b/TODO.md @@ -35,6 +35,10 @@ - `tape_drive` component, compatible with Computronics, except maybe with proper seek times and support for multiple tapes - `cd_reader` and `cd_writer` components, to work with CDs +# API changes + +- move controls into the component instances instead of using getters, to boost performance + # Internal changes - use dynamic arrays for signals (and maybe components), but still keep the maximums to prevent memory hogging diff --git a/src/components/drive.c b/src/components/drive.c index ab648fd..099f6e8 100644 --- a/src/components/drive.c +++ b/src/components/drive.c @@ -43,7 +43,7 @@ void nni_drive_seekTo(nn_component *component, nni_drive *drive, nn_size_t secto sector = sector - 1; // switch to 0 to N-1 sector addressing, // which is much nicer to do math with // and Lua made a big oopsie. - size_t old = drive->currentSector; + nn_size_t old = drive->currentSector; nn_driveControl ctrl = nn_drive_getControl(component, drive); if(ctrl.seekSectorsPerTick == 0) return; // seek latency disabled nn_computer *computer = nn_getComputerOfComponent(component);