2022-05-31 16:43:31 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module RplLang
|
|
|
|
module Words
|
|
|
|
module Display
|
|
|
|
include Types
|
|
|
|
|
|
|
|
def populate_dictionary
|
|
|
|
super
|
|
|
|
|
2022-08-31 09:57:10 +02:00
|
|
|
category = 'Display'
|
|
|
|
|
2022-05-31 16:43:31 +02:00
|
|
|
@dictionary.add_word( ['erase'],
|
2022-08-31 09:57:10 +02:00
|
|
|
category,
|
2022-05-31 16:43:31 +02:00
|
|
|
'( -- ) erase display',
|
|
|
|
proc do
|
2022-08-30 13:37:34 +02:00
|
|
|
initialize_frame_buffer
|
2022-05-31 16:43:31 +02:00
|
|
|
end )
|
|
|
|
|
|
|
|
@dictionary.add_word( ['display→', 'display->'],
|
2022-08-31 09:57:10 +02:00
|
|
|
category,
|
2022-05-31 16:43:31 +02:00
|
|
|
'( -- pict ) put current display state on stack',
|
|
|
|
proc do
|
2022-08-30 13:37:34 +02:00
|
|
|
@stack << @frame_buffer # FIXME: RplPict type
|
2022-05-31 16:43:31 +02:00
|
|
|
end )
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|