##// END OF EJS Templates
IMG and *IMG
naryl -
r34:fac4b25b default
parent child Browse files
Show More
@@ -1,4 +1,5 b''
1 1 .*~
2 2 .qlot
3 3 .html
4 .png
4 5 tests
@@ -11,4 +11,16 b' USEHTML = 1'
11 11 '<img src="content/room.jpg">'
12 12 ! Π’Ρ‹Π²ΠΎΠ΄ΠΈΠΌ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ Π² Π΄ΠΎΠΏ. описаниС
13 13 PL '<img src="content/map.jpg">'
14
15 !! Π ΠΠ‘Π¨Π˜Π Π•ΠΠ˜Π• ΠšΠžΠœΠŸΠ˜Π›Π―Π’ΠžΠ Π (Π½Π΅ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ Ссли Ρ…ΠΎΡ‚ΠΈΡ‚ΠΈΠ΅ пСрСносимости Π½Π° Π΄Ρ€ΡƒΠ³ΠΈΠ΅ ΠΏΠ»Π΅Π΅Ρ€Ρ‹)
16 ! Π’Ρ‹Π²ΠΎΠ΄ΠΈΠΌ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ Π² основноС описаниС
17 *IMG 'content/room.jpg'
18 ! Π’Ρ‹Π²ΠΎΠ΄ΠΈΠΌ Π΄Π²Π΅ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠΈ рядом Π² Π΄ΠΎΠΏΠΎΠ»Π½ΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎΠ΅ описаниС
19 IMG 'content/stat1.png'
20 IMG 'content/stat2.png'
21 ! Π’.Π΅. ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠΈ Π²Π΅Π΄ΡƒΡ‚ сСбя ΠΊΠ°ΠΊ тСкст ΠΈ пСрСносы строк Π½ΡƒΠΆΠ½ΠΎ Π²ΡΡ‚Π°Π²Π»ΡΡ‚ΡŒ явно
22
23 ! НСсколько ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΎΠΊ Ρ€Π°ΡΠΏΠΎΠ»Π°Π³Π°ΡŽΡ‚ΡΡ Π² ΠΎΠ΄Π½ΠΎΠΌ ΠΈ Ρ‚ΠΎΠΌ ΠΆΠ΅ мСстС Π² порядкС пСрСчислСния.
24 ! Π˜ΡΠΏΠΎΠ»ΡŒΠ·ΡƒΡ ΠΏΡ€ΠΎΠ·Ρ€Π°Ρ‡Π½ΠΎΡΡ‚ΡŒ ΠΌΠΎΠΆΠ½ΠΎ ΠΏΠΎΠ»ΡƒΡ‡ΠΈΡ‚ΡŒ эффСкт налоТСния Π½Π΅ΡΠΊΠΎΠ»ΡŒΠΊΠΈΡ… ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΎΠΊ слоями
25 IMG 'content/ragdoll.png', $equipment['body'], $equipment['head']
14 26 -
@@ -411,6 +411,17 b''
411 411 (setf (@ img src) "")
412 412 (setf (@ img style display) "hidden")))))
413 413
414 (defun show-inline-images (frame-name images)
415 (let ((frame (get-frame frame-name))
416 (text ""))
417 (incf text "<div style='position:relative; display: inline-block'>")
418 (incf text (+ "<img src='" (@ images 0) "'>"))
419 (loop :for image :in (chain images (slice 1))
420 :do (incf text
421 (+ "<img style='position:absolute' src='" image "'>")))
422 (incf text "</div>")
423 (incf (inner-html frame) text)))
424
414 425 (defun rgb-string (rgb)
415 426 (let ((red (ps::>> rgb 16))
416 427 (green (logand (ps::>> rgb 8) 255))
@@ -140,6 +140,12 b''
140 140 (defpsmacro view (&optional path)
141 141 `(api-call show-image ,path))
142 142
143 (defpsmacro img (&rest images)
144 `(api-call show-inline-images :stat (list ,@images)))
145
146 (defpsmacro *img (&rest images)
147 `(api-call show-inline-images :main (list ,@images)))
148
143 149 ;;; 19input
144 150
145 151 (defpsmacro showinput (enable)
@@ -265,7 +265,7 b''
265 265
266 266 (defun refint ()
267 267 ;; "Force interface update" Uh... what exactly do we do here?
268 (api:report-error "REFINT is not supported")
268 ;(api:report-error "REFINT is not supported")
269 269 )
270 270
271 271 ;;; 19input
@@ -3,6 +3,9 b''
3 3
4 4 ;;;; Parses TXT source to an intermediate representation
5 5
6 (eval-when (:compile-toplevel :load-toplevel :execute)
7 (defparameter *max-args* 10))
8
6 9 ;;; Utility
7 10
8 11 (defun remove-nth (list nth)
@@ -107,7 +110,7 b''
107 110
108 111 ;;; Identifiers
109 112
110 (defparameter *keywords* '(act addlib addobj addqst and arrcomp arrpos arrsize cla clear *clear close clr *clr cls cmdclear cmdclr copyarr counter countobj curacts curloc debug delact dellib delobj desc disablescroll disablesubex dynamic dyneval else elseif end exit for freelib func getobj gosub goto gs gt if iif inclib input instr isnum isplay jump killall killobj killqst killvar lcase lcolor len let loc local maintxt max menu mid min mod msecscount msg nl *nl no nosave obj opengame openqst or p *p pl *pl play qspver rand refint replace rgb rnd savegame selact selobj set settimer showacts showinput showobjs showstat stattxt step str strcomp strfind strpos to trim ucase unsel unselect usercom user_text usrtxt val view wait xgoto xgt))
113 (defparameter *keywords* '(act addlib addobj addqst and arrcomp arrpos arrsize cla clear *clear close clr *clr cls cmdclear cmdclr copyarr counter countobj curacts curloc debug delact dellib delobj desc disablescroll disablesubex dynamic dyneval else elseif end exit for freelib func getobj gosub goto gs gt if iif img *img inclib input instr isnum isplay jump killall killobj killqst killvar lcase lcolor len let loc local maintxt max menu mid min mod msecscount msg nl *nl no nosave obj opengame openqst or p *p pl *pl play qspver rand refint replace rgb rnd savegame selact selobj set settimer showacts showinput showobjs showstat stattxt step str strcomp strfind strpos to trim ucase unsel unselect usercom user_text usrtxt val view wait xgoto xgt))
111 114
112 115 (defun trim-$ (str)
113 116 (if (char= #\$ (elt str 0))
@@ -415,8 +418,10 b''
415 418 clauses))))
416 419 (p:defrule ,rule-name (or ,returning-rule-name ,non-returning-rule-name))))
417 420
418 (defmacro defintrinsic (sym returning &optional (min-arity 0) (max-arity 10) &rest names)
421 (defmacro defintrinsic (sym returning &optional (min-arity 0) max-arity &rest names)
419 422 (declare (ignore returning))
423 (unless max-arity
424 (setf max-arity *max-args*))
420 425 (setf names
421 426 (if names
422 427 (mapcar #'string-upcase names)
@@ -433,8 +438,8 b''
433 438
434 439 (defintrinsics (intrinsic returning-intrinsic non-returning-intrinsic)
435 440 ;; Transitions
436 (goto% nil 0 10 "gt" "goto")
437 (xgoto% nil 0 10 "xgt" "xgoto")
441 (goto% nil 0 nil "gt" "goto")
442 (xgoto% nil 0 nil "xgt" "xgoto")
438 443 ;; Variables
439 444 (killvar nil 0 2)
440 445 ;; Expressions
@@ -446,8 +451,8 b''
446 451 (curloc t 0 0)
447 452 (rand t 1 2)
448 453 (rnd t 0 0)
449 (qspmax t 1 10 "max")
450 (qspmin t 1 10 "min")
454 (qspmax t 1 nil "max")
455 (qspmin t 1 nil "min")
451 456 ;; Arrays
452 457 (killall nil 0 0)
453 458 (copyarr nil 2 4)
@@ -471,14 +476,14 b''
471 476 ;; IF
472 477 (iif t 2 3)
473 478 ;; Subs
474 (gosub nil 1 10 "gosub" "gs")
475 (func t 1 10)
479 (gosub nil 1 nil "gosub" "gs")
480 (func t 1 nil)
476 481 (exit nil 0 0)
477 482 ;; Jump
478 483 (jump nil 1 1)
479 484 ;; Dynamic
480 (dynamic nil 1 10)
481 (dyneval t 1 10)
485 (dynamic nil 1 nil)
486 (dyneval t 1 nil)
482 487 ;; Sound
483 488 (play nil 1 2)
484 489 (isplay t 1 1)
@@ -518,6 +523,8 b''
518 523 ;; Images
519 524 (refint nil 0 0)
520 525 (view nil 0 1)
526 (img nil 1)
527 (*img nil 1)
521 528 ;; Fonts
522 529 (rgb t 3 3)
523 530 ;; Input
General Comments 0
You need to be logged in to leave comments. Login now