DXX-Rebirth unification Beta Builds
#31
OK, I unboxed my Pi2. I grabbed the latest raspbian image and got everything to run. I'm still not able to reproduce your issue, so I have to admit that I've no idea how to even start debugging this.  :o

Some things though: What System/GPU memory split are you using? Also, have you tried other GLES applications? Do they work without flaws? Does the [tt]/opt/vc/src/hello_pi/hello_triangle/[/tt] example work on your system?
"Perfection is attained not when there is nothing more to add, but when there is nothing more to remove." -- Antoine de Saint Exupéry
Reply
#32
I just built the latest commit and uh...the controls are all kinds of out of whack (on the debug build...the regular build is fine). Somebody messed something up! lol

Also it looks like the debug build doesn't acknowledge the -debug and -verbose options in the .ini.
Reply
#33
The regular build was also affected.  It is now fixed.  Sine handling is sign sensitive.  A cleanup commit happened to switch to unsigned math.
Reply
#34
Hey when I try to compile the latest unification code I get this error while trying to compile d2x-rebirth:

Code:
In file included from common/include/maths.h:21:0,
                 from common/include/timer.h:16,
                 from similar/main/gamerend.cpp:29:
In static member function ‘static valbaseptridxutil_t<P, I>::index_type valbaseptridxutil_t<P, I>::check_index_match(const A&, valbaseptridxutil_t<P, I>::pointer_type, valbaseptridxutil_t<P, I>::index_type) [with A = object_array_t; P = object; I = short int; valbaseptridxutil_t<P, I>::index_type = short int; valbaseptridxutil_t<P, I>::pointer_type = object*]’,
    inlined from ‘vvalidx_t<P, I, magic_constant>::vvalidx_t(A&, vvalidx_t<P, I, magic_constant>::pointer_type, vvalidx_t<P, I, magic_constant>::index_type) [with A = object_array_t; P = object; I = short int; magic_constant = object_magic_constant_t; vvalidx_t<P, I, magic_constant>::pointer_type = object*; vvalidx_t<P, I, magic_constant>::index_type = short int]’ at common/include/valptridx.h:619:57,
    inlined from ‘valptridx_template_t<require_valid, P, I, magic_constant, Prc>::valptridx_template_t(A&, valptridx_template_t<require_valid, P, I, magic_constant, Prc>::pointer_type, valptridx_template_t<require_valid, P, I, magic_constant, Prc>::index_type) [with A = object_array_t; bool require_valid = true; P = object; I = short int; magic_constant = object_magic_constant_t; Prc = object; valptridx_template_t<require_valid, P, I, magic_constant, Prc>::pointer_type = object*; valptridx_template_t<require_valid, P, I, magic_constant, Prc>::index_type = short int]’ at common/include/valptridx.h:449:20,
    inlined from ‘vobjptridx_t::vobjptridx_t(A&, valptridx_template_t<true, object, short int, object_magic_constant_t, object>::pointer_type, valptridx_template_t<true, object, short int, object_magic_constant_t, object>::index_type) [with A = object_array_t; valptridx_template_t<true, object, short int, object_magic_constant_t, object>::pointer_type = object*; valptridx_template_t<true, object, short int, object_magic_constant_t, object>::index_type = short int]’ at common/main/object.h:426:1,
    inlined from ‘vobjptridx_t operator-(object*, object_array_t&)’ at common/main/object.h:426:1,
    inlined from ‘valptridx_template_t<require_valid, P, I, magic_constant, Prc>::valptridx_template_t(valptridx_template_t<require_valid, P, I, magic_constant, Prc>::pointer_type) [with bool require_valid = true; P = object; I = short int; magic_constant = object_magic_constant_t; Prc = object; valptridx_template_t<require_valid, P, I, magic_constant, Prc>::pointer_type = object*]’ at common/include/valptridx.h:460:42,
    inlined from ‘vobjptridx_t::vobjptridx_t(valptridx_template_t<true, object, short int, object_magic_constant_t, object>::pointer_type)’ at common/main/object.h:426:1,
    inlined from ‘void show_extra_views()’ at similar/main/gamerend.cpp:537:123,
    inlined from ‘void game_render_frame_mono()’ at similar/main/gamerend.cpp:752:20:
./dxxsconf.h:21:5: error: call to ‘dxx_trap_index_mismatch_exception’ declared with attribute error: pointer/index mismatch
  F(); \
     ^
common/include/valptridx.h:20:5: note: in expansion of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
    (DXX_ALWAYS_ERROR_FUNCTION(FAILURE_FUNCTION, FAILURE_STRING), 0) \
     ^
common/include/valptridx.h:36:21: note: in expansion of macro ‘DXX_VALPTRIDX_STATIC_CHECK’
   static_cast<void>(DXX_VALPTRIDX_STATIC_CHECK((SUCCESS_CONDITION), dxx_trap_##EXCEPTION, FAILURE_STRING), \
                     ^
common/include/valptridx.h:127:4: note: in expansion of macro ‘DXX_VALPTRIDX_CHECK’
    DXX_VALPTRIDX_CHECK(as == p, index_mismatch_exception, "pointer/index mismatch", &a[0], a.size(), s, as, p);
    ^
In static member function ‘static valbaseptridxutil_t<P, I>::index_type valbaseptridxutil_t<P, I>::check_index_match(const A&, valbaseptridxutil_t<P, I>::pointer_type, valbaseptridxutil_t<P, I>::index_type) [with A = object_array_t; P = object; I = short int; valbaseptridxutil_t<P, I>::index_type = short int; valbaseptridxutil_t<P, I>::pointer_type = object*]’,
    inlined from ‘vvalidx_t<P, I, magic_constant>::vvalidx_t(A&, vvalidx_t<P, I, magic_constant>::pointer_type, vvalidx_t<P, I, magic_constant>::index_type) [with A = object_array_t; P = object; I = short int; magic_constant = object_magic_constant_t; vvalidx_t<P, I, magic_constant>::pointer_type = object*; vvalidx_t<P, I, magic_constant>::index_type = short int]’ at common/include/valptridx.h:619:57,
    inlined from ‘valptridx_template_t<require_valid, P, I, magic_constant, Prc>::valptridx_template_t(A&, valptridx_template_t<require_valid, P, I, magic_constant, Prc>::pointer_type, valptridx_template_t<require_valid, P, I, magic_constant, Prc>::index_type) [with A = object_array_t; bool require_valid = true; P = object; I = short int; magic_constant = object_magic_constant_t; Prc = object; valptridx_template_t<require_valid, P, I, magic_constant, Prc>::pointer_type = object*; valptridx_template_t<require_valid, P, I, magic_constant, Prc>::index_type = short int]’ at common/include/valptridx.h:449:20,
    inlined from ‘vobjptridx_t::vobjptridx_t(A&, valptridx_template_t<true, object, short int, object_magic_constant_t, object>::pointer_type, valptridx_template_t<true, object, short int, object_magic_constant_t, object>::index_type) [with A = object_array_t; valptridx_template_t<true, object, short int, object_magic_constant_t, object>::pointer_type = object*; valptridx_template_t<true, object, short int, object_magic_constant_t, object>::index_type = short int]’ at common/main/object.h:426:1,
    inlined from ‘vobjptridx_t operator-(object*, object_array_t&)’ at common/main/object.h:426:1,
    inlined from ‘valptridx_template_t<require_valid, P, I, magic_constant, Prc>::valptridx_template_t(valptridx_template_t<require_valid, P, I, magic_constant, Prc>::pointer_type) [with bool require_valid = true; P = object; I = short int; magic_constant = object_magic_constant_t; Prc = object; valptridx_template_t<require_valid, P, I, magic_constant, Prc>::pointer_type = object*]’ at common/include/valptridx.h:460:42,
    inlined from ‘vobjptridx_t::vobjptridx_t(valptridx_template_t<true, object, short int, object_magic_constant_t, object>::pointer_type)’ at common/main/object.h:426:1,
    inlined from ‘void show_extra_views()’ at similar/main/gamerend.cpp:550:127,
    inlined from ‘void game_render_frame_mono()’ at similar/main/gamerend.cpp:752:20:
./dxxsconf.h:21:5: error: call to ‘dxx_trap_index_mismatch_exception’ declared with attribute error: pointer/index mismatch
  F(); \
     ^
common/include/valptridx.h:20:5: note: in expansion of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
    (DXX_ALWAYS_ERROR_FUNCTION(FAILURE_FUNCTION, FAILURE_STRING), 0) \
     ^
common/include/valptridx.h:36:21: note: in expansion of macro ‘DXX_VALPTRIDX_STATIC_CHECK’
   static_cast<void>(DXX_VALPTRIDX_STATIC_CHECK((SUCCESS_CONDITION), dxx_trap_##EXCEPTION, FAILURE_STRING), \
                     ^
common/include/valptridx.h:127:4: note: in expansion of macro ‘DXX_VALPTRIDX_CHECK’
    DXX_VALPTRIDX_CHECK(as == p, index_mismatch_exception, "pointer/index mismatch", &a[0], a.size(), s, as, p);
    ^
scons: *** [similar/main/.d2x-rebirth.gamerend.o] Error 1
scons: building terminated because of errors.
Reply
#35
That is issue #60, though it seems your compiler's inliner is aggressive enough that the compile-time check catches it, whereas the original reporter only detects it when it crashes at runtime.  You can work around it by commenting out gamerend.cpp line 550.  I will try to get a fix in soon.
Reply
#36
I pushed a quick fix for this.  The whole area still needs to be reworked, but it should build and run now.
Reply
#37
Compile time warning:

Code:
In file included from common/include/gr.h:34:0,
                 from common/include/window.h:20,
                 from similar/main/gamecntl.cpp:35:
similar/main/gamecntl.cpp: In function ‘window_event_result HandleTestKey(int)’:
common/include/fmtcheck.h:31:89: warning: unknown conversion type character ‘l’ in format [-Wformat=]
l_printf_delete_comma(1 _dxx_call_printf_unwrap_args A, FMT) ,##__VA_ARGS__)) \
                                                                            ^
common/main/hudmsg.h:30:36: note: in expansion of macro ‘dxx_call_printf_checked’
#define HUD_init_message(A1,F,...) dxx_call_printf_checked(HUD_init_message,HUD
                                    ^
similar/main/gamecntl.cpp:1359:4: note: in expansion of macro ‘HUD_init_message’
    HUD_init_message(HM_DEFAULT, "GameTime %" PRIi64 " - Reset in 10 seconds!",
    ^
common/include/fmtcheck.h:31:89: warning: too many arguments for format [-Wformat-extra-args]
l_printf_delete_comma(1 _dxx_call_printf_unwrap_args A, FMT) ,##__VA_ARGS__)) \
                                                                            ^
common/main/hudmsg.h:30:36: note: in expansion of macro ‘dxx_call_printf_checked’
#define HUD_init_message(A1,F,...) dxx_call_printf_checked(HUD_init_message,HUD
                                    ^
similar/main/gamecntl.cpp:1359:4: note: in expansion of macro ‘HUD_init_message’
    HUD_init_message(HM_DEFAULT, "GameTime %" PRIi64 " - Reset in 10 seconds!",
Reply
#38
I get no errors for Win32 or Win64 using current tip.  Support for printing 64-bit values on Windows has always been messy, and getting that line to stop warning at all required an ugly hack.  Could you provide the post-processed output around that line?  Mine is:
"Win32":
( ((void)((__builtin_constant_p((("GameTime %" "I64i" " - Reset in 10 seconds!"))) && (("GameTime %" "I64i" " - Reset in 10 seconds!"))[0] == '%' && (("GameTime %" "I64i" " - Reset in 10 seconds!"))[1] == 's' && (("GameTime %" "I64i" " - Reset in 10 seconds!"))[2] == 0) && (( { void dxx_trap_trivial_string_specifier_argument_HUD_init_message() __attribute__((__error__("bare %s argument to " "HUD_init_message" "; use " "HUD_init_message_literal" " directly"))); dxx_trap_trivial_string_specifier_argument_HUD_init_message(); } ), 0))), (sizeof("GameTime64") == 1) ? (HUD_init_message_literal(1 ,("GameTime %" "I64i" " - Reset in 10 seconds!"))) : (HUD_init_message(1 ,("GameTime %" "I64i" " - Reset in 10 seconds!") , GameTime64)) );
"Win64":
( ((void)((__builtin_constant_p((("GameTime %" "I64i" " - Reset in 10 seconds!"))) && (("GameTime %" "I64i" " - Reset in 10 seconds!"))[0] == '%' && (("GameTime %" "I64i" " - Reset in 10 seconds!"))[1] == 's' && (("GameTime %" "I64i" " - Reset in 10 seconds!"))[2] == 0) && (( { void dxx_trap_trivial_string_specifier_argument_HUD_init_message() __attribute__((__error__("bare %s argument to " "HUD_init_message" "; use " "HUD_init_message_literal" " directly"))); dxx_trap_trivial_string_specifier_argument_HUD_init_message(); } ), 0))), (sizeof("GameTime64") == 1) ? (HUD_init_message_literal(1 ,("GameTime %" "I64i" " - Reset in 10 seconds!"))) : (HUD_init_message(1 ,("GameTime %" "I64i" " - Reset in 10 seconds!") , GameTime64)) );
You can get just this line by running the compile command for that file with -E | grep 'Reset in' instead of -c -o filename
Reply
#39
I'm not getting it now. I'll do that if I see it again.
Reply
#40
I'll be pushing out a new beta build sometime this week. I'm not totally back, but I'll at least keep updating the installer and the beta builds (and may even do a bit of coding here and there).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)