Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/native/omega/allen/tests/look-home-dirty.om # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / native / omega / allen / tests / look-home-dirty.om` 151 lines ยท 2812 bytes Raw Blame History 1 note Incremental HOME pixels must equal a complete redraw, including an independently moving background. 2 note Reuses the HOME oracle's isolated NIGHT/MIND boundary and existing Nsky storage for comparison. 3 global Targ uchar 32 4 global Ttime long 1 5 fn tdstrip to long 6 ret add get Hm 24 div get Hm 26 2 7 end 8 fn tdpx xx long yy long to void 9 c = ulong add 131844 and add xx yy 31 10 if lt xx add tdstrip hms 70 11 if ge xx tdstrip 12 c = add c shl ulong and get Ttime 0 31 8 13 end 14 end 15 put Nfrm add mul ulong yy ulong get Lg 0 ulong xx uint c 16 end 17 fn tdrow x long y long w long to void 18 for i ulong ulong w 19 tdpx add x long i y 20 end 21 end 22 fn tdback x long y long w long h long to void 23 for j ulong ulong h 24 tdrow x add y long j w 25 end 26 hmtext x y w h 27 end 28 fn tdwhole to void 29 tdback get Hm 28 get Hm 29 get Hm 30 get Hm 31 30 end 31 fn tdsaverow at ulong to void 32 for i ulong ulong get Hm 30 33 put Nsky add at i get Nfrm add at i 34 end 35 end 36 fn tdsave to void 37 at = mul ulong get Hm 29 ulong get Lg 0 38 at = add at ulong get Hm 28 39 for j ulong ulong get Hm 31 40 tdsaverow at 41 at = add at ulong get Lg 0 42 end 43 end 44 fn tdequalrow at ulong to bool 45 for i ulong ulong get Hm 30 46 if ne get Nsky add at i get Nfrm add at i 47 ret false 48 end 49 end 50 ret true 51 end 52 fn tdequal to bool 53 at = mul ulong get Hm 29 ulong get Lg 0 54 at = add at ulong get Hm 28 55 for j ulong ulong get Hm 31 56 if not tdequalrow at 57 ret false 58 end 59 at = add at ulong get Lg 0 60 end 61 ret true 62 end 63 fn tdpartial to void 64 x = pkmax get Hm 28 get Hmdirty 0 65 y = pkmax get Hm 29 get Hmdirty 1 66 w = add get Hm 28 get Hm 30 67 w = pkmin w add get Hmdirty 0 get Hmdirty 2 68 w = sub w x 69 h = add get Hm 29 get Hm 31 70 h = pkmin h add get Hmdirty 1 get Hmdirty 3 71 h = sub h y 72 if gt get Hmdirty 2 0 73 if gt w 0 74 if gt h 0 75 tdback x y w h 76 end 77 end 78 end 79 note The changing strip represents a NIGHT dirty region intersecting the bar. 80 tdback tdstrip get Hm 29 hms 70 get Hm 31 81 end 82 fn tdbudget to bool 83 a = mul get Hmdirty 2 get Hmdirty 3 84 b = mul get Hm 30 get Hm 31 85 ret le a div b 4 86 end 87 fn main to long 88 put Lg 0 1280 89 put Lg 1 800 90 put Lg 2 170 91 n = argread 2 Targ 0 32 92 if le n 0 93 ret 64 94 end 95 if eq get Targ 0 52 96 put Lg 0 3840 97 put Lg 1 2160 98 put Lg 2 512 99 end 100 put Targ 0 0 101 n = argread 1 Targ 0 32 102 if le n 0 103 ret 64 104 end 105 put Lg 3 div get Lg 0 2 106 put Lg 4 div mul get Lg 1 40 100 107 pkinit 108 hminit 109 note A static footer exercises its invalidation when typing and opacity change. 110 put Hmfoot 0 65 111 put Hmfootn 0 1 112 put Ttime 0 15300 113 tdwhole 114 for frame ulong 400 115 if ge frame 15 116 if lt frame 174 117 hmkey add 65 rem frame 26 118 end 119 end 120 if ge frame 200 121 if lt frame 210 122 hmkey 8 123 end 124 end 125 if eq frame 220 126 hmkey 13 127 end 128 if eq frame 350 129 put Hmsay 0 72 130 put Hmsay 1 105 131 put Hmsayn 0 2 132 hmsaid 133 end 134 hmstep get Ttime 0 135 if eq get Targ 0 98 136 if or eq frame 12 eq frame 190 137 if not tdbudget 138 ret 11 139 end 140 end 141 end 142 tdpartial 143 tdsave 144 tdwhole 145 if not tdequal 146 ret 30 147 end 148 put Ttime 0 add get Ttime 0 100 149 end 150 ret 0 151 end