// @TODO(tkap, 26/10/2022): // if(is_key_pressed(g_input, key_f, true)) { // play_sound(e_sound_test_music, 4, true); // } // @TODO(tkap, 27/02/2024): // @TODO(tkap, 25/01/2023): Better heart texture // @TODO(tkap, 23/01/2023): If a gem comes from somewhere other than the gem inventory, it cannot be placed on the same slot as a compatible // gem (i.e. they can be merged). We should allow that. // @Hack @TODO(tkap, 20/05/2022): This could stop working if we don't use a different affix for unique stats. I don't think we should anyway... // @TODO(tkap, 04/08/2022): I think we should have flags for draw text instead of "b8 centered" // Something like center_horizontal | center_vertical. Or maybe just 2 bools. // @TODO(tkap, 14/08/2022): Dynamic array // @TODO(tkap, 06/10/2022): Maybe should be calling make_entity instead? // @TODO(tkap, 23/06/2022): spawn at enemy z?? or whatever Z we get passed // @TODO(tkap): Why is this f64? // @TODO(tkap, 10/08/2022): Consider lowering this // @TODO(tkap, 06/06/2022): push_dir should be re-calculated for chain lightning // @TODO(tkap, 10/05/2023): increase particle speed according to explosion radius?? // @TODO(tkap, 10/05/2023): explosion probably too strong?? // @TODO(tkap, 10/05/2023): explosion probably too strong?? // @TODO(tkap, 11/10/2022): Maybe cache this? May be too slow now that we call it when bleeding, slow, etc // @TODO(tkap, 13/06/2022): Is this working?? We had a bug where reviving enemies took what it looked like 1 frame of bleed damage, // but this code should have removed the bleed buff. Removing the buffable flag seemed to fix the bug, but this code should have prevented that // in the first place... check this function better // @TODO(tkap, 31/05/2022): Review this -1 for wave index. I get that passing the actual wave would be bad, because // it could make the wave to be completed when it actually wasn't, but still don't like it. // @Fixme(tkap, 10/05/2023): rename, or add a new stat area of effect? not sure // @TODO(tkap, 22/02/2023): // emitters->speed_multiplier[emitter] = emitters->particle_speed[emitter] * max(enemies->size[entity]); // @TODO(tkap, 10/05/2023): different particles instead of copying the ones above // @TODO(tkap, 18/10/2022): Better sound // play_sound(e_sound_level_up); // @TODO(tkap, 15/07/2022): This could be auto generated // @TODO(tkap, 18/09/2022): Lots of unnecessary work here. Some of this can be done once instead of every frame // @TODO(tkap, 20/11/2023): Handle negative "increased" // @TODO(tkap, 24/10/2022): Make this different than the normal upgrades // @TODO(tkap, 25/01/2023): Replace with new sound // @Fixme(tkap, 28/02/2024): do we need this now?? it would be nice to just delete it // @TODO(tkap, 01/03/2023): Sound effect? // @TODO(tkap, 14/01/2024): Rename? has_stat or something?? // @TODO(tkap, 11/08/2022): This is client side only... // @TODO(tkap, 11/08/2022): This is client side only... // @TODO(tkap, 18/10/2022): Probably don't add the full distance on the first iteration, // because we may be half way through the tile, but we still add the full distance // @TODO(tkap, 18/10/2022): Profile this // @Hack @Fixme(tkap, 01/03/2023): Giga hack for flyers because they seem to always have path_index == 1, which means that we skip the loop // We should try to understand why that is. // @TODO(tkap, 18/10/2022): Profile this // @Hack @Fixme(tkap, 01/03/2023): Giga hack for flyers because they seem to always have path_index == 1, which means that we skip the loop // We should try to understand why that is. // @Hack @Fixme(tkap, 01/03/2023): Giga hack for flyers because they seem to always have path_index == 1, which means that we skip the loop // We should try to understand why that is. // @TODO(tkap, 26/11/2023): Not handling e_projectile_target_type_pos (not sure if we care) // @Fixme(tkap, 10/05/2023): handle shot triggers and shit // @TODO(tkap, 15/03/2024): Remove this assert. I just want to make sure it triggers so that I understand what's happening! // @TODO(tkap, 20/10/2022): Is this wrong?? // @TODO @Note(tkap, 02/12/2023): The way this is currently set up, we use the same shoot data for each enemy, which is probably not what we want // @TODO(tkap, 28/01/2023): Sell the towers with the least amount of gold spent on them // @TODO(tkap, 13/06/2023): Maybe lerp speed should increase with attack speed? // @Fixme(tkap, 13/06/2023): How do we handle execute? The thing we are doing with damage_left doesn't take that into account. // Also same problem for chain lightning, etc. // BIK PROBLEM zero // @Fixme(tkap, 13/06/2023): proper damage info // @Fixme(tkap, 13/06/2023): proper damage info? // @Note @TODO(tkap, 11/01/2023): We set this to at least 1 because from the point of view of the player, it wouldn't make sense // that having <= 0 chain count results in chain lightning not hitting at all. It makes sense that it hits once and then chains // X times. We may need to update the chain lightning description. Also if we ever have something like x% increased damage per time chained // we may need to update something about this system, but tests will catch that, probably. // @Fixme(tkap, 06/02/2024): DUPLICATION ALERT WITH ENEMY SECTION // @TODO(tkap, 23/11/2023): Optimize this? Maybe just a x/y check instead of full blown 3D check // @TODO(tkap, 15/06/2023): Not sure about this check. What if we have some debuff that makes enemy explode on death, but the hit that is supposed // to apply the debuff kills the enemy? No debuff will be applied, therefore no explosion will happen. This will? be a problem. Same problem if // we ever have something that cares about dying bleeding enemies. // @TODO(tkap, 18/11/2022): It'd be nice to check this somewhere // assert(enemies->flags[entity].get(e_entity_flag_buffable)); // @TODO(tkap, 31/08/2022): Probably want to cache dmg?? // @TODO(tkap, 20/11/2023): Do we need to check if the tower reference is still valid or does make projectiles check that?? // @Fixme(tkap, 09/02/2024): Should this apply on hit effects? // @TODO(tkap): Don't think I like this system // @Hack(tkap, 27/01/2024): // @TODO(tkap, 10/12/2023): Better way to do this // @TODO(tkap, 30/01/2023): Remove this if we ever add artifacts that can only be used on a certain type, and that type is // not e_gear_type_tower // @TODO(tkap, 06/10/2022): This doesn't take into account tile size // @TODO: I would like this to be something like: // u8 data[sizeof(s_map)]; and use that buffer as the receiver of the ReadFile // @TODO(tkap, 06/08/2022): This is useless for now, because we have no variations // s_tile_draw_data draw_data = map->tile_draw_data[y][x]; // @TODO(tkap, 14/01/2023): This effect is not very cool. Make it better. Also better water with some splash stuff // and transparency would make it cooler // @TODO(tkap, 25/01/2023): We need a 2D version of tiles to display in the UI // @TODO(tkap, 28/10/2022): maybe not? // @Fixme(tkap, 06/01/2024): make sure we have at least 1 point // @TODO(tkap): I don't understand why this is 16 and not 32. Perhaps confusing naming on my part?? // @Fixme(tkap, 20/06/2023): we still need to restore state and all of that shit // @Note(tkap, 20/06/2023): This seems kinda stupid. We probably want to reload the whole game or something? idk // @TODO(tkap): Logging // @TODO(tkap): Handle ALT F4 // @Fixme(tkap, 20/06/2023): fix this? // @TODO(tkap): Is this correct? We probably want to hide the cursor anyway... // @Fixme(tkap, 03/03/2023): This is a disaster. The whole astar system is not generic at all. // @TODO(tkap, 01/11/2022): This means that nodes in both skill trees share UI ids. It is not really intended, // but it can look kind of cool. Maybe we want to leave as is? // @TODO(tkap, 23/11/2022): We probably want to try the thing that I just described above // @Fixme(tkap, 24/11/2022): I'm 50% sure that this is a problem for the item filter because we may reach // the 4096 limit // @Fixme(tkap, 24/11/2022): I'm 50% sure that this is a problem for the item filter because we may reach // the 4096 limit // @TODO(tkap, 29/07/2022): handle this on call site? // @TODO(tkap, 31/07/2022): This whole function is a huge mess // @TODO(tkap, 08/08/2022): // font_size = get_fitting_font_size(text_without_id, font, font_size, layout->size.x - layout->offset.x * 2); // @TODO(tkap, 05/08/2022): // if(optional.flags & e_ui_label_background) // { // constexpr s_v2 padding = v2(24, 8); // s_v2 temp_size = text_size; // pos = ui_get_pos_and_advance_layout(layout, temp_size - v2(0, padding.y)); // temp_size += padding * 2; // s_v2 temp_pos = pos; // temp_pos -= padding; // temp_pos.x += padding.x; // draw_rect_ui(temp_pos - scroll_vec, z, temp_size, BLACK.rgb); // pos.x += padding.x; // } // @TODO(tkap, 30/10/2022): repeat // @Fixme(tkap, 06/03/2024): This needs a change. I expected this function to work with bit indices. // It actually expects things like is_bit_set(foo, 1 << 5) // @Fixme(tkap, 27/01/2024): I feel like we just want to handle all rotation inside draw?? idk // @TODO(tkap, 01/06/2022): Should this be s64?? // @TODO(tkap, 30/01/2023): We probably want to allow this to be used on all item types, but we need to add type-specific implicits // @TODO(tkap, 19/12/2023): // @Fixme(tkap, 25/01/2024): Bad name. We can't just pass in a z coordinate. We need to do some math (that should be done for us in this function) // Check lessons.txt // @TODO(tkap): Add 0 as an invalid difficulty // @TODO(tkap, 11/03/2024): Delete? not sure I like this // @TODO(tkap): I'd like this to have a packet tag, but metaprogram doesn't understand anonymous structs and shit. Maybe not even unions // @TODO(tkap, 15/03/2024): Not set on most things // @TODO(tkap, 04/03/2024): Not set everywhere