Skip to content
Permalink
Browse files

(temp) remove mmap dependency to avoid osicat

  • Loading branch information...
Shinmera committed Oct 7, 2019
1 parent 07068c3 commit 77674365ea56e35dc8a1c062514793713bac1a55
Showing with 6 additions and 2 deletions.
  1. +1 −0 data-pointer.lisp
  2. +1 −1 deploy.lisp
  3. +3 −0 geometry-clipmap.lisp
  4. +1 −1 trial.asd
@@ -99,6 +99,7 @@
(funcall function (cffi:inc-pointer ptr offset) size))))

(defmethod call-with-data-ptr (function (data pathname) &key (offset 0))
#+trial-mmap
(mmap:with-mmap (ptr fd size data)
(funcall function (cffi:inc-pointer ptr offset) size)))

@@ -25,6 +25,6 @@
(deploy:define-library cl-opengl-bindings::opengl
:dont-deploy T)

#-windows
#+(and trial-mmap (not windows))
(deploy:define-library osicat-posix::librt
:dont-deploy T)
@@ -80,6 +80,7 @@
(when (and (< 0 w) (< 0 h))
(handler-case
(let ((cached (or (assoc file cache :test #'equal)
#+trial-mmap
(list* file (multiple-value-list (mmap:mmap file))))))
(push cached new-cache)
;; FIXME: Calculate height and slope in a non-retarded way.
@@ -96,6 +97,7 @@
(/ (internal-format-pixel-size
(internal-format tex))
8)))))
#+trial-mmap
(mmap:mmap-error (e)
(declare (ignore e))))))
(show-map (bank tex)
@@ -111,6 +113,7 @@
(show-map (geometry-clipmap-map-bank map) (geometry-clipmap-map-texture map)))
(gl:pixel-store :unpack-row-length 0)
;; Update mmap cache
#+trial-mmap
(let ((to-unmap (set-difference cache new-cache)))
(loop for cached in to-unmap do (apply #'mmap:munmap (rest cached))))
(setf (aref (mmap-cache clipmap) level) new-cache))))
@@ -131,7 +131,7 @@
:cl-jpeg
:retrospectiff
:terrable
:mmap
;:mmap
:form-fiddle
:lambda-fiddle))

0 comments on commit 7767436

Please sign in to comment.
You can’t perform that action at this time.