##// 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 .qlot
2 .qlot
3 .html
3 .html
4 .png
4 tests
5 tests
@@ -11,4 +11,16 b' USEHTML = 1'
11 '<img src="content/room.jpg">'
11 '<img src="content/room.jpg">'
12 ! Π’Ρ‹Π²ΠΎΠ΄ΠΈΠΌ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ Π² Π΄ΠΎΠΏ. описаниС
12 ! Π’Ρ‹Π²ΠΎΠ΄ΠΈΠΌ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ Π² Π΄ΠΎΠΏ. описаниС
13 PL '<img src="content/map.jpg">'
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 (setf (@ img src) "")
411 (setf (@ img src) "")
412 (setf (@ img style display) "hidden")))))
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 (defun rgb-string (rgb)
425 (defun rgb-string (rgb)
415 (let ((red (ps::>> rgb 16))
426 (let ((red (ps::>> rgb 16))
416 (green (logand (ps::>> rgb 8) 255))
427 (green (logand (ps::>> rgb 8) 255))
@@ -140,6 +140,12 b''
140 (defpsmacro view (&optional path)
140 (defpsmacro view (&optional path)
141 `(api-call show-image ,path))
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 ;;; 19input
149 ;;; 19input
144
150
145 (defpsmacro showinput (enable)
151 (defpsmacro showinput (enable)
@@ -265,7 +265,7 b''
265
265
266 (defun refint ()
266 (defun refint ()
267 ;; "Force interface update" Uh... what exactly do we do here?
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 ;;; 19input
271 ;;; 19input
@@ -3,6 +3,9 b''
3
3
4 ;;;; Parses TXT source to an intermediate representation
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 ;;; Utility
9 ;;; Utility
7
10
8 (defun remove-nth (list nth)
11 (defun remove-nth (list nth)
@@ -107,7 +110,7 b''
107
110
108 ;;; Identifiers
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 (defun trim-$ (str)
115 (defun trim-$ (str)
113 (if (char= #\$ (elt str 0))
116 (if (char= #\$ (elt str 0))
@@ -415,8 +418,10 b''
415 clauses))))
418 clauses))))
416 (p:defrule ,rule-name (or ,returning-rule-name ,non-returning-rule-name))))
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 (declare (ignore returning))
422 (declare (ignore returning))
423 (unless max-arity
424 (setf max-arity *max-args*))
420 (setf names
425 (setf names
421 (if names
426 (if names
422 (mapcar #'string-upcase names)
427 (mapcar #'string-upcase names)
@@ -433,8 +438,8 b''
433
438
434 (defintrinsics (intrinsic returning-intrinsic non-returning-intrinsic)
439 (defintrinsics (intrinsic returning-intrinsic non-returning-intrinsic)
435 ;; Transitions
440 ;; Transitions
436 (goto% nil 0 10 "gt" "goto")
441 (goto% nil 0 nil "gt" "goto")
437 (xgoto% nil 0 10 "xgt" "xgoto")
442 (xgoto% nil 0 nil "xgt" "xgoto")
438 ;; Variables
443 ;; Variables
439 (killvar nil 0 2)
444 (killvar nil 0 2)
440 ;; Expressions
445 ;; Expressions
@@ -446,8 +451,8 b''
446 (curloc t 0 0)
451 (curloc t 0 0)
447 (rand t 1 2)
452 (rand t 1 2)
448 (rnd t 0 0)
453 (rnd t 0 0)
449 (qspmax t 1 10 "max")
454 (qspmax t 1 nil "max")
450 (qspmin t 1 10 "min")
455 (qspmin t 1 nil "min")
451 ;; Arrays
456 ;; Arrays
452 (killall nil 0 0)
457 (killall nil 0 0)
453 (copyarr nil 2 4)
458 (copyarr nil 2 4)
@@ -471,14 +476,14 b''
471 ;; IF
476 ;; IF
472 (iif t 2 3)
477 (iif t 2 3)
473 ;; Subs
478 ;; Subs
474 (gosub nil 1 10 "gosub" "gs")
479 (gosub nil 1 nil "gosub" "gs")
475 (func t 1 10)
480 (func t 1 nil)
476 (exit nil 0 0)
481 (exit nil 0 0)
477 ;; Jump
482 ;; Jump
478 (jump nil 1 1)
483 (jump nil 1 1)
479 ;; Dynamic
484 ;; Dynamic
480 (dynamic nil 1 10)
485 (dynamic nil 1 nil)
481 (dyneval t 1 10)
486 (dyneval t 1 nil)
482 ;; Sound
487 ;; Sound
483 (play nil 1 2)
488 (play nil 1 2)
484 (isplay t 1 1)
489 (isplay t 1 1)
@@ -512,12 +517,14 b''
512 (delobj nil 1 1 "delobj" "del obj")
517 (delobj nil 1 1 "delobj" "del obj")
513 (killobj nil 0 1)
518 (killobj nil 0 1)
514 (countobj t 0 0)
519 (countobj t 0 0)
515 (getobj t 1 1)
520 (getobj t 1 1)
516 ;; Menu
521 ;; Menu
517 (menu nil 1 1)
522 (menu nil 1 1)
518 ;; Images
523 ;; Images
519 (refint nil 0 0)
524 (refint nil 0 0)
520 (view nil 0 1)
525 (view nil 0 1)
526 (img nil 1)
527 (*img nil 1)
521 ;; Fonts
528 ;; Fonts
522 (rgb t 3 3)
529 (rgb t 3 3)
523 ;; Input
530 ;; Input
General Comments 0
You need to be logged in to leave comments. Login now