@@ -348,13 +348,6 @@ local function iterate()
348348 if texts .sector then text (10 , TextPosY .Sector , texts .sector , 0xff00ffff ) end
349349end
350350
351- local function cycle_log_types (isUse )
352- if isUse
353- then LineUseLog = (LineUseLog + 1 ) % (LineLogType .ALL + 1 )
354- else LineCrossLog = (LineCrossLog + 1 ) % (LineLogType .ALL + 1 )
355- end
356- end
357-
358351local function make_buttons ()
359352 local w = PADDING_WIDTH
360353
@@ -372,22 +365,13 @@ local function make_buttons()
372365 elseif LineCrossLog == LineLogType .ALL then crossName = " ALL"
373366 end
374367
375- make_button (w + 5 , 26 ," Log Use " .. useName , function () cycle_log_types (true ) end )
376- make_button (w + 5 , 52 ," Log Cross " .. crossName ,function () cycle_log_types (false ) end )
377- make_button (w + 5 , 78 ," Log RNG " .. (RNGLog and " ON" or " OFF" ), prandom_toggle )
378- make_button (w + 5 ,104 ,(ShowMap and " Hide" or " Show" ) .. " Map " ,map_toggle )
379- make_button (w + 5 ,130 ," Reset View" , reset_view )
380- make_button (w + 5 ,156 ," Hilite " .. (Hilite and " ON " or " OFF" ), hilite_toggle )
381- make_button (w + 5 ,182 ," Follow " .. (Follow and " ON " or " OFF" ), follow_toggle )
382-
383- --[[ --
384- make_button(10, -40, "+", function() zoom( 1) end)
385- make_button(10, -10, "-", function() zoom(-1) end)
386- make_button(40, -24, "<", pan_left )
387- make_button(64, -40, "^", pan_up )
388- make_button(64, -10, "v", pan_down )
389- make_button(88, -24, ">", pan_right)
390- --]] --
368+ make_button (w + 5 , 26 , " Log Use " .. useName , function () cycle_log_types (true ) end )
369+ make_button (w + 5 , 52 , " Log Cross " .. crossName , function () cycle_log_types (false ) end )
370+ make_button (w + 5 , 78 , " Log RNG " .. (RNGLog and " ON" or " OFF" ), prandom_toggle )
371+ make_button (w + 5 , 104 , (ShowMap and " Hide" or " Show" ).. " Map " , map_toggle )
372+ make_button (w + 5 , 130 , " Reset View" , reset_view )
373+ make_button (w + 5 , 156 , " Hilite " .. (Hilite and " ON " or " OFF" ), hilite_toggle )
374+ make_button (w + 5 , 182 , " Follow " .. (Follow and " ON " or " OFF" ), follow_toggle )
391375
392376 Input = input .get ()
393377
@@ -472,17 +456,21 @@ end
472456doom .on_prandom (function (info )
473457 if not RNGLog then return end
474458
475- local tic = Globals . gametic - 1
459+ local seed = " "
476460
477- if tic < 0 then tic = 0 end
461+ if Globals .compatibility_level >= 7 then
462+ seed = string.format (" %010u" ,
463+ Globals .rng .seed [PRANDOM_ALL_IN_ONE + 1 ]
464+ )
465+ else
466+ seed = string.format (" %03d" ,
467+ memory .readbyte (memory .read_u32_le (symbols .rndtable ) + Globals .rng .rndindex )
468+ )
469+ end
478470
479471 table.insert (PRandomInfo , string.format (
480- " %d (%d): #%03d %010u %s" ,
481- tic ,
482- # PRandomInfo ,
483- Globals .rng .rndindex ,
484- Globals .rng .seed [PRANDOM_ALL_IN_ONE ],
485- info
472+ " %d (%d): #%03d %s %s" ,
473+ Globals .gametic , # PRandomInfo + 1 , Globals .rng .rndindex , seed , info
486474 ))
487475 end )
488476
0 commit comments