Detail
2023.07.02.Log2051.txt
No SVN revisions parsed. Raw content is shown below.
Raw Content
commit 77e6bb66fc27b54f9b2fa448a138047c71fab02e
Author: Evan Ramos <hendricks266@gmail.com>
Date: Sun Jul 2 23:24:20 2023 -0500
Use bitmap macros in more places
regex for initial replacement:
find: ([A-Za-z0-9_]+)[ \t]*\[[ \t]*([A-Za-z0-9_]+)[ \t]*>>[ \t]*3[ \t]*\][ \t]*&[ \t]*pow2char[ \t]*\[[ \t]*([A-Za-z0-9_]+)[ \t]*&[ \t]*7[ \t]*\]
find: ([A-Za-z0-9_]+)[ \t]*\[[ \t]*([A-Za-z0-9_]+)[ \t]*>>[ \t]*3[ \t]*\][ \t]*&[ \t]*\(1[ \t]*<<[ \t]*\([ \t]*([A-Za-z0-9_]+)[ \t]*&[ \t]*7[ \t]*\)[ \t]*\)
replace: bitmap_test(\1, \2)
find: ([A-Za-z0-9_]+)[ \t]*\[[ \t]*([A-Za-z0-9_]+)[ \t]*>>[ \t]*3[ \t]*\][ \t]*\|=[ \t]*pow2char[ \t]*\[[ \t]*([A-Za-z0-9_]+)[ \t]*&[ \t]*7[ \t]*\]
find: ([A-Za-z0-9_]+)[ \t]*\[[ \t]*([A-Za-z0-9_]+)[ \t]*>>[ \t]*3[ \t]*\][ \t]*\|=[ \t]*\(1[ \t]*<<[ \t]*\([ \t]*([A-Za-z0-9_]+)[ \t]*&[ \t]*7[ \t]*\)[ \t]*\)
replace: bitmap_set(\1, \2)
find: ([A-Za-z0-9_]+)[ \t]*\[[ \t]*([A-Za-z0-9_]+)[ \t]*>>[ \t]*3[ \t]*\][ \t]*&=[ \t]*~[ \t]*pow2char[ \t]*\[[ \t]*([A-Za-z0-9_]+)[ \t]*&[ \t]*7[ \t]*\]
find: ([A-Za-z0-9_]+)[ \t]*\[[ \t]*([A-Za-z0-9_]+)[ \t]*>>[ \t]*3[ \t]*\][ \t]*&=[ \t]*~[ \t]*\(1[ \t]*<<[ \t]*\([ \t]*([A-Za-z0-9_]+)[ \t]*&[ \t]*7[ \t]*\)[ \t]*\)
replace: bitmap_clear(\1, \2)
regex for cleanup:
find: \((bitmap_test\([A-Za-z0-9_]+, [A-Za-z0-9_]+\))\) == 0
replace: !\1
find: \((bitmap_test\([A-Za-z0-9_]+, [A-Za-z0-9_]+\))\) != 0
find: \((bitmap_test\([A-Za-z0-9_]+, [A-Za-z0-9_]+\))\) > 0
replace: \1
find: \((bitmap_test\([A-Za-z0-9_]+, [A-Za-z0-9_]+\))\)
replace: \1
plus manual filtering
to find missed cases:
git grep -nw pow2char
git grep -nEw '>> *3'
git grep -nEw '(gotpic|gotsector)'
git grep -n show2d
See https://voidpoint.io/terminx/eduke32 for more details.